From c62427284793171ac17c0c0bead189cc88250ac2 Mon Sep 17 00:00:00 2001 From: Matt Devy Date: Wed, 26 Nov 2025 20:31:54 +0000 Subject: [PATCH 1/9] chore: update APIs for 9.3.0-SNAPSHOT --- .buildkite/pipeline.yml | 2 +- Makefile | 2 +- typedapi/api._.go | 982 +++++++++++++++--- typedapi/asyncsearch/delete/delete.go | 2 +- typedapi/asyncsearch/delete/response.go | 5 +- typedapi/asyncsearch/get/get.go | 6 +- typedapi/asyncsearch/get/response.go | 15 +- typedapi/asyncsearch/status/response.go | 15 +- typedapi/asyncsearch/status/status.go | 2 +- typedapi/asyncsearch/submit/request.go | 4 +- typedapi/asyncsearch/submit/response.go | 15 +- typedapi/asyncsearch/submit/submit.go | 28 +- .../delete_autoscaling_policy.go | 2 +- .../deleteautoscalingpolicy/response.go | 5 +- .../get_autoscaling_capacity.go | 2 +- .../getautoscalingcapacity/response.go | 4 +- .../get_autoscaling_policy.go | 2 +- .../getautoscalingpolicy/response.go | 5 +- .../put_autoscaling_policy.go | 2 +- .../putautoscalingpolicy/request.go | 4 +- .../putautoscalingpolicy/response.go | 5 +- typedapi/capabilities/capabilities.go | 2 +- typedapi/cat/aliases/aliases.go | 45 +- typedapi/cat/aliases/response.go | 4 +- typedapi/cat/allocation/allocation.go | 52 +- typedapi/cat/allocation/response.go | 4 +- .../componenttemplates/component_templates.go | 45 +- typedapi/cat/componenttemplates/response.go | 4 +- typedapi/cat/count/count.go | 63 +- typedapi/cat/count/response.go | 4 +- typedapi/cat/fielddata/fielddata.go | 52 +- typedapi/cat/fielddata/response.go | 4 +- typedapi/cat/health/health.go | 52 +- typedapi/cat/health/response.go | 4 +- typedapi/cat/help/help.go | 2 +- typedapi/cat/help/response.go | 4 +- typedapi/cat/indices/indices.go | 59 +- typedapi/cat/indices/response.go | 4 +- typedapi/cat/master/master.go | 45 +- typedapi/cat/master/response.go | 4 +- typedapi/cat/mldatafeeds/ml_datafeeds.go | 32 +- typedapi/cat/mldatafeeds/response.go | 4 +- .../ml_data_frame_analytics.go | 43 +- typedapi/cat/mldataframeanalytics/response.go | 4 +- typedapi/cat/mljobs/ml_jobs.go | 47 +- typedapi/cat/mljobs/response.go | 4 +- .../cat/mltrainedmodels/ml_trained_models.go | 39 +- typedapi/cat/mltrainedmodels/response.go | 4 +- typedapi/cat/nodeattrs/nodeattrs.go | 45 +- typedapi/cat/nodeattrs/response.go | 4 +- typedapi/cat/nodes/nodes.go | 43 +- typedapi/cat/nodes/response.go | 4 +- typedapi/cat/pendingtasks/pending_tasks.go | 44 +- typedapi/cat/pendingtasks/response.go | 4 +- typedapi/cat/plugins/plugins.go | 45 +- typedapi/cat/plugins/response.go | 4 +- typedapi/cat/recovery/recovery.go | 39 +- typedapi/cat/recovery/response.go | 4 +- typedapi/cat/repositories/repositories.go | 33 +- typedapi/cat/repositories/response.go | 4 +- typedapi/cat/segments/response.go | 4 +- typedapi/cat/segments/segments.go | 96 +- typedapi/cat/shards/response.go | 4 +- typedapi/cat/shards/shards.go | 39 +- typedapi/cat/snapshots/response.go | 4 +- typedapi/cat/snapshots/snapshots.go | 32 +- typedapi/cat/tasks/response.go | 4 +- typedapi/cat/tasks/tasks.go | 52 +- typedapi/cat/templates/response.go | 4 +- typedapi/cat/templates/templates.go | 45 +- typedapi/cat/threadpool/response.go | 4 +- typedapi/cat/threadpool/thread_pool.go | 40 +- typedapi/cat/transforms/response.go | 4 +- typedapi/cat/transforms/transforms.go | 40 +- .../delete_auto_follow_pattern.go | 2 +- .../ccr/deleteautofollowpattern/response.go | 5 +- typedapi/ccr/follow/follow.go | 4 +- typedapi/ccr/follow/request.go | 5 +- typedapi/ccr/follow/response.go | 4 +- typedapi/ccr/followinfo/follow_info.go | 2 +- typedapi/ccr/followinfo/response.go | 4 +- typedapi/ccr/followstats/follow_stats.go | 2 +- typedapi/ccr/followstats/response.go | 5 +- .../ccr/forgetfollower/forget_follower.go | 4 +- typedapi/ccr/forgetfollower/request.go | 4 +- typedapi/ccr/forgetfollower/response.go | 4 +- .../get_auto_follow_pattern.go | 2 +- typedapi/ccr/getautofollowpattern/response.go | 4 +- .../pause_auto_follow_pattern.go | 2 +- .../ccr/pauseautofollowpattern/response.go | 5 +- typedapi/ccr/pausefollow/pause_follow.go | 2 +- typedapi/ccr/pausefollow/response.go | 5 +- .../put_auto_follow_pattern.go | 4 +- typedapi/ccr/putautofollowpattern/request.go | 5 +- typedapi/ccr/putautofollowpattern/response.go | 5 +- .../ccr/resumeautofollowpattern/response.go | 5 +- .../resume_auto_follow_pattern.go | 2 +- typedapi/ccr/resumefollow/request.go | 4 +- typedapi/ccr/resumefollow/response.go | 5 +- typedapi/ccr/resumefollow/resume_follow.go | 4 +- typedapi/ccr/stats/response.go | 5 +- typedapi/ccr/stats/stats.go | 2 +- typedapi/ccr/unfollow/response.go | 5 +- typedapi/ccr/unfollow/unfollow.go | 2 +- .../allocationexplain/allocation_explain.go | 23 +- typedapi/cluster/allocationexplain/request.go | 25 +- .../cluster/allocationexplain/response.go | 4 +- .../delete_component_template.go | 4 +- .../deletecomponenttemplate/response.go | 5 +- .../delete_voting_config_exclusions.go | 4 +- .../exists_component_template.go | 4 +- .../get_component_template.go | 4 +- .../cluster/getcomponenttemplate/response.go | 4 +- typedapi/cluster/getsettings/get_settings.go | 14 +- typedapi/cluster/getsettings/response.go | 5 +- typedapi/cluster/health/health.go | 2 +- typedapi/cluster/health/response.go | 5 +- typedapi/cluster/info/info.go | 4 +- typedapi/cluster/info/response.go | 4 +- .../cluster/pendingtasks/pending_tasks.go | 4 +- typedapi/cluster/pendingtasks/response.go | 4 +- .../post_voting_config_exclusions.go | 4 +- .../put_component_template.go | 4 +- .../cluster/putcomponenttemplate/request.go | 5 +- .../cluster/putcomponenttemplate/response.go | 5 +- typedapi/cluster/putsettings/put_settings.go | 2 +- typedapi/cluster/putsettings/request.go | 5 +- typedapi/cluster/putsettings/response.go | 4 +- typedapi/cluster/remoteinfo/remote_info.go | 2 +- typedapi/cluster/remoteinfo/response.go | 4 +- typedapi/cluster/reroute/request.go | 5 +- typedapi/cluster/reroute/reroute.go | 10 +- typedapi/cluster/reroute/response.go | 4 +- typedapi/cluster/state/response.go | 4 +- typedapi/cluster/state/state.go | 6 +- typedapi/cluster/stats/response.go | 5 +- typedapi/cluster/stats/stats.go | 4 +- typedapi/connector/checkin/check_in.go | 2 +- typedapi/connector/checkin/response.go | 4 +- typedapi/connector/delete/delete.go | 5 +- typedapi/connector/delete/response.go | 5 +- typedapi/connector/get/get.go | 2 +- typedapi/connector/get/response.go | 4 +- typedapi/connector/lastsync/last_sync.go | 2 +- typedapi/connector/lastsync/request.go | 4 +- typedapi/connector/lastsync/response.go | 4 +- typedapi/connector/list/list.go | 4 +- typedapi/connector/list/response.go | 4 +- typedapi/connector/post/post.go | 2 +- typedapi/connector/post/request.go | 4 +- typedapi/connector/post/response.go | 4 +- typedapi/connector/put/put.go | 2 +- typedapi/connector/put/request.go | 4 +- typedapi/connector/put/response.go | 4 +- typedapi/connector/secretdelete/response.go | 34 + .../connector/secretdelete/secret_delete.go | 342 ++++++ typedapi/connector/secretget/response.go | 35 + typedapi/connector/secretget/secret_get.go | 342 ++++++ typedapi/connector/secretpost/request.go | 52 + typedapi/connector/secretpost/response.go | 34 + typedapi/connector/secretpost/secret_post.go | 158 ++- typedapi/connector/secretput/request.go | 52 + typedapi/connector/secretput/response.go | 38 + typedapi/connector/secretput/secret_put.go | 362 +++++++ typedapi/connector/syncjobcancel/response.go | 4 +- .../syncjobcancel/sync_job_cancel.go | 2 +- typedapi/connector/syncjobcheckin/response.go | 4 +- .../syncjobcheckin/sync_job_check_in.go | 4 +- typedapi/connector/syncjobclaim/request.go | 5 +- typedapi/connector/syncjobclaim/response.go | 4 +- .../connector/syncjobclaim/sync_job_claim.go | 4 +- typedapi/connector/syncjobdelete/response.go | 5 +- .../syncjobdelete/sync_job_delete.go | 2 +- typedapi/connector/syncjoberror/request.go | 5 +- typedapi/connector/syncjoberror/response.go | 4 +- .../connector/syncjoberror/sync_job_error.go | 4 +- typedapi/connector/syncjobget/response.go | 4 +- typedapi/connector/syncjobget/sync_job_get.go | 2 +- typedapi/connector/syncjoblist/response.go | 4 +- .../connector/syncjoblist/sync_job_list.go | 4 +- typedapi/connector/syncjobpost/request.go | 5 +- typedapi/connector/syncjobpost/response.go | 4 +- .../connector/syncjobpost/sync_job_post.go | 2 +- .../connector/syncjobupdatestats/request.go | 5 +- .../connector/syncjobupdatestats/response.go | 4 +- .../sync_job_update_stats.go | 4 +- .../updateactivefiltering/response.go | 4 +- .../update_active_filtering.go | 2 +- typedapi/connector/updateapikeyid/request.go | 4 +- typedapi/connector/updateapikeyid/response.go | 4 +- .../updateapikeyid/update_api_key_id.go | 2 +- .../connector/updateconfiguration/request.go | 4 +- .../connector/updateconfiguration/response.go | 4 +- .../update_configuration.go | 2 +- typedapi/connector/updateerror/request.go | 4 +- typedapi/connector/updateerror/response.go | 4 +- .../connector/updateerror/update_error.go | 2 +- typedapi/connector/updatefeatures/request.go | 4 +- typedapi/connector/updatefeatures/response.go | 4 +- .../updatefeatures/update_features.go | 4 +- typedapi/connector/updatefiltering/request.go | 4 +- .../connector/updatefiltering/response.go | 4 +- .../updatefiltering/update_filtering.go | 2 +- .../updatefilteringvalidation/request.go | 4 +- .../updatefilteringvalidation/response.go | 4 +- .../update_filtering_validation.go | 2 +- typedapi/connector/updateindexname/request.go | 4 +- .../connector/updateindexname/response.go | 4 +- .../updateindexname/update_index_name.go | 2 +- typedapi/connector/updatename/request.go | 4 +- typedapi/connector/updatename/response.go | 4 +- typedapi/connector/updatename/update_name.go | 2 +- typedapi/connector/updatenative/request.go | 4 +- typedapi/connector/updatenative/response.go | 4 +- .../connector/updatenative/update_native.go | 2 +- typedapi/connector/updatepipeline/request.go | 4 +- typedapi/connector/updatepipeline/response.go | 4 +- .../updatepipeline/update_pipeline.go | 2 +- .../connector/updatescheduling/request.go | 4 +- .../connector/updatescheduling/response.go | 4 +- .../updatescheduling/update_scheduling.go | 2 +- .../connector/updateservicetype/request.go | 4 +- .../connector/updateservicetype/response.go | 4 +- .../updateservicetype/update_service_type.go | 2 +- typedapi/connector/updatestatus/request.go | 4 +- typedapi/connector/updatestatus/response.go | 4 +- .../connector/updatestatus/update_status.go | 2 +- typedapi/core/bulk/bulk.go | 14 +- typedapi/core/bulk/request.go | 4 +- typedapi/core/bulk/response.go | 5 +- typedapi/core/clearscroll/clear_scroll.go | 4 +- typedapi/core/clearscroll/request.go | 5 +- typedapi/core/clearscroll/response.go | 5 +- .../closepointintime/close_point_in_time.go | 4 +- typedapi/core/closepointintime/request.go | 5 +- typedapi/core/closepointintime/response.go | 5 +- typedapi/core/count/count.go | 28 +- typedapi/core/count/request.go | 5 +- typedapi/core/count/response.go | 4 +- typedapi/core/create/create.go | 6 +- typedapi/core/create/request.go | 4 +- typedapi/core/create/response.go | 9 +- typedapi/core/delete/delete.go | 6 +- typedapi/core/delete/response.go | 9 +- .../core/deletebyquery/delete_by_query.go | 35 +- typedapi/core/deletebyquery/request.go | 71 +- typedapi/core/deletebyquery/response.go | 5 +- .../delete_by_query_rethrottle.go | 2 +- .../core/deletebyqueryrethrottle/response.go | 4 +- typedapi/core/deletescript/delete_script.go | 4 +- typedapi/core/deletescript/response.go | 5 +- typedapi/core/exists/exists.go | 6 +- typedapi/core/existssource/exists_source.go | 6 +- typedapi/core/explain/explain.go | 10 +- typedapi/core/explain/request.go | 5 +- typedapi/core/explain/response.go | 4 +- typedapi/core/fieldcaps/field_caps.go | 29 +- typedapi/core/fieldcaps/request.go | 5 +- typedapi/core/fieldcaps/response.go | 4 +- typedapi/core/get/get.go | 14 +- typedapi/core/get/response.go | 5 +- typedapi/core/getscript/get_script.go | 4 +- typedapi/core/getscript/response.go | 4 +- .../getscriptcontext/get_script_context.go | 2 +- typedapi/core/getscriptcontext/response.go | 4 +- .../get_script_languages.go | 2 +- typedapi/core/getscriptlanguages/response.go | 4 +- typedapi/core/getsource/get_source.go | 6 +- typedapi/core/getsource/response.go | 4 +- typedapi/core/healthreport/health_report.go | 4 +- typedapi/core/healthreport/response.go | 4 +- typedapi/core/index/index.go | 10 +- typedapi/core/index/request.go | 4 +- typedapi/core/index/response.go | 9 +- typedapi/core/info/info.go | 4 +- typedapi/core/info/response.go | 5 +- typedapi/core/knnsearch/knn_search.go | 469 +++++++++ typedapi/core/knnsearch/request.go | 197 ++++ typedapi/core/knnsearch/response.go | 56 + typedapi/core/mget/mget.go | 6 +- typedapi/core/mget/request.go | 5 +- typedapi/core/mget/response.go | 5 +- typedapi/core/msearch/msearch.go | 22 +- typedapi/core/msearch/request.go | 4 +- typedapi/core/msearch/response.go | 4 +- .../core/msearchtemplate/msearch_template.go | 20 +- typedapi/core/msearchtemplate/request.go | 4 +- typedapi/core/msearchtemplate/response.go | 4 +- typedapi/core/mtermvectors/mtermvectors.go | 6 +- typedapi/core/mtermvectors/request.go | 5 +- typedapi/core/mtermvectors/response.go | 4 +- .../openpointintime/open_point_in_time.go | 24 +- typedapi/core/openpointintime/request.go | 5 +- typedapi/core/openpointintime/response.go | 4 +- typedapi/core/ping/ping.go | 4 +- typedapi/core/putscript/put_script.go | 4 +- typedapi/core/putscript/request.go | 5 +- typedapi/core/putscript/response.go | 5 +- typedapi/core/rankeval/rank_eval.go | 7 +- typedapi/core/rankeval/request.go | 5 +- typedapi/core/rankeval/response.go | 5 +- typedapi/core/reindex/reindex.go | 38 +- typedapi/core/reindex/request.go | 6 +- typedapi/core/reindex/response.go | 5 +- .../reindexrethrottle/reindex_rethrottle.go | 2 +- typedapi/core/reindexrethrottle/response.go | 4 +- .../render_search_template.go | 2 +- typedapi/core/rendersearchtemplate/request.go | 4 +- .../core/rendersearchtemplate/response.go | 4 +- .../core/scriptspainlessexecute/request.go | 5 +- .../core/scriptspainlessexecute/response.go | 4 +- .../scripts_painless_execute.go | 2 +- typedapi/core/scroll/request.go | 5 +- typedapi/core/scroll/response.go | 25 +- typedapi/core/scroll/scroll.go | 2 +- typedapi/core/search/request.go | 5 +- typedapi/core/search/response.go | 25 +- typedapi/core/search/search.go | 34 +- typedapi/core/searchmvt/request.go | 5 +- typedapi/core/searchmvt/response.go | 4 +- typedapi/core/searchmvt/search_mvt.go | 20 +- typedapi/core/searchshards/response.go | 4 +- typedapi/core/searchshards/search_shards.go | 6 +- typedapi/core/searchtemplate/request.go | 5 +- typedapi/core/searchtemplate/response.go | 25 +- .../core/searchtemplate/search_template.go | 24 +- typedapi/core/termsenum/request.go | 5 +- typedapi/core/termsenum/response.go | 5 +- typedapi/core/termsenum/terms_enum.go | 2 +- typedapi/core/termvectors/request.go | 37 +- typedapi/core/termvectors/response.go | 4 +- typedapi/core/termvectors/termvectors.go | 10 +- typedapi/core/update/request.go | 5 +- typedapi/core/update/response.go | 11 +- typedapi/core/update/update.go | 6 +- typedapi/core/updatebyquery/request.go | 5 +- typedapi/core/updatebyquery/response.go | 5 +- .../core/updatebyquery/update_by_query.go | 10 +- .../core/updatebyqueryrethrottle/response.go | 4 +- .../update_by_query_rethrottle.go | 2 +- .../delete_dangling_index.go | 4 +- .../deletedanglingindex/response.go | 5 +- .../import_dangling_index.go | 2 +- .../importdanglingindex/response.go | 5 +- .../list_dangling_indices.go | 2 +- .../listdanglingindices/response.go | 4 +- typedapi/enrich/deletepolicy/delete_policy.go | 4 +- typedapi/enrich/deletepolicy/response.go | 5 +- .../enrich/executepolicy/execute_policy.go | 4 +- typedapi/enrich/executepolicy/response.go | 4 +- typedapi/enrich/getpolicy/get_policy.go | 4 +- typedapi/enrich/getpolicy/response.go | 4 +- typedapi/enrich/putpolicy/put_policy.go | 4 +- typedapi/enrich/putpolicy/request.go | 5 +- typedapi/enrich/putpolicy/response.go | 5 +- typedapi/enrich/stats/response.go | 5 +- typedapi/enrich/stats/stats.go | 4 +- typedapi/eql/delete/delete.go | 4 +- typedapi/eql/delete/response.go | 5 +- typedapi/eql/get/get.go | 4 +- typedapi/eql/get/response.go | 5 +- typedapi/eql/getstatus/get_status.go | 4 +- typedapi/eql/getstatus/response.go | 5 +- typedapi/eql/search/request.go | 7 +- typedapi/eql/search/response.go | 5 +- typedapi/eql/search/search.go | 26 +- typedapi/esdsl/access.go | 2 +- typedapi/esdsl/acknowledgestate.go | 2 +- typedapi/esdsl/actionstatus.go | 2 +- typedapi/esdsl/activationstate.go | 2 +- typedapi/esdsl/adaptiveallocations.go | 2 +- typedapi/esdsl/adaptiveallocationssettings.go | 2 +- typedapi/esdsl/addaction.go | 14 +- typedapi/esdsl/adjacencymatrixaggregation.go | 2 +- .../esdsl/aggregatemetricdoubleproperty.go | 2 +- typedapi/esdsl/aggregateorder.go | 2 +- typedapi/esdsl/aggregateoutput.go | 2 +- typedapi/esdsl/aggregationrange.go | 2 +- typedapi/esdsl/aggregations.go | 23 +- typedapi/esdsl/ai21servicesettings.go | 62 ++ typedapi/esdsl/alias.go | 14 +- typedapi/esdsl/aliasdefinition.go | 2 +- typedapi/esdsl/alibabacloudservicesettings.go | 2 +- typedapi/esdsl/alibabacloudtasksettings.go | 2 +- typedapi/esdsl/allfield.go | 2 +- typedapi/esdsl/allocateaction.go | 2 +- typedapi/esdsl/alwayscondition.go | 2 +- .../esdsl/amazonbedrockservicesettings.go | 2 +- typedapi/esdsl/amazonbedrocktasksettings.go | 2 +- .../esdsl/amazonsagemakerservicesettings.go | 2 +- typedapi/esdsl/amazonsagemakertasksettings.go | 2 +- typedapi/esdsl/analysisconfig.go | 2 +- typedapi/esdsl/analysislimits.go | 2 +- typedapi/esdsl/analysismemorylimit.go | 2 +- typedapi/esdsl/analyzer.go | 2 +- typedapi/esdsl/anthropicservicesettings.go | 2 +- typedapi/esdsl/anthropictasksettings.go | 2 +- typedapi/esdsl/apikeyaggregationcontainer.go | 2 +- typedapi/esdsl/apikeyfiltersaggregation.go | 2 +- typedapi/esdsl/apikeyquerycontainer.go | 2 +- typedapi/esdsl/apostrophetokenfilter.go | 2 +- typedapi/esdsl/appendprocessor.go | 9 +- .../esdsl/applicationglobaluserprivileges.go | 2 +- typedapi/esdsl/applicationprivileges.go | 2 +- typedapi/esdsl/applicationprivilegescheck.go | 2 +- typedapi/esdsl/arabicanalyzer.go | 2 +- .../esdsl/arabicnormalizationtokenfilter.go | 2 +- typedapi/esdsl/arabicstemtokenfilter.go | 2 +- typedapi/esdsl/armeniananalyzer.go | 2 +- typedapi/esdsl/arraycomparecondition.go | 2 +- typedapi/esdsl/arraycompareopparams.go | 2 +- typedapi/esdsl/asciifoldingtokenfilter.go | 2 +- typedapi/esdsl/attachmentprocessor.go | 2 +- .../esdsl/autodatehistogramaggregation.go | 2 +- typedapi/esdsl/autoscalingpolicy.go | 2 +- typedapi/esdsl/averageaggregation.go | 2 +- typedapi/esdsl/averagebucketaggregation.go | 2 +- .../esdsl/azureaistudioservicesettings.go | 2 +- typedapi/esdsl/azureaistudiotasksettings.go | 16 +- typedapi/esdsl/azureopenaiservicesettings.go | 2 +- typedapi/esdsl/azureopenaitasksettings.go | 2 +- typedapi/esdsl/azurerepository.go | 2 +- typedapi/esdsl/azurerepositorysettings.go | 2 +- typedapi/esdsl/basqueanalyzer.go | 2 +- typedapi/esdsl/bengalianalyzer.go | 2 +- .../esdsl/bengalinormalizationtokenfilter.go | 2 +- typedapi/esdsl/binaryproperty.go | 2 +- typedapi/esdsl/booleanproperty.go | 2 +- typedapi/esdsl/boolquery.go | 2 +- typedapi/esdsl/boostingquery.go | 2 +- typedapi/esdsl/boxplotaggregation.go | 2 +- typedapi/esdsl/braziliananalyzer.go | 2 +- typedapi/esdsl/brazilianstemtokenfilter.go | 2 +- .../esdsl/bucketcorrelationaggregation.go | 2 +- typedapi/esdsl/bucketcorrelationfunction.go | 2 +- ...cketcorrelationfunctioncountcorrelation.go | 2 +- ...lationfunctioncountcorrelationindicator.go | 2 +- typedapi/esdsl/bucketksaggregation.go | 2 +- typedapi/esdsl/bucketsapikeyquerycontainer.go | 2 +- typedapi/esdsl/bucketscriptaggregation.go | 2 +- typedapi/esdsl/bucketselectoraggregation.go | 2 +- typedapi/esdsl/bucketsortaggregation.go | 2 +- typedapi/esdsl/bucketspath.go | 2 +- typedapi/esdsl/bucketsquery.go | 2 +- typedapi/esdsl/bulgariananalyzer.go | 2 +- typedapi/esdsl/bytenumberproperty.go | 2 +- typedapi/esdsl/bytesize.go | 2 +- typedapi/esdsl/bytesprocessor.go | 2 +- typedapi/esdsl/cachequeries.go | 2 +- typedapi/esdsl/calendarevent.go | 2 +- typedapi/esdsl/cardinalityaggregation.go | 2 +- typedapi/esdsl/cartesianboundsaggregation.go | 68 ++ .../esdsl/cartesiancentroidaggregation.go | 68 ++ typedapi/esdsl/catalananalyzer.go | 2 +- typedapi/esdsl/categorizationanalyzer.go | 2 +- .../esdsl/categorizationanalyzerdefinition.go | 2 +- typedapi/esdsl/categorizetextaggregation.go | 2 +- typedapi/esdsl/categorizetextanalyzer.go | 2 +- typedapi/esdsl/chaininput.go | 2 +- typedapi/esdsl/changepointaggregation.go | 76 ++ typedapi/esdsl/charfilter.go | 2 +- typedapi/esdsl/charfilterdefinition.go | 2 +- typedapi/esdsl/chargrouptokenizer.go | 2 +- typedapi/esdsl/childrenaggregation.go | 2 +- typedapi/esdsl/chineseanalyzer.go | 2 +- typedapi/esdsl/chisquareheuristic.go | 2 +- typedapi/esdsl/chunkingconfig.go | 2 +- typedapi/esdsl/chunkingsettings.go | 19 +- typedapi/esdsl/chunkrescorer.go | 51 + .../esdsl/chunkrescorerchunkingsettings.go | 86 ++ typedapi/esdsl/circleprocessor.go | 2 +- typedapi/esdsl/cjkanalyzer.go | 2 +- typedapi/esdsl/cjkbigramtokenfilter.go | 2 +- typedapi/esdsl/cjkwidthtokenfilter.go | 2 +- typedapi/esdsl/classictokenfilter.go | 2 +- typedapi/esdsl/classictokenizer.go | 2 +- .../esdsl/classificationinferenceoptions.go | 2 +- typedapi/esdsl/cohereservicesettings.go | 8 +- typedapi/esdsl/coheretasksettings.go | 12 +- typedapi/esdsl/combinedfieldsquery.go | 2 +- typedapi/esdsl/command.go | 2 +- .../esdsl/commandallocateprimaryaction.go | 2 +- .../esdsl/commandallocatereplicaaction.go | 2 +- typedapi/esdsl/commandcancelaction.go | 2 +- typedapi/esdsl/commandmoveaction.go | 2 +- typedapi/esdsl/commongramstokenfilter.go | 2 +- typedapi/esdsl/commontermsquery.go | 2 +- typedapi/esdsl/communityidprocessor.go | 2 +- typedapi/esdsl/completioncontext.go | 2 +- typedapi/esdsl/completionproperty.go | 2 +- typedapi/esdsl/completionsuggester.go | 32 +- typedapi/esdsl/completiontool.go | 2 +- typedapi/esdsl/completiontoolchoice.go | 2 +- .../esdsl/completiontoolchoicefunction.go | 2 +- typedapi/esdsl/completiontoolfunction.go | 2 +- typedapi/esdsl/completiontooltype.go | 2 +- typedapi/esdsl/componenttemplatenode.go | 30 +- typedapi/esdsl/componenttemplatesummary.go | 2 +- typedapi/esdsl/compositeaggregatekey.go | 2 +- typedapi/esdsl/compositeaggregation.go | 2 +- typedapi/esdsl/compositeaggregationsource.go | 4 +- .../compositedatehistogramaggregation.go | 11 +- .../esdsl/compositegeotilegridaggregation.go | 11 +- .../esdsl/compositehistogramaggregation.go | 11 +- typedapi/esdsl/compositesubfield.go | 2 +- typedapi/esdsl/compositetermsaggregation.go | 11 +- typedapi/esdsl/conditiontokenfilter.go | 2 +- typedapi/esdsl/configuration.go | 2 +- typedapi/esdsl/connectorconfigproperties.go | 2 +- typedapi/esdsl/connectorconfiguration.go | 2 +- typedapi/esdsl/connectorfeatures.go | 2 +- typedapi/esdsl/connectorscheduling.go | 2 +- typedapi/esdsl/constantkeywordproperty.go | 2 +- typedapi/esdsl/constantscorequery.go | 2 +- typedapi/esdsl/contentobject.go | 2 +- typedapi/esdsl/context.go | 2 +- typedapi/esdsl/contextualaiservicesettings.go | 64 ++ typedapi/esdsl/contextualaitasksettings.go | 58 ++ typedapi/esdsl/convertprocessor.go | 2 +- typedapi/esdsl/coordsgeobounds.go | 2 +- typedapi/esdsl/countedkeywordproperty.go | 2 +- typedapi/esdsl/createfrom.go | 2 +- typedapi/esdsl/createoperation.go | 6 +- typedapi/esdsl/csvprocessor.go | 2 +- .../esdsl/cumulativecardinalityaggregation.go | 2 +- typedapi/esdsl/cumulativesumaggregation.go | 2 +- typedapi/esdsl/customanalyzer.go | 2 +- .../esdsl/customcategorizetextanalyzer.go | 2 +- typedapi/esdsl/customnormalizer.go | 2 +- typedapi/esdsl/customrequestparams.go | 2 +- typedapi/esdsl/customresponseparams.go | 2 +- typedapi/esdsl/customservicesettings.go | 9 +- typedapi/esdsl/customtasksettings.go | 2 +- typedapi/esdsl/czechanalyzer.go | 2 +- typedapi/esdsl/czechstemtokenfilter.go | 2 +- typedapi/esdsl/dailyschedule.go | 2 +- typedapi/esdsl/danishanalyzer.go | 2 +- typedapi/esdsl/databaseconfiguration.go | 20 +- typedapi/esdsl/datadescription.go | 2 +- typedapi/esdsl/dataemailattachment.go | 2 +- typedapi/esdsl/datafeedconfig.go | 2 +- .../esdsl/dataframeanalysisanalyzedfields.go | 2 +- .../esdsl/dataframeanalysisclassification.go | 2 +- typedapi/esdsl/dataframeanalysiscontainer.go | 20 +- .../dataframeanalysisfeatureprocessor.go | 20 +- ...alysisfeatureprocessorfrequencyencoding.go | 2 +- ...meanalysisfeatureprocessormultiencoding.go | 2 +- ...meanalysisfeatureprocessorngramencoding.go | 2 +- ...eanalysisfeatureprocessoronehotencoding.go | 2 +- ...lysisfeatureprocessortargetmeanencoding.go | 2 +- .../dataframeanalysisoutlierdetection.go | 2 +- typedapi/esdsl/dataframeanalysisregression.go | 2 +- .../esdsl/dataframeanalyticsdestination.go | 2 +- typedapi/esdsl/dataframeanalyticssource.go | 2 +- .../dataframeevaluationclassification.go | 2 +- ...ataframeevaluationclassificationmetrics.go | 2 +- ...meevaluationclassificationmetricsaucroc.go | 2 +- .../esdsl/dataframeevaluationcontainer.go | 20 +- .../dataframeevaluationoutlierdetection.go | 2 +- ...aframeevaluationoutlierdetectionmetrics.go | 2 +- .../esdsl/dataframeevaluationregression.go | 2 +- .../dataframeevaluationregressionmetrics.go | 2 +- ...taframeevaluationregressionmetricshuber.go | 2 +- ...ataframeevaluationregressionmetricsmsle.go | 2 +- typedapi/esdsl/dataframepreviewconfig.go | 2 +- typedapi/esdsl/datastreamfailurestore.go | 2 +- .../esdsl/datastreamfailurestoretemplate.go | 2 +- typedapi/esdsl/datastreamlifecycle.go | 2 +- .../esdsl/datastreamlifecycledownsampling.go | 2 +- .../datastreamlifecyclerolloverconditions.go | 2 +- .../esdsl/datastreamlifecyclewithrollover.go | 2 +- typedapi/esdsl/datastreamoptionstemplate.go | 2 +- typedapi/esdsl/datastreamtimestamp.go | 2 +- typedapi/esdsl/datastreamvisibility.go | 2 +- typedapi/esdsl/datedecayfunction.go | 2 +- typedapi/esdsl/datedistancefeaturequery.go | 2 +- typedapi/esdsl/datehistogramaggregation.go | 2 +- typedapi/esdsl/datehistogramgrouping.go | 2 +- typedapi/esdsl/dateindexnameprocessor.go | 2 +- typedapi/esdsl/datenanosproperty.go | 2 +- typedapi/esdsl/dateprocessor.go | 2 +- typedapi/esdsl/dateproperty.go | 2 +- typedapi/esdsl/daterangeaggregation.go | 2 +- typedapi/esdsl/daterangeexpression.go | 2 +- typedapi/esdsl/daterangeproperty.go | 2 +- typedapi/esdsl/daterangequery.go | 2 +- typedapi/esdsl/datetime.go | 2 +- typedapi/esdsl/decayfunction.go | 2 +- typedapi/esdsl/decayplacement.go | 2 +- .../esdsl/decayplacementdatemathduration.go | 2 +- typedapi/esdsl/decayplacementdoubledouble.go | 2 +- .../decayplacementgeolocationdistance.go | 2 +- typedapi/esdsl/decimaldigittokenfilter.go | 2 +- typedapi/esdsl/deepseekservicesettings.go | 2 +- typedapi/esdsl/definition.go | 2 +- typedapi/esdsl/delayeddatacheckconfig.go | 2 +- typedapi/esdsl/deleteaction.go | 2 +- typedapi/esdsl/deleteoperation.go | 6 +- typedapi/esdsl/delimitedpayloadtokenfilter.go | 2 +- typedapi/esdsl/densevectorindexoptions.go | 9 +- .../densevectorindexoptionsrescorevector.go | 2 +- typedapi/esdsl/densevectorproperty.go | 2 +- typedapi/esdsl/dependency.go | 2 +- typedapi/esdsl/derivativeaggregation.go | 2 +- typedapi/esdsl/detectionrule.go | 2 +- typedapi/esdsl/detector.go | 2 +- typedapi/esdsl/detectorupdate.go | 2 +- .../dictionarydecompoundertokenfilter.go | 2 +- typedapi/esdsl/directgenerator.go | 2 +- typedapi/esdsl/dismaxquery.go | 2 +- typedapi/esdsl/dissectprocessor.go | 2 +- typedapi/esdsl/distancefeaturequery.go | 2 +- .../esdsl/diversifiedsampleraggregation.go | 2 +- typedapi/esdsl/document.go | 2 +- typedapi/esdsl/documentrating.go | 2 +- typedapi/esdsl/dotexpanderprocessor.go | 2 +- typedapi/esdsl/doublenumberproperty.go | 2 +- typedapi/esdsl/doublerangeproperty.go | 2 +- typedapi/esdsl/downsampleaction.go | 2 +- typedapi/esdsl/downsampleconfig.go | 13 +- typedapi/esdsl/downsamplinground.go | 14 +- typedapi/esdsl/dropprocessor.go | 2 +- typedapi/esdsl/duration.go | 2 +- typedapi/esdsl/durationvalueunitmillis.go | 2 +- typedapi/esdsl/dutchanalyzer.go | 2 +- typedapi/esdsl/dutchstemtokenfilter.go | 2 +- typedapi/esdsl/dynamicproperty.go | 2 +- typedapi/esdsl/dynamictemplate.go | 16 +- typedapi/esdsl/edgengramtokenfilter.go | 2 +- typedapi/esdsl/edgengramtokenizer.go | 2 +- .../esdsl/elasticsearchservicesettings.go | 16 +- typedapi/esdsl/elasticsearchtasksettings.go | 2 +- typedapi/esdsl/elisiontokenfilter.go | 2 +- typedapi/esdsl/elserservicesettings.go | 2 +- typedapi/esdsl/emailaction.go | 2 +- typedapi/esdsl/emailattachmentcontainer.go | 20 +- typedapi/esdsl/emailbody.go | 2 +- typedapi/esdsl/emptyobject.go | 2 +- typedapi/esdsl/englishanalyzer.go | 2 +- typedapi/esdsl/enrichpolicy.go | 2 +- typedapi/esdsl/enrichprocessor.go | 2 +- typedapi/esdsl/ensemble.go | 2 +- typedapi/esdsl/epochtimeunitmillis.go | 2 +- typedapi/esdsl/epochtimeunitseconds.go | 2 +- typedapi/esdsl/estoniananalyzer.go | 2 +- typedapi/esdsl/ewmamodelsettings.go | 2 +- .../esdsl/ewmamovingaverageaggregation.go | 2 +- typedapi/esdsl/executionstate.go | 2 +- typedapi/esdsl/existsquery.go | 2 +- typedapi/esdsl/expandwildcards.go | 2 +- typedapi/esdsl/explorecontrols.go | 2 +- typedapi/esdsl/extendedboundsdouble.go | 2 +- typedapi/esdsl/extendedboundsfielddatemath.go | 2 +- typedapi/esdsl/extendedstatsaggregation.go | 2 +- .../esdsl/extendedstatsbucketaggregation.go | 2 +- typedapi/esdsl/failprocessor.go | 2 +- typedapi/esdsl/failurestorelifecycle.go | 2 +- .../esdsl/failurestorelifecycletemplate.go | 2 +- typedapi/esdsl/featureenabled.go | 2 +- typedapi/esdsl/featureextractor.go | 2 +- typedapi/esdsl/fieldaliasproperty.go | 2 +- typedapi/esdsl/fieldandformat.go | 2 +- typedapi/esdsl/fieldcollapse.go | 2 +- typedapi/esdsl/fielddatafrequencyfilter.go | 2 +- typedapi/esdsl/fielddatemath.go | 2 +- typedapi/esdsl/fieldlookup.go | 6 +- typedapi/esdsl/fieldmetric.go | 2 +- typedapi/esdsl/fieldnamesfield.go | 2 +- typedapi/esdsl/fields.go | 2 +- typedapi/esdsl/fieldsecurity.go | 2 +- typedapi/esdsl/fieldsort.go | 2 +- typedapi/esdsl/fieldsuggester.go | 2 +- typedapi/esdsl/fieldvalue.go | 2 +- .../esdsl/fieldvaluefactorscorefunction.go | 2 +- typedapi/esdsl/fillmaskinferenceoptions.go | 12 +- .../esdsl/fillmaskinferenceupdateoptions.go | 2 +- typedapi/esdsl/filteringadvancedsnippet.go | 2 +- typedapi/esdsl/filteringconfig.go | 2 +- typedapi/esdsl/filteringrule.go | 2 +- typedapi/esdsl/filteringrules.go | 2 +- typedapi/esdsl/filteringrulesvalidation.go | 2 +- typedapi/esdsl/filteringvalidation.go | 2 +- typedapi/esdsl/filterref.go | 2 +- typedapi/esdsl/filtersaggregation.go | 2 +- typedapi/esdsl/fingerprintanalyzer.go | 2 +- typedapi/esdsl/fingerprintprocessor.go | 2 +- typedapi/esdsl/fingerprinttokenfilter.go | 2 +- typedapi/esdsl/finnishanalyzer.go | 2 +- typedapi/esdsl/flattenedproperty.go | 2 +- typedapi/esdsl/flattengraphtokenfilter.go | 2 +- typedapi/esdsl/floatnumberproperty.go | 2 +- typedapi/esdsl/floatrangeproperty.go | 2 +- typedapi/esdsl/forcemergeaction.go | 2 +- typedapi/esdsl/foreachprocessor.go | 2 +- typedapi/esdsl/frenchanalyzer.go | 2 +- typedapi/esdsl/frenchstemtokenfilter.go | 2 +- .../esdsl/frequencyencodingpreprocessor.go | 2 +- typedapi/esdsl/frequentitemsetsaggregation.go | 2 +- typedapi/esdsl/frequentitemsetsfield.go | 2 +- typedapi/esdsl/functionscore.go | 20 +- typedapi/esdsl/functionscorequery.go | 2 +- typedapi/esdsl/fuzziness.go | 2 +- typedapi/esdsl/fuzzyquery.go | 2 +- typedapi/esdsl/galiciananalyzer.go | 2 +- typedapi/esdsl/gcsrepository.go | 2 +- typedapi/esdsl/gcsrepositorysettings.go | 2 +- typedapi/esdsl/geoboundingboxquery.go | 2 +- typedapi/esdsl/geobounds.go | 2 +- typedapi/esdsl/geoboundsaggregation.go | 2 +- typedapi/esdsl/geocentroidaggregation.go | 2 +- typedapi/esdsl/geodecayfunction.go | 2 +- typedapi/esdsl/geodistanceaggregation.go | 2 +- typedapi/esdsl/geodistancefeaturequery.go | 2 +- typedapi/esdsl/geodistancequery.go | 2 +- typedapi/esdsl/geodistancesort.go | 2 +- typedapi/esdsl/geogridprocessor.go | 2 +- typedapi/esdsl/geogridquery.go | 20 +- typedapi/esdsl/geohashgridaggregation.go | 2 +- typedapi/esdsl/geohashlocation.go | 2 +- typedapi/esdsl/geohashprecision.go | 2 +- typedapi/esdsl/geohexgridaggregation.go | 2 +- typedapi/esdsl/geoipprocessor.go | 2 +- typedapi/esdsl/geolineaggregation.go | 8 +- typedapi/esdsl/geolinepoint.go | 2 +- typedapi/esdsl/geolinesort.go | 2 +- typedapi/esdsl/geolocation.go | 2 +- typedapi/esdsl/geopointproperty.go | 2 +- typedapi/esdsl/geopolygonpoints.go | 2 +- typedapi/esdsl/geopolygonquery.go | 2 +- typedapi/esdsl/geoshapefieldquery.go | 2 +- typedapi/esdsl/geoshapeproperty.go | 2 +- typedapi/esdsl/geoshapequery.go | 2 +- typedapi/esdsl/geotilegridaggregation.go | 2 +- typedapi/esdsl/germananalyzer.go | 2 +- .../esdsl/germannormalizationtokenfilter.go | 2 +- typedapi/esdsl/germanstemtokenfilter.go | 2 +- typedapi/esdsl/globalaggregation.go | 2 +- typedapi/esdsl/globalprivilege.go | 2 +- .../esdsl/googleaistudioservicesettings.go | 2 +- .../googlenormalizeddistanceheuristic.go | 2 +- .../esdsl/googlevertexaiservicesettings.go | 46 +- typedapi/esdsl/googlevertexaitasksettings.go | 16 +- typedapi/esdsl/grantapikey.go | 2 +- typedapi/esdsl/greaterthanvalidation.go | 2 +- typedapi/esdsl/greekanalyzer.go | 2 +- typedapi/esdsl/grokprocessor.go | 2 +- typedapi/esdsl/groupings.go | 2 +- typedapi/esdsl/gsubprocessor.go | 2 +- typedapi/esdsl/halffloatnumberproperty.go | 2 +- typedapi/esdsl/haschildquery.go | 2 +- typedapi/esdsl/hasparentquery.go | 2 +- typedapi/esdsl/hdrmethod.go | 2 +- typedapi/esdsl/highlight.go | 132 +-- typedapi/esdsl/highlightfield.go | 122 +-- typedapi/esdsl/hindianalyzer.go | 2 +- .../esdsl/hindinormalizationtokenfilter.go | 2 +- typedapi/esdsl/hint.go | 2 +- typedapi/esdsl/histogramaggregation.go | 5 +- typedapi/esdsl/histogramgrouping.go | 2 +- typedapi/esdsl/histogramproperty.go | 2 +- typedapi/esdsl/holtlinearmodelsettings.go | 2 +- .../esdsl/holtmovingaverageaggregation.go | 2 +- typedapi/esdsl/holtwintersmodelsettings.go | 2 +- .../holtwintersmovingaverageaggregation.go | 2 +- typedapi/esdsl/hop.go | 2 +- typedapi/esdsl/hourandminute.go | 2 +- typedapi/esdsl/hourlyschedule.go | 2 +- typedapi/esdsl/htmlstripcharfilter.go | 2 +- typedapi/esdsl/htmlstripprocessor.go | 2 +- typedapi/esdsl/httpemailattachment.go | 2 +- typedapi/esdsl/httpheaders.go | 2 +- typedapi/esdsl/httpinput.go | 2 +- typedapi/esdsl/httpinputauthentication.go | 2 +- .../esdsl/httpinputbasicauthentication.go | 2 +- typedapi/esdsl/httpinputproxy.go | 2 +- typedapi/esdsl/httpinputrequestdefinition.go | 2 +- typedapi/esdsl/huggingfaceservicesettings.go | 2 +- typedapi/esdsl/huggingfacetasksettings.go | 2 +- typedapi/esdsl/hungariananalyzer.go | 2 +- typedapi/esdsl/hunspelltokenfilter.go | 2 +- .../hyphenationdecompoundertokenfilter.go | 2 +- typedapi/esdsl/icuanalyzer.go | 2 +- typedapi/esdsl/icucollationproperty.go | 2 +- typedapi/esdsl/icucollationtokenfilter.go | 2 +- typedapi/esdsl/icufoldingtokenfilter.go | 2 +- typedapi/esdsl/icunormalizationcharfilter.go | 2 +- typedapi/esdsl/icunormalizationtokenfilter.go | 2 +- typedapi/esdsl/icutokenizer.go | 2 +- typedapi/esdsl/icutransformtokenfilter.go | 2 +- typedapi/esdsl/ids.go | 2 +- typedapi/esdsl/idsquery.go | 6 +- typedapi/esdsl/ilmactions.go | 2 +- typedapi/esdsl/ilmpolicy.go | 2 +- typedapi/esdsl/includedinvalidation.go | 2 +- typedapi/esdsl/indexaction.go | 2 +- typedapi/esdsl/indexanddatastreamaction.go | 2 +- typedapi/esdsl/indexfield.go | 2 +- typedapi/esdsl/indexingslowlogsettings.go | 2 +- typedapi/esdsl/indexingslowlogtresholds.go | 2 +- typedapi/esdsl/indexoperation.go | 6 +- typedapi/esdsl/indexprivilegescheck.go | 2 +- typedapi/esdsl/indexrouting.go | 2 +- typedapi/esdsl/indexroutingallocation.go | 2 +- typedapi/esdsl/indexroutingallocationdisk.go | 2 +- .../esdsl/indexroutingallocationinclude.go | 2 +- .../indexroutingallocationinitialrecovery.go | 2 +- typedapi/esdsl/indexroutingrebalance.go | 2 +- typedapi/esdsl/indexsegmentsort.go | 2 +- typedapi/esdsl/indexsettingblocks.go | 2 +- typedapi/esdsl/indexsettings.go | 2 +- typedapi/esdsl/indexsettingsanalysis.go | 2 +- typedapi/esdsl/indexsettingslifecycle.go | 2 +- typedapi/esdsl/indexsettingslifecyclestep.go | 2 +- typedapi/esdsl/indexsettingstimeseries.go | 2 +- typedapi/esdsl/indexstate.go | 2 +- typedapi/esdsl/indextemplate.go | 30 +- .../indextemplatedatastreamconfiguration.go | 2 +- typedapi/esdsl/indextemplatemapping.go | 2 +- typedapi/esdsl/indextemplatesummary.go | 2 +- typedapi/esdsl/indexversioning.go | 2 +- typedapi/esdsl/indices.go | 2 +- typedapi/esdsl/indicesaction.go | 20 +- typedapi/esdsl/indicesindexingpressure.go | 2 +- .../esdsl/indicesindexingpressurememory.go | 2 +- typedapi/esdsl/indicesmodifyaction.go | 20 +- typedapi/esdsl/indicesoptions.go | 2 +- typedapi/esdsl/indicesprivileges.go | 2 +- typedapi/esdsl/indicesprivilegesquery.go | 2 +- .../esdsl/indicnormalizationtokenfilter.go | 2 +- typedapi/esdsl/indonesiananalyzer.go | 2 +- typedapi/esdsl/inferenceaggregation.go | 2 +- typedapi/esdsl/inferencechunkingsettings.go | 19 +- typedapi/esdsl/inferenceconfig.go | 20 +- .../esdsl/inferenceconfigclassification.go | 2 +- typedapi/esdsl/inferenceconfigcontainer.go | 20 +- .../esdsl/inferenceconfigcreatecontainer.go | 20 +- typedapi/esdsl/inferenceconfigregression.go | 2 +- .../esdsl/inferenceconfigupdatecontainer.go | 20 +- typedapi/esdsl/inferenceendpoint.go | 2 +- typedapi/esdsl/inferenceprocessor.go | 2 +- typedapi/esdsl/ingestpipeline.go | 41 +- typedapi/esdsl/ingestpipelineparams.go | 2 +- typedapi/esdsl/innerhits.go | 2 +- typedapi/esdsl/innerretriever.go | 2 +- typedapi/esdsl/input.go | 2 +- typedapi/esdsl/inputconfig.go | 2 +- typedapi/esdsl/integernumberproperty.go | 2 +- typedapi/esdsl/integerrangeproperty.go | 2 +- typedapi/esdsl/intervals.go | 20 +- typedapi/esdsl/intervalsallof.go | 2 +- typedapi/esdsl/intervalsanyof.go | 2 +- typedapi/esdsl/intervalsfilter.go | 20 +- typedapi/esdsl/intervalsfuzzy.go | 2 +- typedapi/esdsl/intervalsmatch.go | 2 +- typedapi/esdsl/intervalsprefix.go | 2 +- typedapi/esdsl/intervalsquery.go | 20 +- typedapi/esdsl/intervalsrange.go | 2 +- typedapi/esdsl/intervalsregexp.go | 2 +- typedapi/esdsl/intervalswildcard.go | 2 +- typedapi/esdsl/ipinfo.go | 2 +- typedapi/esdsl/iplocationprocessor.go | 2 +- typedapi/esdsl/ipprefixaggregation.go | 2 +- typedapi/esdsl/ipproperty.go | 2 +- typedapi/esdsl/iprangeaggregation.go | 2 +- typedapi/esdsl/iprangeaggregationrange.go | 2 +- typedapi/esdsl/iprangeproperty.go | 2 +- typedapi/esdsl/irishanalyzer.go | 2 +- typedapi/esdsl/italiananalyzer.go | 2 +- typedapi/esdsl/jastoptokenfilter.go | 2 +- typedapi/esdsl/jinaaiservicesettings.go | 2 +- typedapi/esdsl/jinaaitasksettings.go | 2 +- typedapi/esdsl/jobconfig.go | 2 +- typedapi/esdsl/joinprocessor.go | 2 +- typedapi/esdsl/joinproperty.go | 2 +- typedapi/esdsl/jsonprocessor.go | 2 +- typedapi/esdsl/keeptypestokenfilter.go | 2 +- typedapi/esdsl/keepwordstokenfilter.go | 2 +- typedapi/esdsl/keyvalueprocessor.go | 2 +- typedapi/esdsl/keywordanalyzer.go | 2 +- typedapi/esdsl/keywordmarkertokenfilter.go | 2 +- typedapi/esdsl/keywordproperty.go | 2 +- typedapi/esdsl/keywordrepeattokenfilter.go | 2 +- typedapi/esdsl/keywordtokenizer.go | 2 +- typedapi/esdsl/knnquery.go | 37 +- typedapi/esdsl/knnretriever.go | 51 +- typedapi/esdsl/knnsearch.go | 9 +- typedapi/esdsl/knnsearchquery.go | 71 ++ typedapi/esdsl/kstemtokenfilter.go | 2 +- typedapi/esdsl/kuromojianalyzer.go | 12 +- .../esdsl/kuromojiiterationmarkcharfilter.go | 2 +- .../esdsl/kuromojipartofspeechtokenfilter.go | 2 +- .../esdsl/kuromojireadingformtokenfilter.go | 2 +- typedapi/esdsl/kuromojistemmertokenfilter.go | 2 +- typedapi/esdsl/kuromojitokenizer.go | 2 +- typedapi/esdsl/laplacesmoothingmodel.go | 2 +- typedapi/esdsl/latest.go | 2 +- typedapi/esdsl/latlongeolocation.go | 2 +- typedapi/esdsl/latviananalyzer.go | 2 +- typedapi/esdsl/learningtorank.go | 2 +- typedapi/esdsl/learningtorankconfig.go | 2 +- typedapi/esdsl/lengthtokenfilter.go | 2 +- typedapi/esdsl/lessthanvalidation.go | 2 +- typedapi/esdsl/lettertokenizer.go | 2 +- typedapi/esdsl/license.go | 2 +- typedapi/esdsl/like.go | 2 +- typedapi/esdsl/likedocument.go | 6 +- typedapi/esdsl/limittokencounttokenfilter.go | 2 +- .../linearinterpolationsmoothingmodel.go | 2 +- .../esdsl/linearmovingaverageaggregation.go | 2 +- typedapi/esdsl/linearretriever.go | 44 +- typedapi/esdsl/listtypevalidation.go | 2 +- typedapi/esdsl/lithuaniananalyzer.go | 2 +- typedapi/esdsl/llamaservicesettings.go | 80 ++ typedapi/esdsl/loggingaction.go | 2 +- typedapi/esdsl/logstashpipeline.go | 2 +- typedapi/esdsl/longnumberproperty.go | 2 +- typedapi/esdsl/longrangeproperty.go | 2 +- typedapi/esdsl/lowercasenormalizer.go | 2 +- typedapi/esdsl/lowercaseprocessor.go | 2 +- typedapi/esdsl/lowercasetokenfilter.go | 2 +- typedapi/esdsl/lowercasetokenizer.go | 2 +- typedapi/esdsl/manageuserprivileges.go | 2 +- typedapi/esdsl/mappingcharfilter.go | 2 +- typedapi/esdsl/mappinglimitsettings.go | 2 +- typedapi/esdsl/mappinglimitsettingsdepth.go | 2 +- .../mappinglimitsettingsdimensionfields.go | 2 +- .../mappinglimitsettingsfieldnamelength.go | 2 +- .../esdsl/mappinglimitsettingsnestedfields.go | 2 +- .../mappinglimitsettingsnestedobjects.go | 2 +- .../esdsl/mappinglimitsettingssourcefields.go | 2 +- .../esdsl/mappinglimitsettingstotalfields.go | 2 +- typedapi/esdsl/matchallquery.go | 4 +- typedapi/esdsl/matchboolprefixquery.go | 2 +- typedapi/esdsl/matchnonequery.go | 2 +- typedapi/esdsl/matchonlytextproperty.go | 2 +- typedapi/esdsl/matchphraseprefixquery.go | 2 +- typedapi/esdsl/matchphrasequery.go | 2 +- typedapi/esdsl/matchquery.go | 2 +- typedapi/esdsl/matrixstatsaggregation.go | 2 +- typedapi/esdsl/maxaggregation.go | 2 +- typedapi/esdsl/maxbucketaggregation.go | 2 +- typedapi/esdsl/maxmind.go | 2 +- .../medianabsolutedeviationaggregation.go | 2 +- typedapi/esdsl/merge.go | 2 +- typedapi/esdsl/mergescheduler.go | 2 +- typedapi/esdsl/message.go | 2 +- typedapi/esdsl/messagecontent.go | 2 +- typedapi/esdsl/metadata.go | 2 +- typedapi/esdsl/mgetoperation.go | 6 +- typedapi/esdsl/migrateaction.go | 2 +- typedapi/esdsl/migratereindex.go | 2 +- typedapi/esdsl/minaggregation.go | 2 +- typedapi/esdsl/minbucketaggregation.go | 2 +- typedapi/esdsl/minhashtokenfilter.go | 2 +- typedapi/esdsl/minimumshouldmatch.go | 2 +- typedapi/esdsl/missing.go | 2 +- typedapi/esdsl/missingaggregation.go | 2 +- typedapi/esdsl/mistralservicesettings.go | 2 +- typedapi/esdsl/modelplotconfig.go | 2 +- typedapi/esdsl/morelikethisquery.go | 6 +- typedapi/esdsl/movingaverageaggregation.go | 2 +- typedapi/esdsl/movingfunctionaggregation.go | 2 +- .../esdsl/movingpercentilesaggregation.go | 2 +- typedapi/esdsl/msearchrequestitem.go | 2 +- typedapi/esdsl/mtermvectorsoperation.go | 6 +- typedapi/esdsl/multimatchquery.go | 2 +- typedapi/esdsl/multiplexertokenfilter.go | 2 +- typedapi/esdsl/multisearchheader.go | 13 +- typedapi/esdsl/multitermlookup.go | 2 +- typedapi/esdsl/multitermsaggregation.go | 2 +- typedapi/esdsl/murmur3hashproperty.go | 2 +- typedapi/esdsl/mutualinformationheuristic.go | 2 +- typedapi/esdsl/names.go | 2 +- typedapi/esdsl/nerinferenceoptions.go | 2 +- typedapi/esdsl/nerinferenceupdateoptions.go | 2 +- typedapi/esdsl/nestedaggregation.go | 2 +- typedapi/esdsl/nestedproperty.go | 2 +- typedapi/esdsl/nestedquery.go | 2 +- typedapi/esdsl/nestedsortvalue.go | 2 +- typedapi/esdsl/networkdirectionprocessor.go | 2 +- typedapi/esdsl/nevercondition.go | 2 +- typedapi/esdsl/ngramtokenfilter.go | 2 +- typedapi/esdsl/ngramtokenizer.go | 2 +- typedapi/esdsl/nlpberttokenizationconfig.go | 2 +- .../esdsl/nlprobertatokenizationconfig.go | 2 +- .../esdsl/nlptokenizationupdateoptions.go | 2 +- typedapi/esdsl/norianalyzer.go | 2 +- typedapi/esdsl/noripartofspeechtokenfilter.go | 2 +- typedapi/esdsl/noritokenizer.go | 2 +- typedapi/esdsl/normalizeaggregation.go | 2 +- typedapi/esdsl/normalizer.go | 2 +- typedapi/esdsl/norwegiananalyzer.go | 2 +- typedapi/esdsl/numberrangequery.go | 4 +- typedapi/esdsl/numericdecayfunction.go | 2 +- typedapi/esdsl/numericfielddata.go | 2 +- typedapi/esdsl/objectproperty.go | 2 +- typedapi/esdsl/onehotencodingpreprocessor.go | 2 +- typedapi/esdsl/openaiservicesettings.go | 2 +- typedapi/esdsl/openaitasksettings.go | 15 +- typedapi/esdsl/openshiftaiservicesettings.go | 87 ++ typedapi/esdsl/openshiftaitasksettings.go | 51 + typedapi/esdsl/operationcontainer.go | 20 +- typedapi/esdsl/page.go | 2 +- typedapi/esdsl/pagerdutyaction.go | 2 +- typedapi/esdsl/pagerdutycontext.go | 2 +- typedapi/esdsl/pagerdutyeventproxy.go | 2 +- typedapi/esdsl/painlesscontextsetup.go | 2 +- typedapi/esdsl/parentaggregation.go | 2 +- typedapi/esdsl/parentidquery.go | 2 +- typedapi/esdsl/passthroughinferenceoptions.go | 2 +- .../passthroughinferenceupdateoptions.go | 2 +- typedapi/esdsl/passthroughobjectproperty.go | 2 +- typedapi/esdsl/pathhierarchytokenizer.go | 2 +- typedapi/esdsl/patternanalyzer.go | 2 +- typedapi/esdsl/patterncapturetokenfilter.go | 2 +- typedapi/esdsl/patternreplacecharfilter.go | 2 +- typedapi/esdsl/patternreplacetokenfilter.go | 2 +- typedapi/esdsl/patterntokenizer.go | 2 +- typedapi/esdsl/percentage.go | 2 +- typedapi/esdsl/percentagescoreheuristic.go | 2 +- typedapi/esdsl/percentileranksaggregation.go | 2 +- typedapi/esdsl/percentilesaggregation.go | 8 +- .../esdsl/percentilesbucketaggregation.go | 2 +- typedapi/esdsl/percolatequery.go | 6 +- typedapi/esdsl/percolatorproperty.go | 2 +- typedapi/esdsl/perpartitioncategorization.go | 2 +- typedapi/esdsl/persiananalyzer.go | 2 +- .../esdsl/persiannormalizationtokenfilter.go | 2 +- typedapi/esdsl/persianstemtokenfilter.go | 2 +- typedapi/esdsl/phase.go | 2 +- typedapi/esdsl/phases.go | 2 +- typedapi/esdsl/phonetictokenfilter.go | 2 +- typedapi/esdsl/phrasesuggestcollate.go | 2 +- typedapi/esdsl/phrasesuggestcollatequery.go | 2 +- typedapi/esdsl/phrasesuggester.go | 44 +- typedapi/esdsl/phrasesuggesthighlight.go | 2 +- typedapi/esdsl/pinneddoc.go | 2 +- typedapi/esdsl/pinnedquery.go | 20 +- typedapi/esdsl/pinnedretriever.go | 38 +- typedapi/esdsl/pipelinemetadata.go | 2 +- typedapi/esdsl/pipelineprocessor.go | 2 +- typedapi/esdsl/pipelinesettings.go | 2 +- ...pipeseparatedflagssimplequerystringflag.go | 2 +- typedapi/esdsl/pivot.go | 2 +- typedapi/esdsl/pivotgroupbycontainer.go | 20 +- typedapi/esdsl/pointintimereference.go | 2 +- typedapi/esdsl/pointproperty.go | 2 +- typedapi/esdsl/porterstemtokenfilter.go | 2 +- typedapi/esdsl/portugueseanalyzer.go | 2 +- typedapi/esdsl/predicatetokenfilter.go | 2 +- typedapi/esdsl/prefixquery.go | 4 +- typedapi/esdsl/preprocessor.go | 20 +- typedapi/esdsl/privilegesactions.go | 2 +- typedapi/esdsl/privilegescheck.go | 2 +- typedapi/esdsl/processorcontainer.go | 2 +- typedapi/esdsl/property.go | 2 +- typedapi/esdsl/pvalueheuristic.go | 51 + typedapi/esdsl/queries.go | 2 +- typedapi/esdsl/query.go | 2 +- typedapi/esdsl/queryfeatureextractor.go | 2 +- typedapi/esdsl/queryrule.go | 2 +- typedapi/esdsl/queryruleactions.go | 2 +- typedapi/esdsl/queryrulecriteria.go | 2 +- typedapi/esdsl/querystringquery.go | 2 +- typedapi/esdsl/queryvectorbuilder.go | 20 +- .../questionansweringinferenceoptions.go | 2 +- ...questionansweringinferenceupdateoptions.go | 2 +- typedapi/esdsl/randomsampleraggregation.go | 2 +- typedapi/esdsl/randomscorefunction.go | 2 +- typedapi/esdsl/rangeaggregation.go | 2 +- typedapi/esdsl/rangequery.go | 2 +- typedapi/esdsl/rankcontainer.go | 20 +- typedapi/esdsl/rankevalmetric.go | 2 +- .../rankevalmetricdiscountedcumulativegain.go | 10 +- .../rankevalmetricexpectedreciprocalrank.go | 10 +- .../esdsl/rankevalmetricmeanreciprocalrank.go | 10 +- typedapi/esdsl/rankevalmetricprecision.go | 10 +- typedapi/esdsl/rankevalmetricrecall.go | 2 +- typedapi/esdsl/rankevalquery.go | 2 +- typedapi/esdsl/rankevalrequestitem.go | 2 +- typedapi/esdsl/rankfeaturefunctionlinear.go | 2 +- .../esdsl/rankfeaturefunctionlogarithm.go | 2 +- .../esdsl/rankfeaturefunctionsaturation.go | 2 +- typedapi/esdsl/rankfeaturefunctionsigmoid.go | 2 +- typedapi/esdsl/rankfeatureproperty.go | 2 +- typedapi/esdsl/rankfeaturequery.go | 2 +- typedapi/esdsl/rankfeaturesproperty.go | 2 +- typedapi/esdsl/rankvectorproperty.go | 2 +- typedapi/esdsl/raretermsaggregation.go | 2 +- typedapi/esdsl/rateaggregation.go | 2 +- typedapi/esdsl/ratelimitsetting.go | 2 +- typedapi/esdsl/readonlyurlrepository.go | 2 +- .../esdsl/readonlyurlrepositorysettings.go | 2 +- typedapi/esdsl/redactprocessor.go | 2 +- typedapi/esdsl/regexoptions.go | 2 +- typedapi/esdsl/regexpquery.go | 2 +- typedapi/esdsl/regexvalidation.go | 2 +- typedapi/esdsl/registereddomainprocessor.go | 2 +- typedapi/esdsl/regressioninferenceoptions.go | 2 +- typedapi/esdsl/reindexdestination.go | 6 +- typedapi/esdsl/reindexsource.go | 6 +- typedapi/esdsl/remoteclusterprivileges.go | 2 +- typedapi/esdsl/remoteindicesprivileges.go | 2 +- typedapi/esdsl/remotesource.go | 9 +- typedapi/esdsl/removeaction.go | 2 +- typedapi/esdsl/removeduplicatestokenfilter.go | 2 +- typedapi/esdsl/removeindexaction.go | 2 +- typedapi/esdsl/removeprocessor.go | 2 +- typedapi/esdsl/renameprocessor.go | 2 +- typedapi/esdsl/replicationaccess.go | 2 +- typedapi/esdsl/reportingemailattachment.go | 2 +- typedapi/esdsl/repository.go | 2 +- typedapi/esdsl/requestchatcompletion.go | 2 +- typedapi/esdsl/requestitem.go | 2 +- typedapi/esdsl/rerouteprocessor.go | 2 +- typedapi/esdsl/rescore.go | 9 +- typedapi/esdsl/rescorequery.go | 2 +- typedapi/esdsl/rescorerretriever.go | 32 +- typedapi/esdsl/rescorevector.go | 2 +- typedapi/esdsl/restriction.go | 2 +- typedapi/esdsl/retention.go | 2 +- typedapi/esdsl/retentionlease.go | 2 +- typedapi/esdsl/retentionpolicy.go | 2 +- typedapi/esdsl/retentionpolicycontainer.go | 20 +- typedapi/esdsl/retrievercontainer.go | 20 +- typedapi/esdsl/reversenestedaggregation.go | 2 +- typedapi/esdsl/reversetokenfilter.go | 2 +- typedapi/esdsl/roledescriptor.go | 2 +- typedapi/esdsl/rolemappingrule.go | 20 +- typedapi/esdsl/rolequerycontainer.go | 2 +- typedapi/esdsl/roletemplate.go | 2 +- typedapi/esdsl/roletemplateinlinequery.go | 2 +- typedapi/esdsl/roletemplatequery.go | 2 +- typedapi/esdsl/roletemplatescript.go | 2 +- typedapi/esdsl/rolloveraction.go | 2 +- typedapi/esdsl/rolloverconditions.go | 2 +- typedapi/esdsl/romaniananalyzer.go | 2 +- typedapi/esdsl/routing.go | 44 + typedapi/esdsl/routingfield.go | 2 +- typedapi/esdsl/rrfrank.go | 2 +- typedapi/esdsl/rrfretriever.go | 42 +- typedapi/esdsl/rrfretrievercomponent.go | 55 + typedapi/esdsl/rrfretrieverentry.go | 62 ++ typedapi/esdsl/rulecondition.go | 2 +- typedapi/esdsl/rulequery.go | 2 +- typedapi/esdsl/ruleretriever.go | 2 +- typedapi/esdsl/runtimefield.go | 2 +- typedapi/esdsl/runtimefieldfetchfields.go | 2 +- typedapi/esdsl/runtimefields.go | 2 +- typedapi/esdsl/russiananalyzer.go | 2 +- typedapi/esdsl/russianstemtokenfilter.go | 2 +- typedapi/esdsl/s3repository.go | 2 +- typedapi/esdsl/s3repositorysettings.go | 2 +- typedapi/esdsl/samplediversity.go | 2 +- typedapi/esdsl/sampleraggregation.go | 2 +- typedapi/esdsl/scalarvalue.go | 2 +- typedapi/esdsl/scaledfloatnumberproperty.go | 2 +- .../esdsl/scandinavianfoldingtokenfilter.go | 2 +- .../scandinaviannormalizationtokenfilter.go | 2 +- typedapi/esdsl/schedulecontainer.go | 20 +- typedapi/esdsl/scheduletimeofday.go | 2 +- typedapi/esdsl/scheduletriggerevent.go | 2 +- typedapi/esdsl/schedulingconfiguration.go | 2 +- typedapi/esdsl/scoresort.go | 2 +- typedapi/esdsl/script.go | 2 +- typedapi/esdsl/scriptcondition.go | 2 +- typedapi/esdsl/scriptedheuristic.go | 2 +- typedapi/esdsl/scriptedmetricaggregation.go | 2 +- typedapi/esdsl/scriptfield.go | 2 +- typedapi/esdsl/scriptprocessor.go | 2 +- typedapi/esdsl/scriptquery.go | 2 +- typedapi/esdsl/scriptrescore.go | 56 + typedapi/esdsl/scriptscorefunction.go | 2 +- typedapi/esdsl/scriptscorequery.go | 2 +- typedapi/esdsl/scriptsort.go | 2 +- typedapi/esdsl/scriptsource.go | 2 +- typedapi/esdsl/scripttransform.go | 2 +- typedapi/esdsl/scrollids.go | 2 +- typedapi/esdsl/searchablesnapshotaction.go | 2 +- typedapi/esdsl/searchaccess.go | 2 +- typedapi/esdsl/searchapplicationparameters.go | 2 +- typedapi/esdsl/searchapplicationtemplate.go | 2 +- typedapi/esdsl/searchasyoutypeproperty.go | 2 +- typedapi/esdsl/searchidle.go | 2 +- typedapi/esdsl/searchinput.go | 2 +- typedapi/esdsl/searchinputrequestbody.go | 2 +- .../esdsl/searchinputrequestdefinition.go | 2 +- typedapi/esdsl/searchrequestbody.go | 2 +- typedapi/esdsl/searchtemplaterequestbody.go | 2 +- typedapi/esdsl/searchtransform.go | 2 +- typedapi/esdsl/securitysettings.go | 2 +- typedapi/esdsl/selectoption.go | 2 +- typedapi/esdsl/semanticquery.go | 2 +- typedapi/esdsl/semantictextindexoptions.go | 51 + typedapi/esdsl/semantictextproperty.go | 30 +- typedapi/esdsl/serbiananalyzer.go | 2 +- .../esdsl/serbiannormalizationtokenfilter.go | 2 +- .../esdsl/serialdifferencingaggregation.go | 2 +- typedapi/esdsl/setpriorityaction.go | 2 +- typedapi/esdsl/setprocessor.go | 2 +- typedapi/esdsl/setsecurityuserprocessor.go | 2 +- typedapi/esdsl/settings.go | 9 +- typedapi/esdsl/settingsanalyze.go | 2 +- typedapi/esdsl/settingshighlight.go | 2 +- typedapi/esdsl/settingsquerystring.go | 2 +- typedapi/esdsl/settingssearch.go | 2 +- typedapi/esdsl/settingssimilarity.go | 2 +- typedapi/esdsl/settingssimilaritybm25.go | 2 +- typedapi/esdsl/settingssimilarityboolean.go | 2 +- typedapi/esdsl/settingssimilaritydfi.go | 2 +- typedapi/esdsl/settingssimilaritydfr.go | 2 +- typedapi/esdsl/settingssimilarityib.go | 2 +- typedapi/esdsl/settingssimilaritylmd.go | 2 +- typedapi/esdsl/settingssimilaritylmj.go | 2 +- typedapi/esdsl/settingssimilarityscripted.go | 2 +- typedapi/esdsl/shapefieldquery.go | 2 +- typedapi/esdsl/shapeproperty.go | 2 +- typedapi/esdsl/shapequery.go | 2 +- typedapi/esdsl/sharedfilesystemrepository.go | 2 +- .../sharedfilesystemrepositorysettings.go | 2 +- typedapi/esdsl/shingletokenfilter.go | 2 +- typedapi/esdsl/shortnumberproperty.go | 2 +- typedapi/esdsl/shrinkaction.go | 2 +- typedapi/esdsl/significanttermsaggregation.go | 9 +- typedapi/esdsl/significanttextaggregation.go | 2 +- typedapi/esdsl/simpleanalyzer.go | 2 +- .../esdsl/simplemovingaverageaggregation.go | 2 +- typedapi/esdsl/simplepatternsplittokenizer.go | 2 +- typedapi/esdsl/simplepatterntokenizer.go | 2 +- typedapi/esdsl/simplequerystringflags.go | 2 +- typedapi/esdsl/simplequerystringquery.go | 2 +- typedapi/esdsl/simulatedactions.go | 2 +- typedapi/esdsl/sizefield.go | 2 +- typedapi/esdsl/slackaction.go | 2 +- typedapi/esdsl/slackattachment.go | 2 +- typedapi/esdsl/slackattachmentfield.go | 2 +- typedapi/esdsl/slackdynamicattachment.go | 2 +- typedapi/esdsl/slackmessage.go | 2 +- typedapi/esdsl/slicedscroll.go | 2 +- typedapi/esdsl/slowlogsettings.go | 2 +- typedapi/esdsl/slowlogtresholdlevels.go | 2 +- typedapi/esdsl/slowlogtresholds.go | 2 +- typedapi/esdsl/smoothingmodelcontainer.go | 20 +- typedapi/esdsl/snowballanalyzer.go | 2 +- typedapi/esdsl/snowballtokenfilter.go | 2 +- typedapi/esdsl/softdeletes.go | 2 +- typedapi/esdsl/soranianalyzer.go | 2 +- .../esdsl/soraninormalizationtokenfilter.go | 2 +- typedapi/esdsl/sort.go | 2 +- typedapi/esdsl/sortcombinations.go | 2 +- typedapi/esdsl/sortoptions.go | 2 +- typedapi/esdsl/sortprocessor.go | 2 +- typedapi/esdsl/sourceconfig.go | 2 +- typedapi/esdsl/sourcefield.go | 2 +- typedapi/esdsl/sourcefilter.go | 2 +- typedapi/esdsl/sourceindex.go | 2 +- typedapi/esdsl/sourceonlyrepository.go | 2 +- .../esdsl/sourceonlyrepositorysettings.go | 2 +- typedapi/esdsl/spancontainingquery.go | 2 +- typedapi/esdsl/spanfieldmaskingquery.go | 2 +- typedapi/esdsl/spanfirstquery.go | 2 +- typedapi/esdsl/spangapquery.go | 2 +- typedapi/esdsl/spanishanalyzer.go | 2 +- typedapi/esdsl/spanmultitermquery.go | 2 +- typedapi/esdsl/spannearquery.go | 2 +- typedapi/esdsl/spannotquery.go | 2 +- typedapi/esdsl/spanorquery.go | 2 +- typedapi/esdsl/spanquery.go | 2 +- typedapi/esdsl/spantermquery.go | 2 +- typedapi/esdsl/spanwithinquery.go | 2 +- typedapi/esdsl/sparsevectorindexoptions.go | 2 +- typedapi/esdsl/sparsevectorproperty.go | 2 +- typedapi/esdsl/sparsevectorquery.go | 20 +- typedapi/esdsl/specifieddocument.go | 2 +- typedapi/esdsl/splitprocessor.go | 2 +- typedapi/esdsl/standardanalyzer.go | 2 +- typedapi/esdsl/standardretriever.go | 2 +- typedapi/esdsl/standardtokenizer.go | 2 +- typedapi/esdsl/statsaggregation.go | 2 +- typedapi/esdsl/statsbucketaggregation.go | 2 +- typedapi/esdsl/stemmeroverridetokenfilter.go | 2 +- typedapi/esdsl/stemmertokenfilter.go | 2 +- typedapi/esdsl/stepkey.go | 2 +- typedapi/esdsl/stopanalyzer.go | 2 +- typedapi/esdsl/stoptokenfilter.go | 2 +- typedapi/esdsl/stopwords.go | 2 +- typedapi/esdsl/storage.go | 2 +- typedapi/esdsl/storedscript.go | 2 +- typedapi/esdsl/stringifiedboolean.go | 2 +- typedapi/esdsl/stringifieddouble.go | 50 + .../esdsl/stringifiedepochtimeunitmillis.go | 2 +- typedapi/esdsl/stringifiedinteger.go | 2 +- typedapi/esdsl/stringstatsaggregation.go | 2 +- typedapi/esdsl/stupidbackoffsmoothingmodel.go | 2 +- typedapi/esdsl/suggestcontext.go | 2 +- typedapi/esdsl/suggester.go | 2 +- typedapi/esdsl/suggestfuzziness.go | 2 +- typedapi/esdsl/sumaggregation.go | 2 +- typedapi/esdsl/sumbucketaggregation.go | 2 +- typedapi/esdsl/swedishanalyzer.go | 2 +- typedapi/esdsl/synccontainer.go | 20 +- typedapi/esdsl/syncrulesfeature.go | 2 +- typedapi/esdsl/synonymgraphtokenfilter.go | 2 +- typedapi/esdsl/synonymrule.go | 2 +- typedapi/esdsl/synonymtokenfilter.go | 2 +- typedapi/esdsl/tablevaluescontainer.go | 20 +- typedapi/esdsl/tablevaluesintegervalue.go | 2 +- typedapi/esdsl/tablevalueskeywordvalue.go | 2 +- typedapi/esdsl/tablevalueslongdouble.go | 2 +- typedapi/esdsl/tablevalueslongvalue.go | 2 +- .../esdsl/targetmeanencodingpreprocessor.go | 2 +- typedapi/esdsl/tdigest.go | 2 +- typedapi/esdsl/templateconfig.go | 2 +- typedapi/esdsl/terminateprocessor.go | 2 +- typedapi/esdsl/termquery.go | 4 +- typedapi/esdsl/termrangequery.go | 2 +- typedapi/esdsl/termsaggregation.go | 2 +- typedapi/esdsl/termsexclude.go | 2 +- typedapi/esdsl/termsgrouping.go | 2 +- typedapi/esdsl/termsinclude.go | 2 +- typedapi/esdsl/termslookup.go | 6 +- typedapi/esdsl/termspartition.go | 2 +- typedapi/esdsl/termsquery.go | 2 +- typedapi/esdsl/termsqueryfield.go | 2 +- typedapi/esdsl/termssetquery.go | 2 +- typedapi/esdsl/termsuggester.go | 2 +- typedapi/esdsl/termvectorsfilter.go | 2 +- typedapi/esdsl/testpopulation.go | 2 +- .../textclassificationinferenceoptions.go | 2 +- ...extclassificationinferenceupdateoptions.go | 2 +- typedapi/esdsl/textembedding.go | 8 +- .../esdsl/textembeddinginferenceoptions.go | 12 +- .../textembeddinginferenceupdateoptions.go | 2 +- .../esdsl/textexpansioninferenceoptions.go | 12 +- .../textexpansioninferenceupdateoptions.go | 2 +- typedapi/esdsl/textexpansionquery.go | 2 +- typedapi/esdsl/textindexprefixes.go | 2 +- typedapi/esdsl/textproperty.go | 2 +- typedapi/esdsl/textsimilarityreranker.go | 9 +- typedapi/esdsl/texttoanalyze.go | 2 +- typedapi/esdsl/thaianalyzer.go | 2 +- typedapi/esdsl/thaitokenizer.go | 2 +- typedapi/esdsl/thinkingconfig.go | 44 + typedapi/esdsl/throttlestate.go | 2 +- typedapi/esdsl/timeofmonth.go | 2 +- typedapi/esdsl/timeofweek.go | 2 +- typedapi/esdsl/timeofyear.go | 2 +- typedapi/esdsl/timeseriesaggregation.go | 2 +- typedapi/esdsl/timesync.go | 2 +- typedapi/esdsl/tokencountproperty.go | 2 +- typedapi/esdsl/tokenfilter.go | 2 +- typedapi/esdsl/tokenfilterdefinition.go | 2 +- typedapi/esdsl/tokenizationconfigcontainer.go | 20 +- typedapi/esdsl/tokenizer.go | 2 +- typedapi/esdsl/tokenizerdefinition.go | 2 +- typedapi/esdsl/tokenpruningconfig.go | 2 +- typedapi/esdsl/toolcall.go | 2 +- typedapi/esdsl/toolcallfunction.go | 2 +- typedapi/esdsl/tophitsaggregation.go | 2 +- typedapi/esdsl/topleftbottomrightgeobounds.go | 2 +- typedapi/esdsl/topmetricsaggregation.go | 2 +- typedapi/esdsl/topmetricsvalue.go | 2 +- typedapi/esdsl/toprightbottomleftgeobounds.go | 2 +- typedapi/esdsl/trackhits.go | 2 +- typedapi/esdsl/trainedmodel.go | 2 +- typedapi/esdsl/trainedmodelprefixstrings.go | 2 +- typedapi/esdsl/trainedmodeltree.go | 2 +- typedapi/esdsl/trainedmodeltreenode.go | 2 +- typedapi/esdsl/transformcontainer.go | 20 +- typedapi/esdsl/transformdestination.go | 2 +- typedapi/esdsl/transformsource.go | 2 +- typedapi/esdsl/translog.go | 2 +- typedapi/esdsl/translogretention.go | 2 +- typedapi/esdsl/triggercontainer.go | 20 +- typedapi/esdsl/trimprocessor.go | 2 +- typedapi/esdsl/trimtokenfilter.go | 2 +- typedapi/esdsl/truncatetokenfilter.go | 2 +- typedapi/esdsl/ttestaggregation.go | 2 +- typedapi/esdsl/turkishanalyzer.go | 2 +- typedapi/esdsl/typemapping.go | 2 +- typedapi/esdsl/typequery.go | 2 +- typedapi/esdsl/uaxemailurltokenizer.go | 2 +- typedapi/esdsl/uniquetokenfilter.go | 2 +- typedapi/esdsl/unsignedlongnumberproperty.go | 2 +- typedapi/esdsl/untypeddecayfunction.go | 2 +- typedapi/esdsl/untypeddistancefeaturequery.go | 2 +- typedapi/esdsl/untypedrangequery.go | 4 +- typedapi/esdsl/updateaction.go | 2 +- typedapi/esdsl/updateoperation.go | 6 +- typedapi/esdsl/uppercaseprocessor.go | 2 +- typedapi/esdsl/uppercasetokenfilter.go | 2 +- typedapi/esdsl/uripartsprocessor.go | 2 +- typedapi/esdsl/urldecodeprocessor.go | 2 +- typedapi/esdsl/useragentprocessor.go | 2 +- typedapi/esdsl/userquerycontainer.go | 2 +- typedapi/esdsl/validation.go | 2 +- typedapi/esdsl/valuecountaggregation.go | 2 +- .../variablewidthhistogramaggregation.go | 2 +- typedapi/esdsl/versionproperty.go | 2 +- typedapi/esdsl/vertexdefinition.go | 2 +- typedapi/esdsl/vertexinclude.go | 2 +- typedapi/esdsl/vocabulary.go | 2 +- typedapi/esdsl/voyageaiservicesettings.go | 2 +- typedapi/esdsl/voyageaitasksettings.go | 2 +- typedapi/esdsl/waitforsnapshotaction.go | 2 +- typedapi/esdsl/watch.go | 2 +- typedapi/esdsl/watcheraction.go | 2 +- typedapi/esdsl/watchercondition.go | 20 +- typedapi/esdsl/watcherinput.go | 14 +- typedapi/esdsl/watcherstatusactions.go | 2 +- typedapi/esdsl/watchstatus.go | 2 +- typedapi/esdsl/watsonxservicesettings.go | 2 +- typedapi/esdsl/webhookaction.go | 2 +- typedapi/esdsl/weightedaverageaggregation.go | 2 +- typedapi/esdsl/weightedaveragevalue.go | 2 +- typedapi/esdsl/weightedtokensquery.go | 2 +- typedapi/esdsl/weights.go | 2 +- typedapi/esdsl/whitespaceanalyzer.go | 2 +- typedapi/esdsl/whitespacetokenizer.go | 2 +- typedapi/esdsl/wildcardproperty.go | 2 +- typedapi/esdsl/wildcardquery.go | 2 +- typedapi/esdsl/wktgeobounds.go | 2 +- .../esdsl/worddelimitergraphtokenfilter.go | 2 +- typedapi/esdsl/worddelimitertokenfilter.go | 2 +- typedapi/esdsl/wrapperquery.go | 2 +- .../esdsl/xlmrobertatokenizationconfig.go | 2 +- .../zeroshotclassificationinferenceoptions.go | 2 +- ...hotclassificationinferenceupdateoptions.go | 2 +- typedapi/esql/asyncquery/async_query.go | 26 +- typedapi/esql/asyncquery/request.go | 30 +- .../asyncquerydelete/async_query_delete.go | 4 +- typedapi/esql/asyncquerydelete/response.go | 5 +- .../esql/asyncqueryget/async_query_get.go | 4 +- .../esql/asyncquerystop/async_query_stop.go | 2 +- typedapi/esql/getquery/get_query.go | 6 +- typedapi/esql/getquery/response.go | 4 +- typedapi/esql/listqueries/list_queries.go | 6 +- typedapi/esql/listqueries/response.go | 4 +- typedapi/esql/query/query.go | 26 +- typedapi/esql/query/request.go | 20 +- typedapi/features/getfeatures/get_features.go | 4 +- typedapi/features/getfeatures/response.go | 4 +- .../features/resetfeatures/reset_features.go | 4 +- typedapi/features/resetfeatures/response.go | 4 +- typedapi/fleet/deletesecret/delete_secret.go | 342 ++++++ typedapi/fleet/deletesecret/response.go | 34 + typedapi/fleet/getsecret/get_secret.go | 342 ++++++ typedapi/fleet/getsecret/response.go | 35 + .../globalcheckpoints/global_checkpoints.go | 2 +- typedapi/fleet/globalcheckpoints/response.go | 4 +- typedapi/fleet/msearch/msearch.go | 4 +- typedapi/fleet/msearch/request.go | 4 +- typedapi/fleet/msearch/response.go | 4 +- typedapi/fleet/postsecret/post_secret.go | 158 ++- typedapi/fleet/postsecret/request.go | 52 + typedapi/fleet/postsecret/response.go | 34 + typedapi/fleet/search/request.go | 4 +- typedapi/fleet/search/response.go | 25 +- typedapi/fleet/search/search.go | 8 +- typedapi/graph/explore/explore.go | 8 +- typedapi/graph/explore/request.go | 5 +- typedapi/graph/explore/response.go | 4 +- .../ilm/deletelifecycle/delete_lifecycle.go | 4 +- typedapi/ilm/deletelifecycle/response.go | 5 +- .../ilm/explainlifecycle/explain_lifecycle.go | 4 +- typedapi/ilm/explainlifecycle/response.go | 4 +- typedapi/ilm/getlifecycle/get_lifecycle.go | 2 +- typedapi/ilm/getlifecycle/response.go | 4 +- typedapi/ilm/getstatus/get_status.go | 2 +- typedapi/ilm/getstatus/response.go | 4 +- .../migrate_to_data_tiers.go | 4 +- typedapi/ilm/migratetodatatiers/request.go | 4 +- typedapi/ilm/migratetodatatiers/response.go | 4 +- typedapi/ilm/movetostep/move_to_step.go | 4 +- typedapi/ilm/movetostep/request.go | 5 +- typedapi/ilm/movetostep/response.go | 5 +- typedapi/ilm/putlifecycle/put_lifecycle.go | 4 +- typedapi/ilm/putlifecycle/request.go | 4 +- typedapi/ilm/putlifecycle/response.go | 5 +- typedapi/ilm/removepolicy/remove_policy.go | 4 +- typedapi/ilm/removepolicy/response.go | 4 +- typedapi/ilm/retry/response.go | 5 +- typedapi/ilm/retry/retry.go | 4 +- typedapi/ilm/start/response.go | 5 +- typedapi/ilm/start/start.go | 4 +- typedapi/ilm/stop/response.go | 5 +- typedapi/ilm/stop/stop.go | 4 +- typedapi/indices/addblock/add_block.go | 2 +- typedapi/indices/addblock/response.go | 4 +- typedapi/indices/analyze/analyze.go | 4 +- typedapi/indices/analyze/request.go | 5 +- typedapi/indices/analyze/response.go | 4 +- .../cancel_migrate_reindex.go | 2 +- .../indices/cancelmigratereindex/response.go | 5 +- typedapi/indices/clearcache/clear_cache.go | 4 +- typedapi/indices/clearcache/response.go | 4 +- typedapi/indices/clone/clone.go | 4 +- typedapi/indices/clone/request.go | 5 +- typedapi/indices/clone/response.go | 4 +- typedapi/indices/close/close.go | 4 +- typedapi/indices/close/response.go | 4 +- typedapi/indices/create/create.go | 4 +- typedapi/indices/create/request.go | 5 +- typedapi/indices/create/response.go | 4 +- .../createdatastream/create_data_stream.go | 2 +- typedapi/indices/createdatastream/response.go | 5 +- typedapi/indices/createfrom/create_from.go | 2 +- typedapi/indices/createfrom/request.go | 4 +- typedapi/indices/createfrom/response.go | 4 +- .../datastreamsstats/data_streams_stats.go | 2 +- typedapi/indices/datastreamsstats/response.go | 5 +- typedapi/indices/delete/delete.go | 4 +- typedapi/indices/delete/response.go | 5 +- typedapi/indices/deletealias/delete_alias.go | 4 +- typedapi/indices/deletealias/response.go | 5 +- .../delete_data_lifecycle.go | 4 +- .../indices/deletedatalifecycle/response.go | 5 +- .../deletedatastream/delete_data_stream.go | 4 +- typedapi/indices/deletedatastream/response.go | 5 +- .../delete_data_stream_options.go | 6 +- .../deletedatastreamoptions/response.go | 5 +- .../delete_index_template.go | 4 +- .../indices/deleteindextemplate/response.go | 5 +- .../delete_sample_configuration.go | 374 +++++++ .../deletesampleconfiguration/response.go | 36 + .../indices/deletetemplate/delete_template.go | 4 +- typedapi/indices/deletetemplate/response.go | 5 +- typedapi/indices/diskusage/disk_usage.go | 14 +- typedapi/indices/diskusage/response.go | 4 +- typedapi/indices/downsample/downsample.go | 47 +- typedapi/indices/downsample/request.go | 4 +- typedapi/indices/downsample/response.go | 4 +- typedapi/indices/exists/exists.go | 4 +- typedapi/indices/existsalias/exists_alias.go | 2 +- .../exists_index_template.go | 2 +- .../indices/existstemplate/exists_template.go | 4 +- .../explain_data_lifecycle.go | 6 +- .../indices/explaindatalifecycle/response.go | 4 +- .../fieldusagestats/field_usage_stats.go | 4 +- typedapi/indices/fieldusagestats/response.go | 4 +- typedapi/indices/flush/flush.go | 4 +- typedapi/indices/flush/response.go | 4 +- typedapi/indices/forcemerge/forcemerge.go | 4 +- typedapi/indices/forcemerge/response.go | 4 +- typedapi/indices/get/get.go | 4 +- typedapi/indices/get/response.go | 4 +- typedapi/indices/getalias/get_alias.go | 4 +- typedapi/indices/getalias/response.go | 4 +- .../get_all_sample_configuration.go | 335 ++++++ .../getallsampleconfiguration/response.go | 38 + .../getdatalifecycle/get_data_lifecycle.go | 2 +- typedapi/indices/getdatalifecycle/response.go | 4 +- .../get_data_lifecycle_stats.go | 4 +- .../indices/getdatalifecyclestats/response.go | 5 +- .../indices/getdatastream/get_data_stream.go | 2 +- typedapi/indices/getdatastream/response.go | 4 +- .../get_data_stream_mappings.go | 359 +++++++ .../indices/getdatastreammappings/response.go | 38 + .../get_data_stream_options.go | 4 +- .../indices/getdatastreamoptions/response.go | 4 +- .../get_data_stream_settings.go | 2 +- .../indices/getdatastreamsettings/response.go | 4 +- .../getfieldmapping/get_field_mapping.go | 4 +- typedapi/indices/getfieldmapping/response.go | 4 +- .../getindextemplate/get_index_template.go | 7 +- typedapi/indices/getindextemplate/response.go | 4 +- typedapi/indices/getmapping/get_mapping.go | 4 +- typedapi/indices/getmapping/response.go | 4 +- .../get_migrate_reindex_status.go | 2 +- .../getmigratereindexstatus/response.go | 4 +- typedapi/indices/getsample/get_sample.go | 344 ++++++ typedapi/indices/getsample/response.go | 38 + .../get_sample_configuration.go | 358 +++++++ .../getsampleconfiguration/response.go | 39 + .../getsamplestats/get_sample_stats.go | 346 ++++++ typedapi/indices/getsamplestats/response.go | 51 + typedapi/indices/getsettings/get_settings.go | 4 +- typedapi/indices/getsettings/response.go | 4 +- typedapi/indices/gettemplate/get_template.go | 4 +- typedapi/indices/gettemplate/response.go | 4 +- .../indices/migratereindex/migrate_reindex.go | 2 +- typedapi/indices/migratereindex/request.go | 4 +- typedapi/indices/migratereindex/response.go | 5 +- .../migrate_to_data_stream.go | 4 +- .../indices/migratetodatastream/response.go | 5 +- .../modifydatastream/modify_data_stream.go | 4 +- typedapi/indices/modifydatastream/request.go | 5 +- typedapi/indices/modifydatastream/response.go | 5 +- typedapi/indices/open/open.go | 4 +- typedapi/indices/open/response.go | 4 +- .../promotedatastream/promote_data_stream.go | 4 +- .../indices/promotedatastream/response.go | 4 +- typedapi/indices/putalias/put_alias.go | 16 +- typedapi/indices/putalias/request.go | 56 +- typedapi/indices/putalias/response.go | 5 +- .../putdatalifecycle/put_data_lifecycle.go | 10 +- typedapi/indices/putdatalifecycle/request.go | 7 +- typedapi/indices/putdatalifecycle/response.go | 5 +- .../put_data_stream_mappings.go | 637 ++++++++++++ .../indices/putdatastreammappings/request.go | 37 + .../indices/putdatastreammappings/response.go | 38 + .../put_data_stream_options.go | 6 +- .../indices/putdatastreamoptions/request.go | 5 +- .../indices/putdatastreamoptions/response.go | 5 +- .../put_data_stream_settings.go | 2 +- .../indices/putdatastreamsettings/request.go | 4 +- .../indices/putdatastreamsettings/response.go | 4 +- .../putindextemplate/put_index_template.go | 4 +- typedapi/indices/putindextemplate/request.go | 5 +- typedapi/indices/putindextemplate/response.go | 5 +- typedapi/indices/putmapping/put_mapping.go | 8 +- typedapi/indices/putmapping/request.go | 5 +- typedapi/indices/putmapping/response.go | 5 +- .../put_sample_configuration.go | 452 ++++++++ .../indices/putsampleconfiguration/request.go | 134 +++ .../putsampleconfiguration/response.go | 36 + typedapi/indices/putsettings/put_settings.go | 4 +- typedapi/indices/putsettings/request.go | 4 +- typedapi/indices/putsettings/response.go | 5 +- typedapi/indices/puttemplate/put_template.go | 4 +- typedapi/indices/puttemplate/request.go | 5 +- typedapi/indices/puttemplate/response.go | 5 +- typedapi/indices/recovery/recovery.go | 4 +- typedapi/indices/recovery/response.go | 4 +- typedapi/indices/refresh/refresh.go | 10 +- typedapi/indices/refresh/response.go | 4 +- .../reload_search_analyzers.go | 4 +- .../indices/reloadsearchanalyzers/response.go | 4 +- typedapi/indices/removeblock/remove_block.go | 2 +- typedapi/indices/removeblock/response.go | 4 +- .../indices/resolvecluster/resolve_cluster.go | 2 +- typedapi/indices/resolvecluster/response.go | 4 +- .../indices/resolveindex/resolve_index.go | 36 +- typedapi/indices/resolveindex/response.go | 4 +- typedapi/indices/rollover/request.go | 5 +- typedapi/indices/rollover/response.go | 4 +- typedapi/indices/rollover/rollover.go | 14 +- typedapi/indices/segments/response.go | 4 +- typedapi/indices/segments/segments.go | 4 +- typedapi/indices/shardstores/response.go | 4 +- typedapi/indices/shardstores/shard_stores.go | 4 +- typedapi/indices/shrink/request.go | 5 +- typedapi/indices/shrink/response.go | 4 +- typedapi/indices/shrink/shrink.go | 4 +- .../indices/simulateindextemplate/request.go | 37 + .../indices/simulateindextemplate/response.go | 4 +- .../simulate_index_template.go | 294 +++++- typedapi/indices/simulatetemplate/request.go | 5 +- typedapi/indices/simulatetemplate/response.go | 4 +- .../simulatetemplate/simulate_template.go | 4 +- typedapi/indices/split/request.go | 5 +- typedapi/indices/split/response.go | 4 +- typedapi/indices/split/split.go | 4 +- typedapi/indices/stats/response.go | 4 +- typedapi/indices/stats/stats.go | 8 +- typedapi/indices/updatealiases/request.go | 5 +- typedapi/indices/updatealiases/response.go | 5 +- .../indices/updatealiases/update_aliases.go | 4 +- typedapi/indices/validatequery/request.go | 5 +- typedapi/indices/validatequery/response.go | 4 +- .../indices/validatequery/validate_query.go | 6 +- .../chat_completion_unified.go | 9 +- .../chatcompletionunified/request.go | 4 +- .../chatcompletionunified/response.go | 4 +- typedapi/inference/completion/completion.go | 40 +- typedapi/inference/completion/request.go | 9 +- typedapi/inference/completion/response.go | 4 +- typedapi/inference/delete/delete.go | 17 +- typedapi/inference/delete/response.go | 5 +- typedapi/inference/get/get.go | 12 +- typedapi/inference/get/response.go | 4 +- typedapi/inference/inference/inference.go | 2 +- typedapi/inference/inference/request.go | 5 +- typedapi/inference/inference/response.go | 23 +- typedapi/inference/put/put.go | 35 +- typedapi/inference/put/request.go | 4 +- typedapi/inference/put/response.go | 10 +- typedapi/inference/putai21/put_ai21.go | 418 ++++++++ typedapi/inference/putai21/request.go | 60 ++ typedapi/inference/putai21/response.go | 55 + .../putalibabacloud/put_alibabacloud.go | 4 +- typedapi/inference/putalibabacloud/request.go | 7 +- .../inference/putalibabacloud/response.go | 10 +- .../putamazonbedrock/put_amazonbedrock.go | 4 +- .../inference/putamazonbedrock/request.go | 7 +- .../inference/putamazonbedrock/response.go | 10 +- .../putamazonsagemaker/put_amazonsagemaker.go | 5 +- .../inference/putamazonsagemaker/request.go | 8 +- .../inference/putamazonsagemaker/response.go | 10 +- .../inference/putanthropic/put_anthropic.go | 17 +- typedapi/inference/putanthropic/request.go | 9 +- typedapi/inference/putanthropic/response.go | 10 +- .../putazureaistudio/put_azureaistudio.go | 6 +- .../inference/putazureaistudio/request.go | 9 +- .../inference/putazureaistudio/response.go | 10 +- .../putazureopenai/put_azureopenai.go | 4 +- typedapi/inference/putazureopenai/request.go | 7 +- typedapi/inference/putazureopenai/response.go | 10 +- typedapi/inference/putcohere/put_cohere.go | 4 +- typedapi/inference/putcohere/request.go | 7 +- typedapi/inference/putcohere/response.go | 10 +- .../putcontextualai/put_contextualai.go | 438 ++++++++ typedapi/inference/putcontextualai/request.go | 63 ++ .../inference/putcontextualai/response.go | 55 + typedapi/inference/putcustom/put_custom.go | 4 +- typedapi/inference/putcustom/request.go | 7 +- typedapi/inference/putcustom/response.go | 10 +- .../inference/putdeepseek/put_deepseek.go | 15 +- typedapi/inference/putdeepseek/request.go | 7 +- typedapi/inference/putdeepseek/response.go | 10 +- .../putelasticsearch/put_elasticsearch.go | 4 +- .../inference/putelasticsearch/request.go | 7 +- .../inference/putelasticsearch/response.go | 10 +- typedapi/inference/putelser/put_elser.go | 3 +- typedapi/inference/putelser/request.go | 6 +- typedapi/inference/putelser/response.go | 10 +- .../putgoogleaistudio/put_googleaistudio.go | 4 +- .../inference/putgoogleaistudio/request.go | 7 +- .../inference/putgoogleaistudio/response.go | 10 +- .../putgooglevertexai/put_googlevertexai.go | 5 +- .../inference/putgooglevertexai/request.go | 8 +- .../inference/putgooglevertexai/response.go | 10 +- .../puthuggingface/put_hugging_face.go | 5 +- typedapi/inference/puthuggingface/request.go | 8 +- typedapi/inference/puthuggingface/response.go | 10 +- typedapi/inference/putjinaai/put_jinaai.go | 4 +- typedapi/inference/putjinaai/request.go | 7 +- typedapi/inference/putjinaai/response.go | 10 +- typedapi/inference/putllama/put_llama.go | 433 ++++++++ typedapi/inference/putllama/request.go | 64 ++ typedapi/inference/putllama/response.go | 55 + typedapi/inference/putmistral/put_mistral.go | 4 +- typedapi/inference/putmistral/request.go | 7 +- typedapi/inference/putmistral/response.go | 10 +- typedapi/inference/putopenai/put_openai.go | 4 +- typedapi/inference/putopenai/request.go | 7 +- typedapi/inference/putopenai/response.go | 10 +- .../putopenshiftai/put_openshift_ai.go | 453 ++++++++ typedapi/inference/putopenshiftai/request.go | 71 ++ typedapi/inference/putopenshiftai/response.go | 55 + .../inference/putvoyageai/put_voyageai.go | 4 +- typedapi/inference/putvoyageai/request.go | 7 +- typedapi/inference/putvoyageai/response.go | 10 +- typedapi/inference/putwatsonx/put_watsonx.go | 17 +- typedapi/inference/putwatsonx/request.go | 9 +- typedapi/inference/putwatsonx/response.go | 10 +- typedapi/inference/rerank/request.go | 61 +- typedapi/inference/rerank/rerank.go | 45 +- typedapi/inference/rerank/response.go | 4 +- typedapi/inference/sparseembedding/request.go | 9 +- .../inference/sparseembedding/response.go | 4 +- .../sparseembedding/sparse_embedding.go | 10 +- .../inference/streamcompletion/request.go | 9 +- .../inference/streamcompletion/response.go | 4 +- .../streamcompletion/stream_completion.go | 12 +- typedapi/inference/textembedding/request.go | 37 +- typedapi/inference/textembedding/response.go | 17 +- .../inference/textembedding/text_embedding.go | 36 +- typedapi/inference/update/request.go | 4 +- typedapi/inference/update/response.go | 10 +- typedapi/inference/update/update.go | 7 +- .../delete_geoip_database.go | 2 +- .../ingest/deletegeoipdatabase/response.go | 5 +- .../delete_ip_location_database.go | 2 +- .../deleteiplocationdatabase/response.go | 5 +- .../ingest/deletepipeline/delete_pipeline.go | 4 +- typedapi/ingest/deletepipeline/response.go | 5 +- typedapi/ingest/geoipstats/geo_ip_stats.go | 4 +- typedapi/ingest/geoipstats/response.go | 5 +- .../getgeoipdatabase/get_geoip_database.go | 2 +- typedapi/ingest/getgeoipdatabase/response.go | 4 +- .../get_ip_location_database.go | 2 +- .../ingest/getiplocationdatabase/response.go | 4 +- typedapi/ingest/getpipeline/get_pipeline.go | 2 +- typedapi/ingest/getpipeline/response.go | 4 +- .../ingest/processorgrok/processor_grok.go | 4 +- typedapi/ingest/processorgrok/response.go | 4 +- .../putgeoipdatabase/put_geoip_database.go | 2 +- typedapi/ingest/putgeoipdatabase/request.go | 5 +- typedapi/ingest/putgeoipdatabase/response.go | 5 +- .../put_ip_location_database.go | 19 +- .../ingest/putiplocationdatabase/request.go | 4 +- .../ingest/putiplocationdatabase/response.go | 5 +- typedapi/ingest/putpipeline/put_pipeline.go | 21 +- typedapi/ingest/putpipeline/request.go | 14 +- typedapi/ingest/putpipeline/response.go | 5 +- typedapi/ingest/simulate/request.go | 5 +- typedapi/ingest/simulate/response.go | 4 +- typedapi/ingest/simulate/simulate.go | 2 +- typedapi/license/delete/delete.go | 2 +- typedapi/license/delete/response.go | 5 +- typedapi/license/get/get.go | 9 +- typedapi/license/get/response.go | 4 +- .../getbasicstatus/get_basic_status.go | 2 +- typedapi/license/getbasicstatus/response.go | 4 +- .../gettrialstatus/get_trial_status.go | 2 +- typedapi/license/gettrialstatus/response.go | 4 +- typedapi/license/post/post.go | 2 +- typedapi/license/post/request.go | 4 +- typedapi/license/post/response.go | 4 +- .../poststartbasic/post_start_basic.go | 2 +- typedapi/license/poststartbasic/response.go | 4 +- .../poststarttrial/post_start_trial.go | 4 +- typedapi/license/poststarttrial/response.go | 4 +- .../deletepipeline/delete_pipeline.go | 4 +- typedapi/logstash/getpipeline/get_pipeline.go | 4 +- typedapi/logstash/getpipeline/response.go | 4 +- typedapi/logstash/putpipeline/put_pipeline.go | 4 +- typedapi/logstash/putpipeline/request.go | 4 +- .../migration/deprecations/deprecations.go | 4 +- typedapi/migration/deprecations/response.go | 5 +- .../get_feature_upgrade_status.go | 4 +- .../getfeatureupgradestatus/response.go | 4 +- .../post_feature_upgrade.go | 4 +- .../migration/postfeatureupgrade/response.go | 4 +- .../clear_trained_model_deployment_cache.go | 2 +- .../response.go | 4 +- typedapi/ml/closejob/close_job.go | 2 +- typedapi/ml/closejob/request.go | 5 +- typedapi/ml/closejob/response.go | 4 +- typedapi/ml/deletecalendar/delete_calendar.go | 2 +- typedapi/ml/deletecalendar/response.go | 5 +- .../delete_calendar_event.go | 2 +- typedapi/ml/deletecalendarevent/response.go | 5 +- .../deletecalendarjob/delete_calendar_job.go | 2 +- typedapi/ml/deletecalendarjob/response.go | 5 +- typedapi/ml/deletedatafeed/delete_datafeed.go | 2 +- typedapi/ml/deletedatafeed/response.go | 5 +- .../delete_data_frame_analytics.go | 2 +- .../ml/deletedataframeanalytics/response.go | 5 +- .../deleteexpireddata/delete_expired_data.go | 2 +- typedapi/ml/deleteexpireddata/request.go | 5 +- typedapi/ml/deleteexpireddata/response.go | 4 +- typedapi/ml/deletefilter/delete_filter.go | 2 +- typedapi/ml/deletefilter/response.go | 5 +- typedapi/ml/deleteforecast/delete_forecast.go | 2 +- typedapi/ml/deleteforecast/response.go | 5 +- typedapi/ml/deletejob/delete_job.go | 2 +- typedapi/ml/deletejob/response.go | 5 +- .../delete_model_snapshot.go | 2 +- typedapi/ml/deletemodelsnapshot/response.go | 5 +- .../delete_trained_model.go | 2 +- typedapi/ml/deletetrainedmodel/response.go | 5 +- .../delete_trained_model_alias.go | 2 +- .../ml/deletetrainedmodelalias/response.go | 5 +- .../estimate_model_memory.go | 2 +- typedapi/ml/estimatemodelmemory/request.go | 5 +- typedapi/ml/estimatemodelmemory/response.go | 4 +- .../evaluatedataframe/evaluate_data_frame.go | 2 +- typedapi/ml/evaluatedataframe/request.go | 5 +- typedapi/ml/evaluatedataframe/response.go | 5 +- .../explain_data_frame_analytics.go | 2 +- .../ml/explaindataframeanalytics/request.go | 5 +- .../ml/explaindataframeanalytics/response.go | 5 +- typedapi/ml/flushjob/flush_job.go | 4 +- typedapi/ml/flushjob/request.go | 5 +- typedapi/ml/flushjob/response.go | 4 +- typedapi/ml/forecast/forecast.go | 2 +- typedapi/ml/forecast/request.go | 5 +- typedapi/ml/forecast/response.go | 4 +- typedapi/ml/getbuckets/get_buckets.go | 4 +- typedapi/ml/getbuckets/request.go | 5 +- typedapi/ml/getbuckets/response.go | 4 +- .../getcalendarevents/get_calendar_events.go | 2 +- typedapi/ml/getcalendarevents/response.go | 4 +- typedapi/ml/getcalendars/get_calendars.go | 2 +- typedapi/ml/getcalendars/request.go | 5 +- typedapi/ml/getcalendars/response.go | 4 +- typedapi/ml/getcategories/get_categories.go | 2 +- typedapi/ml/getcategories/request.go | 5 +- typedapi/ml/getcategories/response.go | 4 +- typedapi/ml/getdatafeeds/get_datafeeds.go | 4 +- typedapi/ml/getdatafeeds/response.go | 4 +- .../ml/getdatafeedstats/get_datafeed_stats.go | 4 +- typedapi/ml/getdatafeedstats/response.go | 4 +- .../get_data_frame_analytics.go | 4 +- typedapi/ml/getdataframeanalytics/response.go | 4 +- .../get_data_frame_analytics_stats.go | 2 +- .../ml/getdataframeanalyticsstats/response.go | 4 +- typedapi/ml/getfilters/get_filters.go | 4 +- typedapi/ml/getfilters/response.go | 4 +- typedapi/ml/getinfluencers/get_influencers.go | 4 +- typedapi/ml/getinfluencers/request.go | 5 +- typedapi/ml/getinfluencers/response.go | 4 +- typedapi/ml/getjobs/get_jobs.go | 4 +- typedapi/ml/getjobs/response.go | 4 +- typedapi/ml/getjobstats/get_job_stats.go | 2 +- typedapi/ml/getjobstats/response.go | 4 +- .../ml/getmemorystats/get_memory_stats.go | 4 +- typedapi/ml/getmemorystats/response.go | 4 +- .../getmodelsnapshots/get_model_snapshots.go | 2 +- typedapi/ml/getmodelsnapshots/request.go | 5 +- typedapi/ml/getmodelsnapshots/response.go | 4 +- .../get_model_snapshot_upgrade_stats.go | 2 +- .../getmodelsnapshotupgradestats/response.go | 4 +- .../getoverallbuckets/get_overall_buckets.go | 4 +- typedapi/ml/getoverallbuckets/request.go | 29 +- typedapi/ml/getoverallbuckets/response.go | 4 +- typedapi/ml/getrecords/get_records.go | 4 +- typedapi/ml/getrecords/request.go | 5 +- typedapi/ml/getrecords/response.go | 4 +- .../ml/gettrainedmodels/get_trained_models.go | 2 +- typedapi/ml/gettrainedmodels/response.go | 4 +- .../get_trained_models_stats.go | 4 +- typedapi/ml/gettrainedmodelsstats/response.go | 5 +- .../infertrainedmodel/infer_trained_model.go | 2 +- typedapi/ml/infertrainedmodel/request.go | 5 +- typedapi/ml/infertrainedmodel/response.go | 4 +- typedapi/ml/info/info.go | 4 +- typedapi/ml/info/response.go | 4 +- typedapi/ml/openjob/open_job.go | 2 +- typedapi/ml/openjob/request.go | 5 +- typedapi/ml/openjob/response.go | 5 +- .../post_calendar_events.go | 2 +- typedapi/ml/postcalendarevents/request.go | 5 +- typedapi/ml/postcalendarevents/response.go | 4 +- typedapi/ml/postdata/post_data.go | 2 +- typedapi/ml/postdata/request.go | 4 +- typedapi/ml/postdata/response.go | 4 +- .../ml/previewdatafeed/preview_datafeed.go | 4 +- typedapi/ml/previewdatafeed/request.go | 5 +- typedapi/ml/previewdatafeed/response.go | 4 +- .../preview_data_frame_analytics.go | 4 +- .../ml/previewdataframeanalytics/request.go | 5 +- .../ml/previewdataframeanalytics/response.go | 5 +- typedapi/ml/putcalendar/put_calendar.go | 2 +- typedapi/ml/putcalendar/request.go | 5 +- typedapi/ml/putcalendar/response.go | 5 +- .../ml/putcalendarjob/put_calendar_job.go | 2 +- typedapi/ml/putcalendarjob/response.go | 5 +- typedapi/ml/putdatafeed/put_datafeed.go | 4 +- typedapi/ml/putdatafeed/request.go | 5 +- typedapi/ml/putdatafeed/response.go | 4 +- .../put_data_frame_analytics.go | 4 +- typedapi/ml/putdataframeanalytics/request.go | 5 +- typedapi/ml/putdataframeanalytics/response.go | 4 +- typedapi/ml/putfilter/put_filter.go | 4 +- typedapi/ml/putfilter/request.go | 5 +- typedapi/ml/putfilter/response.go | 4 +- typedapi/ml/putjob/put_job.go | 2 +- typedapi/ml/putjob/request.go | 5 +- typedapi/ml/putjob/response.go | 4 +- .../ml/puttrainedmodel/put_trained_model.go | 4 +- typedapi/ml/puttrainedmodel/request.go | 5 +- typedapi/ml/puttrainedmodel/response.go | 4 +- .../put_trained_model_alias.go | 4 +- typedapi/ml/puttrainedmodelalias/response.go | 5 +- .../put_trained_model_definition_part.go | 2 +- .../puttrainedmodeldefinitionpart/request.go | 5 +- .../puttrainedmodeldefinitionpart/response.go | 5 +- .../put_trained_model_vocabulary.go | 4 +- .../ml/puttrainedmodelvocabulary/request.go | 5 +- .../ml/puttrainedmodelvocabulary/response.go | 5 +- typedapi/ml/resetjob/reset_job.go | 4 +- typedapi/ml/resetjob/response.go | 5 +- typedapi/ml/revertmodelsnapshot/request.go | 5 +- typedapi/ml/revertmodelsnapshot/response.go | 4 +- .../revert_model_snapshot.go | 4 +- typedapi/ml/setupgrademode/response.go | 5 +- .../ml/setupgrademode/set_upgrade_mode.go | 4 +- typedapi/ml/startdatafeed/request.go | 5 +- typedapi/ml/startdatafeed/response.go | 5 +- typedapi/ml/startdatafeed/start_datafeed.go | 2 +- .../ml/startdataframeanalytics/response.go | 4 +- .../start_data_frame_analytics.go | 4 +- .../ml/starttrainedmodeldeployment/request.go | 5 +- .../starttrainedmodeldeployment/response.go | 4 +- .../start_trained_model_deployment.go | 4 +- typedapi/ml/stopdatafeed/request.go | 5 +- typedapi/ml/stopdatafeed/response.go | 4 +- typedapi/ml/stopdatafeed/stop_datafeed.go | 4 +- .../ml/stopdataframeanalytics/response.go | 4 +- .../stop_data_frame_analytics.go | 4 +- .../ml/stoptrainedmodeldeployment/response.go | 4 +- .../stop_trained_model_deployment.go | 2 +- typedapi/ml/updatedatafeed/request.go | 5 +- typedapi/ml/updatedatafeed/response.go | 32 +- typedapi/ml/updatedatafeed/update_datafeed.go | 4 +- .../ml/updatedataframeanalytics/request.go | 5 +- .../ml/updatedataframeanalytics/response.go | 4 +- .../update_data_frame_analytics.go | 2 +- typedapi/ml/updatefilter/request.go | 5 +- typedapi/ml/updatefilter/response.go | 4 +- typedapi/ml/updatefilter/update_filter.go | 4 +- typedapi/ml/updatejob/request.go | 5 +- typedapi/ml/updatejob/response.go | 4 +- typedapi/ml/updatejob/update_job.go | 4 +- typedapi/ml/updatemodelsnapshot/request.go | 5 +- typedapi/ml/updatemodelsnapshot/response.go | 4 +- .../update_model_snapshot.go | 4 +- .../updatetrainedmodeldeployment/request.go | 5 +- .../updatetrainedmodeldeployment/response.go | 4 +- .../update_trained_model_deployment.go | 2 +- typedapi/ml/upgradejobsnapshot/response.go | 5 +- .../upgrade_job_snapshot.go | 4 +- typedapi/ml/validate/request.go | 4 +- typedapi/ml/validate/response.go | 5 +- typedapi/ml/validate/validate.go | 2 +- typedapi/ml/validatedetector/request.go | 4 +- typedapi/ml/validatedetector/response.go | 5 +- .../ml/validatedetector/validate_detector.go | 2 +- typedapi/monitoring/bulk/bulk.go | 32 +- typedapi/monitoring/bulk/request.go | 4 +- typedapi/monitoring/bulk/response.go | 4 +- .../clear_repositories_metering_archive.go | 4 +- .../response.go | 5 +- .../get_repositories_metering_info.go | 4 +- .../getrepositoriesmeteringinfo/response.go | 5 +- typedapi/nodes/hotthreads/hot_threads.go | 4 +- typedapi/nodes/hotthreads/response.go | 4 +- typedapi/nodes/info/info.go | 2 +- typedapi/nodes/info/response.go | 4 +- .../reload_secure_settings.go | 2 +- .../nodes/reloadsecuresettings/request.go | 5 +- .../nodes/reloadsecuresettings/response.go | 4 +- typedapi/nodes/stats/response.go | 4 +- typedapi/nodes/stats/stats.go | 10 +- typedapi/nodes/usage/response.go | 4 +- typedapi/nodes/usage/usage.go | 5 +- typedapi/profiling/flamegraph/flamegraph.go | 159 ++- typedapi/profiling/flamegraph/request.go | 37 + typedapi/profiling/flamegraph/response.go | 35 + typedapi/profiling/stacktraces/request.go | 37 + typedapi/profiling/stacktraces/response.go | 35 + typedapi/profiling/stacktraces/stacktraces.go | 153 ++- typedapi/profiling/status/response.go | 38 + typedapi/profiling/status/status.go | 130 ++- .../profiling/topnfunctions/topn_functions.go | 6 +- typedapi/project/tags/response.go | 42 + typedapi/project/tags/tags.go | 334 ++++++ typedapi/queryrules/deleterule/delete_rule.go | 4 +- typedapi/queryrules/deleterule/response.go | 5 +- .../deleteruleset/delete_ruleset.go | 4 +- typedapi/queryrules/deleteruleset/response.go | 5 +- typedapi/queryrules/getrule/get_rule.go | 4 +- typedapi/queryrules/getrule/response.go | 5 +- typedapi/queryrules/getruleset/get_ruleset.go | 4 +- typedapi/queryrules/getruleset/response.go | 5 +- .../queryrules/listrulesets/list_rulesets.go | 4 +- typedapi/queryrules/listrulesets/response.go | 4 +- typedapi/queryrules/putrule/put_rule.go | 4 +- typedapi/queryrules/putrule/request.go | 5 +- typedapi/queryrules/putrule/response.go | 4 +- typedapi/queryrules/putruleset/put_ruleset.go | 4 +- typedapi/queryrules/putruleset/request.go | 4 +- typedapi/queryrules/putruleset/response.go | 4 +- typedapi/queryrules/test/request.go | 5 +- typedapi/queryrules/test/response.go | 4 +- typedapi/queryrules/test/test.go | 4 +- typedapi/rollup/deletejob/delete_job.go | 2 +- typedapi/rollup/deletejob/response.go | 4 +- typedapi/rollup/getjobs/get_jobs.go | 4 +- typedapi/rollup/getjobs/response.go | 4 +- .../rollup/getrollupcaps/get_rollup_caps.go | 4 +- typedapi/rollup/getrollupcaps/response.go | 4 +- .../get_rollup_index_caps.go | 4 +- .../rollup/getrollupindexcaps/response.go | 4 +- typedapi/rollup/putjob/put_job.go | 2 +- typedapi/rollup/putjob/request.go | 5 +- typedapi/rollup/putjob/response.go | 5 +- typedapi/rollup/rollupsearch/request.go | 5 +- typedapi/rollup/rollupsearch/response.go | 25 +- typedapi/rollup/rollupsearch/rollup_search.go | 4 +- typedapi/rollup/startjob/response.go | 4 +- typedapi/rollup/startjob/start_job.go | 4 +- typedapi/rollup/stopjob/response.go | 4 +- typedapi/rollup/stopjob/stop_job.go | 4 +- .../cachestats/cache_stats.go | 4 +- .../cachestats/response.go | 4 +- .../clearcache/clear_cache.go | 4 +- .../clearcache/response.go | 4 +- typedapi/searchablesnapshots/mount/mount.go | 4 +- typedapi/searchablesnapshots/mount/request.go | 5 +- .../searchablesnapshots/mount/response.go | 4 +- .../searchablesnapshots/stats/response.go | 4 +- typedapi/searchablesnapshots/stats/stats.go | 2 +- typedapi/searchapplication/delete/delete.go | 2 +- typedapi/searchapplication/delete/response.go | 5 +- .../delete_behavioral_analytics.go | 4 +- .../deletebehavioralanalytics/response.go | 5 +- typedapi/searchapplication/get/get.go | 2 +- typedapi/searchapplication/get/response.go | 5 +- .../get_behavioral_analytics.go | 2 +- .../getbehavioralanalytics/response.go | 4 +- typedapi/searchapplication/list/list.go | 4 +- typedapi/searchapplication/list/response.go | 4 +- .../post_behavioral_analytics_event.go | 2 +- .../postbehavioralanalyticsevent/request.go | 4 +- .../postbehavioralanalyticsevent/response.go | 4 +- typedapi/searchapplication/put/put.go | 2 +- typedapi/searchapplication/put/request.go | 4 +- typedapi/searchapplication/put/response.go | 4 +- .../put_behavioral_analytics.go | 2 +- .../putbehavioralanalytics/response.go | 5 +- .../renderquery/render_query.go | 4 +- .../searchapplication/renderquery/request.go | 4 +- .../searchapplication/renderquery/response.go | 4 +- typedapi/searchapplication/search/request.go | 5 +- typedapi/searchapplication/search/response.go | 25 +- typedapi/searchapplication/search/search.go | 4 +- .../activate_user_profile.go | 2 +- .../security/activateuserprofile/request.go | 5 +- .../security/activateuserprofile/response.go | 4 +- .../security/authenticate/authenticate.go | 2 +- typedapi/security/authenticate/response.go | 4 +- .../bulkdeleterole/bulk_delete_role.go | 2 +- typedapi/security/bulkdeleterole/request.go | 5 +- typedapi/security/bulkdeleterole/response.go | 5 +- .../security/bulkputrole/bulk_put_role.go | 2 +- typedapi/security/bulkputrole/request.go | 5 +- typedapi/security/bulkputrole/response.go | 5 +- .../bulkupdateapikeys/bulk_update_api_keys.go | 4 +- .../security/bulkupdateapikeys/request.go | 5 +- .../security/bulkupdateapikeys/response.go | 4 +- .../changepassword/change_password.go | 2 +- typedapi/security/changepassword/request.go | 5 +- typedapi/security/changepassword/response.go | 4 +- .../clearapikeycache/clear_api_key_cache.go | 2 +- .../security/clearapikeycache/response.go | 4 +- .../clear_cached_privileges.go | 2 +- .../clearcachedprivileges/response.go | 4 +- .../clearcachedrealms/clear_cached_realms.go | 2 +- .../security/clearcachedrealms/response.go | 4 +- .../clearcachedroles/clear_cached_roles.go | 2 +- .../security/clearcachedroles/response.go | 4 +- .../clear_cached_service_tokens.go | 2 +- .../clearcachedservicetokens/response.go | 4 +- .../security/createapikey/create_api_key.go | 2 +- typedapi/security/createapikey/request.go | 5 +- typedapi/security/createapikey/response.go | 5 +- .../create_cross_cluster_api_key.go | 18 +- .../createcrossclusterapikey/request.go | 23 +- .../createcrossclusterapikey/response.go | 5 +- .../create_service_token.go | 2 +- .../security/createservicetoken/response.go | 4 +- typedapi/security/delegatepki/delegate_pki.go | 2 +- typedapi/security/delegatepki/request.go | 5 +- typedapi/security/delegatepki/response.go | 5 +- .../deleteprivileges/delete_privileges.go | 2 +- .../security/deleteprivileges/response.go | 4 +- typedapi/security/deleterole/delete_role.go | 2 +- typedapi/security/deleterole/response.go | 5 +- .../deleterolemapping/delete_role_mapping.go | 2 +- .../security/deleterolemapping/response.go | 5 +- .../delete_service_token.go | 2 +- .../security/deleteservicetoken/response.go | 5 +- typedapi/security/deleteuser/delete_user.go | 2 +- typedapi/security/deleteuser/response.go | 5 +- typedapi/security/disableuser/disable_user.go | 2 +- typedapi/security/disableuser/response.go | 4 +- .../disable_user_profile.go | 2 +- .../security/disableuserprofile/response.go | 5 +- typedapi/security/enableuser/enable_user.go | 2 +- typedapi/security/enableuser/response.go | 4 +- .../enableuserprofile/enable_user_profile.go | 2 +- .../security/enableuserprofile/response.go | 5 +- .../security/enrollkibana/enroll_kibana.go | 2 +- typedapi/security/enrollkibana/response.go | 5 +- typedapi/security/enrollnode/enroll_node.go | 2 +- typedapi/security/enrollnode/response.go | 5 +- typedapi/security/getapikey/get_api_key.go | 2 +- typedapi/security/getapikey/response.go | 4 +- .../get_builtin_privileges.go | 2 +- .../security/getbuiltinprivileges/response.go | 5 +- .../security/getprivileges/get_privileges.go | 2 +- typedapi/security/getprivileges/response.go | 4 +- typedapi/security/getrole/get_role.go | 2 +- typedapi/security/getrole/response.go | 4 +- .../getrolemapping/get_role_mapping.go | 2 +- typedapi/security/getrolemapping/response.go | 4 +- .../get_service_accounts.go | 2 +- .../security/getserviceaccounts/response.go | 4 +- .../get_service_credentials.go | 2 +- .../getservicecredentials/response.go | 4 +- typedapi/security/getsettings/get_settings.go | 2 +- typedapi/security/getsettings/response.go | 5 +- typedapi/security/getstats/get_stats.go | 331 ++++++ typedapi/security/getstats/response.go | 41 + typedapi/security/gettoken/get_token.go | 2 +- typedapi/security/gettoken/request.go | 5 +- typedapi/security/gettoken/response.go | 4 +- typedapi/security/getuser/get_user.go | 2 +- typedapi/security/getuser/response.go | 4 +- .../getuserprivileges/get_user_privileges.go | 2 +- .../security/getuserprivileges/response.go | 4 +- .../getuserprofile/get_user_profile.go | 2 +- typedapi/security/getuserprofile/response.go | 4 +- .../security/grantapikey/grant_api_key.go | 2 +- typedapi/security/grantapikey/request.go | 5 +- typedapi/security/grantapikey/response.go | 4 +- .../security/hasprivileges/has_privileges.go | 2 +- typedapi/security/hasprivileges/request.go | 4 +- typedapi/security/hasprivileges/response.go | 4 +- .../has_privileges_user_profile.go | 2 +- .../hasprivilegesuserprofile/request.go | 5 +- .../hasprivilegesuserprofile/response.go | 5 +- .../invalidateapikey/invalidate_api_key.go | 2 +- typedapi/security/invalidateapikey/request.go | 4 +- .../security/invalidateapikey/response.go | 5 +- .../invalidatetoken/invalidate_token.go | 2 +- typedapi/security/invalidatetoken/request.go | 5 +- typedapi/security/invalidatetoken/response.go | 5 +- .../oidcauthenticate/oidc_authenticate.go | 2 +- typedapi/security/oidcauthenticate/request.go | 5 +- .../security/oidcauthenticate/response.go | 5 +- typedapi/security/oidclogout/oidc_logout.go | 2 +- typedapi/security/oidclogout/request.go | 5 +- typedapi/security/oidclogout/response.go | 5 +- .../oidc_prepare_authentication.go | 2 +- .../oidcprepareauthentication/request.go | 5 +- .../oidcprepareauthentication/response.go | 4 +- .../security/putprivileges/put_privileges.go | 2 +- typedapi/security/putprivileges/request.go | 4 +- typedapi/security/putprivileges/response.go | 4 +- typedapi/security/putrole/put_role.go | 2 +- typedapi/security/putrole/request.go | 5 +- typedapi/security/putrole/response.go | 5 +- .../putrolemapping/put_role_mapping.go | 2 +- typedapi/security/putrolemapping/request.go | 5 +- typedapi/security/putrolemapping/response.go | 4 +- typedapi/security/putuser/put_user.go | 2 +- typedapi/security/putuser/request.go | 5 +- typedapi/security/putuser/response.go | 5 +- .../security/queryapikeys/query_api_keys.go | 2 +- typedapi/security/queryapikeys/request.go | 5 +- typedapi/security/queryapikeys/response.go | 5 +- typedapi/security/queryrole/query_role.go | 6 +- typedapi/security/queryrole/request.go | 9 +- typedapi/security/queryrole/response.go | 5 +- typedapi/security/queryuser/query_user.go | 2 +- typedapi/security/queryuser/request.go | 5 +- typedapi/security/queryuser/response.go | 5 +- typedapi/security/samlauthenticate/request.go | 5 +- .../security/samlauthenticate/response.go | 5 +- .../samlauthenticate/saml_authenticate.go | 2 +- .../security/samlcompletelogout/request.go | 5 +- .../saml_complete_logout.go | 2 +- typedapi/security/samlinvalidate/request.go | 5 +- typedapi/security/samlinvalidate/response.go | 5 +- .../samlinvalidate/saml_invalidate.go | 2 +- typedapi/security/samllogout/request.go | 5 +- typedapi/security/samllogout/response.go | 5 +- typedapi/security/samllogout/saml_logout.go | 2 +- .../samlprepareauthentication/request.go | 5 +- .../samlprepareauthentication/response.go | 5 +- .../saml_prepare_authentication.go | 2 +- .../samlserviceprovidermetadata/response.go | 5 +- .../saml_service_provider_metadata.go | 2 +- .../security/suggestuserprofiles/request.go | 5 +- .../security/suggestuserprofiles/response.go | 5 +- .../suggest_user_profiles.go | 2 +- typedapi/security/updateapikey/request.go | 5 +- typedapi/security/updateapikey/response.go | 5 +- .../security/updateapikey/update_api_key.go | 2 +- .../updatecrossclusterapikey/request.go | 28 +- .../updatecrossclusterapikey/response.go | 5 +- .../update_cross_cluster_api_key.go | 23 +- typedapi/security/updatesettings/request.go | 5 +- typedapi/security/updatesettings/response.go | 4 +- .../updatesettings/update_settings.go | 2 +- .../security/updateuserprofiledata/request.go | 5 +- .../updateuserprofiledata/response.go | 5 +- .../update_user_profile_data.go | 2 +- typedapi/shutdown/deletenode/delete_node.go | 13 +- typedapi/shutdown/deletenode/response.go | 5 +- typedapi/shutdown/getnode/get_node.go | 9 +- typedapi/shutdown/getnode/response.go | 4 +- typedapi/shutdown/putnode/put_node.go | 11 +- typedapi/shutdown/putnode/request.go | 5 +- typedapi/shutdown/putnode/response.go | 5 +- typedapi/simulate/ingest/ingest.go | 19 +- typedapi/simulate/ingest/request.go | 5 +- typedapi/simulate/ingest/response.go | 4 +- .../slm/deletelifecycle/delete_lifecycle.go | 4 +- typedapi/slm/deletelifecycle/response.go | 5 +- .../slm/executelifecycle/execute_lifecycle.go | 4 +- typedapi/slm/executelifecycle/response.go | 4 +- .../slm/executeretention/execute_retention.go | 4 +- typedapi/slm/executeretention/response.go | 5 +- typedapi/slm/getlifecycle/get_lifecycle.go | 4 +- typedapi/slm/getlifecycle/response.go | 4 +- typedapi/slm/getstats/get_stats.go | 4 +- typedapi/slm/getstats/response.go | 4 +- typedapi/slm/getstatus/get_status.go | 2 +- typedapi/slm/getstatus/response.go | 4 +- typedapi/slm/putlifecycle/put_lifecycle.go | 4 +- typedapi/slm/putlifecycle/request.go | 5 +- typedapi/slm/putlifecycle/response.go | 5 +- typedapi/slm/start/response.go | 5 +- typedapi/slm/start/start.go | 4 +- typedapi/slm/stop/response.go | 5 +- typedapi/slm/stop/stop.go | 4 +- .../cleanuprepository/cleanup_repository.go | 4 +- .../snapshot/cleanuprepository/response.go | 5 +- typedapi/snapshot/clone/clone.go | 4 +- typedapi/snapshot/clone/request.go | 5 +- typedapi/snapshot/clone/response.go | 5 +- typedapi/snapshot/create/create.go | 4 +- typedapi/snapshot/create/request.go | 5 +- typedapi/snapshot/create/response.go | 5 +- .../createrepository/create_repository.go | 4 +- typedapi/snapshot/createrepository/request.go | 4 +- .../snapshot/createrepository/response.go | 5 +- typedapi/snapshot/delete/delete.go | 2 +- typedapi/snapshot/delete/response.go | 5 +- .../deleterepository/delete_repository.go | 4 +- .../snapshot/deleterepository/response.go | 5 +- typedapi/snapshot/get/get.go | 2 +- typedapi/snapshot/get/response.go | 5 +- .../snapshot/getrepository/get_repository.go | 2 +- typedapi/snapshot/getrepository/response.go | 4 +- .../repositoryanalyze/repository_analyze.go | 18 +- .../snapshot/repositoryanalyze/response.go | 5 +- .../repository_verify_integrity.go | 4 +- .../repositoryverifyintegrity/response.go | 4 +- typedapi/snapshot/restore/request.go | 5 +- typedapi/snapshot/restore/response.go | 4 +- typedapi/snapshot/restore/restore.go | 4 +- typedapi/snapshot/status/response.go | 4 +- typedapi/snapshot/status/status.go | 28 +- .../snapshot/verifyrepository/response.go | 5 +- .../verifyrepository/verify_repository.go | 4 +- typedapi/sql/clearcursor/clear_cursor.go | 2 +- typedapi/sql/clearcursor/request.go | 5 +- typedapi/sql/clearcursor/response.go | 4 +- typedapi/sql/deleteasync/delete_async.go | 4 +- typedapi/sql/deleteasync/response.go | 5 +- typedapi/sql/getasync/get_async.go | 4 +- typedapi/sql/getasync/response.go | 5 +- .../sql/getasyncstatus/get_async_status.go | 4 +- typedapi/sql/getasyncstatus/response.go | 5 +- typedapi/sql/query/query.go | 22 +- typedapi/sql/query/request.go | 5 +- typedapi/sql/query/response.go | 5 +- typedapi/sql/translate/request.go | 5 +- typedapi/sql/translate/response.go | 22 +- typedapi/sql/translate/translate.go | 4 +- typedapi/ssl/certificates/certificates.go | 2 +- typedapi/ssl/certificates/response.go | 4 +- typedapi/streams/logsdisable/logs_disable.go | 132 ++- typedapi/streams/logsdisable/response.go | 36 + typedapi/streams/logsenable/logs_enable.go | 144 ++- typedapi/streams/logsenable/response.go | 36 + typedapi/streams/status/response.go | 38 + typedapi/streams/status/status.go | 121 ++- .../synonyms/deletesynonym/delete_synonym.go | 2 +- typedapi/synonyms/deletesynonym/response.go | 5 +- .../deletesynonymrule/delete_synonym_rule.go | 4 +- .../synonyms/deletesynonymrule/response.go | 5 +- typedapi/synonyms/getsynonym/get_synonym.go | 2 +- typedapi/synonyms/getsynonym/response.go | 5 +- .../getsynonymrule/get_synonym_rule.go | 4 +- typedapi/synonyms/getsynonymrule/response.go | 5 +- .../getsynonymssets/get_synonyms_sets.go | 4 +- typedapi/synonyms/getsynonymssets/response.go | 5 +- typedapi/synonyms/putsynonym/put_synonym.go | 4 +- typedapi/synonyms/putsynonym/request.go | 5 +- typedapi/synonyms/putsynonym/response.go | 5 +- .../putsynonymrule/put_synonym_rule.go | 4 +- typedapi/synonyms/putsynonymrule/request.go | 5 +- typedapi/synonyms/putsynonymrule/response.go | 5 +- typedapi/tasks/cancel/cancel.go | 2 +- typedapi/tasks/cancel/response.go | 4 +- typedapi/tasks/get/get.go | 4 +- typedapi/tasks/get/response.go | 4 +- typedapi/tasks/list/list.go | 4 +- typedapi/tasks/list/response.go | 4 +- .../find_field_structure.go | 12 +- .../findfieldstructure/response.go | 4 +- .../find_message_structure.go | 12 +- .../findmessagestructure/request.go | 5 +- .../findmessagestructure/response.go | 4 +- .../findstructure/find_structure.go | 17 +- .../textstructure/findstructure/request.go | 4 +- .../textstructure/findstructure/response.go | 5 +- .../textstructure/testgrokpattern/request.go | 5 +- .../textstructure/testgrokpattern/response.go | 4 +- .../testgrokpattern/test_grok_pattern.go | 4 +- .../deletetransform/delete_transform.go | 2 +- .../transform/deletetransform/response.go | 5 +- .../transform/getnodestats/get_node_stats.go | 6 +- .../transform/gettransform/get_transform.go | 4 +- typedapi/transform/gettransform/response.go | 4 +- .../gettransformstats/get_transform_stats.go | 2 +- .../transform/gettransformstats/response.go | 4 +- .../previewtransform/preview_transform.go | 4 +- .../transform/previewtransform/request.go | 5 +- .../transform/previewtransform/response.go | 4 +- .../transform/puttransform/put_transform.go | 4 +- typedapi/transform/puttransform/request.go | 5 +- typedapi/transform/puttransform/response.go | 5 +- .../resettransform/reset_transform.go | 2 +- typedapi/transform/resettransform/response.go | 5 +- .../schedulenowtransform/response.go | 5 +- .../schedule_now_transform.go | 2 +- typedapi/transform/setupgrademode/response.go | 36 + .../setupgrademode/set_upgrade_mode.go | 365 +++++++ typedapi/transform/starttransform/response.go | 5 +- .../starttransform/start_transform.go | 2 +- typedapi/transform/stoptransform/response.go | 5 +- .../transform/stoptransform/stop_transform.go | 4 +- typedapi/transform/updatetransform/request.go | 5 +- .../transform/updatetransform/response.go | 4 +- .../updatetransform/update_transform.go | 4 +- .../transform/upgradetransforms/response.go | 5 +- .../upgradetransforms/upgrade_transforms.go | 2 +- typedapi/types/access.go | 4 +- typedapi/types/acknowledgement.go | 4 +- typedapi/types/acknowledgestate.go | 4 +- typedapi/types/actionstatus.go | 4 +- typedapi/types/activationstate.go | 4 +- typedapi/types/activationstatus.go | 4 +- typedapi/types/adaptiveallocations.go | 4 +- typedapi/types/adaptiveallocationssettings.go | 4 +- typedapi/types/adaptiveselection.go | 4 +- typedapi/types/addaction.go | 55 +- typedapi/types/addindicesblockstatus.go | 4 +- typedapi/types/adjacencymatrixaggregate.go | 4 +- typedapi/types/adjacencymatrixaggregation.go | 4 +- typedapi/types/adjacencymatrixbucket.go | 25 +- typedapi/types/aggregate.go | 7 +- .../types/aggregatemetricdoubleproperty.go | 4 +- typedapi/types/aggregateorder.go | 4 +- typedapi/types/aggregateoutput.go | 4 +- typedapi/types/aggregationbreakdown.go | 4 +- typedapi/types/aggregationprofile.go | 4 +- typedapi/types/aggregationprofiledebug.go | 4 +- .../aggregationprofiledelegatedebugfilter.go | 4 +- typedapi/types/aggregationrange.go | 4 +- typedapi/types/aggregations.go | 36 +- typedapi/types/ai21servicesettings.go | 122 +++ typedapi/types/alias.go | 55 +- typedapi/types/aliasdefinition.go | 4 +- typedapi/types/aliasesrecord.go | 4 +- typedapi/types/alibabacloudservicesettings.go | 4 +- typedapi/types/alibabacloudtasksettings.go | 4 +- typedapi/types/allfield.go | 4 +- typedapi/types/allocateaction.go | 4 +- typedapi/types/allocationdecision.go | 4 +- typedapi/types/allocationrecord.go | 4 +- typedapi/types/allocationstore.go | 4 +- typedapi/types/alwayscondition.go | 4 +- .../types/amazonbedrockservicesettings.go | 4 +- typedapi/types/amazonbedrocktasksettings.go | 4 +- .../types/amazonsagemakerservicesettings.go | 4 +- typedapi/types/amazonsagemakertasksettings.go | 4 +- typedapi/types/analysisconfig.go | 4 +- typedapi/types/analysisconfigread.go | 4 +- typedapi/types/analysislimits.go | 4 +- typedapi/types/analysismemorylimit.go | 4 +- typedapi/types/analytics.go | 4 +- typedapi/types/analyticscollection.go | 4 +- typedapi/types/analyticsstatistics.go | 4 +- typedapi/types/analyzedetail.go | 4 +- typedapi/types/analyzer.go | 4 +- typedapi/types/analyzerdetail.go | 4 +- typedapi/types/analyzetoken.go | 4 +- typedapi/types/anomaly.go | 4 +- typedapi/types/anomalycause.go | 4 +- typedapi/types/anomalydetectors.go | 4 +- typedapi/types/anomalyexplanation.go | 4 +- typedapi/types/anthropicservicesettings.go | 4 +- typedapi/types/anthropictasksettings.go | 4 +- typedapi/types/apikey.go | 21 +- typedapi/types/apikeyaggregate.go | 4 +- typedapi/types/apikeyaggregationcontainer.go | 4 +- typedapi/types/apikeyauthorization.go | 4 +- typedapi/types/apikeyfiltersaggregation.go | 4 +- typedapi/types/apikeyquerycontainer.go | 4 +- typedapi/types/apostrophetokenfilter.go | 4 +- typedapi/types/appendprocessor.go | 17 +- .../types/applicationglobaluserprivileges.go | 4 +- typedapi/types/applicationprivileges.go | 4 +- typedapi/types/applicationprivilegescheck.go | 4 +- typedapi/types/applicationsprivileges.go | 4 +- typedapi/types/arabicanalyzer.go | 4 +- .../types/arabicnormalizationtokenfilter.go | 4 +- typedapi/types/arabicstemtokenfilter.go | 4 +- typedapi/types/archive.go | 4 +- typedapi/types/armeniananalyzer.go | 4 +- typedapi/types/arraycomparecondition.go | 4 +- typedapi/types/arraycompareopparams.go | 4 +- typedapi/types/arraypercentilesitem.go | 28 +- typedapi/types/asciifoldingtokenfilter.go | 4 +- typedapi/types/asyncsearch.go | 25 +- typedapi/types/attachmentprocessor.go | 4 +- typedapi/types/audit.go | 4 +- typedapi/types/authenticateapikey.go | 32 +- typedapi/types/authenticateduser.go | 4 +- typedapi/types/authenticatetoken.go | 4 +- typedapi/types/authentication.go | 4 +- typedapi/types/authenticationprovider.go | 4 +- typedapi/types/authenticationrealm.go | 4 +- typedapi/types/autodatehistogramaggregate.go | 4 +- .../types/autodatehistogramaggregation.go | 4 +- typedapi/types/autofollowedcluster.go | 4 +- typedapi/types/autofollowpattern.go | 4 +- typedapi/types/autofollowpatternsummary.go | 4 +- typedapi/types/autofollowstats.go | 4 +- typedapi/types/autoscalingcapacity.go | 4 +- typedapi/types/autoscalingdecider.go | 4 +- typedapi/types/autoscalingdeciders.go | 4 +- typedapi/types/autoscalingnode.go | 4 +- typedapi/types/autoscalingpolicy.go | 4 +- typedapi/types/autoscalingresources.go | 4 +- typedapi/types/averageaggregation.go | 4 +- typedapi/types/averagebucketaggregation.go | 4 +- typedapi/types/avgaggregate.go | 4 +- .../types/azureaistudioservicesettings.go | 4 +- typedapi/types/azureaistudiotasksettings.go | 39 +- typedapi/types/azureopenaiservicesettings.go | 4 +- typedapi/types/azureopenaitasksettings.go | 4 +- typedapi/types/azurerepository.go | 4 +- typedapi/types/azurerepositorysettings.go | 4 +- typedapi/types/base.go | 4 +- typedapi/types/basqueanalyzer.go | 4 +- typedapi/types/bengalianalyzer.go | 4 +- .../types/bengalinormalizationtokenfilter.go | 4 +- typedapi/types/binaryproperty.go | 4 +- typedapi/types/blobdetails.go | 4 +- typedapi/types/body.go | 4 +- typedapi/types/booleanproperty.go | 4 +- typedapi/types/boolquery.go | 4 +- typedapi/types/boostingquery.go | 4 +- typedapi/types/boxplotaggregate.go | 4 +- typedapi/types/boxplotaggregation.go | 4 +- typedapi/types/braziliananalyzer.go | 4 +- typedapi/types/brazilianstemtokenfilter.go | 4 +- typedapi/types/breaker.go | 4 +- .../types/bucketcorrelationaggregation.go | 4 +- typedapi/types/bucketcorrelationfunction.go | 4 +- ...cketcorrelationfunctioncountcorrelation.go | 4 +- ...lationfunctioncountcorrelationindicator.go | 4 +- typedapi/types/bucketinfluencer.go | 4 +- typedapi/types/bucketksaggregation.go | 4 +- typedapi/types/bucketmetricvalueaggregate.go | 4 +- .../types/bucketsadjacencymatrixbucket.go | 4 +- typedapi/types/bucketsapikeyquerycontainer.go | 4 +- typedapi/types/bucketscompositebucket.go | 4 +- typedapi/types/bucketscriptaggregation.go | 4 +- typedapi/types/bucketsdatehistogrambucket.go | 4 +- typedapi/types/bucketsdoubletermsbucket.go | 4 +- typedapi/types/bucketselectoraggregation.go | 4 +- typedapi/types/bucketsfiltersbucket.go | 4 +- .../types/bucketsfrequentitemsetsbucket.go | 4 +- typedapi/types/bucketsgeohashgridbucket.go | 4 +- typedapi/types/bucketsgeohexgridbucket.go | 4 +- typedapi/types/bucketsgeotilegridbucket.go | 4 +- typedapi/types/bucketshistogrambucket.go | 4 +- typedapi/types/bucketsipprefixbucket.go | 4 +- typedapi/types/bucketsiprangebucket.go | 4 +- typedapi/types/bucketslongraretermsbucket.go | 4 +- typedapi/types/bucketslongtermsbucket.go | 4 +- typedapi/types/bucketsmultitermsbucket.go | 4 +- typedapi/types/bucketsortaggregation.go | 4 +- typedapi/types/bucketspath.go | 4 +- typedapi/types/bucketsquery.go | 4 +- typedapi/types/bucketsrangebucket.go | 4 +- .../bucketssignificantlongtermsbucket.go | 4 +- .../bucketssignificantstringtermsbucket.go | 4 +- .../types/bucketsstringraretermsbucket.go | 4 +- typedapi/types/bucketsstringtermsbucket.go | 4 +- typedapi/types/bucketstimeseriesbucket.go | 4 +- typedapi/types/bucketsummary.go | 4 +- .../bucketsvariablewidthhistogrambucket.go | 4 +- typedapi/types/bucketsvoid.go | 4 +- typedapi/types/buildinformation.go | 4 +- typedapi/types/bulgariananalyzer.go | 4 +- typedapi/types/bulkerror.go | 4 +- typedapi/types/bulkindexbyscrollfailure.go | 4 +- typedapi/types/bulkstats.go | 4 +- typedapi/types/bytenumberproperty.go | 4 +- typedapi/types/bytesize.go | 4 +- typedapi/types/bytesprocessor.go | 4 +- typedapi/types/cachequeries.go | 4 +- typedapi/types/cachestats.go | 4 +- typedapi/types/calendar.go | 4 +- typedapi/types/calendarevent.go | 4 +- typedapi/types/cardinalityaggregate.go | 4 +- typedapi/types/cardinalityaggregation.go | 4 +- typedapi/types/cartesianboundsaggregate.go | 74 ++ typedapi/types/cartesianboundsaggregation.go | 91 ++ typedapi/types/cartesiancentroidaggregate.go | 91 ++ .../types/cartesiancentroidaggregation.go | 91 ++ typedapi/types/cartesianpoint.go | 97 ++ typedapi/types/catalananalyzer.go | 4 +- typedapi/types/cataliasescolumns.go | 30 + typedapi/types/catallocationcolumns.go | 30 + ...olumns.go => catanomalydetectorcolumns.go} | 8 +- typedapi/types/catcomponentcolumns.go | 30 + typedapi/types/catcomponenttemplate.go | 4 +- typedapi/types/catcountcolumns.go | 30 + typedapi/types/catdatafeedcolumns.go | 4 +- typedapi/types/catdfacolumns.go | 4 +- typedapi/types/categorizationanalyzer.go | 4 +- .../types/categorizationanalyzerdefinition.go | 4 +- typedapi/types/categorizetextaggregation.go | 4 +- typedapi/types/categorizetextanalyzer.go | 4 +- typedapi/types/category.go | 4 +- typedapi/types/catfielddatacolumns.go | 30 + typedapi/types/cathealthcolumns.go | 30 + typedapi/types/catindicescolumns.go | 30 + typedapi/types/catmastercolumns.go | 30 + typedapi/types/catnodeattrscolumns.go | 30 + typedapi/types/catnodecolumns.go | 4 +- typedapi/types/catpendingtaskscolumns.go | 30 + typedapi/types/catpluginscolumns.go | 30 + typedapi/types/catrecoverycolumns.go | 4 +- typedapi/types/catsegmentscolumns.go | 4 +- typedapi/types/catshardcolumns.go | 4 +- typedapi/types/catsnapshotscolumns.go | 4 +- typedapi/types/cattaskscolumns.go | 30 + typedapi/types/cattemplatescolumns.go | 30 + typedapi/types/catthreadpoolcolumns.go | 4 +- typedapi/types/cattrainedmodelscolumns.go | 4 +- typedapi/types/cattransformcolumns.go | 4 +- typedapi/types/ccr.go | 4 +- typedapi/types/ccrshardstats.go | 4 +- typedapi/types/ccsstats.go | 4 +- typedapi/types/ccsusageclusterstats.go | 4 +- typedapi/types/ccsusagestats.go | 4 +- typedapi/types/ccsusagetimevalue.go | 4 +- typedapi/types/certificateinformation.go | 4 +- typedapi/types/cgroup.go | 4 +- typedapi/types/cgroupcpu.go | 4 +- typedapi/types/cgroupcpustat.go | 4 +- typedapi/types/cgroupmemory.go | 4 +- typedapi/types/chaininput.go | 4 +- typedapi/types/changepointaggregate.go | 80 ++ typedapi/types/changepointaggregation.go | 103 ++ typedapi/types/changepointbucket.go | 659 ++++++++++++ typedapi/types/changetype.go | 42 + typedapi/types/charfilter.go | 4 +- typedapi/types/charfilterdefinition.go | 4 +- typedapi/types/charfilterdetail.go | 4 +- typedapi/types/charfiltertypes.go | 4 +- typedapi/types/chargrouptokenizer.go | 4 +- typedapi/types/checkpointing.go | 4 +- typedapi/types/checkpointstats.go | 4 +- typedapi/types/childrenaggregate.go | 25 +- typedapi/types/childrenaggregation.go | 4 +- typedapi/types/chineseanalyzer.go | 4 +- typedapi/types/chisquareheuristic.go | 4 +- typedapi/types/chunkingconfig.go | 4 +- typedapi/types/chunkingsettings.go | 56 +- typedapi/types/chunkrescorer.go | 96 ++ .../types/chunkrescorerchunkingsettings.go | 191 ++++ typedapi/types/circleprocessor.go | 4 +- typedapi/types/cjkanalyzer.go | 4 +- typedapi/types/cjkbigramtokenfilter.go | 4 +- typedapi/types/cjkwidthtokenfilter.go | 4 +- typedapi/types/classictokenfilter.go | 4 +- typedapi/types/classictokenizer.go | 4 +- .../types/classificationinferenceoptions.go | 4 +- typedapi/types/cleanuprepositoryresults.go | 4 +- typedapi/types/client.go | 4 +- typedapi/types/closeindexresult.go | 4 +- typedapi/types/closeshardresult.go | 4 +- typedapi/types/clusterappliedstats.go | 4 +- typedapi/types/clustercomponenttemplate.go | 4 +- typedapi/types/clusterdetails.go | 4 +- typedapi/types/clusterfilesystem.go | 4 +- typedapi/types/clusterindexingpressure.go | 4 +- typedapi/types/clusterindices.go | 4 +- typedapi/types/clusterindicesshards.go | 4 +- typedapi/types/clusterindicesshardsindex.go | 4 +- typedapi/types/clusterinfo.go | 4 +- typedapi/types/clusterinfotargets.go | 4 +- typedapi/types/clusteringest.go | 4 +- typedapi/types/clusterjvm.go | 4 +- typedapi/types/clusterjvmmemory.go | 4 +- typedapi/types/clusterjvmversion.go | 4 +- typedapi/types/clusternetworktypes.go | 4 +- typedapi/types/clusternode.go | 4 +- typedapi/types/clusternodecount.go | 4 +- typedapi/types/clusternodes.go | 4 +- typedapi/types/clusteroperatingsystem.go | 4 +- .../clusteroperatingsystemarchitecture.go | 4 +- typedapi/types/clusteroperatingsystemname.go | 4 +- .../types/clusteroperatingsystemprettyname.go | 4 +- typedapi/types/clusterprocess.go | 4 +- typedapi/types/clusterprocesscpu.go | 4 +- .../clusterprocessopenfiledescriptors.go | 4 +- typedapi/types/clusterprocessor.go | 4 +- typedapi/types/clusterremoteinfo.go | 4 +- typedapi/types/clusterremoteproxyinfo.go | 4 +- typedapi/types/clusterremotesniffinfo.go | 4 +- typedapi/types/clusterruntimefieldtypes.go | 4 +- typedapi/types/clustershardmetrics.go | 4 +- typedapi/types/clustersnapshotstats.go | 4 +- typedapi/types/clusterstatemetrics.go | 30 + typedapi/types/clusterstatequeue.go | 4 +- typedapi/types/clusterstateupdate.go | 4 +- typedapi/types/clusterstatistics.go | 4 +- typedapi/types/cohereservicesettings.go | 10 +- typedapi/types/coheretasksettings.go | 6 +- typedapi/types/collector.go | 4 +- typedapi/types/column.go | 4 +- typedapi/types/combinedfieldsquery.go | 4 +- typedapi/types/command.go | 4 +- .../types/commandallocateprimaryaction.go | 4 +- .../types/commandallocatereplicaaction.go | 4 +- typedapi/types/commandcancelaction.go | 4 +- typedapi/types/commandmoveaction.go | 4 +- typedapi/types/commongramstokenfilter.go | 4 +- typedapi/types/commonstatsflags.go | 30 + typedapi/types/commontermsquery.go | 4 +- typedapi/types/communityidprocessor.go | 4 +- typedapi/types/compactnodeinfo.go | 4 +- typedapi/types/completioncontext.go | 4 +- typedapi/types/completionproperty.go | 4 +- typedapi/types/completionresult.go | 4 +- typedapi/types/completionstats.go | 4 +- typedapi/types/completionsuggest.go | 4 +- typedapi/types/completionsuggester.go | 4 +- typedapi/types/completionsuggestoption.go | 21 +- typedapi/types/completiontool.go | 4 +- typedapi/types/completiontoolchoice.go | 4 +- .../types/completiontoolchoicefunction.go | 4 +- typedapi/types/completiontoolfunction.go | 4 +- typedapi/types/completiontooltype.go | 4 +- typedapi/types/componenttemplatenode.go | 44 +- typedapi/types/componenttemplatesummary.go | 4 +- typedapi/types/compositeaggregate.go | 4 +- typedapi/types/compositeaggregatekey.go | 4 +- typedapi/types/compositeaggregation.go | 4 +- typedapi/types/compositeaggregationsource.go | 4 +- typedapi/types/compositebucket.go | 25 +- .../compositedatehistogramaggregation.go | 4 +- .../types/compositegeotilegridaggregation.go | 4 +- .../types/compositehistogramaggregation.go | 4 +- typedapi/types/compositesubfield.go | 4 +- typedapi/types/compositetermsaggregation.go | 4 +- typedapi/types/conditiontokenfilter.go | 4 +- typedapi/types/configuration.go | 4 +- typedapi/types/confusionmatrixitem.go | 4 +- typedapi/types/confusionmatrixprediction.go | 4 +- typedapi/types/confusionmatrixthreshold.go | 4 +- typedapi/types/connection.go | 4 +- typedapi/types/connector.go | 4 +- typedapi/types/connectorconfigproperties.go | 4 +- typedapi/types/connectorconfiguration.go | 4 +- typedapi/types/connectorcustomscheduling.go | 4 +- typedapi/types/connectorfeatures.go | 4 +- typedapi/types/connectorscheduling.go | 4 +- typedapi/types/connectorsyncjob.go | 4 +- typedapi/types/constantkeywordproperty.go | 4 +- typedapi/types/constantscorequery.go | 4 +- typedapi/types/contentobject.go | 4 +- typedapi/types/context.go | 4 +- typedapi/types/contextmethod.go | 4 +- typedapi/types/contextmethodparam.go | 4 +- typedapi/types/contextualaiservicesettings.go | 119 +++ typedapi/types/contextualaitasksettings.go | 124 +++ typedapi/types/convertprocessor.go | 4 +- typedapi/types/coordinatorstats.go | 4 +- typedapi/types/coordsgeobounds.go | 4 +- typedapi/types/countedkeywordproperty.go | 4 +- typedapi/types/counter.go | 4 +- typedapi/types/countrecord.go | 4 +- typedapi/types/cpu.go | 4 +- typedapi/types/cpuacct.go | 4 +- typedapi/types/createdstatus.go | 4 +- typedapi/types/createfrom.go | 4 +- typedapi/types/createoperation.go | 21 +- typedapi/types/csvprocessor.go | 4 +- .../types/cumulativecardinalityaggregate.go | 4 +- .../types/cumulativecardinalityaggregation.go | 4 +- typedapi/types/cumulativesumaggregation.go | 4 +- typedapi/types/currentnode.go | 4 +- typedapi/types/customanalyzer.go | 4 +- .../types/customcategorizetextanalyzer.go | 4 +- typedapi/types/customnormalizer.go | 4 +- typedapi/types/customrequestparams.go | 4 +- typedapi/types/customresponseparams.go | 21 +- typedapi/types/customscheduling.go | 4 +- .../customschedulingconfigurationoverrides.go | 4 +- typedapi/types/customservicesettings.go | 31 +- typedapi/types/customtasksettings.go | 4 +- typedapi/types/czechanalyzer.go | 4 +- typedapi/types/czechstemtokenfilter.go | 4 +- typedapi/types/dailyschedule.go | 4 +- typedapi/types/danglingindex.go | 4 +- typedapi/types/danishanalyzer.go | 4 +- typedapi/types/databaseconfiguration.go | 55 +- typedapi/types/databaseconfigurationfull.go | 57 +- typedapi/types/datacounts.go | 4 +- typedapi/types/datadescription.go | 4 +- typedapi/types/dataemailattachment.go | 4 +- typedapi/types/datafeedauthorization.go | 4 +- typedapi/types/datafeedconfig.go | 4 +- typedapi/types/datafeedrunningstate.go | 4 +- typedapi/types/datafeeds.go | 4 +- typedapi/types/datafeedsrecord.go | 4 +- typedapi/types/datafeedstats.go | 4 +- typedapi/types/datafeedtimingstats.go | 4 +- .../types/dataframeanalysisanalyzedfields.go | 4 +- .../types/dataframeanalysisclassification.go | 4 +- typedapi/types/dataframeanalysiscontainer.go | 43 +- .../dataframeanalysisfeatureprocessor.go | 43 +- ...alysisfeatureprocessorfrequencyencoding.go | 4 +- ...meanalysisfeatureprocessormultiencoding.go | 4 +- ...meanalysisfeatureprocessorngramencoding.go | 4 +- ...eanalysisfeatureprocessoronehotencoding.go | 4 +- ...lysisfeatureprocessortargetmeanencoding.go | 4 +- .../dataframeanalysisoutlierdetection.go | 4 +- typedapi/types/dataframeanalysisregression.go | 4 +- typedapi/types/dataframeanalytics.go | 4 +- .../types/dataframeanalyticsauthorization.go | 4 +- .../types/dataframeanalyticsdestination.go | 4 +- .../types/dataframeanalyticsfieldselection.go | 4 +- .../dataframeanalyticsmemoryestimation.go | 4 +- typedapi/types/dataframeanalyticsrecord.go | 4 +- typedapi/types/dataframeanalyticssource.go | 4 +- .../types/dataframeanalyticsstatscontainer.go | 43 +- .../dataframeanalyticsstatsdatacounts.go | 4 +- .../dataframeanalyticsstatshyperparameters.go | 4 +- .../dataframeanalyticsstatsmemoryusage.go | 4 +- ...dataframeanalyticsstatsoutlierdetection.go | 4 +- .../types/dataframeanalyticsstatsprogress.go | 4 +- typedapi/types/dataframeanalyticssummary.go | 4 +- .../types/dataframeclassificationsummary.go | 4 +- .../dataframeclassificationsummaryaccuracy.go | 4 +- ...icationsummarymulticlassconfusionmatrix.go | 4 +- ...dataframeclassificationsummaryprecision.go | 4 +- .../dataframeclassificationsummaryrecall.go | 4 +- typedapi/types/dataframeevaluationclass.go | 4 +- .../dataframeevaluationclassification.go | 4 +- ...ataframeevaluationclassificationmetrics.go | 4 +- ...meevaluationclassificationmetricsaucroc.go | 4 +- .../types/dataframeevaluationcontainer.go | 43 +- .../dataframeevaluationoutlierdetection.go | 4 +- ...aframeevaluationoutlierdetectionmetrics.go | 4 +- .../types/dataframeevaluationregression.go | 4 +- .../dataframeevaluationregressionmetrics.go | 4 +- ...taframeevaluationregressionmetricshuber.go | 4 +- ...ataframeevaluationregressionmetricsmsle.go | 4 +- .../types/dataframeevaluationsummaryaucroc.go | 4 +- ...taframeevaluationsummaryaucroccurveitem.go | 4 +- typedapi/types/dataframeevaluationvalue.go | 4 +- .../types/dataframeoutlierdetectionsummary.go | 4 +- typedapi/types/dataframepreviewconfig.go | 4 +- typedapi/types/dataframeregressionsummary.go | 4 +- typedapi/types/datapathstats.go | 4 +- typedapi/types/datastream.go | 13 +- typedapi/types/datastreamfailurestore.go | 4 +- .../types/datastreamfailurestoretemplate.go | 4 +- typedapi/types/datastreamindex.go | 4 +- typedapi/types/datastreamlifecycle.go | 4 +- typedapi/types/datastreamlifecycledetails.go | 4 +- .../types/datastreamlifecycledownsampling.go | 4 +- typedapi/types/datastreamlifecycleexplain.go | 4 +- .../types/datastreamlifecycleindicator.go | 4 +- .../datastreamlifecyclerolloverconditions.go | 4 +- .../types/datastreamlifecyclewithrollover.go | 4 +- typedapi/types/datastreammappings.go | 94 ++ typedapi/types/datastreamnames.go | 4 +- typedapi/types/datastreamoptions.go | 4 +- typedapi/types/datastreamoptionstemplate.go | 4 +- typedapi/types/datastreams.go | 4 +- typedapi/types/datastreamsettings.go | 4 +- typedapi/types/datastreamsettingserror.go | 4 +- typedapi/types/datastreamsstatsitem.go | 4 +- typedapi/types/datastreamstats.go | 4 +- typedapi/types/datastreamtimestamp.go | 4 +- typedapi/types/datastreamtimestampfield.go | 4 +- typedapi/types/datastreamvisibility.go | 4 +- typedapi/types/datastreamwithlifecycle.go | 4 +- typedapi/types/datastreamwithoptions.go | 4 +- typedapi/types/datatierphasestatistics.go | 4 +- typedapi/types/datatiers.go | 4 +- typedapi/types/datedecayfunction.go | 4 +- typedapi/types/datedistancefeaturequery.go | 4 +- typedapi/types/datehistogramaggregate.go | 4 +- typedapi/types/datehistogramaggregation.go | 4 +- typedapi/types/datehistogrambucket.go | 25 +- typedapi/types/datehistogramgrouping.go | 4 +- typedapi/types/dateindexnameprocessor.go | 4 +- typedapi/types/datenanosproperty.go | 4 +- typedapi/types/dateprocessor.go | 4 +- typedapi/types/dateproperty.go | 4 +- typedapi/types/daterangeaggregate.go | 4 +- typedapi/types/daterangeaggregation.go | 4 +- typedapi/types/daterangeexpression.go | 4 +- typedapi/types/daterangeproperty.go | 4 +- typedapi/types/daterangequery.go | 4 +- typedapi/types/datetime.go | 4 +- typedapi/types/decayfunction.go | 4 +- typedapi/types/decayplacement.go | 4 +- .../types/decayplacementdatemathduration.go | 4 +- typedapi/types/decayplacementdoubledouble.go | 4 +- .../decayplacementgeolocationdistance.go | 4 +- typedapi/types/decimaldigittokenfilter.go | 4 +- typedapi/types/deepseekservicesettings.go | 4 +- typedapi/types/defaults.go | 4 +- typedapi/types/definition.go | 4 +- typedapi/types/delayeddatacheckconfig.go | 4 +- typedapi/types/deleteaction.go | 4 +- typedapi/types/deleteoperation.go | 21 +- typedapi/types/delimitedpayloadtokenfilter.go | 4 +- typedapi/types/densevectorindexoptions.go | 28 +- .../densevectorindexoptionsrescorevector.go | 4 +- typedapi/types/densevectoroffheapstats.go | 70 +- typedapi/types/densevectorproperty.go | 4 +- typedapi/types/densevectorstats.go | 4 +- typedapi/types/dependency.go | 4 +- typedapi/types/deprecation.go | 4 +- typedapi/types/deprecationindexing.go | 4 +- typedapi/types/derivativeaggregate.go | 4 +- typedapi/types/derivativeaggregation.go | 4 +- typedapi/types/detailsinfo.go | 4 +- typedapi/types/detectionrule.go | 4 +- typedapi/types/detector.go | 4 +- typedapi/types/detectorread.go | 4 +- typedapi/types/detectorupdate.go | 4 +- typedapi/types/dfsknnprofile.go | 4 +- typedapi/types/dfsprofile.go | 4 +- typedapi/types/dfsstatisticsbreakdown.go | 4 +- typedapi/types/dfsstatisticsprofile.go | 4 +- typedapi/types/diagnosis.go | 4 +- typedapi/types/diagnosisaffectedresources.go | 4 +- .../dictionarydecompoundertokenfilter.go | 4 +- typedapi/types/dip.go | 97 ++ typedapi/types/directgenerator.go | 4 +- typedapi/types/discovery.go | 4 +- typedapi/types/discoverynode.go | 4 +- typedapi/types/discoverynodecompact.go | 4 +- typedapi/types/discoverynodecontent.go | 4 +- typedapi/types/diskindicator.go | 4 +- typedapi/types/diskindicatordetails.go | 4 +- typedapi/types/diskusage.go | 4 +- typedapi/types/dismaxquery.go | 4 +- typedapi/types/dissectprocessor.go | 4 +- typedapi/types/distancefeaturequery.go | 4 +- typedapi/types/distributionchange.go | 97 ++ .../types/diversifiedsampleraggregation.go | 4 +- typedapi/types/docstats.go | 4 +- typedapi/types/document.go | 4 +- typedapi/types/documentrating.go | 4 +- typedapi/types/documentsimulation.go | 4 +- typedapi/types/dotexpanderprocessor.go | 4 +- typedapi/types/doublenumberproperty.go | 4 +- typedapi/types/doublerangeproperty.go | 4 +- typedapi/types/doubletermsaggregate.go | 4 +- typedapi/types/doubletermsbucket.go | 25 +- typedapi/types/downsampleaction.go | 4 +- typedapi/types/downsampleconfig.go | 14 +- typedapi/types/downsamplinground.go | 14 +- typedapi/types/dropprocessor.go | 4 +- typedapi/types/duration.go | 4 +- .../types/durationvalueunitfloatmillis.go | 4 +- typedapi/types/durationvalueunitmillis.go | 4 +- typedapi/types/durationvalueunitnanos.go | 4 +- typedapi/types/durationvalueunitseconds.go | 4 +- typedapi/types/dutchanalyzer.go | 4 +- typedapi/types/dutchstemtokenfilter.go | 4 +- typedapi/types/dynamicproperty.go | 4 +- typedapi/types/dynamictemplate.go | 69 +- typedapi/types/edgengramtokenfilter.go | 4 +- typedapi/types/edgengramtokenizer.go | 4 +- .../types/elasticsearchservicesettings.go | 49 +- typedapi/types/elasticsearchtasksettings.go | 4 +- typedapi/types/elasticsearchversioninfo.go | 4 +- typedapi/types/elasticsearchversionmininfo.go | 4 +- typedapi/types/elisiontokenfilter.go | 4 +- typedapi/types/elserservicesettings.go | 4 +- typedapi/types/email.go | 4 +- typedapi/types/emailaction.go | 4 +- typedapi/types/emailattachmentcontainer.go | 49 +- typedapi/types/emailbody.go | 4 +- typedapi/types/emailresult.go | 4 +- typedapi/types/emptyobject.go | 4 +- typedapi/types/englishanalyzer.go | 4 +- typedapi/types/enrichpolicy.go | 4 +- typedapi/types/enrichprocessor.go | 4 +- typedapi/types/ensemble.go | 4 +- .../accesstokengranttype.go | 4 +- .../acknowledgementoptions.go | 4 +- .../actionexecutionmode.go | 4 +- .../actionstatusoptions.go | 4 +- typedapi/types/enums/actiontype/actiontype.go | 4 +- .../enums/ai21servicetype/ai21servicetype.go | 53 + .../types/enums/ai21tasktype/ai21tasktype.go | 57 + .../alibabacloudservicetype.go | 4 +- .../alibabacloudtasktype.go | 10 +- .../allocationexplaindecision.go | 4 +- .../amazonbedrockservicetype.go | 4 +- .../amazonbedrocktasktype.go | 4 +- .../amazonsagemakerapi/amazonsagemakerapi.go | 4 +- .../amazonsagemakerservicetype.go | 4 +- .../anthropicservicetype.go | 4 +- .../anthropictasktype/anthropictasktype.go | 4 +- .../enums/apikeygranttype/apikeygranttype.go | 4 +- .../enums/apikeymanagedby/apikeymanagedby.go | 57 + typedapi/types/enums/apikeytype/apikeytype.go | 4 +- typedapi/types/enums/appliesto/appliesto.go | 4 +- .../azureaistudioservicetype.go | 4 +- .../azureaistudiotasktype.go | 8 +- .../azureopenaiservicetype.go | 4 +- .../azureopenaitasktype.go | 4 +- .../enums/boundaryscanner/boundaryscanner.go | 4 +- typedapi/types/enums/bytes/bytes.go | 4 +- .../calendarinterval/calendarinterval.go | 4 +- .../cardinalityexecutionmode.go | 4 +- .../cataliasescolumn/cataliasescolumn.go | 73 ++ .../catallocationcolumn.go | 101 ++ .../catanomalydetectorcolumn.go | 4 +- .../catcomponentcolumn/catcomponentcolumn.go | 77 ++ .../enums/catcountcolumn/catcountcolumn.go | 61 ++ .../catdatafeedcolumn/catdatafeedcolumn.go | 4 +- .../types/enums/catdfacolumn/catdfacolumn.go | 4 +- .../categorizationstatus.go | 4 +- .../catfielddatacolumn/catfielddatacolumn.go | 73 ++ .../enums/cathealthcolumn/cathealthcolumn.go | 109 ++ .../catindicescolumn/catindicescolumn.go | 637 ++++++++++++ .../enums/catmastercolumn/catmastercolumn.go | 65 ++ .../catnodeattrscolumn/catnodeattrscolumn.go | 81 ++ .../enums/catnodecolumn/catnodecolumn.go | 8 +- .../catpendingtaskscolumn.go | 65 ++ .../catpluginscolumn/catpluginscolumn.go | 69 ++ .../catrecoverycolumn/catrecoverycolumn.go | 36 +- .../catsegmentscolumn/catsegmentscolumn.go | 4 +- .../enums/catshardcolumn/catshardcolumn.go | 4 +- .../catsnapshotscolumn/catsnapshotscolumn.go | 4 +- .../enums/cattaskscolumn/cattaskscolumn.go | 109 ++ .../cattemplatescolumn/cattemplatescolumn.go | 69 ++ .../catthreadpoolcolumn.go | 4 +- .../cattrainedmodelscolumn.go | 4 +- .../cattransformcolumn/cattransformcolumn.go | 4 +- .../enums/childscoremode/childscoremode.go | 4 +- .../types/enums/chunkingmode/chunkingmode.go | 4 +- .../cjkbigramignoredscript.go | 4 +- .../clusterinfotarget/clusterinfotarget.go | 4 +- .../clusterprivilege/clusterprivilege.go | 4 +- .../clustersearchstatus.go | 4 +- .../clusterstatemetric/clusterstatemetric.go | 85 ++ .../cohereembeddingtype.go | 4 +- .../enums/cohereinputtype/cohereinputtype.go | 4 +- .../cohereservicetype/cohereservicetype.go | 4 +- .../coheresimilaritytype.go | 4 +- .../enums/coheretasktype/coheretasktype.go | 4 +- .../coheretruncatetype/coheretruncatetype.go | 4 +- .../combinedfieldsoperator.go | 4 +- .../combinedfieldszeroterms.go | 4 +- .../enums/commonstatsflag/commonstatsflag.go | 137 +++ .../types/enums/conditionop/conditionop.go | 4 +- .../conditionoperator/conditionoperator.go | 4 +- .../enums/conditiontype/conditiontype.go | 4 +- typedapi/types/enums/conflicts/conflicts.go | 4 +- .../connectionscheme/connectionscheme.go | 4 +- .../connectorfieldtype/connectorfieldtype.go | 4 +- .../enums/connectorstatus/connectorstatus.go | 4 +- .../contextualaiservicetype.go | 53 + .../types/enums/converttype/converttype.go | 4 +- .../customservicetype/customservicetype.go | 4 +- .../enums/customtasktype/customtasktype.go | 4 +- .../dataattachmentformat.go | 4 +- .../enums/datafeedstate/datafeedstate.go | 4 +- .../enums/dataframestate/dataframestate.go | 4 +- typedapi/types/enums/day/day.go | 4 +- typedapi/types/enums/decision/decision.go | 4 +- .../deepseekservicetype.go | 4 +- .../delimitedpayloadencoding.go | 4 +- .../densevectorelementtype.go | 8 +- .../densevectorindexoptionstype.go | 8 +- .../densevectorsimilarity.go | 4 +- .../deploymentallocationstate.go | 4 +- .../deploymentassignmentstate.go | 4 +- .../deprecationlevel/deprecationlevel.go | 4 +- .../dfiindependencemeasure.go | 4 +- .../enums/dfraftereffect/dfraftereffect.go | 4 +- .../enums/dfrbasicmodel/dfrbasicmodel.go | 4 +- .../types/enums/displaytype/displaytype.go | 4 +- .../types/enums/distanceunit/distanceunit.go | 4 +- .../enums/dynamicmapping/dynamicmapping.go | 4 +- .../ecscompatibilitytype.go | 4 +- .../enums/edgengramside/edgengramside.go | 4 +- .../elasticsearchservicetype.go | 4 +- .../elasticsearchtasktype.go | 4 +- .../elserservicetype/elserservicetype.go | 4 +- .../enums/elsertasktype/elsertasktype.go | 4 +- .../enums/emailpriority/emailpriority.go | 4 +- .../enrichpolicyphase/enrichpolicyphase.go | 4 +- .../esqlclusterstatus/esqlclusterstatus.go | 4 +- typedapi/types/enums/esqlformat/esqlformat.go | 4 +- typedapi/types/enums/eventtype/eventtype.go | 4 +- .../enums/excludefrequent/excludefrequent.go | 4 +- .../enums/executionphase/executionphase.go | 4 +- .../enums/executionstatus/executionstatus.go | 4 +- .../enums/expandwildcard/expandwildcard.go | 4 +- .../failurestorestatus/failurestorestatus.go | 4 +- typedapi/types/enums/feature/feature.go | 4 +- .../fieldaccesspattern/fieldaccesspattern.go | 57 + .../fieldsortnumerictype.go | 4 +- typedapi/types/enums/fieldtype/fieldtype.go | 4 +- .../fieldvaluefactormodifier.go | 4 +- .../enums/filteringpolicy/filteringpolicy.go | 4 +- .../filteringrulerule/filteringrulerule.go | 4 +- .../filteringvalidationstate.go | 4 +- typedapi/types/enums/filtertype/filtertype.go | 4 +- .../findstructureformat.go | 65 ++ .../fingerprintdigest/fingerprintdigest.go | 4 +- .../followerindexstatus.go | 4 +- typedapi/types/enums/formattype/formattype.go | 4 +- .../functionboostmode/functionboostmode.go | 4 +- .../functionscoremode/functionscoremode.go | 4 +- typedapi/types/enums/gappolicy/gappolicy.go | 4 +- .../enums/geodistancetype/geodistancetype.go | 4 +- .../types/enums/geoexecution/geoexecution.go | 4 +- .../geogridtargetformat.go | 4 +- .../enums/geogridtiletype/geogridtiletype.go | 4 +- .../enums/geoorientation/geoorientation.go | 4 +- .../geopointmetrictype/geopointmetrictype.go | 4 +- .../geoshaperelation/geoshaperelation.go | 4 +- .../types/enums/geostrategy/geostrategy.go | 4 +- .../geovalidationmethod.go | 4 +- .../googleaiservicetype.go | 4 +- .../googleaistudiotasktype.go | 4 +- .../googlemodelgardenprovider.go | 73 ++ .../googlevertexaiservicetype.go | 4 +- .../googlevertexaitasktype.go | 4 +- typedapi/types/enums/granttype/granttype.go | 4 +- .../gridaggregationtype.go | 4 +- typedapi/types/enums/gridtype/gridtype.go | 4 +- typedapi/types/enums/groupby/groupby.go | 4 +- .../types/enums/healthstatus/healthstatus.go | 4 +- .../highlighterencoder/highlighterencoder.go | 4 +- .../highlighterfragmenter.go | 4 +- .../highlighterorder/highlighterorder.go | 4 +- .../highlightertagsschema.go | 4 +- .../enums/highlightertype/highlightertype.go | 4 +- .../enums/holtwinterstype/holtwinterstype.go | 4 +- .../enums/httpinputmethod/httpinputmethod.go | 4 +- .../huggingfaceservicetype.go | 4 +- .../huggingfacetasktype.go | 4 +- .../enums/ibdistribution/ibdistribution.go | 4 +- typedapi/types/enums/iblambda/iblambda.go | 4 +- .../icucollationalternate.go | 4 +- .../icucollationcasefirst.go | 4 +- .../icucollationdecomposition.go | 4 +- .../icucollationstrength.go | 4 +- .../icunormalizationmode.go | 4 +- .../icunormalizationtype.go | 4 +- .../icutransformdirection.go | 4 +- typedapi/types/enums/impactarea/impactarea.go | 4 +- typedapi/types/enums/include/include.go | 4 +- .../indexcheckonstartup.go | 4 +- .../indexingjobstate/indexingjobstate.go | 4 +- .../indexmetadatastate/indexmetadatastate.go | 4 +- typedapi/types/enums/indexmode/indexmode.go | 4 +- .../types/enums/indexoptions/indexoptions.go | 4 +- .../enums/indexprivilege/indexprivilege.go | 4 +- .../indexroutingallocationoptions.go | 4 +- .../indexroutingrebalanceoptions.go | 4 +- .../indicatorhealthstatus.go | 4 +- .../indicesblockoptions.go | 4 +- typedapi/types/enums/inputtype/inputtype.go | 4 +- .../jinaaiservicetype/jinaaiservicetype.go | 4 +- .../jinaaisimilaritytype.go | 4 +- .../enums/jinaaitasktype/jinaaitasktype.go | 4 +- .../jinaaitextembeddingtask.go | 4 +- .../jobblockedreason/jobblockedreason.go | 4 +- typedapi/types/enums/jobstate/jobstate.go | 4 +- .../jsonprocessorconflictstrategy.go | 4 +- .../enums/keeptypesmode/keeptypesmode.go | 4 +- .../kuromojitokenizationmode.go | 4 +- typedapi/types/enums/level/level.go | 4 +- .../enums/licensestatus/licensestatus.go | 4 +- .../types/enums/licensetype/licensetype.go | 4 +- .../lifecycleoperationmode.go | 4 +- .../llamaservicetype/llamaservicetype.go | 53 + .../llamasimilaritytype.go | 61 ++ .../enums/llamatasktype/llamatasktype.go | 61 ++ .../lowercasetokenfilterlanguages.go | 4 +- typedapi/types/enums/managedby/managedby.go | 4 +- typedapi/types/enums/matchtype/matchtype.go | 4 +- .../types/enums/memorystatus/memorystatus.go | 4 +- typedapi/types/enums/mergetype/mergetype.go | 57 + typedapi/types/enums/metric/metric.go | 4 +- .../enums/migrationstatus/migrationstatus.go | 4 +- .../enums/minimuminterval/minimuminterval.go | 4 +- .../types/enums/missingorder/missingorder.go | 4 +- .../mistralservicetype/mistralservicetype.go | 4 +- .../enums/mistraltasktype/mistraltasktype.go | 4 +- typedapi/types/enums/modeenum/modeenum.go | 4 +- typedapi/types/enums/month/month.go | 4 +- .../enums/multivaluemode/multivaluemode.go | 4 +- typedapi/types/enums/noderole/noderole.go | 4 +- .../enums/nodesinfometric/nodesinfometric.go | 105 ++ .../enums/nodestatslevel/nodestatslevel.go | 61 ++ .../enums/nodestatsmetric/nodestatsmetric.go | 125 +++ .../nodesusagemetric/nodesusagemetric.go | 61 ++ .../noridecompoundmode/noridecompoundmode.go | 4 +- .../enums/normalization/normalization.go | 4 +- .../enums/normalizemethod/normalizemethod.go | 4 +- .../numericfielddataformat.go | 4 +- .../enums/onscripterror/onscripterror.go | 4 +- .../openaiservicetype/openaiservicetype.go | 4 +- .../enums/openaitasktype/openaitasktype.go | 4 +- .../openshiftaiservicetype.go | 53 + .../openshiftaisimilaritytype.go | 61 ++ .../openshiftaitasktype.go | 65 ++ .../enums/operationtype/operationtype.go | 4 +- typedapi/types/enums/operator/operator.go | 4 +- typedapi/types/enums/optype/optype.go | 4 +- .../pagerdutycontexttype.go | 4 +- .../pagerdutyeventtype/pagerdutyeventtype.go | 4 +- .../enums/painlesscontext/painlesscontext.go | 4 +- .../enums/phoneticencoder/phoneticencoder.go | 4 +- .../phoneticlanguage/phoneticlanguage.go | 4 +- .../phoneticnametype/phoneticnametype.go | 4 +- .../phoneticruletype/phoneticruletype.go | 4 +- .../pipelinesimulationstatusoptions.go | 4 +- typedapi/types/enums/policytype/policytype.go | 4 +- .../profilingoperationmode.go | 61 ++ typedapi/types/enums/quantifier/quantifier.go | 4 +- .../queryrulecriteriatype.go | 4 +- .../enums/queryruletype/queryruletype.go | 4 +- .../enums/rangerelation/rangerelation.go | 4 +- .../rankvectorelementtype.go | 4 +- typedapi/types/enums/ratemode/ratemode.go | 4 +- typedapi/types/enums/refresh/refresh.go | 4 +- .../remoteclusterprivilege.go | 4 +- .../responsecontenttype.go | 4 +- .../restrictionworkflow.go | 4 +- typedapi/types/enums/result/result.go | 4 +- .../enums/resultposition/resultposition.go | 4 +- .../types/enums/routingstate/routingstate.go | 4 +- typedapi/types/enums/ruleaction/ruleaction.go | 4 +- .../runtimefieldtype/runtimefieldtype.go | 4 +- .../sampleraggregationexecutionhint.go | 4 +- .../enums/samplingmethod/samplingmethod.go | 57 + typedapi/types/enums/scoremode/scoremode.go | 4 +- .../enums/scorenormalizer/scorenormalizer.go | 4 +- .../enums/scriptlanguage/scriptlanguage.go | 4 +- .../enums/scriptsorttype/scriptsorttype.go | 4 +- typedapi/types/enums/searchtype/searchtype.go | 4 +- .../segmentsortmissing/segmentsortmissing.go | 4 +- .../enums/segmentsortmode/segmentsortmode.go | 4 +- .../segmentsortorder/segmentsortorder.go | 4 +- typedapi/types/enums/shapetype/shapetype.go | 4 +- .../shardroutingstate/shardroutingstate.go | 4 +- .../shardsstatsstage/shardsstatsstage.go | 4 +- typedapi/types/enums/shardstate/shardstate.go | 4 +- .../shardstoreallocation.go | 4 +- .../shardstorestatus/shardstorestatus.go | 4 +- .../enums/shutdownstatus/shutdownstatus.go | 4 +- .../types/enums/shutdowntype/shutdowntype.go | 4 +- .../simplequerystringflag.go | 4 +- .../slicescalculation/slicescalculation.go | 4 +- .../types/enums/snapshotsort/snapshotsort.go | 4 +- .../enums/snapshotstate/snapshotstate.go | 4 +- .../snapshotupgradestate.go | 4 +- .../snowballlanguage/snowballlanguage.go | 4 +- typedapi/types/enums/sortmode/sortmode.go | 4 +- typedapi/types/enums/sortorder/sortorder.go | 4 +- .../enums/sourcefieldmode/sourcefieldmode.go | 4 +- typedapi/types/enums/sourcemode/sourcemode.go | 4 +- typedapi/types/enums/sqlformat/sqlformat.go | 4 +- typedapi/types/enums/statslevel/statslevel.go | 4 +- .../stopwordlanguage/stopwordlanguage.go | 4 +- .../types/enums/storagetype/storagetype.go | 4 +- .../enums/stringdistance/stringdistance.go | 4 +- typedapi/types/enums/subobjects/subobjects.go | 4 +- .../types/enums/suggestmode/suggestmode.go | 4 +- .../types/enums/suggestsort/suggestsort.go | 4 +- .../syncjobtriggermethod.go | 4 +- .../types/enums/syncjobtype/syncjobtype.go | 4 +- typedapi/types/enums/syncstatus/syncstatus.go | 4 +- .../enums/synonymformat/synonymformat.go | 4 +- .../syntheticsourcekeepenum.go | 4 +- typedapi/types/enums/tasktype/tasktype.go | 4 +- .../types/enums/tasktypeai21/tasktypeai21.go | 57 + .../tasktypealibabacloudai.go | 4 +- .../tasktypeamazonbedrock.go | 4 +- .../tasktypeamazonsagemaker.go | 4 +- .../tasktypeanthropic/tasktypeanthropic.go | 4 +- .../tasktypeazureaistudio.go | 8 +- .../tasktypeazureopenai.go | 4 +- .../enums/tasktypecohere/tasktypecohere.go | 4 +- .../tasktypecontextualai.go | 53 + .../enums/tasktypecustom/tasktypecustom.go | 4 +- .../tasktypedeepseek/tasktypedeepseek.go | 4 +- .../tasktypeelasticsearch.go | 4 +- .../enums/tasktypeelser/tasktypeelser.go | 4 +- .../tasktypegoogleaistudio.go | 4 +- .../tasktypegooglevertexai.go | 12 +- .../tasktypehuggingface.go | 4 +- .../enums/tasktypejinaai/tasktypejinaai.go | 4 +- .../enums/tasktypellama/tasktypellama.go | 61 ++ .../enums/tasktypemistral/tasktypemistral.go | 4 +- .../enums/tasktypeopenai/tasktypeopenai.go | 4 +- .../tasktypeopenshiftai.go | 65 ++ .../tasktypevoyageai/tasktypevoyageai.go | 4 +- .../enums/tasktypewatsonx/tasktypewatsonx.go | 4 +- .../tdigestexecutionhint.go | 4 +- .../enums/templateformat/templateformat.go | 4 +- .../termsaggregationcollectmode.go | 4 +- .../termsaggregationexecutionhint.go | 4 +- .../termvectoroption/termvectoroption.go | 4 +- .../enums/textquerytype/textquerytype.go | 4 +- typedapi/types/enums/threadtype/threadtype.go | 4 +- .../timeseriesmetrictype.go | 4 +- typedapi/types/enums/timeunit/timeunit.go | 4 +- typedapi/types/enums/tokenchar/tokenchar.go | 4 +- .../tokenizationtruncate.go | 4 +- .../totalhitsrelation/totalhitsrelation.go | 4 +- .../trainedmodeltype/trainedmodeltype.go | 4 +- .../trainingpriority/trainingpriority.go | 4 +- .../translogdurability/translogdurability.go | 4 +- typedapi/types/enums/ttesttype/ttesttype.go | 4 +- typedapi/types/enums/type_/type_.go | 4 +- .../unassignedinformationreason.go | 4 +- .../useragentproperty/useragentproperty.go | 4 +- typedapi/types/enums/valuetype/valuetype.go | 4 +- .../types/enums/versiontype/versiontype.go | 8 +- .../voyageaiservicetype.go | 4 +- .../voyageaitasktype/voyageaitasktype.go | 4 +- .../waitforactiveshardoptions.go | 4 +- .../enums/waitforevents/waitforevents.go | 4 +- .../enums/watchermetric/watchermetric.go | 4 +- .../types/enums/watcherstate/watcherstate.go | 4 +- .../watsonxservicetype/watsonxservicetype.go | 4 +- .../enums/watsonxtasktype/watsonxtasktype.go | 4 +- .../enums/xpackcategory/xpackcategory.go | 4 +- .../enums/zerotermsquery/zerotermsquery.go | 4 +- typedapi/types/epochtimeunitmillis.go | 4 +- typedapi/types/epochtimeunitseconds.go | 4 +- typedapi/types/eql.go | 4 +- typedapi/types/eqlfeatures.go | 4 +- typedapi/types/eqlfeaturesjoin.go | 4 +- typedapi/types/eqlfeatureskeys.go | 4 +- typedapi/types/eqlfeaturespipes.go | 4 +- typedapi/types/eqlfeaturessequences.go | 4 +- typedapi/types/eqlhits.go | 4 +- typedapi/types/errorcause.go | 4 +- typedapi/types/errorresponsebase.go | 4 +- typedapi/types/esqlclusterdetails.go | 4 +- typedapi/types/esqlclusterinfo.go | 4 +- typedapi/types/esqlcolumninfo.go | 4 +- typedapi/types/{metrics.go => esqlparam.go} | 8 +- typedapi/types/esqlshardfailure.go | 4 +- typedapi/types/esqlshardinfo.go | 4 +- typedapi/types/estoniananalyzer.go | 4 +- typedapi/types/eventdatastream.go | 4 +- typedapi/types/ewmamodelsettings.go | 4 +- .../types/ewmamovingaverageaggregation.go | 4 +- typedapi/types/executeenrichpolicystatus.go | 4 +- typedapi/types/executingpolicy.go | 4 +- typedapi/types/executionresult.go | 4 +- typedapi/types/executionresultaction.go | 4 +- typedapi/types/executionresultcondition.go | 4 +- typedapi/types/executionresultinput.go | 4 +- typedapi/types/executionstate.go | 4 +- typedapi/types/executionthreadpool.go | 4 +- typedapi/types/existsquery.go | 4 +- typedapi/types/expandwildcards.go | 4 +- typedapi/types/explainanalyzetoken.go | 4 +- typedapi/types/explanation.go | 4 +- typedapi/types/explanationdetail.go | 4 +- typedapi/types/explorecontrols.go | 4 +- .../exponentialaveragecalculationcontext.go | 4 +- typedapi/types/extendedboundsdouble.go | 4 +- typedapi/types/extendedboundsfielddatemath.go | 4 +- typedapi/types/extendedmemorystats.go | 4 +- .../types/extendedretrieverssearchusage.go | 35 + typedapi/types/extendedsearchusage.go | 35 + typedapi/types/extendedstatsaggregate.go | 4 +- typedapi/types/extendedstatsaggregation.go | 4 +- .../types/extendedstatsbucketaggregate.go | 4 +- .../types/extendedstatsbucketaggregation.go | 4 +- .../extendedtextsimilarityretrieverusage.go | 79 ++ typedapi/types/failprocessor.go | 4 +- typedapi/types/failurestore.go | 4 +- typedapi/types/failurestorelifecycle.go | 4 +- .../types/failurestorelifecycletemplate.go | 4 +- typedapi/types/feature.go | 4 +- typedapi/types/featureenabled.go | 4 +- typedapi/types/featureextractor.go | 4 +- typedapi/types/features.go | 4 +- typedapi/types/featuretoggle.go | 4 +- typedapi/types/fetchprofile.go | 4 +- typedapi/types/fetchprofilebreakdown.go | 4 +- typedapi/types/fetchprofiledebug.go | 4 +- typedapi/types/fieldaliasproperty.go | 4 +- typedapi/types/fieldandformat.go | 4 +- typedapi/types/fieldcapability.go | 4 +- typedapi/types/fieldcollapse.go | 4 +- typedapi/types/fielddatafrequencyfilter.go | 4 +- typedapi/types/fielddatarecord.go | 4 +- typedapi/types/fielddatastats.go | 4 +- typedapi/types/fielddatemath.go | 4 +- typedapi/types/fieldlookup.go | 21 +- typedapi/types/fieldmapping.go | 4 +- typedapi/types/fieldmemoryusage.go | 4 +- typedapi/types/fieldmetric.go | 4 +- typedapi/types/fieldnamesfield.go | 4 +- typedapi/types/fields.go | 4 +- typedapi/types/fieldsecurity.go | 4 +- typedapi/types/fieldsizeusage.go | 4 +- typedapi/types/fieldsort.go | 4 +- typedapi/types/fieldstat.go | 4 +- typedapi/types/fieldstatistics.go | 4 +- typedapi/types/fieldsuggester.go | 4 +- typedapi/types/fieldsummary.go | 4 +- typedapi/types/fieldtypes.go | 4 +- typedapi/types/fieldtypesmappings.go | 4 +- typedapi/types/fieldvalue.go | 4 +- .../types/fieldvaluefactorscorefunction.go | 4 +- typedapi/types/filecountsnapshotstats.go | 4 +- typedapi/types/filedetails.go | 4 +- typedapi/types/filesettingsindicator.go | 4 +- .../types/filesettingsindicatordetails.go | 4 +- typedapi/types/filesystem.go | 4 +- typedapi/types/filesystemtotal.go | 4 +- typedapi/types/fillmaskinferenceoptions.go | 6 +- .../types/fillmaskinferenceupdateoptions.go | 4 +- typedapi/types/filteraggregate.go | 25 +- typedapi/types/filteringadvancedsnippet.go | 4 +- typedapi/types/filteringconfig.go | 4 +- typedapi/types/filteringrule.go | 4 +- typedapi/types/filteringrules.go | 4 +- typedapi/types/filteringrulesvalidation.go | 4 +- typedapi/types/filteringvalidation.go | 4 +- typedapi/types/filterref.go | 4 +- typedapi/types/filtersaggregate.go | 4 +- typedapi/types/filtersaggregation.go | 4 +- typedapi/types/filtersbucket.go | 25 +- typedapi/types/fingerprintanalyzer.go | 4 +- typedapi/types/fingerprintprocessor.go | 4 +- typedapi/types/fingerprinttokenfilter.go | 4 +- typedapi/types/finnishanalyzer.go | 4 +- typedapi/types/flattened.go | 4 +- typedapi/types/flattenedproperty.go | 4 +- typedapi/types/flattengraphtokenfilter.go | 4 +- typedapi/types/floatnumberproperty.go | 4 +- typedapi/types/floatrangeproperty.go | 4 +- typedapi/types/flushstats.go | 4 +- typedapi/types/followerindex.go | 4 +- typedapi/types/followerindexparameters.go | 4 +- typedapi/types/followindexstats.go | 4 +- typedapi/types/followstats.go | 4 +- typedapi/types/forcemergeaction.go | 4 +- typedapi/types/foreachprocessor.go | 4 +- typedapi/types/foundstatus.go | 4 +- typedapi/types/frenchanalyzer.go | 4 +- typedapi/types/frenchstemtokenfilter.go | 4 +- .../types/frequencyencodingpreprocessor.go | 4 +- typedapi/types/frequentitemsetsaggregate.go | 4 +- typedapi/types/frequentitemsetsaggregation.go | 4 +- typedapi/types/frequentitemsetsbucket.go | 25 +- typedapi/types/frequentitemsetsfield.go | 4 +- typedapi/types/functionscore.go | 51 +- typedapi/types/functionscorequery.go | 4 +- typedapi/types/fuzziness.go | 4 +- typedapi/types/fuzzyquery.go | 4 +- typedapi/types/galiciananalyzer.go | 4 +- typedapi/types/garbagecollector.go | 4 +- typedapi/types/garbagecollectortotal.go | 4 +- typedapi/types/gcsrepository.go | 4 +- typedapi/types/gcsrepositorysettings.go | 4 +- typedapi/types/geoboundingboxquery.go | 4 +- typedapi/types/geobounds.go | 4 +- typedapi/types/geoboundsaggregate.go | 4 +- typedapi/types/geoboundsaggregation.go | 4 +- typedapi/types/geocentroidaggregate.go | 4 +- typedapi/types/geocentroidaggregation.go | 4 +- typedapi/types/geodecayfunction.go | 4 +- typedapi/types/geodistanceaggregate.go | 4 +- typedapi/types/geodistanceaggregation.go | 4 +- typedapi/types/geodistancefeaturequery.go | 4 +- typedapi/types/geodistancequery.go | 4 +- typedapi/types/geodistancesort.go | 4 +- typedapi/types/geogridprocessor.go | 4 +- typedapi/types/geogridquery.go | 51 +- typedapi/types/geohashgridaggregate.go | 4 +- typedapi/types/geohashgridaggregation.go | 4 +- typedapi/types/geohashgridbucket.go | 25 +- typedapi/types/geohashlocation.go | 4 +- typedapi/types/geohashprecision.go | 4 +- typedapi/types/geohexgridaggregate.go | 4 +- typedapi/types/geohexgridaggregation.go | 4 +- typedapi/types/geohexgridbucket.go | 25 +- .../geoipdatabaseconfigurationmetadata.go | 4 +- typedapi/types/geoipdownloadstatistics.go | 4 +- typedapi/types/geoipnodedatabasename.go | 4 +- typedapi/types/geoipnodedatabases.go | 4 +- typedapi/types/geoipprocessor.go | 4 +- typedapi/types/geoline.go | 4 +- typedapi/types/geolineaggregate.go | 4 +- typedapi/types/geolineaggregation.go | 6 +- typedapi/types/geolinepoint.go | 4 +- typedapi/types/geolinesort.go | 4 +- typedapi/types/geolocation.go | 4 +- typedapi/types/geopointproperty.go | 4 +- typedapi/types/geopolygonpoints.go | 4 +- typedapi/types/geopolygonquery.go | 4 +- typedapi/types/georesults.go | 4 +- typedapi/types/geoshapefieldquery.go | 4 +- typedapi/types/geoshapeproperty.go | 4 +- typedapi/types/geoshapequery.go | 4 +- typedapi/types/geotilegridaggregate.go | 4 +- typedapi/types/geotilegridaggregation.go | 4 +- typedapi/types/geotilegridbucket.go | 25 +- typedapi/types/germananalyzer.go | 4 +- .../types/germannormalizationtokenfilter.go | 4 +- typedapi/types/germanstemtokenfilter.go | 4 +- typedapi/types/getmigrationfeature.go | 4 +- typedapi/types/getresult.go | 4 +- typedapi/types/getscriptcontext.go | 4 +- typedapi/types/getstats.go | 4 +- typedapi/types/getuserprofileerrors.go | 4 +- typedapi/types/globalaggregate.go | 25 +- typedapi/types/globalaggregation.go | 4 +- typedapi/types/globalordinalfieldstats.go | 4 +- typedapi/types/globalordinalsstats.go | 4 +- typedapi/types/globalprivilege.go | 4 +- .../types/googleaistudioservicesettings.go | 4 +- .../googlenormalizeddistanceheuristic.go | 4 +- .../types/googlevertexaiservicesettings.go | 134 ++- typedapi/types/googlevertexaitasksettings.go | 38 +- typedapi/types/grantapikey.go | 4 +- typedapi/types/greaterthanvalidation.go | 4 +- typedapi/types/greekanalyzer.go | 4 +- typedapi/types/grokprocessor.go | 4 +- typedapi/types/groupings.go | 4 +- typedapi/types/gsubprocessor.go | 4 +- typedapi/types/halffloatnumberproperty.go | 4 +- typedapi/types/haschildquery.go | 4 +- typedapi/types/hasparentquery.go | 4 +- .../types/hasprivilegesuserprofileerrors.go | 4 +- typedapi/types/hdrmethod.go | 4 +- typedapi/types/hdrpercentileranksaggregate.go | 4 +- typedapi/types/hdrpercentilesaggregate.go | 4 +- typedapi/types/healthrecord.go | 4 +- typedapi/types/healthstatistics.go | 4 +- typedapi/types/highlight.go | 4 +- typedapi/types/highlightfield.go | 4 +- typedapi/types/hindianalyzer.go | 4 +- .../types/hindinormalizationtokenfilter.go | 4 +- typedapi/types/hint.go | 4 +- typedapi/types/histogramaggregate.go | 4 +- typedapi/types/histogramaggregation.go | 4 +- typedapi/types/histogrambucket.go | 25 +- typedapi/types/histogramgrouping.go | 4 +- typedapi/types/histogramproperty.go | 4 +- typedapi/types/hit.go | 4 +- typedapi/types/hitsevent.go | 4 +- typedapi/types/hitsmetadata.go | 4 +- typedapi/types/hitssequence.go | 4 +- typedapi/types/holtlinearmodelsettings.go | 4 +- .../types/holtmovingaverageaggregation.go | 4 +- typedapi/types/holtwintersmodelsettings.go | 4 +- .../holtwintersmovingaverageaggregation.go | 4 +- typedapi/types/hop.go | 4 +- typedapi/types/hourandminute.go | 4 +- typedapi/types/hourlyschedule.go | 4 +- typedapi/types/htmlstripcharfilter.go | 4 +- typedapi/types/htmlstripprocessor.go | 4 +- typedapi/types/http.go | 4 +- typedapi/types/httpemailattachment.go | 4 +- typedapi/types/httpheaders.go | 4 +- typedapi/types/httpinput.go | 4 +- typedapi/types/httpinputauthentication.go | 4 +- .../types/httpinputbasicauthentication.go | 4 +- typedapi/types/httpinputproxy.go | 4 +- typedapi/types/httpinputrequestdefinition.go | 4 +- typedapi/types/httpinputrequestresult.go | 4 +- typedapi/types/httpinputresponseresult.go | 4 +- typedapi/types/httproute.go | 4 +- typedapi/types/httprouterequests.go | 4 +- typedapi/types/httprouteresponses.go | 4 +- typedapi/types/huggingfaceservicesettings.go | 4 +- typedapi/types/huggingfacetasksettings.go | 4 +- typedapi/types/hungariananalyzer.go | 4 +- typedapi/types/hunspelltokenfilter.go | 4 +- typedapi/types/hyperparameter.go | 4 +- typedapi/types/hyperparameters.go | 4 +- .../hyphenationdecompoundertokenfilter.go | 4 +- typedapi/types/icuanalyzer.go | 4 +- typedapi/types/icucollationproperty.go | 4 +- typedapi/types/icucollationtokenfilter.go | 4 +- typedapi/types/icufoldingtokenfilter.go | 4 +- typedapi/types/icunormalizationcharfilter.go | 4 +- typedapi/types/icunormalizationtokenfilter.go | 4 +- typedapi/types/icutokenizer.go | 4 +- typedapi/types/icutransformtokenfilter.go | 4 +- typedapi/types/ids.go | 4 +- typedapi/types/idsquery.go | 4 +- typedapi/types/ilm.go | 4 +- typedapi/types/ilmactions.go | 4 +- typedapi/types/ilmindicator.go | 4 +- typedapi/types/ilmindicatordetails.go | 4 +- typedapi/types/ilmpolicy.go | 4 +- typedapi/types/ilmpolicystatistics.go | 4 +- typedapi/types/impact.go | 4 +- typedapi/types/includedinvalidation.go | 4 +- typedapi/types/indeterminable.go | 76 ++ typedapi/types/indexaction.go | 4 +- typedapi/types/indexaliases.go | 4 +- typedapi/types/indexanddatastreamaction.go | 4 +- typedapi/types/indexcapabilities.go | 4 +- typedapi/types/indexdetails.go | 4 +- typedapi/types/indexfield.go | 4 +- typedapi/types/indexhealthstats.go | 4 +- typedapi/types/indexingslowlogsettings.go | 4 +- typedapi/types/indexingslowlogtresholds.go | 4 +- typedapi/types/indexingstats.go | 4 +- typedapi/types/indexmappingrecord.go | 4 +- typedapi/types/indexoperation.go | 21 +- typedapi/types/indexprivilegescheck.go | 4 +- typedapi/types/indexresult.go | 4 +- typedapi/types/indexresultsummary.go | 4 +- typedapi/types/indexrouting.go | 4 +- typedapi/types/indexroutingallocation.go | 4 +- typedapi/types/indexroutingallocationdisk.go | 4 +- .../types/indexroutingallocationinclude.go | 4 +- .../indexroutingallocationinitialrecovery.go | 4 +- typedapi/types/indexroutingrebalance.go | 4 +- typedapi/types/indexsamplingconfiguration.go | 74 ++ typedapi/types/indexsegment.go | 4 +- typedapi/types/indexsegmentsort.go | 4 +- typedapi/types/indexsettingblocks.go | 4 +- typedapi/types/indexsettingresults.go | 4 +- typedapi/types/indexsettings.go | 4 +- typedapi/types/indexsettingsanalysis.go | 4 +- typedapi/types/indexsettingslifecycle.go | 4 +- typedapi/types/indexsettingslifecyclestep.go | 4 +- typedapi/types/indexsettingstimeseries.go | 4 +- typedapi/types/indexstate.go | 4 +- typedapi/types/indexstats.go | 4 +- typedapi/types/indextemplate.go | 36 +- .../indextemplatedatastreamconfiguration.go | 4 +- typedapi/types/indextemplateitem.go | 4 +- typedapi/types/indextemplatemapping.go | 4 +- typedapi/types/indextemplatesummary.go | 4 +- typedapi/types/indexversioning.go | 4 +- typedapi/types/indicatornode.go | 4 +- typedapi/types/indicators.go | 4 +- typedapi/types/indices.go | 4 +- typedapi/types/indicesaction.go | 45 +- typedapi/types/indicesindexingpressure.go | 4 +- .../types/indicesindexingpressurememory.go | 4 +- typedapi/types/indicesmodifyaction.go | 45 +- typedapi/types/indicesoptions.go | 4 +- typedapi/types/indicesprivileges.go | 4 +- typedapi/types/indicesprivilegesquery.go | 4 +- typedapi/types/indicesrecord.go | 10 +- typedapi/types/indicesshardsstats.go | 4 +- typedapi/types/indicesshardstats.go | 4 +- typedapi/types/indicesshardstores.go | 4 +- typedapi/types/indicesstats.go | 4 +- .../types/indicesvalidationexplanation.go | 4 +- typedapi/types/indicesversions.go | 4 +- .../types/indicnormalizationtokenfilter.go | 4 +- typedapi/types/indonesiananalyzer.go | 4 +- typedapi/types/inferenceaggregate.go | 4 +- typedapi/types/inferenceaggregation.go | 4 +- typedapi/types/inferencechunkingsettings.go | 56 +- typedapi/types/inferenceclassimportance.go | 4 +- typedapi/types/inferenceconfig.go | 43 +- .../types/inferenceconfigclassification.go | 4 +- typedapi/types/inferenceconfigcontainer.go | 43 +- .../types/inferenceconfigcreatecontainer.go | 43 +- typedapi/types/inferenceconfigregression.go | 4 +- .../types/inferenceconfigupdatecontainer.go | 43 +- typedapi/types/inferenceendpoint.go | 9 +- typedapi/types/inferenceendpointinfo.go | 9 +- typedapi/types/inferencefeatureimportance.go | 4 +- typedapi/types/inferenceprocessor.go | 4 +- typedapi/types/inferenceresponseresult.go | 4 +- typedapi/types/inferencetopclassentry.go | 4 +- typedapi/types/influence.go | 4 +- typedapi/types/influencer.go | 4 +- typedapi/types/infofeaturestate.go | 4 +- typedapi/types/ingest.go | 4 +- typedapi/types/ingestdocumentsimulation.go | 10 +- typedapi/types/ingestpipeline.go | 45 +- typedapi/types/ingestpipelineparams.go | 4 +- typedapi/types/ingeststats.go | 4 +- typedapi/types/ingesttotal.go | 4 +- typedapi/types/inlineget.go | 21 +- typedapi/types/inlinegetdictuserdefined.go | 21 +- typedapi/types/innerhits.go | 4 +- typedapi/types/innerhitsresult.go | 4 +- typedapi/types/innerretriever.go | 4 +- typedapi/types/inprogress.go | 4 +- typedapi/types/input.go | 4 +- typedapi/types/inputconfig.go | 4 +- typedapi/types/integernumberproperty.go | 4 +- typedapi/types/integerrangeproperty.go | 4 +- typedapi/types/intervals.go | 43 +- typedapi/types/intervalsallof.go | 4 +- typedapi/types/intervalsanyof.go | 4 +- typedapi/types/intervalsfilter.go | 43 +- typedapi/types/intervalsfuzzy.go | 4 +- typedapi/types/intervalsmatch.go | 4 +- typedapi/types/intervalsprefix.go | 4 +- typedapi/types/intervalsquery.go | 51 +- typedapi/types/intervalsrange.go | 4 +- typedapi/types/intervalsregexp.go | 4 +- typedapi/types/intervalswildcard.go | 4 +- typedapi/types/invertedindex.go | 4 +- typedapi/types/invocation.go | 4 +- typedapi/types/invocations.go | 4 +- typedapi/types/iostatdevice.go | 4 +- typedapi/types/iostats.go | 4 +- typedapi/types/ipfilter.go | 4 +- typedapi/types/ipinfo.go | 4 +- ...iplocationdatabaseconfigurationmetadata.go | 4 +- typedapi/types/iplocationprocessor.go | 4 +- typedapi/types/ipprefixaggregate.go | 4 +- typedapi/types/ipprefixaggregation.go | 4 +- typedapi/types/ipprefixbucket.go | 25 +- typedapi/types/ipproperty.go | 4 +- typedapi/types/iprangeaggregate.go | 4 +- typedapi/types/iprangeaggregation.go | 4 +- typedapi/types/iprangeaggregationrange.go | 4 +- typedapi/types/iprangebucket.go | 25 +- typedapi/types/iprangeproperty.go | 4 +- typedapi/types/irishanalyzer.go | 4 +- typedapi/types/italiananalyzer.go | 4 +- typedapi/types/jastoptokenfilter.go | 4 +- typedapi/types/jinaaiservicesettings.go | 4 +- typedapi/types/jinaaitasksettings.go | 4 +- typedapi/types/job.go | 4 +- typedapi/types/jobblocked.go | 4 +- typedapi/types/jobconfig.go | 4 +- typedapi/types/jobforecaststatistics.go | 4 +- typedapi/types/jobsrecord.go | 4 +- typedapi/types/jobstatistics.go | 4 +- typedapi/types/jobstats.go | 4 +- typedapi/types/jobtimingstats.go | 4 +- typedapi/types/jobusage.go | 4 +- typedapi/types/joinprocessor.go | 4 +- typedapi/types/joinproperty.go | 4 +- typedapi/types/jsonprocessor.go | 4 +- typedapi/types/jvm.go | 4 +- typedapi/types/jvmclasses.go | 4 +- typedapi/types/jvmmemorystats.go | 4 +- typedapi/types/jvmstats.go | 4 +- typedapi/types/jvmthreads.go | 4 +- typedapi/types/keeptypestokenfilter.go | 4 +- typedapi/types/keepwordstokenfilter.go | 4 +- typedapi/types/keyedpercentiles.go | 4 +- typedapi/types/keyedprocessor.go | 4 +- typedapi/types/keyvalueprocessor.go | 4 +- typedapi/types/keywordanalyzer.go | 4 +- typedapi/types/keywordmarkertokenfilter.go | 4 +- typedapi/types/keywordproperty.go | 4 +- typedapi/types/keywordrepeattokenfilter.go | 4 +- typedapi/types/keywordtokenizer.go | 4 +- typedapi/types/kibanatoken.go | 4 +- typedapi/types/knncollectorresult.go | 4 +- typedapi/types/knnquery.go | 23 +- typedapi/types/knnqueryprofilebreakdown.go | 4 +- typedapi/types/knnqueryprofileresult.go | 4 +- typedapi/types/knnretriever.go | 23 +- typedapi/types/knnsearch.go | 23 +- typedapi/types/knnsearchquery.go | 121 +++ typedapi/types/kstemtokenfilter.go | 4 +- typedapi/types/kuromojianalyzer.go | 10 +- .../types/kuromojiiterationmarkcharfilter.go | 4 +- .../types/kuromojipartofspeechtokenfilter.go | 4 +- .../types/kuromojireadingformtokenfilter.go | 4 +- typedapi/types/kuromojistemmertokenfilter.go | 4 +- typedapi/types/kuromojitokenizer.go | 4 +- typedapi/types/languagecontext.go | 4 +- typedapi/types/laplacesmoothingmodel.go | 4 +- typedapi/types/latest.go | 4 +- typedapi/types/latlongeolocation.go | 4 +- typedapi/types/latviananalyzer.go | 4 +- typedapi/types/learningtorank.go | 4 +- typedapi/types/learningtorankconfig.go | 4 +- typedapi/types/lengthtokenfilter.go | 4 +- typedapi/types/lessthanvalidation.go | 4 +- typedapi/types/lettertokenizer.go | 4 +- typedapi/types/license.go | 4 +- typedapi/types/licenseinformation.go | 4 +- typedapi/types/lifecycle.go | 4 +- typedapi/types/lifecycleexplain.go | 4 +- typedapi/types/lifecycleexplainmanaged.go | 11 +- .../types/lifecycleexplainphaseexecution.go | 4 +- typedapi/types/lifecycleexplainunmanaged.go | 4 +- typedapi/types/like.go | 4 +- typedapi/types/likedocument.go | 21 +- typedapi/types/limits.go | 4 +- typedapi/types/limittokencounttokenfilter.go | 4 +- .../linearinterpolationsmoothingmodel.go | 4 +- .../types/linearmovingaverageaggregation.go | 4 +- typedapi/types/linearretriever.go | 4 +- typedapi/types/listtypevalidation.go | 4 +- typedapi/types/lithuaniananalyzer.go | 4 +- typedapi/types/llamaservicesettings.go | 148 +++ typedapi/types/local.go | 4 +- typedapi/types/loggingaction.go | 4 +- typedapi/types/loggingresult.go | 4 +- typedapi/types/logsstatus.go | 79 ++ typedapi/types/logstashpipeline.go | 4 +- typedapi/types/longnumberproperty.go | 4 +- typedapi/types/longrangeproperty.go | 4 +- typedapi/types/longraretermsaggregate.go | 4 +- typedapi/types/longraretermsbucket.go | 25 +- typedapi/types/longtermsaggregate.go | 4 +- typedapi/types/longtermsbucket.go | 25 +- typedapi/types/lowercasenormalizer.go | 4 +- typedapi/types/lowercaseprocessor.go | 4 +- typedapi/types/lowercasetokenfilter.go | 4 +- typedapi/types/lowercasetokenizer.go | 4 +- typedapi/types/machinelearning.go | 4 +- typedapi/types/manageuserprivileges.go | 4 +- typedapi/types/mapboxvectortiles.go | 4 +- typedapi/types/mappingcharfilter.go | 4 +- typedapi/types/mappinglimitsettings.go | 4 +- typedapi/types/mappinglimitsettingsdepth.go | 4 +- .../mappinglimitsettingsdimensionfields.go | 4 +- .../mappinglimitsettingsfieldnamelength.go | 4 +- .../types/mappinglimitsettingsnestedfields.go | 4 +- .../mappinglimitsettingsnestedobjects.go | 4 +- .../types/mappinglimitsettingssourcefields.go | 4 +- .../types/mappinglimitsettingstotalfields.go | 4 +- typedapi/types/mappingstats.go | 4 +- typedapi/types/masterisstableindicator.go | 4 +- ...erisstableindicatorclusterformationnode.go | 4 +- .../types/masterisstableindicatordetails.go | 4 +- ...stableindicatorexceptionfetchinghistory.go | 4 +- typedapi/types/masterrecord.go | 4 +- typedapi/types/matchallquery.go | 4 +- typedapi/types/matchboolprefixquery.go | 4 +- typedapi/types/matchedfield.go | 4 +- typedapi/types/matchedtext.go | 4 +- typedapi/types/matchnonequery.go | 4 +- typedapi/types/matchonlytextproperty.go | 4 +- typedapi/types/matchphraseprefixquery.go | 4 +- typedapi/types/matchphrasequery.go | 4 +- typedapi/types/matchquery.go | 4 +- typedapi/types/matrixstatsaggregate.go | 4 +- typedapi/types/matrixstatsaggregation.go | 4 +- typedapi/types/matrixstatsfields.go | 4 +- typedapi/types/maxaggregate.go | 4 +- typedapi/types/maxaggregation.go | 4 +- typedapi/types/maxbucketaggregation.go | 4 +- typedapi/types/maxmind.go | 4 +- .../types/medianabsolutedeviationaggregate.go | 4 +- .../medianabsolutedeviationaggregation.go | 4 +- typedapi/types/memmlstats.go | 4 +- typedapi/types/memory.go | 4 +- typedapi/types/memorystats.go | 4 +- typedapi/types/memstats.go | 4 +- typedapi/types/merge.go | 4 +- typedapi/types/mergescheduler.go | 4 +- typedapi/types/mergesstats.go | 4 +- typedapi/types/message.go | 4 +- typedapi/types/messagecontent.go | 4 +- typedapi/types/metadata.go | 4 +- typedapi/types/mgetoperation.go | 21 +- typedapi/types/mgetresponseitem.go | 4 +- typedapi/types/migrateaction.go | 4 +- typedapi/types/migratereindex.go | 4 +- typedapi/types/migrationfeatureindexinfo.go | 4 +- typedapi/types/minaggregate.go | 4 +- typedapi/types/minaggregation.go | 4 +- typedapi/types/minbucketaggregation.go | 4 +- typedapi/types/minhashtokenfilter.go | 4 +- typedapi/types/minimallicenseinformation.go | 4 +- typedapi/types/minimumshouldmatch.go | 4 +- typedapi/types/missing.go | 4 +- typedapi/types/missingaggregate.go | 25 +- typedapi/types/missingaggregation.go | 4 +- typedapi/types/mistralservicesettings.go | 4 +- typedapi/types/mlcounter.go | 4 +- typedapi/types/mldatafeed.go | 34 +- typedapi/types/mldataframeanalyticsjobs.go | 4 +- .../types/mldataframeanalyticsjobsanalysis.go | 4 +- .../types/mldataframeanalyticsjobscount.go | 4 +- .../types/mldataframeanalyticsjobsmemory.go | 4 +- typedapi/types/mlfilter.go | 4 +- typedapi/types/mlinference.go | 4 +- typedapi/types/mlinferencedeployments.go | 4 +- .../types/mlinferencedeploymentstimems.go | 4 +- typedapi/types/mlinferenceingestprocessor.go | 4 +- .../types/mlinferenceingestprocessorcount.go | 4 +- typedapi/types/mlinferencetrainedmodels.go | 4 +- .../types/mlinferencetrainedmodelscount.go | 4 +- typedapi/types/mljobforecasts.go | 4 +- typedapi/types/modelpackageconfig.go | 4 +- typedapi/types/modelplotconfig.go | 4 +- typedapi/types/modelsizestats.go | 4 +- typedapi/types/modelsnapshot.go | 4 +- typedapi/types/modelsnapshotupgrade.go | 4 +- typedapi/types/monitoring.go | 4 +- typedapi/types/morelikethisquery.go | 21 +- typedapi/types/mountedsnapshot.go | 4 +- typedapi/types/movingaverageaggregation.go | 4 +- typedapi/types/movingfunctionaggregation.go | 4 +- .../types/movingpercentilesaggregation.go | 4 +- typedapi/types/msearchrequestitem.go | 4 +- typedapi/types/msearchresponseitem.go | 4 +- typedapi/types/mtermvectorsoperation.go | 21 +- typedapi/types/multigeterror.go | 4 +- typedapi/types/multimatchquery.go | 4 +- typedapi/types/multiplexertokenfilter.go | 4 +- typedapi/types/multisearchheader.go | 27 +- typedapi/types/multisearchitem.go | 25 +- typedapi/types/multitermlookup.go | 4 +- typedapi/types/multitermsaggregate.go | 4 +- typedapi/types/multitermsaggregation.go | 4 +- typedapi/types/multitermsbucket.go | 25 +- typedapi/types/murmur3hashproperty.go | 4 +- typedapi/types/mutualinformationheuristic.go | 4 +- typedapi/types/names.go | 4 +- typedapi/types/nativecode.go | 4 +- typedapi/types/nativecodeinformation.go | 4 +- typedapi/types/nerinferenceoptions.go | 4 +- typedapi/types/nerinferenceupdateoptions.go | 4 +- typedapi/types/nestedaggregate.go | 25 +- typedapi/types/nestedaggregation.go | 4 +- typedapi/types/nestedidentity.go | 4 +- typedapi/types/nestedproperty.go | 4 +- typedapi/types/nestedquery.go | 4 +- typedapi/types/nestedsortvalue.go | 4 +- typedapi/types/networkdirectionprocessor.go | 4 +- typedapi/types/nevercondition.go | 4 +- typedapi/types/ngramtokenfilter.go | 4 +- typedapi/types/ngramtokenizer.go | 4 +- typedapi/types/nlpberttokenizationconfig.go | 4 +- .../types/nlprobertatokenizationconfig.go | 4 +- .../types/nlptokenizationupdateoptions.go | 4 +- typedapi/types/node.go | 4 +- typedapi/types/nodeallocationexplanation.go | 12 +- typedapi/types/nodeattributes.go | 4 +- typedapi/types/nodeattributesrecord.go | 4 +- typedapi/types/nodebufferpool.go | 4 +- typedapi/types/nodediskusage.go | 4 +- typedapi/types/nodeids.go | 4 +- typedapi/types/nodeinfo.go | 4 +- typedapi/types/nodeinfoaction.go | 4 +- typedapi/types/nodeinfoaggregation.go | 4 +- typedapi/types/nodeinfobootstrap.go | 4 +- typedapi/types/nodeinfoclient.go | 4 +- typedapi/types/nodeinfodiscover.go | 4 +- typedapi/types/nodeinfohttp.go | 4 +- typedapi/types/nodeinfoingest.go | 4 +- typedapi/types/nodeinfoingestdownloader.go | 4 +- typedapi/types/nodeinfoingestinfo.go | 4 +- typedapi/types/nodeinfoingestprocessor.go | 4 +- typedapi/types/nodeinfojvmmemory.go | 4 +- typedapi/types/nodeinfomemory.go | 4 +- typedapi/types/nodeinfooscpu.go | 4 +- typedapi/types/nodeinfopath.go | 4 +- typedapi/types/nodeinforepositories.go | 4 +- typedapi/types/nodeinforepositoriesurl.go | 4 +- typedapi/types/nodeinfoscript.go | 4 +- typedapi/types/nodeinfosearch.go | 4 +- typedapi/types/nodeinfosearchremote.go | 4 +- typedapi/types/nodeinfosettings.go | 4 +- typedapi/types/nodeinfosettingscluster.go | 4 +- .../types/nodeinfosettingsclusterelection.go | 4 +- typedapi/types/nodeinfosettingshttp.go | 4 +- typedapi/types/nodeinfosettingshttptype.go | 4 +- typedapi/types/nodeinfosettingsingest.go | 4 +- typedapi/types/nodeinfosettingsnetwork.go | 4 +- typedapi/types/nodeinfosettingsnode.go | 4 +- typedapi/types/nodeinfosettingstransport.go | 4 +- .../nodeinfosettingstransportfeatures.go | 4 +- .../types/nodeinfosettingstransporttype.go | 4 +- typedapi/types/nodeinfotransport.go | 4 +- typedapi/types/nodeinfoxpack.go | 4 +- typedapi/types/nodeinfoxpacklicense.go | 4 +- typedapi/types/nodeinfoxpacklicensetype.go | 4 +- typedapi/types/nodeinfoxpackml.go | 4 +- typedapi/types/nodeinfoxpacksecurity.go | 4 +- typedapi/types/nodeinfoxpacksecurityauthc.go | 4 +- .../types/nodeinfoxpacksecurityauthcrealms.go | 4 +- .../nodeinfoxpacksecurityauthcrealmsstatus.go | 4 +- .../types/nodeinfoxpacksecurityauthctoken.go | 4 +- typedapi/types/nodeinfoxpacksecurityssl.go | 4 +- typedapi/types/nodejvminfo.go | 4 +- typedapi/types/nodeoperatingsysteminfo.go | 4 +- typedapi/types/nodepackagingtype.go | 4 +- typedapi/types/nodeprocessinfo.go | 4 +- typedapi/types/nodereloadresult.go | 4 +- typedapi/types/nodescontext.go | 4 +- typedapi/types/nodescredentials.go | 4 +- typedapi/types/nodescredentialsfiletoken.go | 4 +- typedapi/types/nodesecuritystats.go | 36 + typedapi/types/nodeshard.go | 4 +- typedapi/types/nodeshutdownstatus.go | 4 +- typedapi/types/nodesindexingpressure.go | 4 +- typedapi/types/nodesindexingpressurememory.go | 4 +- typedapi/types/nodesinfometrics.go | 30 + typedapi/types/nodesingest.go | 4 +- typedapi/types/nodesrecord.go | 18 +- typedapi/types/nodestatistics.go | 4 +- typedapi/types/nodestatsmetrics.go | 30 + typedapi/types/nodesusagemetrics.go | 30 + typedapi/types/nodetasks.go | 4 +- typedapi/types/nodethreadpoolinfo.go | 4 +- typedapi/types/nodeusage.go | 4 +- typedapi/types/nonstationary.go | 110 ++ typedapi/types/norianalyzer.go | 4 +- typedapi/types/noripartofspeechtokenfilter.go | 4 +- typedapi/types/noritokenizer.go | 4 +- typedapi/types/normalizeaggregation.go | 4 +- typedapi/types/normalizer.go | 4 +- typedapi/types/norwegiananalyzer.go | 4 +- typedapi/types/notfoundaliases.go | 19 +- typedapi/types/numberrangequery.go | 4 +- typedapi/types/numericdecayfunction.go | 4 +- typedapi/types/numericfielddata.go | 4 +- typedapi/types/objectproperty.go | 4 +- typedapi/types/onehotencodingpreprocessor.go | 4 +- typedapi/types/openaiservicesettings.go | 4 +- typedapi/types/openaitasksettings.go | 20 +- typedapi/types/openshiftaiservicesettings.go | 159 +++ typedapi/types/openshiftaitasksettings.go | 105 ++ typedapi/types/operatingsystem.go | 4 +- typedapi/types/operatingsystemmemoryinfo.go | 4 +- typedapi/types/operationcontainer.go | 43 +- typedapi/types/outlierdetectionparameters.go | 4 +- typedapi/types/overallbucket.go | 4 +- typedapi/types/overallbucketjob.go | 4 +- typedapi/types/overlapping.go | 4 +- typedapi/types/page.go | 4 +- typedapi/types/pagerdutyaction.go | 4 +- typedapi/types/pagerdutycontext.go | 4 +- typedapi/types/pagerdutyevent.go | 4 +- typedapi/types/pagerdutyeventproxy.go | 4 +- typedapi/types/pagerdutyresult.go | 4 +- typedapi/types/painlesscontextsetup.go | 4 +- typedapi/types/parentaggregate.go | 25 +- typedapi/types/parentaggregation.go | 4 +- typedapi/types/parentidquery.go | 4 +- typedapi/types/parenttaskinfo.go | 4 +- typedapi/types/passthroughinferenceoptions.go | 4 +- .../passthroughinferenceupdateoptions.go | 4 +- typedapi/types/passthroughobjectproperty.go | 4 +- typedapi/types/pathhierarchytokenizer.go | 4 +- typedapi/types/patternanalyzer.go | 4 +- typedapi/types/patterncapturetokenfilter.go | 4 +- typedapi/types/patternreplacecharfilter.go | 4 +- typedapi/types/patternreplacetokenfilter.go | 4 +- typedapi/types/patterntokenizer.go | 4 +- typedapi/types/pendingtask.go | 4 +- typedapi/types/pendingtasksrecord.go | 4 +- typedapi/types/percentage.go | 4 +- typedapi/types/percentagescoreheuristic.go | 4 +- typedapi/types/percentileranksaggregation.go | 4 +- typedapi/types/percentiles.go | 4 +- typedapi/types/percentilesaggregation.go | 19 +- typedapi/types/percentilesbucketaggregate.go | 4 +- .../types/percentilesbucketaggregation.go | 4 +- typedapi/types/percolatequery.go | 21 +- typedapi/types/percolatorproperty.go | 4 +- typedapi/types/perpartitioncategorization.go | 4 +- typedapi/types/perrepositorystats.go | 4 +- typedapi/types/persiananalyzer.go | 4 +- .../types/persiannormalizationtokenfilter.go | 4 +- typedapi/types/persianstemtokenfilter.go | 4 +- typedapi/types/persistenttaskstatus.go | 4 +- typedapi/types/phase.go | 4 +- typedapi/types/phases.go | 4 +- typedapi/types/phonetictokenfilter.go | 4 +- typedapi/types/phrasesuggest.go | 4 +- typedapi/types/phrasesuggestcollate.go | 4 +- typedapi/types/phrasesuggestcollatequery.go | 4 +- typedapi/types/phrasesuggester.go | 4 +- typedapi/types/phrasesuggesthighlight.go | 4 +- typedapi/types/phrasesuggestoption.go | 4 +- typedapi/types/pinneddoc.go | 4 +- typedapi/types/pinnedquery.go | 51 +- typedapi/types/pinnedretriever.go | 4 +- typedapi/types/pipelineconfig.go | 4 +- typedapi/types/pipelinemetadata.go | 4 +- typedapi/types/pipelineprocessor.go | 4 +- typedapi/types/pipelineprocessorresult.go | 4 +- typedapi/types/pipelinesettings.go | 4 +- ...pipeseparatedflagssimplequerystringflag.go | 4 +- typedapi/types/pivot.go | 4 +- typedapi/types/pivotgroupbycontainer.go | 51 +- typedapi/types/pluginsrecord.go | 4 +- typedapi/types/pluginsstatus.go | 4 +- typedapi/types/pluginstats.go | 4 +- typedapi/types/pointintimereference.go | 4 +- typedapi/types/pointproperty.go | 4 +- typedapi/types/pool.go | 4 +- typedapi/types/porterstemtokenfilter.go | 4 +- typedapi/types/portugueseanalyzer.go | 4 +- typedapi/types/postmigrationfeature.go | 4 +- typedapi/types/predicatetokenfilter.go | 4 +- typedapi/types/predictedvalue.go | 4 +- typedapi/types/prefixquery.go | 4 +- typedapi/types/preprocessor.go | 49 +- typedapi/types/pressurememory.go | 4 +- typedapi/types/privileges.go | 4 +- typedapi/types/privilegesactions.go | 4 +- typedapi/types/privilegescheck.go | 4 +- typedapi/types/process.go | 4 +- typedapi/types/processor.go | 4 +- typedapi/types/processorcontainer.go | 4 +- typedapi/types/profile.go | 4 +- typedapi/types/property.go | 4 +- typedapi/types/publishedclusterstates.go | 4 +- typedapi/types/pvalueheuristic.go | 105 ++ typedapi/types/queries.go | 4 +- typedapi/types/query.go | 4 +- typedapi/types/querybreakdown.go | 4 +- typedapi/types/querycachestats.go | 4 +- typedapi/types/queryfeatureextractor.go | 4 +- typedapi/types/queryprofile.go | 4 +- typedapi/types/queryrole.go | 4 +- typedapi/types/queryrule.go | 4 +- typedapi/types/queryruleactions.go | 4 +- typedapi/types/queryrulecriteria.go | 4 +- typedapi/types/queryrulesetlistitem.go | 4 +- typedapi/types/queryrulesetmatchedrule.go | 4 +- typedapi/types/querystringquery.go | 4 +- typedapi/types/queryuser.go | 4 +- typedapi/types/queryvectorbuilder.go | 45 +- typedapi/types/querywatch.go | 4 +- .../questionansweringinferenceoptions.go | 4 +- ...questionansweringinferenceupdateoptions.go | 4 +- typedapi/types/randomsampleraggregation.go | 4 +- typedapi/types/randomscorefunction.go | 4 +- typedapi/types/rangeaggregate.go | 4 +- typedapi/types/rangeaggregation.go | 4 +- typedapi/types/rangebucket.go | 25 +- typedapi/types/rangequery.go | 4 +- typedapi/types/rankcontainer.go | 43 +- typedapi/types/rankeddocument.go | 4 +- typedapi/types/rankevalhit.go | 4 +- typedapi/types/rankevalhititem.go | 4 +- typedapi/types/rankevalmetric.go | 4 +- typedapi/types/rankevalmetricdetail.go | 4 +- .../rankevalmetricdiscountedcumulativegain.go | 4 +- .../rankevalmetricexpectedreciprocalrank.go | 4 +- .../types/rankevalmetricmeanreciprocalrank.go | 4 +- typedapi/types/rankevalmetricprecision.go | 4 +- typedapi/types/rankevalmetricrecall.go | 4 +- typedapi/types/rankevalquery.go | 4 +- typedapi/types/rankevalrequestitem.go | 4 +- typedapi/types/rankfeaturefunctionlinear.go | 4 +- .../types/rankfeaturefunctionlogarithm.go | 4 +- .../types/rankfeaturefunctionsaturation.go | 4 +- typedapi/types/rankfeaturefunctionsigmoid.go | 4 +- typedapi/types/rankfeatureproperty.go | 4 +- typedapi/types/rankfeaturequery.go | 4 +- typedapi/types/rankfeaturesproperty.go | 4 +- typedapi/types/rankvectorproperty.go | 4 +- typedapi/types/raretermsaggregation.go | 4 +- typedapi/types/rateaggregate.go | 4 +- typedapi/types/rateaggregation.go | 4 +- typedapi/types/ratelimitsetting.go | 7 +- typedapi/types/rawdocument.go | 418 ++++++++ typedapi/types/readblobdetails.go | 4 +- typedapi/types/readexception.go | 4 +- typedapi/types/readonlyurlrepository.go | 4 +- .../types/readonlyurlrepositorysettings.go | 4 +- typedapi/types/readsummaryinfo.go | 4 +- typedapi/types/realmcache.go | 4 +- typedapi/types/realminfo.go | 4 +- typedapi/types/recording.go | 4 +- typedapi/types/recoverybytes.go | 4 +- typedapi/types/recoveryfiles.go | 4 +- typedapi/types/recoveryindexstatus.go | 4 +- typedapi/types/recoveryorigin.go | 4 +- typedapi/types/recoveryrecord.go | 4 +- typedapi/types/recoverystartstatus.go | 4 +- typedapi/types/recoverystats.go | 4 +- typedapi/types/recoverystatus.go | 4 +- typedapi/types/redact.go | 4 +- typedapi/types/redactprocessor.go | 4 +- typedapi/types/refreshstats.go | 4 +- typedapi/types/regexoptions.go | 4 +- typedapi/types/regexpquery.go | 4 +- typedapi/types/regexvalidation.go | 4 +- typedapi/types/registereddomainprocessor.go | 4 +- typedapi/types/regressioninferenceoptions.go | 4 +- typedapi/types/reindexdestination.go | 21 +- typedapi/types/reindexnode.go | 4 +- typedapi/types/reindexsource.go | 42 +- typedapi/types/reindexstatus.go | 4 +- typedapi/types/reindextask.go | 4 +- typedapi/types/reloaddetails.go | 4 +- typedapi/types/reloadresult.go | 4 +- typedapi/types/relocationfailureinfo.go | 4 +- typedapi/types/remoteclusterinfo.go | 4 +- typedapi/types/remoteclusterprivileges.go | 4 +- typedapi/types/remoteindicesprivileges.go | 4 +- typedapi/types/remotesource.go | 28 +- typedapi/types/remoteuserindicesprivileges.go | 4 +- typedapi/types/removeaction.go | 4 +- typedapi/types/removeclusterserver.go | 4 +- typedapi/types/removeduplicatestokenfilter.go | 4 +- typedapi/types/removeindexaction.go | 4 +- typedapi/types/removeindicesblockstatus.go | 4 +- typedapi/types/removeprocessor.go | 4 +- typedapi/types/renameprocessor.go | 4 +- typedapi/types/replicationaccess.go | 4 +- typedapi/types/reportingemailattachment.go | 4 +- typedapi/types/repositoriesrecord.go | 4 +- typedapi/types/repository.go | 4 +- .../types/repositoryintegrityindicator.go | 4 +- .../repositoryintegrityindicatordetails.go | 4 +- typedapi/types/repositorylocation.go | 4 +- .../types/repositorymeteringinformation.go | 4 +- .../types/repositorystatscurrentcounts.go | 4 +- typedapi/types/repositorystatsshards.go | 4 +- typedapi/types/requestcachestats.go | 4 +- typedapi/types/requestchatcompletion.go | 7 +- typedapi/types/requestcounts.go | 4 +- typedapi/types/requestitem.go | 4 +- typedapi/types/reroutedecision.go | 4 +- typedapi/types/rerouteexplanation.go | 4 +- typedapi/types/rerouteparameters.go | 4 +- typedapi/types/rerouteprocessor.go | 4 +- typedapi/types/rescore.go | 10 +- typedapi/types/rescorequery.go | 4 +- typedapi/types/rescorerretriever.go | 4 +- typedapi/types/rescorevector.go | 4 +- typedapi/types/reservedsize.go | 4 +- typedapi/types/resolveclusterinfo.go | 4 +- typedapi/types/resolveindexaliasitem.go | 4 +- typedapi/types/resolveindexdatastreamsitem.go | 4 +- typedapi/types/resolveindexitem.go | 20 +- typedapi/types/resourceprivileges.go | 4 +- typedapi/types/responseitem.go | 4 +- typedapi/types/restriction.go | 4 +- typedapi/types/retention.go | 4 +- typedapi/types/retentionlease.go | 4 +- typedapi/types/retentionpolicy.go | 4 +- typedapi/types/retentionpolicycontainer.go | 43 +- typedapi/types/retries.go | 4 +- typedapi/types/retrievercontainer.go | 48 +- typedapi/types/reversenestedaggregate.go | 25 +- typedapi/types/reversenestedaggregation.go | 4 +- typedapi/types/reversetokenfilter.go | 4 +- typedapi/types/role.go | 4 +- typedapi/types/roledescriptor.go | 4 +- typedapi/types/roledescriptorread.go | 4 +- typedapi/types/roledescriptorwrapper.go | 4 +- typedapi/types/rolemappingrule.go | 50 +- typedapi/types/rolequerycontainer.go | 4 +- typedapi/types/rolesstats.go | 36 + typedapi/types/roletemplate.go | 4 +- typedapi/types/roletemplateinlinequery.go | 4 +- typedapi/types/roletemplatequery.go | 4 +- typedapi/types/roletemplatescript.go | 4 +- typedapi/types/rolloveraction.go | 6 +- typedapi/types/rolloverconditions.go | 6 +- typedapi/types/rollupcapabilities.go | 4 +- typedapi/types/rollupcapabilitysummary.go | 4 +- typedapi/types/rollupfieldsummary.go | 4 +- typedapi/types/rollupjob.go | 4 +- typedapi/types/rollupjobconfiguration.go | 4 +- typedapi/types/rollupjobstats.go | 4 +- typedapi/types/rollupjobstatus.go | 4 +- typedapi/types/rollupjobsummary.go | 4 +- typedapi/types/rollupjobsummaryfield.go | 4 +- typedapi/types/romaniananalyzer.go | 4 +- typedapi/types/routing.go | 30 + typedapi/types/routingfield.go | 4 +- typedapi/types/rrfrank.go | 4 +- typedapi/types/rrfretriever.go | 54 +- typedapi/types/rrfretrievercomponent.go | 103 ++ typedapi/types/rrfretrieverentry.go | 33 + typedapi/types/rulecondition.go | 4 +- typedapi/types/rulequery.go | 4 +- typedapi/types/ruleretriever.go | 4 +- typedapi/types/runningstatesearchinterval.go | 4 +- typedapi/types/runtimefield.go | 4 +- typedapi/types/runtimefieldfetchfields.go | 4 +- typedapi/types/runtimefields.go | 4 +- typedapi/types/runtimefieldstype.go | 4 +- typedapi/types/russiananalyzer.go | 4 +- typedapi/types/russianstemtokenfilter.go | 4 +- typedapi/types/s3repository.go | 4 +- typedapi/types/s3repositorysettings.go | 4 +- typedapi/types/samplediversity.go | 4 +- typedapi/types/sampleraggregate.go | 25 +- typedapi/types/sampleraggregation.go | 4 +- typedapi/types/samplingconfiguration.go | 187 ++++ typedapi/types/scalarvalue.go | 4 +- typedapi/types/scaledfloatnumberproperty.go | 4 +- .../types/scandinavianfoldingtokenfilter.go | 4 +- .../scandinaviannormalizationtokenfilter.go | 4 +- typedapi/types/schedulecontainer.go | 67 +- typedapi/types/scheduletimeofday.go | 4 +- typedapi/types/scheduletriggerevent.go | 4 +- typedapi/types/schedulingconfiguration.go | 4 +- typedapi/types/scoresort.go | 4 +- typedapi/types/script.go | 4 +- typedapi/types/scriptcache.go | 4 +- typedapi/types/scriptcondition.go | 4 +- typedapi/types/scriptedheuristic.go | 4 +- typedapi/types/scriptedmetricaggregate.go | 4 +- typedapi/types/scriptedmetricaggregation.go | 4 +- typedapi/types/scriptfield.go | 4 +- typedapi/types/scripting.go | 4 +- typedapi/types/scriptprocessor.go | 4 +- typedapi/types/scriptquery.go | 4 +- typedapi/types/scriptrescore.go | 43 + typedapi/types/scriptscorefunction.go | 4 +- typedapi/types/scriptscorequery.go | 4 +- typedapi/types/scriptsort.go | 4 +- typedapi/types/scriptsource.go | 4 +- typedapi/types/scripttransform.go | 4 +- typedapi/types/scrollids.go | 4 +- typedapi/types/searchablesnapshotaction.go | 4 +- typedapi/types/searchablesnapshots.go | 4 +- typedapi/types/searchaccess.go | 4 +- typedapi/types/searchapplication.go | 4 +- typedapi/types/searchapplicationparameters.go | 4 +- typedapi/types/searchapplicationtemplate.go | 4 +- typedapi/types/searchasyoutypeproperty.go | 4 +- typedapi/types/searchidle.go | 4 +- typedapi/types/searchinput.go | 4 +- typedapi/types/searchinputrequestbody.go | 4 +- .../types/searchinputrequestdefinition.go | 4 +- typedapi/types/searchprofile.go | 4 +- typedapi/types/searchrequestbody.go | 4 +- typedapi/types/searchshardsnodeattributes.go | 4 +- typedapi/types/searchstats.go | 4 +- typedapi/types/searchtemplaterequestbody.go | 4 +- typedapi/types/searchtransform.go | 4 +- typedapi/types/searchusagestats.go | 20 +- typedapi/types/security.go | 4 +- typedapi/types/securityrolemapping.go | 4 +- typedapi/types/securityroles.go | 4 +- typedapi/types/securityrolesdls.go | 4 +- typedapi/types/securityrolesdlsbitsetcache.go | 78 +- typedapi/types/securityrolesfile.go | 4 +- typedapi/types/securityrolesnative.go | 4 +- typedapi/types/securitysettings.go | 4 +- typedapi/types/segment.go | 4 +- typedapi/types/segmentsrecord.go | 4 +- typedapi/types/segmentsstats.go | 4 +- typedapi/types/selectoption.go | 4 +- typedapi/types/semanticquery.go | 4 +- typedapi/types/semantictextindexoptions.go | 44 + typedapi/types/semantictextproperty.go | 360 ++++++- typedapi/types/serbiananalyzer.go | 4 +- .../types/serbiannormalizationtokenfilter.go | 4 +- .../types/serialdifferencingaggregation.go | 4 +- typedapi/types/serializedclusterstate.go | 4 +- .../types/serializedclusterstatedetail.go | 4 +- typedapi/types/servicetoken.go | 4 +- typedapi/types/setpriorityaction.go | 4 +- typedapi/types/setprocessor.go | 4 +- typedapi/types/setsecurityuserprocessor.go | 4 +- typedapi/types/settings.go | 28 +- typedapi/types/settingsanalyze.go | 4 +- typedapi/types/settingshighlight.go | 4 +- typedapi/types/settingsquerystring.go | 4 +- typedapi/types/settingssearch.go | 4 +- typedapi/types/settingssimilarity.go | 4 +- typedapi/types/settingssimilaritybm25.go | 4 +- typedapi/types/settingssimilarityboolean.go | 4 +- typedapi/types/settingssimilaritydfi.go | 4 +- typedapi/types/settingssimilaritydfr.go | 4 +- typedapi/types/settingssimilarityib.go | 4 +- typedapi/types/settingssimilaritylmd.go | 4 +- typedapi/types/settingssimilaritylmj.go | 4 +- typedapi/types/settingssimilarityscripted.go | 4 +- typedapi/types/shapefieldquery.go | 4 +- typedapi/types/shapeproperty.go | 4 +- typedapi/types/shapequery.go | 4 +- typedapi/types/shardcommit.go | 4 +- typedapi/types/shardfailure.go | 39 +- typedapi/types/shardfilesizeinfo.go | 4 +- typedapi/types/shardhealthstats.go | 4 +- typedapi/types/shardlease.go | 4 +- typedapi/types/shardmigrationstatus.go | 4 +- typedapi/types/shardpath.go | 4 +- typedapi/types/shardprofile.go | 4 +- typedapi/types/shardquerycache.go | 4 +- typedapi/types/shardrecovery.go | 4 +- typedapi/types/shardretentionleases.go | 4 +- typedapi/types/shardrouting.go | 4 +- typedapi/types/shardsavailabilityindicator.go | 4 +- .../shardsavailabilityindicatordetails.go | 4 +- typedapi/types/shardscapacityindicator.go | 4 +- .../types/shardscapacityindicatordetails.go | 4 +- .../shardscapacityindicatortierdetail.go | 4 +- typedapi/types/shardsegmentrouting.go | 4 +- typedapi/types/shardsequencenumber.go | 4 +- typedapi/types/shardsrecord.go | 4 +- typedapi/types/shardssegment.go | 4 +- typedapi/types/shardsstatssummary.go | 4 +- typedapi/types/shardsstatssummaryitem.go | 4 +- typedapi/types/shardstatistics.go | 4 +- typedapi/types/shardstore.go | 4 +- typedapi/types/shardstoreexception.go | 4 +- typedapi/types/shardstoreindex.go | 4 +- typedapi/types/shardstorenode.go | 4 +- typedapi/types/shardstorewrapper.go | 4 +- typedapi/types/shardstotalstats.go | 4 +- typedapi/types/shared.go | 4 +- typedapi/types/sharedfilesystemrepository.go | 4 +- .../sharedfilesystemrepositorysettings.go | 4 +- typedapi/types/shingletokenfilter.go | 4 +- typedapi/types/shortnumberproperty.go | 4 +- typedapi/types/shrinkaction.go | 4 +- .../types/significantlongtermsaggregate.go | 4 +- typedapi/types/significantlongtermsbucket.go | 25 +- .../types/significantstringtermsaggregate.go | 4 +- .../types/significantstringtermsbucket.go | 25 +- typedapi/types/significanttermsaggregation.go | 21 +- typedapi/types/significanttextaggregation.go | 4 +- typedapi/types/simpleanalyzer.go | 4 +- .../types/simplemovingaverageaggregation.go | 4 +- typedapi/types/simplepatternsplittokenizer.go | 4 +- typedapi/types/simplepatterntokenizer.go | 4 +- typedapi/types/simplequerystringflags.go | 4 +- typedapi/types/simplequerystringquery.go | 4 +- typedapi/types/simplevalueaggregate.go | 4 +- typedapi/types/simulatedactions.go | 4 +- typedapi/types/simulatedocumentresult.go | 4 +- .../types/simulateingestdocumentresult.go | 4 +- typedapi/types/sizefield.go | 4 +- typedapi/types/sizehttphistogram.go | 4 +- typedapi/types/slackaction.go | 4 +- typedapi/types/slackattachment.go | 4 +- typedapi/types/slackattachmentfield.go | 4 +- typedapi/types/slackdynamicattachment.go | 4 +- typedapi/types/slackmessage.go | 4 +- typedapi/types/slackresult.go | 4 +- typedapi/types/slicedscroll.go | 4 +- typedapi/types/slices.go | 4 +- typedapi/types/slm.go | 4 +- typedapi/types/slmindicator.go | 4 +- typedapi/types/slmindicatordetails.go | 4 +- .../types/slmindicatorunhealthypolicies.go | 4 +- typedapi/types/slmpolicy.go | 4 +- typedapi/types/slowlogsettings.go | 4 +- typedapi/types/slowlogtresholdlevels.go | 4 +- typedapi/types/slowlogtresholds.go | 4 +- typedapi/types/smoothingmodelcontainer.go | 43 +- typedapi/types/snapshotcurrentcounts.go | 4 +- typedapi/types/snapshotindexstats.go | 4 +- typedapi/types/snapshotinfo.go | 4 +- typedapi/types/snapshotlifecycle.go | 4 +- typedapi/types/snapshotnodeinfo.go | 4 +- typedapi/types/snapshotpolicystats.go | 4 +- typedapi/types/snapshotresponseitem.go | 4 +- typedapi/types/snapshotrestore.go | 4 +- typedapi/types/snapshotshardfailure.go | 4 +- typedapi/types/snapshotshardsstats.go | 4 +- typedapi/types/snapshotshardsstatus.go | 4 +- typedapi/types/snapshotsrecord.go | 4 +- typedapi/types/snapshotstats.go | 4 +- typedapi/types/snowballanalyzer.go | 4 +- typedapi/types/snowballtokenfilter.go | 4 +- typedapi/types/softdeletes.go | 4 +- typedapi/types/soranianalyzer.go | 4 +- .../types/soraninormalizationtokenfilter.go | 4 +- typedapi/types/sort.go | 4 +- typedapi/types/sortcombinations.go | 4 +- typedapi/types/sortoptions.go | 4 +- typedapi/types/sortprocessor.go | 4 +- typedapi/types/sourceconfig.go | 4 +- typedapi/types/sourceconfigparam.go | 4 +- typedapi/types/sourcefield.go | 4 +- typedapi/types/sourcefilter.go | 4 +- typedapi/types/sourceindex.go | 4 +- typedapi/types/sourceonlyrepository.go | 4 +- .../types/sourceonlyrepositorysettings.go | 4 +- typedapi/types/spancontainingquery.go | 4 +- typedapi/types/spanfieldmaskingquery.go | 4 +- typedapi/types/spanfirstquery.go | 4 +- typedapi/types/spangapquery.go | 4 +- typedapi/types/spanishanalyzer.go | 4 +- typedapi/types/spanmultitermquery.go | 4 +- typedapi/types/spannearquery.go | 4 +- typedapi/types/spannotquery.go | 4 +- typedapi/types/spanorquery.go | 4 +- typedapi/types/spanquery.go | 4 +- typedapi/types/spantermquery.go | 4 +- typedapi/types/spanwithinquery.go | 4 +- typedapi/types/sparseembeddingresult.go | 4 +- typedapi/types/sparsevector.go | 4 +- typedapi/types/sparsevectorindexoptions.go | 4 +- typedapi/types/sparsevectorproperty.go | 4 +- typedapi/types/sparsevectorquery.go | 50 +- typedapi/types/sparsevectorstats.go | 4 +- typedapi/types/specifieddocument.go | 4 +- typedapi/types/spike.go | 97 ++ typedapi/types/splitprocessor.go | 4 +- typedapi/types/sql.go | 4 +- typedapi/types/ssl.go | 4 +- typedapi/types/stagnatingbackingindices.go | 4 +- typedapi/types/standardanalyzer.go | 4 +- typedapi/types/standarddeviationbounds.go | 4 +- .../types/standarddeviationboundsasstring.go | 4 +- typedapi/types/standardretriever.go | 4 +- typedapi/types/standardtokenizer.go | 4 +- typedapi/types/stationary.go | 34 + typedapi/types/statistics.go | 4 +- typedapi/types/stats.go | 4 +- typedapi/types/statsaggregate.go | 4 +- typedapi/types/statsaggregation.go | 4 +- typedapi/types/statsbucketaggregate.go | 4 +- typedapi/types/statsbucketaggregation.go | 4 +- typedapi/types/status.go | 4 +- typedapi/types/statuserror.go | 4 +- typedapi/types/statusinprogress.go | 4 +- typedapi/types/stemmeroverridetokenfilter.go | 4 +- typedapi/types/stemmertokenfilter.go | 4 +- typedapi/types/stepchange.go | 97 ++ typedapi/types/stepkey.go | 4 +- typedapi/types/stopanalyzer.go | 4 +- typedapi/types/stoptokenfilter.go | 4 +- typedapi/types/stopwords.go | 4 +- typedapi/types/storage.go | 4 +- typedapi/types/storedscript.go | 4 +- typedapi/types/storestats.go | 4 +- typedapi/types/streamresult.go | 4 +- typedapi/types/stringifiedboolean.go | 4 +- typedapi/types/stringifieddouble.go | 8 +- .../types/stringifiedepochtimeunitmillis.go | 4 +- .../types/stringifiedepochtimeunitseconds.go | 4 +- typedapi/types/stringifiedinteger.go | 4 +- typedapi/types/stringifiedversionnumber.go | 4 +- typedapi/types/stringraretermsaggregate.go | 4 +- typedapi/types/stringraretermsbucket.go | 25 +- typedapi/types/stringstatsaggregate.go | 4 +- typedapi/types/stringstatsaggregation.go | 4 +- typedapi/types/stringtermsaggregate.go | 4 +- typedapi/types/stringtermsbucket.go | 25 +- typedapi/types/stupidbackoffsmoothingmodel.go | 4 +- typedapi/types/suggest.go | 4 +- typedapi/types/suggestcontext.go | 4 +- typedapi/types/suggester.go | 4 +- typedapi/types/suggestfuzziness.go | 4 +- typedapi/types/sumaggregate.go | 4 +- typedapi/types/sumaggregation.go | 4 +- typedapi/types/sumbucketaggregation.go | 4 +- typedapi/types/summary.go | 4 +- typedapi/types/summaryinfo.go | 4 +- typedapi/types/swedishanalyzer.go | 4 +- typedapi/types/synccontainer.go | 43 +- typedapi/types/syncjobconnectorreference.go | 4 +- typedapi/types/syncrulesfeature.go | 4 +- typedapi/types/synonymgraphtokenfilter.go | 4 +- typedapi/types/synonymrule.go | 4 +- typedapi/types/synonymruleread.go | 4 +- typedapi/types/synonymssetitem.go | 4 +- typedapi/types/synonymsstats.go | 4 +- typedapi/types/synonymtokenfilter.go | 4 +- typedapi/types/tablevaluescontainer.go | 51 +- typedapi/types/tablevaluesintegervalue.go | 4 +- typedapi/types/tablevalueskeywordvalue.go | 4 +- typedapi/types/tablevalueslongdouble.go | 4 +- typedapi/types/tablevalueslongvalue.go | 4 +- typedapi/types/tags.go | 160 +++ .../types/targetmeanencodingpreprocessor.go | 4 +- typedapi/types/taskfailure.go | 4 +- typedapi/types/taskinfo.go | 4 +- typedapi/types/taskinfos.go | 4 +- typedapi/types/tasksrecord.go | 4 +- typedapi/types/tdigest.go | 4 +- .../types/tdigestpercentileranksaggregate.go | 4 +- typedapi/types/tdigestpercentilesaggregate.go | 4 +- typedapi/types/template.go | 4 +- typedapi/types/templateconfig.go | 4 +- typedapi/types/templatemapping.go | 4 +- typedapi/types/templatesrecord.go | 4 +- typedapi/types/term.go | 4 +- typedapi/types/terminateprocessor.go | 4 +- typedapi/types/termquery.go | 4 +- typedapi/types/termrangequery.go | 4 +- typedapi/types/termsaggregation.go | 4 +- typedapi/types/termsexclude.go | 4 +- typedapi/types/termsgrouping.go | 4 +- typedapi/types/termsinclude.go | 4 +- typedapi/types/termslookup.go | 27 +- typedapi/types/termspartition.go | 4 +- typedapi/types/termsquery.go | 4 +- typedapi/types/termsqueryfield.go | 4 +- typedapi/types/termssetquery.go | 4 +- typedapi/types/termsuggest.go | 4 +- typedapi/types/termsuggester.go | 4 +- typedapi/types/termsuggestoption.go | 4 +- typedapi/types/termvector.go | 4 +- typedapi/types/termvectorsfilter.go | 4 +- typedapi/types/termvectorsresult.go | 4 +- typedapi/types/termvectorstoken.go | 4 +- typedapi/types/testpopulation.go | 4 +- .../textclassificationinferenceoptions.go | 4 +- ...extclassificationinferenceupdateoptions.go | 4 +- typedapi/types/textembedding.go | 12 +- typedapi/types/textembeddingbyteresult.go | 4 +- .../types/textembeddinginferenceoptions.go | 6 +- .../textembeddinginferenceupdateoptions.go | 4 +- typedapi/types/textembeddingresult.go | 4 +- .../types/textexpansioninferenceoptions.go | 6 +- .../textexpansioninferenceupdateoptions.go | 4 +- typedapi/types/textexpansionquery.go | 4 +- typedapi/types/textindexprefixes.go | 4 +- typedapi/types/textproperty.go | 4 +- typedapi/types/textsimilarityreranker.go | 15 +- typedapi/types/texttoanalyze.go | 4 +- typedapi/types/thaianalyzer.go | 4 +- typedapi/types/thaitokenizer.go | 4 +- typedapi/types/thinkingconfig.go | 89 ++ typedapi/types/threadcount.go | 4 +- typedapi/types/threadpoolrecord.go | 4 +- typedapi/types/throttlestate.go | 4 +- typedapi/types/timehttphistogram.go | 4 +- typedapi/types/timeofmonth.go | 4 +- typedapi/types/timeofweek.go | 4 +- typedapi/types/timeofyear.go | 4 +- typedapi/types/timeseriesaggregate.go | 4 +- typedapi/types/timeseriesaggregation.go | 4 +- typedapi/types/timeseriesbucket.go | 25 +- typedapi/types/timesync.go | 4 +- typedapi/types/timingstats.go | 4 +- typedapi/types/tokencountproperty.go | 4 +- typedapi/types/tokendetail.go | 4 +- typedapi/types/tokenfilter.go | 4 +- typedapi/types/tokenfilterdefinition.go | 4 +- typedapi/types/tokenizationconfigcontainer.go | 43 +- typedapi/types/tokenizer.go | 4 +- typedapi/types/tokenizerdefinition.go | 4 +- typedapi/types/tokenpruningconfig.go | 4 +- typedapi/types/toolcall.go | 4 +- typedapi/types/toolcallfunction.go | 4 +- typedapi/types/topclassentry.go | 4 +- typedapi/types/tophit.go | 4 +- typedapi/types/tophitsaggregate.go | 4 +- typedapi/types/tophitsaggregation.go | 4 +- typedapi/types/topleftbottomrightgeobounds.go | 4 +- typedapi/types/topmetrics.go | 4 +- typedapi/types/topmetricsaggregate.go | 4 +- typedapi/types/topmetricsaggregation.go | 4 +- typedapi/types/topmetricsvalue.go | 4 +- typedapi/types/toprightbottomleftgeobounds.go | 4 +- typedapi/types/totalfeatureimportance.go | 4 +- typedapi/types/totalfeatureimportanceclass.go | 4 +- .../types/totalfeatureimportancestatistics.go | 4 +- typedapi/types/totaluserprofiles.go | 4 +- typedapi/types/trackhits.go | 4 +- typedapi/types/trainedmodel.go | 4 +- typedapi/types/trainedmodelassignment.go | 4 +- ...nedmodelassignmentroutingstateandreason.go | 4 +- .../trainedmodelassignmentroutingtable.go | 4 +- .../trainedmodelassignmenttaskparameters.go | 4 +- typedapi/types/trainedmodelconfig.go | 4 +- typedapi/types/trainedmodelconfiginput.go | 4 +- typedapi/types/trainedmodelconfigmetadata.go | 4 +- .../trainedmodeldeploymentallocationstatus.go | 4 +- .../types/trainedmodeldeploymentnodesstats.go | 4 +- typedapi/types/trainedmodeldeploymentstats.go | 4 +- typedapi/types/trainedmodelentities.go | 4 +- .../trainedmodelinferenceclassimportance.go | 4 +- .../trainedmodelinferencefeatureimportance.go | 4 +- typedapi/types/trainedmodelinferencestats.go | 4 +- typedapi/types/trainedmodellocation.go | 4 +- typedapi/types/trainedmodellocationindex.go | 4 +- typedapi/types/trainedmodelprefixstrings.go | 4 +- typedapi/types/trainedmodelsizestats.go | 4 +- typedapi/types/trainedmodelsrecord.go | 4 +- typedapi/types/trainedmodelstats.go | 4 +- typedapi/types/trainedmodeltree.go | 4 +- typedapi/types/trainedmodeltreenode.go | 4 +- typedapi/types/transformauthorization.go | 4 +- typedapi/types/transformcontainer.go | 49 +- typedapi/types/transformdestination.go | 4 +- typedapi/types/transformhealthissue.go | 4 +- typedapi/types/transformindexerstats.go | 4 +- typedapi/types/transformprogress.go | 4 +- typedapi/types/transformsource.go | 4 +- typedapi/types/transformsrecord.go | 4 +- typedapi/types/transformstats.go | 4 +- typedapi/types/transformstatshealth.go | 4 +- typedapi/types/transformsummary.go | 4 +- typedapi/types/translog.go | 4 +- typedapi/types/translogretention.go | 4 +- typedapi/types/translogstats.go | 4 +- typedapi/types/translogstatus.go | 4 +- typedapi/types/transport.go | 4 +- typedapi/types/transporthistogram.go | 4 +- typedapi/types/trendchange.go | 114 ++ typedapi/types/triggercontainer.go | 45 +- typedapi/types/triggereventcontainer.go | 45 +- typedapi/types/triggereventresult.go | 4 +- typedapi/types/trimprocessor.go | 4 +- typedapi/types/trimtokenfilter.go | 4 +- typedapi/types/truncatetokenfilter.go | 4 +- typedapi/types/ttestaggregate.go | 4 +- typedapi/types/ttestaggregation.go | 4 +- typedapi/types/turkishanalyzer.go | 4 +- typedapi/types/typefieldmappings.go | 4 +- typedapi/types/typemapping.go | 4 +- typedapi/types/typequery.go | 4 +- typedapi/types/uaxemailurltokenizer.go | 4 +- typedapi/types/unassignedinformation.go | 4 +- typedapi/types/uniquetokenfilter.go | 4 +- typedapi/types/unmappedraretermsaggregate.go | 4 +- typedapi/types/unmappedsampleraggregate.go | 25 +- .../unmappedsignificanttermsaggregate.go | 4 +- typedapi/types/unmappedtermsaggregate.go | 4 +- typedapi/types/unrateddocument.go | 4 +- typedapi/types/unsignedlongnumberproperty.go | 4 +- typedapi/types/untypeddecayfunction.go | 4 +- typedapi/types/untypeddistancefeaturequery.go | 4 +- typedapi/types/untypedrangequery.go | 4 +- typedapi/types/updateaction.go | 4 +- typedapi/types/updatebyqueryrethrottlenode.go | 4 +- typedapi/types/updateddatastreammappings.go | 120 +++ typedapi/types/updateddatastreamsettings.go | 4 +- typedapi/types/updateoperation.go | 21 +- typedapi/types/uppercaseprocessor.go | 4 +- typedapi/types/uppercasetokenfilter.go | 4 +- typedapi/types/uripartsprocessor.go | 4 +- typedapi/types/urldecodeprocessor.go | 4 +- typedapi/types/usagephase.go | 4 +- typedapi/types/usagephases.go | 4 +- typedapi/types/usagestatsindex.go | 4 +- typedapi/types/usagestatsshards.go | 4 +- typedapi/types/user.go | 4 +- typedapi/types/useragentprocessor.go | 4 +- typedapi/types/userindicesprivileges.go | 4 +- typedapi/types/userprofile.go | 4 +- typedapi/types/userprofilehitmetadata.go | 4 +- typedapi/types/userprofileuser.go | 4 +- typedapi/types/userprofilewithmetadata.go | 4 +- typedapi/types/userquerycontainer.go | 4 +- typedapi/types/userrealm.go | 4 +- typedapi/types/validation.go | 4 +- typedapi/types/validationloss.go | 4 +- typedapi/types/valuecountaggregate.go | 4 +- typedapi/types/valuecountaggregation.go | 4 +- .../types/variablewidthhistogramaggregate.go | 4 +- .../variablewidthhistogramaggregation.go | 4 +- .../types/variablewidthhistogrambucket.go | 25 +- typedapi/types/vector.go | 4 +- typedapi/types/verifyindex.go | 4 +- typedapi/types/versionproperty.go | 4 +- typedapi/types/vertex.go | 4 +- typedapi/types/vertexdefinition.go | 4 +- typedapi/types/vertexinclude.go | 4 +- typedapi/types/vocabulary.go | 4 +- typedapi/types/voyageaiservicesettings.go | 4 +- typedapi/types/voyageaitasksettings.go | 4 +- typedapi/types/waitforactiveshards.go | 4 +- typedapi/types/waitfornodes.go | 4 +- typedapi/types/waitforsnapshotaction.go | 4 +- typedapi/types/warmerstats.go | 4 +- typedapi/types/watch.go | 4 +- typedapi/types/watcher.go | 4 +- typedapi/types/watcheraction.go | 4 +- typedapi/types/watcheractions.go | 4 +- typedapi/types/watcheractiontotals.go | 4 +- typedapi/types/watchercondition.go | 52 +- typedapi/types/watcherinput.go | 46 +- typedapi/types/watchernodestats.go | 4 +- typedapi/types/watcherstatusactions.go | 4 +- typedapi/types/watcherwatch.go | 4 +- typedapi/types/watcherwatchtrigger.go | 4 +- typedapi/types/watcherwatchtriggerschedule.go | 4 +- typedapi/types/watchrecord.go | 4 +- typedapi/types/watchrecordqueuedstats.go | 4 +- typedapi/types/watchrecordstats.go | 4 +- typedapi/types/watchstatus.go | 4 +- typedapi/types/watsonxservicesettings.go | 4 +- typedapi/types/web.go | 4 +- typedapi/types/webhookaction.go | 4 +- typedapi/types/webhookresult.go | 4 +- typedapi/types/weightedaverageaggregation.go | 4 +- typedapi/types/weightedaveragevalue.go | 4 +- typedapi/types/weightedavgaggregate.go | 4 +- typedapi/types/weightedtokensquery.go | 4 +- typedapi/types/weights.go | 4 +- typedapi/types/whitespaceanalyzer.go | 4 +- typedapi/types/whitespacetokenizer.go | 4 +- typedapi/types/wildcardproperty.go | 4 +- typedapi/types/wildcardquery.go | 4 +- typedapi/types/wktgeobounds.go | 4 +- .../types/worddelimitergraphtokenfilter.go | 4 +- typedapi/types/worddelimitertokenfilter.go | 4 +- typedapi/types/wrapperquery.go | 4 +- typedapi/types/writeresponsebase.go | 14 +- typedapi/types/writesummaryinfo.go | 4 +- .../types/xlmrobertatokenizationconfig.go | 4 +- typedapi/types/xpackdatafeed.go | 4 +- typedapi/types/xpackfeature.go | 4 +- typedapi/types/xpackfeatures.go | 4 +- typedapi/types/xpackquery.go | 4 +- typedapi/types/xpackrealm.go | 4 +- typedapi/types/xpackrolemapping.go | 4 +- typedapi/types/xpackruntimefieldtypes.go | 4 +- .../zeroshotclassificationinferenceoptions.go | 4 +- ...hotclassificationinferenceupdateoptions.go | 4 +- typedapi/watcher/ackwatch/ack_watch.go | 4 +- typedapi/watcher/ackwatch/response.go | 4 +- .../watcher/activatewatch/activate_watch.go | 4 +- typedapi/watcher/activatewatch/response.go | 4 +- .../deactivatewatch/deactivate_watch.go | 4 +- typedapi/watcher/deactivatewatch/response.go | 4 +- typedapi/watcher/deletewatch/delete_watch.go | 4 +- typedapi/watcher/deletewatch/response.go | 4 +- .../watcher/executewatch/execute_watch.go | 4 +- typedapi/watcher/executewatch/request.go | 5 +- typedapi/watcher/executewatch/response.go | 5 +- typedapi/watcher/getsettings/get_settings.go | 4 +- typedapi/watcher/getsettings/response.go | 4 +- typedapi/watcher/getwatch/get_watch.go | 2 +- typedapi/watcher/getwatch/response.go | 4 +- typedapi/watcher/putwatch/put_watch.go | 4 +- typedapi/watcher/putwatch/request.go | 5 +- typedapi/watcher/putwatch/response.go | 4 +- .../watcher/querywatches/query_watches.go | 4 +- typedapi/watcher/querywatches/request.go | 5 +- typedapi/watcher/querywatches/response.go | 5 +- typedapi/watcher/start/response.go | 5 +- typedapi/watcher/start/start.go | 4 +- typedapi/watcher/stats/response.go | 4 +- typedapi/watcher/stats/stats.go | 4 +- typedapi/watcher/stop/response.go | 5 +- typedapi/watcher/stop/stop.go | 4 +- typedapi/watcher/updatesettings/request.go | 4 +- typedapi/watcher/updatesettings/response.go | 4 +- .../watcher/updatesettings/update_settings.go | 4 +- typedapi/xpack/info/info.go | 4 +- typedapi/xpack/info/response.go | 4 +- typedapi/xpack/usage/response.go | 4 +- typedapi/xpack/usage/usage.go | 4 +- 4828 files changed, 36569 insertions(+), 11877 deletions(-) create mode 100644 typedapi/connector/secretdelete/response.go create mode 100644 typedapi/connector/secretdelete/secret_delete.go create mode 100644 typedapi/connector/secretget/response.go create mode 100644 typedapi/connector/secretget/secret_get.go create mode 100644 typedapi/connector/secretpost/request.go create mode 100644 typedapi/connector/secretpost/response.go create mode 100644 typedapi/connector/secretput/request.go create mode 100644 typedapi/connector/secretput/response.go create mode 100644 typedapi/connector/secretput/secret_put.go create mode 100644 typedapi/core/knnsearch/knn_search.go create mode 100644 typedapi/core/knnsearch/request.go create mode 100644 typedapi/core/knnsearch/response.go create mode 100644 typedapi/esdsl/ai21servicesettings.go create mode 100644 typedapi/esdsl/cartesianboundsaggregation.go create mode 100644 typedapi/esdsl/cartesiancentroidaggregation.go create mode 100644 typedapi/esdsl/changepointaggregation.go create mode 100644 typedapi/esdsl/chunkrescorer.go create mode 100644 typedapi/esdsl/chunkrescorerchunkingsettings.go create mode 100644 typedapi/esdsl/contextualaiservicesettings.go create mode 100644 typedapi/esdsl/contextualaitasksettings.go create mode 100644 typedapi/esdsl/knnsearchquery.go create mode 100644 typedapi/esdsl/llamaservicesettings.go create mode 100644 typedapi/esdsl/openshiftaiservicesettings.go create mode 100644 typedapi/esdsl/openshiftaitasksettings.go create mode 100644 typedapi/esdsl/pvalueheuristic.go create mode 100644 typedapi/esdsl/routing.go create mode 100644 typedapi/esdsl/rrfretrievercomponent.go create mode 100644 typedapi/esdsl/rrfretrieverentry.go create mode 100644 typedapi/esdsl/scriptrescore.go create mode 100644 typedapi/esdsl/semantictextindexoptions.go create mode 100644 typedapi/esdsl/stringifieddouble.go create mode 100644 typedapi/esdsl/thinkingconfig.go create mode 100644 typedapi/fleet/deletesecret/delete_secret.go create mode 100644 typedapi/fleet/deletesecret/response.go create mode 100644 typedapi/fleet/getsecret/get_secret.go create mode 100644 typedapi/fleet/getsecret/response.go create mode 100644 typedapi/fleet/postsecret/request.go create mode 100644 typedapi/fleet/postsecret/response.go create mode 100644 typedapi/indices/deletesampleconfiguration/delete_sample_configuration.go create mode 100644 typedapi/indices/deletesampleconfiguration/response.go create mode 100644 typedapi/indices/getallsampleconfiguration/get_all_sample_configuration.go create mode 100644 typedapi/indices/getallsampleconfiguration/response.go create mode 100644 typedapi/indices/getdatastreammappings/get_data_stream_mappings.go create mode 100644 typedapi/indices/getdatastreammappings/response.go create mode 100644 typedapi/indices/getsample/get_sample.go create mode 100644 typedapi/indices/getsample/response.go create mode 100644 typedapi/indices/getsampleconfiguration/get_sample_configuration.go create mode 100644 typedapi/indices/getsampleconfiguration/response.go create mode 100644 typedapi/indices/getsamplestats/get_sample_stats.go create mode 100644 typedapi/indices/getsamplestats/response.go create mode 100644 typedapi/indices/putdatastreammappings/put_data_stream_mappings.go create mode 100644 typedapi/indices/putdatastreammappings/request.go create mode 100644 typedapi/indices/putdatastreammappings/response.go create mode 100644 typedapi/indices/putsampleconfiguration/put_sample_configuration.go create mode 100644 typedapi/indices/putsampleconfiguration/request.go create mode 100644 typedapi/indices/putsampleconfiguration/response.go create mode 100644 typedapi/indices/simulateindextemplate/request.go create mode 100644 typedapi/inference/putai21/put_ai21.go create mode 100644 typedapi/inference/putai21/request.go create mode 100644 typedapi/inference/putai21/response.go create mode 100644 typedapi/inference/putcontextualai/put_contextualai.go create mode 100644 typedapi/inference/putcontextualai/request.go create mode 100644 typedapi/inference/putcontextualai/response.go create mode 100644 typedapi/inference/putllama/put_llama.go create mode 100644 typedapi/inference/putllama/request.go create mode 100644 typedapi/inference/putllama/response.go create mode 100644 typedapi/inference/putopenshiftai/put_openshift_ai.go create mode 100644 typedapi/inference/putopenshiftai/request.go create mode 100644 typedapi/inference/putopenshiftai/response.go create mode 100644 typedapi/profiling/flamegraph/request.go create mode 100644 typedapi/profiling/flamegraph/response.go create mode 100644 typedapi/profiling/stacktraces/request.go create mode 100644 typedapi/profiling/stacktraces/response.go create mode 100644 typedapi/profiling/status/response.go create mode 100644 typedapi/project/tags/response.go create mode 100644 typedapi/project/tags/tags.go create mode 100644 typedapi/security/getstats/get_stats.go create mode 100644 typedapi/security/getstats/response.go create mode 100644 typedapi/streams/logsdisable/response.go create mode 100644 typedapi/streams/logsenable/response.go create mode 100644 typedapi/streams/status/response.go create mode 100644 typedapi/transform/setupgrademode/response.go create mode 100644 typedapi/transform/setupgrademode/set_upgrade_mode.go create mode 100644 typedapi/types/ai21servicesettings.go create mode 100644 typedapi/types/cartesianboundsaggregate.go create mode 100644 typedapi/types/cartesianboundsaggregation.go create mode 100644 typedapi/types/cartesiancentroidaggregate.go create mode 100644 typedapi/types/cartesiancentroidaggregation.go create mode 100644 typedapi/types/cartesianpoint.go create mode 100644 typedapi/types/cataliasescolumns.go create mode 100644 typedapi/types/catallocationcolumns.go rename typedapi/types/{catanonalydetectorcolumns.go => catanomalydetectorcolumns.go} (73%) create mode 100644 typedapi/types/catcomponentcolumns.go create mode 100644 typedapi/types/catcountcolumns.go create mode 100644 typedapi/types/catfielddatacolumns.go create mode 100644 typedapi/types/cathealthcolumns.go create mode 100644 typedapi/types/catindicescolumns.go create mode 100644 typedapi/types/catmastercolumns.go create mode 100644 typedapi/types/catnodeattrscolumns.go create mode 100644 typedapi/types/catpendingtaskscolumns.go create mode 100644 typedapi/types/catpluginscolumns.go create mode 100644 typedapi/types/cattaskscolumns.go create mode 100644 typedapi/types/cattemplatescolumns.go create mode 100644 typedapi/types/changepointaggregate.go create mode 100644 typedapi/types/changepointaggregation.go create mode 100644 typedapi/types/changepointbucket.go create mode 100644 typedapi/types/changetype.go create mode 100644 typedapi/types/chunkrescorer.go create mode 100644 typedapi/types/chunkrescorerchunkingsettings.go create mode 100644 typedapi/types/clusterstatemetrics.go create mode 100644 typedapi/types/commonstatsflags.go create mode 100644 typedapi/types/contextualaiservicesettings.go create mode 100644 typedapi/types/contextualaitasksettings.go create mode 100644 typedapi/types/datastreammappings.go create mode 100644 typedapi/types/dip.go create mode 100644 typedapi/types/distributionchange.go create mode 100644 typedapi/types/enums/ai21servicetype/ai21servicetype.go create mode 100644 typedapi/types/enums/ai21tasktype/ai21tasktype.go create mode 100644 typedapi/types/enums/apikeymanagedby/apikeymanagedby.go create mode 100644 typedapi/types/enums/cataliasescolumn/cataliasescolumn.go create mode 100644 typedapi/types/enums/catallocationcolumn/catallocationcolumn.go create mode 100644 typedapi/types/enums/catcomponentcolumn/catcomponentcolumn.go create mode 100644 typedapi/types/enums/catcountcolumn/catcountcolumn.go create mode 100644 typedapi/types/enums/catfielddatacolumn/catfielddatacolumn.go create mode 100644 typedapi/types/enums/cathealthcolumn/cathealthcolumn.go create mode 100644 typedapi/types/enums/catindicescolumn/catindicescolumn.go create mode 100644 typedapi/types/enums/catmastercolumn/catmastercolumn.go create mode 100644 typedapi/types/enums/catnodeattrscolumn/catnodeattrscolumn.go create mode 100644 typedapi/types/enums/catpendingtaskscolumn/catpendingtaskscolumn.go create mode 100644 typedapi/types/enums/catpluginscolumn/catpluginscolumn.go create mode 100644 typedapi/types/enums/cattaskscolumn/cattaskscolumn.go create mode 100644 typedapi/types/enums/cattemplatescolumn/cattemplatescolumn.go create mode 100644 typedapi/types/enums/clusterstatemetric/clusterstatemetric.go create mode 100644 typedapi/types/enums/commonstatsflag/commonstatsflag.go create mode 100644 typedapi/types/enums/contextualaiservicetype/contextualaiservicetype.go create mode 100644 typedapi/types/enums/fieldaccesspattern/fieldaccesspattern.go create mode 100644 typedapi/types/enums/findstructureformat/findstructureformat.go create mode 100644 typedapi/types/enums/googlemodelgardenprovider/googlemodelgardenprovider.go create mode 100644 typedapi/types/enums/llamaservicetype/llamaservicetype.go create mode 100644 typedapi/types/enums/llamasimilaritytype/llamasimilaritytype.go create mode 100644 typedapi/types/enums/llamatasktype/llamatasktype.go create mode 100644 typedapi/types/enums/mergetype/mergetype.go create mode 100644 typedapi/types/enums/nodesinfometric/nodesinfometric.go create mode 100644 typedapi/types/enums/nodestatslevel/nodestatslevel.go create mode 100644 typedapi/types/enums/nodestatsmetric/nodestatsmetric.go create mode 100644 typedapi/types/enums/nodesusagemetric/nodesusagemetric.go create mode 100644 typedapi/types/enums/openshiftaiservicetype/openshiftaiservicetype.go create mode 100644 typedapi/types/enums/openshiftaisimilaritytype/openshiftaisimilaritytype.go create mode 100644 typedapi/types/enums/openshiftaitasktype/openshiftaitasktype.go create mode 100644 typedapi/types/enums/profilingoperationmode/profilingoperationmode.go create mode 100644 typedapi/types/enums/samplingmethod/samplingmethod.go create mode 100644 typedapi/types/enums/tasktypeai21/tasktypeai21.go create mode 100644 typedapi/types/enums/tasktypecontextualai/tasktypecontextualai.go create mode 100644 typedapi/types/enums/tasktypellama/tasktypellama.go create mode 100644 typedapi/types/enums/tasktypeopenshiftai/tasktypeopenshiftai.go rename typedapi/types/{metrics.go => esqlparam.go} (74%) create mode 100644 typedapi/types/extendedretrieverssearchusage.go create mode 100644 typedapi/types/extendedsearchusage.go create mode 100644 typedapi/types/extendedtextsimilarityretrieverusage.go create mode 100644 typedapi/types/indeterminable.go create mode 100644 typedapi/types/indexsamplingconfiguration.go create mode 100644 typedapi/types/knnsearchquery.go create mode 100644 typedapi/types/llamaservicesettings.go create mode 100644 typedapi/types/logsstatus.go create mode 100644 typedapi/types/nodesecuritystats.go create mode 100644 typedapi/types/nodesinfometrics.go create mode 100644 typedapi/types/nodestatsmetrics.go create mode 100644 typedapi/types/nodesusagemetrics.go create mode 100644 typedapi/types/nonstationary.go create mode 100644 typedapi/types/openshiftaiservicesettings.go create mode 100644 typedapi/types/openshiftaitasksettings.go create mode 100644 typedapi/types/pvalueheuristic.go create mode 100644 typedapi/types/rawdocument.go create mode 100644 typedapi/types/rolesstats.go create mode 100644 typedapi/types/routing.go create mode 100644 typedapi/types/rrfretrievercomponent.go create mode 100644 typedapi/types/rrfretrieverentry.go create mode 100644 typedapi/types/samplingconfiguration.go create mode 100644 typedapi/types/scriptrescore.go create mode 100644 typedapi/types/semantictextindexoptions.go create mode 100644 typedapi/types/spike.go create mode 100644 typedapi/types/stationary.go create mode 100644 typedapi/types/stepchange.go create mode 100644 typedapi/types/tags.go create mode 100644 typedapi/types/thinkingconfig.go create mode 100644 typedapi/types/trendchange.go create mode 100644 typedapi/types/updateddatastreammappings.go diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index c4adebe4fc..2128147e2c 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -4,7 +4,7 @@ steps: provider: "gcp" env: TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 9.1.0-SNAPSHOT + STACK_VERSION: 9.3.0-SNAPSHOT WORKSPACE: /tmp/go-elasticsearch matrix: setup: diff --git a/Makefile b/Makefile index 39ddbd0b39..c425499883 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash -ELASTICSEARCH_DEFAULT_BUILD_VERSION = "9.1.0-SNAPSHOT" +ELASTICSEARCH_DEFAULT_BUILD_VERSION = "9.3.0-SNAPSHOT" ##@ Test test-unit: ## Run unit tests diff --git a/typedapi/api._.go b/typedapi/api._.go index dcddb70e93..30cb987c17 100644 --- a/typedapi/api._.go +++ b/typedapi/api._.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package typedapi @@ -93,7 +93,10 @@ import ( connector_list "github.com/elastic/go-elasticsearch/v9/typedapi/connector/list" connector_post "github.com/elastic/go-elasticsearch/v9/typedapi/connector/post" connector_put "github.com/elastic/go-elasticsearch/v9/typedapi/connector/put" + connector_secret_delete "github.com/elastic/go-elasticsearch/v9/typedapi/connector/secretdelete" + connector_secret_get "github.com/elastic/go-elasticsearch/v9/typedapi/connector/secretget" connector_secret_post "github.com/elastic/go-elasticsearch/v9/typedapi/connector/secretpost" + connector_secret_put "github.com/elastic/go-elasticsearch/v9/typedapi/connector/secretput" connector_sync_job_cancel "github.com/elastic/go-elasticsearch/v9/typedapi/connector/syncjobcancel" connector_sync_job_check_in "github.com/elastic/go-elasticsearch/v9/typedapi/connector/syncjobcheckin" connector_sync_job_claim "github.com/elastic/go-elasticsearch/v9/typedapi/connector/syncjobclaim" @@ -138,6 +141,7 @@ import ( core_health_report "github.com/elastic/go-elasticsearch/v9/typedapi/core/healthreport" core_index "github.com/elastic/go-elasticsearch/v9/typedapi/core/index" core_info "github.com/elastic/go-elasticsearch/v9/typedapi/core/info" + core_knn_search "github.com/elastic/go-elasticsearch/v9/typedapi/core/knnsearch" core_mget "github.com/elastic/go-elasticsearch/v9/typedapi/core/mget" core_msearch "github.com/elastic/go-elasticsearch/v9/typedapi/core/msearch" core_msearch_template "github.com/elastic/go-elasticsearch/v9/typedapi/core/msearchtemplate" @@ -181,6 +185,8 @@ import ( esql_query "github.com/elastic/go-elasticsearch/v9/typedapi/esql/query" features_get_features "github.com/elastic/go-elasticsearch/v9/typedapi/features/getfeatures" features_reset_features "github.com/elastic/go-elasticsearch/v9/typedapi/features/resetfeatures" + fleet_delete_secret "github.com/elastic/go-elasticsearch/v9/typedapi/fleet/deletesecret" + fleet_get_secret "github.com/elastic/go-elasticsearch/v9/typedapi/fleet/getsecret" fleet_global_checkpoints "github.com/elastic/go-elasticsearch/v9/typedapi/fleet/globalcheckpoints" fleet_msearch "github.com/elastic/go-elasticsearch/v9/typedapi/fleet/msearch" fleet_post_secret "github.com/elastic/go-elasticsearch/v9/typedapi/fleet/postsecret" @@ -213,6 +219,7 @@ import ( indices_delete_data_stream "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deletedatastream" indices_delete_data_stream_options "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deletedatastreamoptions" indices_delete_index_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deleteindextemplate" + indices_delete_sample_configuration "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deletesampleconfiguration" indices_delete_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deletetemplate" indices_disk_usage "github.com/elastic/go-elasticsearch/v9/typedapi/indices/diskusage" indices_downsample "github.com/elastic/go-elasticsearch/v9/typedapi/indices/downsample" @@ -226,15 +233,20 @@ import ( indices_forcemerge "github.com/elastic/go-elasticsearch/v9/typedapi/indices/forcemerge" indices_get "github.com/elastic/go-elasticsearch/v9/typedapi/indices/get" indices_get_alias "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getalias" + indices_get_all_sample_configuration "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getallsampleconfiguration" indices_get_data_lifecycle "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatalifecycle" indices_get_data_lifecycle_stats "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatalifecyclestats" indices_get_data_stream "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatastream" + indices_get_data_stream_mappings "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatastreammappings" indices_get_data_stream_options "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatastreamoptions" indices_get_data_stream_settings "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatastreamsettings" indices_get_field_mapping "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getfieldmapping" indices_get_index_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getindextemplate" indices_get_mapping "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getmapping" indices_get_migrate_reindex_status "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getmigratereindexstatus" + indices_get_sample "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getsample" + indices_get_sample_configuration "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getsampleconfiguration" + indices_get_sample_stats "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getsamplestats" indices_get_settings "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getsettings" indices_get_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/gettemplate" indices_migrate_reindex "github.com/elastic/go-elasticsearch/v9/typedapi/indices/migratereindex" @@ -244,10 +256,12 @@ import ( indices_promote_data_stream "github.com/elastic/go-elasticsearch/v9/typedapi/indices/promotedatastream" indices_put_alias "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putalias" indices_put_data_lifecycle "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putdatalifecycle" + indices_put_data_stream_mappings "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putdatastreammappings" indices_put_data_stream_options "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putdatastreamoptions" indices_put_data_stream_settings "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putdatastreamsettings" indices_put_index_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putindextemplate" indices_put_mapping "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putmapping" + indices_put_sample_configuration "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putsampleconfiguration" indices_put_settings "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putsettings" indices_put_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/puttemplate" indices_recovery "github.com/elastic/go-elasticsearch/v9/typedapi/indices/recovery" @@ -272,6 +286,7 @@ import ( inference_get "github.com/elastic/go-elasticsearch/v9/typedapi/inference/get" inference_inference "github.com/elastic/go-elasticsearch/v9/typedapi/inference/inference" inference_put "github.com/elastic/go-elasticsearch/v9/typedapi/inference/put" + inference_put_ai21 "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putai21" inference_put_alibabacloud "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putalibabacloud" inference_put_amazonbedrock "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putamazonbedrock" inference_put_amazonsagemaker "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putamazonsagemaker" @@ -279,6 +294,7 @@ import ( inference_put_azureaistudio "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putazureaistudio" inference_put_azureopenai "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putazureopenai" inference_put_cohere "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putcohere" + inference_put_contextualai "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putcontextualai" inference_put_custom "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putcustom" inference_put_deepseek "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putdeepseek" inference_put_elasticsearch "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putelasticsearch" @@ -287,8 +303,10 @@ import ( inference_put_googlevertexai "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putgooglevertexai" inference_put_hugging_face "github.com/elastic/go-elasticsearch/v9/typedapi/inference/puthuggingface" inference_put_jinaai "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putjinaai" + inference_put_llama "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putllama" inference_put_mistral "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putmistral" inference_put_openai "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putopenai" + inference_put_openshift_ai "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putopenshiftai" inference_put_voyageai "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putvoyageai" inference_put_watsonx "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putwatsonx" inference_rerank "github.com/elastic/go-elasticsearch/v9/typedapi/inference/rerank" @@ -406,6 +424,7 @@ import ( profiling_stacktraces "github.com/elastic/go-elasticsearch/v9/typedapi/profiling/stacktraces" profiling_status "github.com/elastic/go-elasticsearch/v9/typedapi/profiling/status" profiling_topn_functions "github.com/elastic/go-elasticsearch/v9/typedapi/profiling/topnfunctions" + project_tags "github.com/elastic/go-elasticsearch/v9/typedapi/project/tags" query_rules_delete_rule "github.com/elastic/go-elasticsearch/v9/typedapi/queryrules/deleterule" query_rules_delete_ruleset "github.com/elastic/go-elasticsearch/v9/typedapi/queryrules/deleteruleset" query_rules_get_rule "github.com/elastic/go-elasticsearch/v9/typedapi/queryrules/getrule" @@ -470,6 +489,7 @@ import ( security_get_service_accounts "github.com/elastic/go-elasticsearch/v9/typedapi/security/getserviceaccounts" security_get_service_credentials "github.com/elastic/go-elasticsearch/v9/typedapi/security/getservicecredentials" security_get_settings "github.com/elastic/go-elasticsearch/v9/typedapi/security/getsettings" + security_get_stats "github.com/elastic/go-elasticsearch/v9/typedapi/security/getstats" security_get_token "github.com/elastic/go-elasticsearch/v9/typedapi/security/gettoken" security_get_user "github.com/elastic/go-elasticsearch/v9/typedapi/security/getuser" security_get_user_privileges "github.com/elastic/go-elasticsearch/v9/typedapi/security/getuserprivileges" @@ -558,6 +578,7 @@ import ( transform_put_transform "github.com/elastic/go-elasticsearch/v9/typedapi/transform/puttransform" transform_reset_transform "github.com/elastic/go-elasticsearch/v9/typedapi/transform/resettransform" transform_schedule_now_transform "github.com/elastic/go-elasticsearch/v9/typedapi/transform/schedulenowtransform" + transform_set_upgrade_mode "github.com/elastic/go-elasticsearch/v9/typedapi/transform/setupgrademode" transform_start_transform "github.com/elastic/go-elasticsearch/v9/typedapi/transform/starttransform" transform_stop_transform "github.com/elastic/go-elasticsearch/v9/typedapi/transform/stoptransform" transform_update_transform "github.com/elastic/go-elasticsearch/v9/typedapi/transform/updatetransform" @@ -669,7 +690,10 @@ type Connector struct { List connector_list.NewList Post connector_post.NewPost Put connector_put.NewPut + SecretDelete connector_secret_delete.NewSecretDelete + SecretGet connector_secret_get.NewSecretGet SecretPost connector_secret_post.NewSecretPost + SecretPut connector_secret_put.NewSecretPut SyncJobCancel connector_sync_job_cancel.NewSyncJobCancel SyncJobCheckIn connector_sync_job_check_in.NewSyncJobCheckIn SyncJobClaim connector_sync_job_claim.NewSyncJobClaim @@ -717,6 +741,7 @@ type Core struct { HealthReport core_health_report.NewHealthReport Index core_index.NewIndex Info core_info.NewInfo + KnnSearch core_knn_search.NewKnnSearch Mget core_mget.NewMget Msearch core_msearch.NewMsearch MsearchTemplate core_msearch_template.NewMsearchTemplate @@ -778,6 +803,8 @@ type Features struct { } type Fleet struct { + DeleteSecret fleet_delete_secret.NewDeleteSecret + GetSecret fleet_get_secret.NewGetSecret GlobalCheckpoints fleet_global_checkpoints.NewGlobalCheckpoints Msearch fleet_msearch.NewMsearch PostSecret fleet_post_secret.NewPostSecret @@ -803,75 +830,83 @@ type Ilm struct { } type Indices struct { - AddBlock indices_add_block.NewAddBlock - Analyze indices_analyze.NewAnalyze - CancelMigrateReindex indices_cancel_migrate_reindex.NewCancelMigrateReindex - ClearCache indices_clear_cache.NewClearCache - Clone indices_clone.NewClone - Close indices_close.NewClose - Create indices_create.NewCreate - CreateDataStream indices_create_data_stream.NewCreateDataStream - CreateFrom indices_create_from.NewCreateFrom - DataStreamsStats indices_data_streams_stats.NewDataStreamsStats - Delete indices_delete.NewDelete - DeleteAlias indices_delete_alias.NewDeleteAlias - DeleteDataLifecycle indices_delete_data_lifecycle.NewDeleteDataLifecycle - DeleteDataStream indices_delete_data_stream.NewDeleteDataStream - DeleteDataStreamOptions indices_delete_data_stream_options.NewDeleteDataStreamOptions - DeleteIndexTemplate indices_delete_index_template.NewDeleteIndexTemplate - DeleteTemplate indices_delete_template.NewDeleteTemplate - DiskUsage indices_disk_usage.NewDiskUsage - Downsample indices_downsample.NewDownsample - Exists indices_exists.NewExists - ExistsAlias indices_exists_alias.NewExistsAlias - ExistsIndexTemplate indices_exists_index_template.NewExistsIndexTemplate - ExistsTemplate indices_exists_template.NewExistsTemplate - ExplainDataLifecycle indices_explain_data_lifecycle.NewExplainDataLifecycle - FieldUsageStats indices_field_usage_stats.NewFieldUsageStats - Flush indices_flush.NewFlush - Forcemerge indices_forcemerge.NewForcemerge - Get indices_get.NewGet - GetAlias indices_get_alias.NewGetAlias - GetDataLifecycle indices_get_data_lifecycle.NewGetDataLifecycle - GetDataLifecycleStats indices_get_data_lifecycle_stats.NewGetDataLifecycleStats - GetDataStream indices_get_data_stream.NewGetDataStream - GetDataStreamOptions indices_get_data_stream_options.NewGetDataStreamOptions - GetDataStreamSettings indices_get_data_stream_settings.NewGetDataStreamSettings - GetFieldMapping indices_get_field_mapping.NewGetFieldMapping - GetIndexTemplate indices_get_index_template.NewGetIndexTemplate - GetMapping indices_get_mapping.NewGetMapping - GetMigrateReindexStatus indices_get_migrate_reindex_status.NewGetMigrateReindexStatus - GetSettings indices_get_settings.NewGetSettings - GetTemplate indices_get_template.NewGetTemplate - MigrateReindex indices_migrate_reindex.NewMigrateReindex - MigrateToDataStream indices_migrate_to_data_stream.NewMigrateToDataStream - ModifyDataStream indices_modify_data_stream.NewModifyDataStream - Open indices_open.NewOpen - PromoteDataStream indices_promote_data_stream.NewPromoteDataStream - PutAlias indices_put_alias.NewPutAlias - PutDataLifecycle indices_put_data_lifecycle.NewPutDataLifecycle - PutDataStreamOptions indices_put_data_stream_options.NewPutDataStreamOptions - PutDataStreamSettings indices_put_data_stream_settings.NewPutDataStreamSettings - PutIndexTemplate indices_put_index_template.NewPutIndexTemplate - PutMapping indices_put_mapping.NewPutMapping - PutSettings indices_put_settings.NewPutSettings - PutTemplate indices_put_template.NewPutTemplate - Recovery indices_recovery.NewRecovery - Refresh indices_refresh.NewRefresh - ReloadSearchAnalyzers indices_reload_search_analyzers.NewReloadSearchAnalyzers - RemoveBlock indices_remove_block.NewRemoveBlock - ResolveCluster indices_resolve_cluster.NewResolveCluster - ResolveIndex indices_resolve_index.NewResolveIndex - Rollover indices_rollover.NewRollover - Segments indices_segments.NewSegments - ShardStores indices_shard_stores.NewShardStores - Shrink indices_shrink.NewShrink - SimulateIndexTemplate indices_simulate_index_template.NewSimulateIndexTemplate - SimulateTemplate indices_simulate_template.NewSimulateTemplate - Split indices_split.NewSplit - Stats indices_stats.NewStats - UpdateAliases indices_update_aliases.NewUpdateAliases - ValidateQuery indices_validate_query.NewValidateQuery + AddBlock indices_add_block.NewAddBlock + Analyze indices_analyze.NewAnalyze + CancelMigrateReindex indices_cancel_migrate_reindex.NewCancelMigrateReindex + ClearCache indices_clear_cache.NewClearCache + Clone indices_clone.NewClone + Close indices_close.NewClose + Create indices_create.NewCreate + CreateDataStream indices_create_data_stream.NewCreateDataStream + CreateFrom indices_create_from.NewCreateFrom + DataStreamsStats indices_data_streams_stats.NewDataStreamsStats + Delete indices_delete.NewDelete + DeleteAlias indices_delete_alias.NewDeleteAlias + DeleteDataLifecycle indices_delete_data_lifecycle.NewDeleteDataLifecycle + DeleteDataStream indices_delete_data_stream.NewDeleteDataStream + DeleteDataStreamOptions indices_delete_data_stream_options.NewDeleteDataStreamOptions + DeleteIndexTemplate indices_delete_index_template.NewDeleteIndexTemplate + DeleteSampleConfiguration indices_delete_sample_configuration.NewDeleteSampleConfiguration + DeleteTemplate indices_delete_template.NewDeleteTemplate + DiskUsage indices_disk_usage.NewDiskUsage + Downsample indices_downsample.NewDownsample + Exists indices_exists.NewExists + ExistsAlias indices_exists_alias.NewExistsAlias + ExistsIndexTemplate indices_exists_index_template.NewExistsIndexTemplate + ExistsTemplate indices_exists_template.NewExistsTemplate + ExplainDataLifecycle indices_explain_data_lifecycle.NewExplainDataLifecycle + FieldUsageStats indices_field_usage_stats.NewFieldUsageStats + Flush indices_flush.NewFlush + Forcemerge indices_forcemerge.NewForcemerge + Get indices_get.NewGet + GetAlias indices_get_alias.NewGetAlias + GetAllSampleConfiguration indices_get_all_sample_configuration.NewGetAllSampleConfiguration + GetDataLifecycle indices_get_data_lifecycle.NewGetDataLifecycle + GetDataLifecycleStats indices_get_data_lifecycle_stats.NewGetDataLifecycleStats + GetDataStream indices_get_data_stream.NewGetDataStream + GetDataStreamMappings indices_get_data_stream_mappings.NewGetDataStreamMappings + GetDataStreamOptions indices_get_data_stream_options.NewGetDataStreamOptions + GetDataStreamSettings indices_get_data_stream_settings.NewGetDataStreamSettings + GetFieldMapping indices_get_field_mapping.NewGetFieldMapping + GetIndexTemplate indices_get_index_template.NewGetIndexTemplate + GetMapping indices_get_mapping.NewGetMapping + GetMigrateReindexStatus indices_get_migrate_reindex_status.NewGetMigrateReindexStatus + GetSample indices_get_sample.NewGetSample + GetSampleConfiguration indices_get_sample_configuration.NewGetSampleConfiguration + GetSampleStats indices_get_sample_stats.NewGetSampleStats + GetSettings indices_get_settings.NewGetSettings + GetTemplate indices_get_template.NewGetTemplate + MigrateReindex indices_migrate_reindex.NewMigrateReindex + MigrateToDataStream indices_migrate_to_data_stream.NewMigrateToDataStream + ModifyDataStream indices_modify_data_stream.NewModifyDataStream + Open indices_open.NewOpen + PromoteDataStream indices_promote_data_stream.NewPromoteDataStream + PutAlias indices_put_alias.NewPutAlias + PutDataLifecycle indices_put_data_lifecycle.NewPutDataLifecycle + PutDataStreamMappings indices_put_data_stream_mappings.NewPutDataStreamMappings + PutDataStreamOptions indices_put_data_stream_options.NewPutDataStreamOptions + PutDataStreamSettings indices_put_data_stream_settings.NewPutDataStreamSettings + PutIndexTemplate indices_put_index_template.NewPutIndexTemplate + PutMapping indices_put_mapping.NewPutMapping + PutSampleConfiguration indices_put_sample_configuration.NewPutSampleConfiguration + PutSettings indices_put_settings.NewPutSettings + PutTemplate indices_put_template.NewPutTemplate + Recovery indices_recovery.NewRecovery + Refresh indices_refresh.NewRefresh + ReloadSearchAnalyzers indices_reload_search_analyzers.NewReloadSearchAnalyzers + RemoveBlock indices_remove_block.NewRemoveBlock + ResolveCluster indices_resolve_cluster.NewResolveCluster + ResolveIndex indices_resolve_index.NewResolveIndex + Rollover indices_rollover.NewRollover + Segments indices_segments.NewSegments + ShardStores indices_shard_stores.NewShardStores + Shrink indices_shrink.NewShrink + SimulateIndexTemplate indices_simulate_index_template.NewSimulateIndexTemplate + SimulateTemplate indices_simulate_template.NewSimulateTemplate + Split indices_split.NewSplit + Stats indices_stats.NewStats + UpdateAliases indices_update_aliases.NewUpdateAliases + ValidateQuery indices_validate_query.NewValidateQuery } type Inference struct { @@ -881,6 +916,7 @@ type Inference struct { Get inference_get.NewGet Inference inference_inference.NewInference Put inference_put.NewPut + PutAi21 inference_put_ai21.NewPutAi21 PutAlibabacloud inference_put_alibabacloud.NewPutAlibabacloud PutAmazonbedrock inference_put_amazonbedrock.NewPutAmazonbedrock PutAmazonsagemaker inference_put_amazonsagemaker.NewPutAmazonsagemaker @@ -888,6 +924,7 @@ type Inference struct { PutAzureaistudio inference_put_azureaistudio.NewPutAzureaistudio PutAzureopenai inference_put_azureopenai.NewPutAzureopenai PutCohere inference_put_cohere.NewPutCohere + PutContextualai inference_put_contextualai.NewPutContextualai PutCustom inference_put_custom.NewPutCustom PutDeepseek inference_put_deepseek.NewPutDeepseek PutElasticsearch inference_put_elasticsearch.NewPutElasticsearch @@ -896,8 +933,10 @@ type Inference struct { PutGooglevertexai inference_put_googlevertexai.NewPutGooglevertexai PutHuggingFace inference_put_hugging_face.NewPutHuggingFace PutJinaai inference_put_jinaai.NewPutJinaai + PutLlama inference_put_llama.NewPutLlama PutMistral inference_put_mistral.NewPutMistral PutOpenai inference_put_openai.NewPutOpenai + PutOpenshiftAi inference_put_openshift_ai.NewPutOpenshiftAi PutVoyageai inference_put_voyageai.NewPutVoyageai PutWatsonx inference_put_watsonx.NewPutWatsonx Rerank inference_rerank.NewRerank @@ -1041,6 +1080,10 @@ type Profiling struct { TopnFunctions profiling_topn_functions.NewTopnFunctions } +type Project struct { + Tags project_tags.NewTags +} + type QueryRules struct { DeleteRule query_rules_delete_rule.NewDeleteRule DeleteRuleset query_rules_delete_ruleset.NewDeleteRuleset @@ -1118,6 +1161,7 @@ type Security struct { GetServiceAccounts security_get_service_accounts.NewGetServiceAccounts GetServiceCredentials security_get_service_credentials.NewGetServiceCredentials GetSettings security_get_settings.NewGetSettings + GetStats security_get_stats.NewGetStats GetToken security_get_token.NewGetToken GetUser security_get_user.NewGetUser GetUserPrivileges security_get_user_privileges.NewGetUserPrivileges @@ -1239,6 +1283,7 @@ type Transform struct { PutTransform transform_put_transform.NewPutTransform ResetTransform transform_reset_transform.NewResetTransform ScheduleNowTransform transform_schedule_now_transform.NewScheduleNowTransform + SetUpgradeMode transform_set_upgrade_mode.NewSetUpgradeMode StartTransform transform_start_transform.NewStartTransform StopTransform transform_stop_transform.NewStopTransform UpdateTransform transform_update_transform.NewUpdateTransform @@ -1293,6 +1338,7 @@ type API struct { Monitoring Monitoring Nodes Nodes Profiling Profiling + Project Project QueryRules QueryRules Rollup Rollup SearchApplication SearchApplication @@ -1333,6 +1379,7 @@ type API struct { HealthReport core_health_report.NewHealthReport Index core_index.NewIndex Info core_info.NewInfo + KnnSearch core_knn_search.NewKnnSearch Mget core_mget.NewMget Msearch core_msearch.NewMsearch MsearchTemplate core_msearch_template.NewMsearchTemplate @@ -1449,7 +1496,10 @@ func New(tp elastictransport.Interface) *API { List: connector_list.NewListFunc(tp), Post: connector_post.NewPostFunc(tp), Put: connector_put.NewPutFunc(tp), + SecretDelete: connector_secret_delete.NewSecretDeleteFunc(tp), + SecretGet: connector_secret_get.NewSecretGetFunc(tp), SecretPost: connector_secret_post.NewSecretPostFunc(tp), + SecretPut: connector_secret_put.NewSecretPutFunc(tp), SyncJobCancel: connector_sync_job_cancel.NewSyncJobCancelFunc(tp), SyncJobCheckIn: connector_sync_job_check_in.NewSyncJobCheckInFunc(tp), SyncJobClaim: connector_sync_job_claim.NewSyncJobClaimFunc(tp), @@ -1497,6 +1547,7 @@ func New(tp elastictransport.Interface) *API { HealthReport: core_health_report.NewHealthReportFunc(tp), Index: core_index.NewIndexFunc(tp), Info: core_info.NewInfoFunc(tp), + KnnSearch: core_knn_search.NewKnnSearchFunc(tp), Mget: core_mget.NewMgetFunc(tp), Msearch: core_msearch.NewMsearchFunc(tp), MsearchTemplate: core_msearch_template.NewMsearchTemplateFunc(tp), @@ -1558,6 +1609,8 @@ func New(tp elastictransport.Interface) *API { }, Fleet: Fleet{ + DeleteSecret: fleet_delete_secret.NewDeleteSecretFunc(tp), + GetSecret: fleet_get_secret.NewGetSecretFunc(tp), GlobalCheckpoints: fleet_global_checkpoints.NewGlobalCheckpointsFunc(tp), Msearch: fleet_msearch.NewMsearchFunc(tp), PostSecret: fleet_post_secret.NewPostSecretFunc(tp), @@ -1583,75 +1636,83 @@ func New(tp elastictransport.Interface) *API { }, Indices: Indices{ - AddBlock: indices_add_block.NewAddBlockFunc(tp), - Analyze: indices_analyze.NewAnalyzeFunc(tp), - CancelMigrateReindex: indices_cancel_migrate_reindex.NewCancelMigrateReindexFunc(tp), - ClearCache: indices_clear_cache.NewClearCacheFunc(tp), - Clone: indices_clone.NewCloneFunc(tp), - Close: indices_close.NewCloseFunc(tp), - Create: indices_create.NewCreateFunc(tp), - CreateDataStream: indices_create_data_stream.NewCreateDataStreamFunc(tp), - CreateFrom: indices_create_from.NewCreateFromFunc(tp), - DataStreamsStats: indices_data_streams_stats.NewDataStreamsStatsFunc(tp), - Delete: indices_delete.NewDeleteFunc(tp), - DeleteAlias: indices_delete_alias.NewDeleteAliasFunc(tp), - DeleteDataLifecycle: indices_delete_data_lifecycle.NewDeleteDataLifecycleFunc(tp), - DeleteDataStream: indices_delete_data_stream.NewDeleteDataStreamFunc(tp), - DeleteDataStreamOptions: indices_delete_data_stream_options.NewDeleteDataStreamOptionsFunc(tp), - DeleteIndexTemplate: indices_delete_index_template.NewDeleteIndexTemplateFunc(tp), - DeleteTemplate: indices_delete_template.NewDeleteTemplateFunc(tp), - DiskUsage: indices_disk_usage.NewDiskUsageFunc(tp), - Downsample: indices_downsample.NewDownsampleFunc(tp), - Exists: indices_exists.NewExistsFunc(tp), - ExistsAlias: indices_exists_alias.NewExistsAliasFunc(tp), - ExistsIndexTemplate: indices_exists_index_template.NewExistsIndexTemplateFunc(tp), - ExistsTemplate: indices_exists_template.NewExistsTemplateFunc(tp), - ExplainDataLifecycle: indices_explain_data_lifecycle.NewExplainDataLifecycleFunc(tp), - FieldUsageStats: indices_field_usage_stats.NewFieldUsageStatsFunc(tp), - Flush: indices_flush.NewFlushFunc(tp), - Forcemerge: indices_forcemerge.NewForcemergeFunc(tp), - Get: indices_get.NewGetFunc(tp), - GetAlias: indices_get_alias.NewGetAliasFunc(tp), - GetDataLifecycle: indices_get_data_lifecycle.NewGetDataLifecycleFunc(tp), - GetDataLifecycleStats: indices_get_data_lifecycle_stats.NewGetDataLifecycleStatsFunc(tp), - GetDataStream: indices_get_data_stream.NewGetDataStreamFunc(tp), - GetDataStreamOptions: indices_get_data_stream_options.NewGetDataStreamOptionsFunc(tp), - GetDataStreamSettings: indices_get_data_stream_settings.NewGetDataStreamSettingsFunc(tp), - GetFieldMapping: indices_get_field_mapping.NewGetFieldMappingFunc(tp), - GetIndexTemplate: indices_get_index_template.NewGetIndexTemplateFunc(tp), - GetMapping: indices_get_mapping.NewGetMappingFunc(tp), - GetMigrateReindexStatus: indices_get_migrate_reindex_status.NewGetMigrateReindexStatusFunc(tp), - GetSettings: indices_get_settings.NewGetSettingsFunc(tp), - GetTemplate: indices_get_template.NewGetTemplateFunc(tp), - MigrateReindex: indices_migrate_reindex.NewMigrateReindexFunc(tp), - MigrateToDataStream: indices_migrate_to_data_stream.NewMigrateToDataStreamFunc(tp), - ModifyDataStream: indices_modify_data_stream.NewModifyDataStreamFunc(tp), - Open: indices_open.NewOpenFunc(tp), - PromoteDataStream: indices_promote_data_stream.NewPromoteDataStreamFunc(tp), - PutAlias: indices_put_alias.NewPutAliasFunc(tp), - PutDataLifecycle: indices_put_data_lifecycle.NewPutDataLifecycleFunc(tp), - PutDataStreamOptions: indices_put_data_stream_options.NewPutDataStreamOptionsFunc(tp), - PutDataStreamSettings: indices_put_data_stream_settings.NewPutDataStreamSettingsFunc(tp), - PutIndexTemplate: indices_put_index_template.NewPutIndexTemplateFunc(tp), - PutMapping: indices_put_mapping.NewPutMappingFunc(tp), - PutSettings: indices_put_settings.NewPutSettingsFunc(tp), - PutTemplate: indices_put_template.NewPutTemplateFunc(tp), - Recovery: indices_recovery.NewRecoveryFunc(tp), - Refresh: indices_refresh.NewRefreshFunc(tp), - ReloadSearchAnalyzers: indices_reload_search_analyzers.NewReloadSearchAnalyzersFunc(tp), - RemoveBlock: indices_remove_block.NewRemoveBlockFunc(tp), - ResolveCluster: indices_resolve_cluster.NewResolveClusterFunc(tp), - ResolveIndex: indices_resolve_index.NewResolveIndexFunc(tp), - Rollover: indices_rollover.NewRolloverFunc(tp), - Segments: indices_segments.NewSegmentsFunc(tp), - ShardStores: indices_shard_stores.NewShardStoresFunc(tp), - Shrink: indices_shrink.NewShrinkFunc(tp), - SimulateIndexTemplate: indices_simulate_index_template.NewSimulateIndexTemplateFunc(tp), - SimulateTemplate: indices_simulate_template.NewSimulateTemplateFunc(tp), - Split: indices_split.NewSplitFunc(tp), - Stats: indices_stats.NewStatsFunc(tp), - UpdateAliases: indices_update_aliases.NewUpdateAliasesFunc(tp), - ValidateQuery: indices_validate_query.NewValidateQueryFunc(tp), + AddBlock: indices_add_block.NewAddBlockFunc(tp), + Analyze: indices_analyze.NewAnalyzeFunc(tp), + CancelMigrateReindex: indices_cancel_migrate_reindex.NewCancelMigrateReindexFunc(tp), + ClearCache: indices_clear_cache.NewClearCacheFunc(tp), + Clone: indices_clone.NewCloneFunc(tp), + Close: indices_close.NewCloseFunc(tp), + Create: indices_create.NewCreateFunc(tp), + CreateDataStream: indices_create_data_stream.NewCreateDataStreamFunc(tp), + CreateFrom: indices_create_from.NewCreateFromFunc(tp), + DataStreamsStats: indices_data_streams_stats.NewDataStreamsStatsFunc(tp), + Delete: indices_delete.NewDeleteFunc(tp), + DeleteAlias: indices_delete_alias.NewDeleteAliasFunc(tp), + DeleteDataLifecycle: indices_delete_data_lifecycle.NewDeleteDataLifecycleFunc(tp), + DeleteDataStream: indices_delete_data_stream.NewDeleteDataStreamFunc(tp), + DeleteDataStreamOptions: indices_delete_data_stream_options.NewDeleteDataStreamOptionsFunc(tp), + DeleteIndexTemplate: indices_delete_index_template.NewDeleteIndexTemplateFunc(tp), + DeleteSampleConfiguration: indices_delete_sample_configuration.NewDeleteSampleConfigurationFunc(tp), + DeleteTemplate: indices_delete_template.NewDeleteTemplateFunc(tp), + DiskUsage: indices_disk_usage.NewDiskUsageFunc(tp), + Downsample: indices_downsample.NewDownsampleFunc(tp), + Exists: indices_exists.NewExistsFunc(tp), + ExistsAlias: indices_exists_alias.NewExistsAliasFunc(tp), + ExistsIndexTemplate: indices_exists_index_template.NewExistsIndexTemplateFunc(tp), + ExistsTemplate: indices_exists_template.NewExistsTemplateFunc(tp), + ExplainDataLifecycle: indices_explain_data_lifecycle.NewExplainDataLifecycleFunc(tp), + FieldUsageStats: indices_field_usage_stats.NewFieldUsageStatsFunc(tp), + Flush: indices_flush.NewFlushFunc(tp), + Forcemerge: indices_forcemerge.NewForcemergeFunc(tp), + Get: indices_get.NewGetFunc(tp), + GetAlias: indices_get_alias.NewGetAliasFunc(tp), + GetAllSampleConfiguration: indices_get_all_sample_configuration.NewGetAllSampleConfigurationFunc(tp), + GetDataLifecycle: indices_get_data_lifecycle.NewGetDataLifecycleFunc(tp), + GetDataLifecycleStats: indices_get_data_lifecycle_stats.NewGetDataLifecycleStatsFunc(tp), + GetDataStream: indices_get_data_stream.NewGetDataStreamFunc(tp), + GetDataStreamMappings: indices_get_data_stream_mappings.NewGetDataStreamMappingsFunc(tp), + GetDataStreamOptions: indices_get_data_stream_options.NewGetDataStreamOptionsFunc(tp), + GetDataStreamSettings: indices_get_data_stream_settings.NewGetDataStreamSettingsFunc(tp), + GetFieldMapping: indices_get_field_mapping.NewGetFieldMappingFunc(tp), + GetIndexTemplate: indices_get_index_template.NewGetIndexTemplateFunc(tp), + GetMapping: indices_get_mapping.NewGetMappingFunc(tp), + GetMigrateReindexStatus: indices_get_migrate_reindex_status.NewGetMigrateReindexStatusFunc(tp), + GetSample: indices_get_sample.NewGetSampleFunc(tp), + GetSampleConfiguration: indices_get_sample_configuration.NewGetSampleConfigurationFunc(tp), + GetSampleStats: indices_get_sample_stats.NewGetSampleStatsFunc(tp), + GetSettings: indices_get_settings.NewGetSettingsFunc(tp), + GetTemplate: indices_get_template.NewGetTemplateFunc(tp), + MigrateReindex: indices_migrate_reindex.NewMigrateReindexFunc(tp), + MigrateToDataStream: indices_migrate_to_data_stream.NewMigrateToDataStreamFunc(tp), + ModifyDataStream: indices_modify_data_stream.NewModifyDataStreamFunc(tp), + Open: indices_open.NewOpenFunc(tp), + PromoteDataStream: indices_promote_data_stream.NewPromoteDataStreamFunc(tp), + PutAlias: indices_put_alias.NewPutAliasFunc(tp), + PutDataLifecycle: indices_put_data_lifecycle.NewPutDataLifecycleFunc(tp), + PutDataStreamMappings: indices_put_data_stream_mappings.NewPutDataStreamMappingsFunc(tp), + PutDataStreamOptions: indices_put_data_stream_options.NewPutDataStreamOptionsFunc(tp), + PutDataStreamSettings: indices_put_data_stream_settings.NewPutDataStreamSettingsFunc(tp), + PutIndexTemplate: indices_put_index_template.NewPutIndexTemplateFunc(tp), + PutMapping: indices_put_mapping.NewPutMappingFunc(tp), + PutSampleConfiguration: indices_put_sample_configuration.NewPutSampleConfigurationFunc(tp), + PutSettings: indices_put_settings.NewPutSettingsFunc(tp), + PutTemplate: indices_put_template.NewPutTemplateFunc(tp), + Recovery: indices_recovery.NewRecoveryFunc(tp), + Refresh: indices_refresh.NewRefreshFunc(tp), + ReloadSearchAnalyzers: indices_reload_search_analyzers.NewReloadSearchAnalyzersFunc(tp), + RemoveBlock: indices_remove_block.NewRemoveBlockFunc(tp), + ResolveCluster: indices_resolve_cluster.NewResolveClusterFunc(tp), + ResolveIndex: indices_resolve_index.NewResolveIndexFunc(tp), + Rollover: indices_rollover.NewRolloverFunc(tp), + Segments: indices_segments.NewSegmentsFunc(tp), + ShardStores: indices_shard_stores.NewShardStoresFunc(tp), + Shrink: indices_shrink.NewShrinkFunc(tp), + SimulateIndexTemplate: indices_simulate_index_template.NewSimulateIndexTemplateFunc(tp), + SimulateTemplate: indices_simulate_template.NewSimulateTemplateFunc(tp), + Split: indices_split.NewSplitFunc(tp), + Stats: indices_stats.NewStatsFunc(tp), + UpdateAliases: indices_update_aliases.NewUpdateAliasesFunc(tp), + ValidateQuery: indices_validate_query.NewValidateQueryFunc(tp), }, Inference: Inference{ @@ -1661,6 +1722,7 @@ func New(tp elastictransport.Interface) *API { Get: inference_get.NewGetFunc(tp), Inference: inference_inference.NewInferenceFunc(tp), Put: inference_put.NewPutFunc(tp), + PutAi21: inference_put_ai21.NewPutAi21Func(tp), PutAlibabacloud: inference_put_alibabacloud.NewPutAlibabacloudFunc(tp), PutAmazonbedrock: inference_put_amazonbedrock.NewPutAmazonbedrockFunc(tp), PutAmazonsagemaker: inference_put_amazonsagemaker.NewPutAmazonsagemakerFunc(tp), @@ -1668,6 +1730,7 @@ func New(tp elastictransport.Interface) *API { PutAzureaistudio: inference_put_azureaistudio.NewPutAzureaistudioFunc(tp), PutAzureopenai: inference_put_azureopenai.NewPutAzureopenaiFunc(tp), PutCohere: inference_put_cohere.NewPutCohereFunc(tp), + PutContextualai: inference_put_contextualai.NewPutContextualaiFunc(tp), PutCustom: inference_put_custom.NewPutCustomFunc(tp), PutDeepseek: inference_put_deepseek.NewPutDeepseekFunc(tp), PutElasticsearch: inference_put_elasticsearch.NewPutElasticsearchFunc(tp), @@ -1676,8 +1739,10 @@ func New(tp elastictransport.Interface) *API { PutGooglevertexai: inference_put_googlevertexai.NewPutGooglevertexaiFunc(tp), PutHuggingFace: inference_put_hugging_face.NewPutHuggingFaceFunc(tp), PutJinaai: inference_put_jinaai.NewPutJinaaiFunc(tp), + PutLlama: inference_put_llama.NewPutLlamaFunc(tp), PutMistral: inference_put_mistral.NewPutMistralFunc(tp), PutOpenai: inference_put_openai.NewPutOpenaiFunc(tp), + PutOpenshiftAi: inference_put_openshift_ai.NewPutOpenshiftAiFunc(tp), PutVoyageai: inference_put_voyageai.NewPutVoyageaiFunc(tp), PutWatsonx: inference_put_watsonx.NewPutWatsonxFunc(tp), Rerank: inference_rerank.NewRerankFunc(tp), @@ -1821,6 +1886,10 @@ func New(tp elastictransport.Interface) *API { TopnFunctions: profiling_topn_functions.NewTopnFunctionsFunc(tp), }, + Project: Project{ + Tags: project_tags.NewTagsFunc(tp), + }, + QueryRules: QueryRules{ DeleteRule: query_rules_delete_rule.NewDeleteRuleFunc(tp), DeleteRuleset: query_rules_delete_ruleset.NewDeleteRulesetFunc(tp), @@ -1898,6 +1967,7 @@ func New(tp elastictransport.Interface) *API { GetServiceAccounts: security_get_service_accounts.NewGetServiceAccountsFunc(tp), GetServiceCredentials: security_get_service_credentials.NewGetServiceCredentialsFunc(tp), GetSettings: security_get_settings.NewGetSettingsFunc(tp), + GetStats: security_get_stats.NewGetStatsFunc(tp), GetToken: security_get_token.NewGetTokenFunc(tp), GetUser: security_get_user.NewGetUserFunc(tp), GetUserPrivileges: security_get_user_privileges.NewGetUserPrivilegesFunc(tp), @@ -2019,6 +2089,7 @@ func New(tp elastictransport.Interface) *API { PutTransform: transform_put_transform.NewPutTransformFunc(tp), ResetTransform: transform_reset_transform.NewResetTransformFunc(tp), ScheduleNowTransform: transform_schedule_now_transform.NewScheduleNowTransformFunc(tp), + SetUpgradeMode: transform_set_upgrade_mode.NewSetUpgradeModeFunc(tp), StartTransform: transform_start_transform.NewStartTransformFunc(tp), StopTransform: transform_stop_transform.NewStopTransformFunc(tp), UpdateTransform: transform_update_transform.NewUpdateTransformFunc(tp), @@ -2067,6 +2138,7 @@ func New(tp elastictransport.Interface) *API { HealthReport: core_health_report.NewHealthReportFunc(tp), Index: core_index.NewIndexFunc(tp), Info: core_info.NewInfoFunc(tp), + KnnSearch: core_knn_search.NewKnnSearchFunc(tp), Mget: core_mget.NewMgetFunc(tp), Msearch: core_msearch.NewMsearchFunc(tp), MsearchTemplate: core_msearch_template.NewMsearchTemplateFunc(tp), @@ -2196,6 +2268,10 @@ type MethodProfiling struct { tp elastictransport.Interface } +type MethodProject struct { + tp elastictransport.Interface +} + type MethodQueryRules struct { tp elastictransport.Interface } @@ -2296,6 +2372,7 @@ type MethodAPI struct { Monitoring MethodMonitoring Nodes MethodNodes Profiling MethodProfiling + Project MethodProject QueryRules MethodQueryRules Rollup MethodRollup SearchApplication MethodSearchApplication @@ -2317,6 +2394,7 @@ type MethodAPI struct { } // Bulk index or delete documents. +// // Perform multiple `index`, `create`, `delete`, and `update` actions in a // single request. // This reduces overhead and can greatly increase indexing speed. @@ -2412,8 +2490,11 @@ type MethodAPI struct { // `Search::Elasticsearch::Client::5_0::Scroll` // * Python: Check out `elasticsearch.helpers.*` // * JavaScript: Check out `client.helpers.*` +// * Java: Check out +// `co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester` // * .NET: Check out `BulkAllObservable` // * PHP: Check out bulk indexing. +// * Ruby: Check out `Elasticsearch::Helpers::BulkHelper` // // **Submitting bulk requests with cURL** // @@ -2485,6 +2566,7 @@ func (p *MethodAPI) Bulk() *core_bulk.Bulk { } // Clear a scrolling search. +// // Clear the search context and results for a scrolling search. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll func (p *MethodAPI) ClearScroll() *core_clear_scroll.ClearScroll { @@ -2493,6 +2575,7 @@ func (p *MethodAPI) ClearScroll() *core_clear_scroll.ClearScroll { } // Close a point in time. +// // A point in time must be opened explicitly before being used in search // requests. // The `keep_alive` parameter tells Elasticsearch how long it should persist. @@ -2507,6 +2590,7 @@ func (p *MethodAPI) ClosePointInTime() *core_close_point_in_time.ClosePointInTim } // Count search results. +// // Get the number of documents matching a query. // // The query can be provided either by using a simple query string as a @@ -2865,6 +2949,7 @@ func (p *MethodAPI) DeleteByQueryRethrottle(taskid string) *core_delete_by_query } // Delete a script or search template. +// // Deletes a stored script or search template. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script func (p *MethodAPI) DeleteScript(id string) *core_delete_script.DeleteScript { @@ -2918,6 +3003,7 @@ func (p *MethodAPI) ExistsSource(index, id string) *core_exists_source.ExistsSou } // Explain a document match result. +// // Get information about why a specific document matches, or doesn't match, a // query. // It computes a score explanation for a query and a specific document. @@ -3023,6 +3109,7 @@ func (p *MethodAPI) Get(index, id string) *core_get.Get { } // Get a script or search template. +// // Retrieves a stored script or search template. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script func (p *MethodAPI) GetScript(id string) *core_get_script.GetScript { @@ -3071,6 +3158,7 @@ func (p *MethodAPI) GetSource(index, id string) *core_get_source.GetSource { } // Get the cluster health. +// // Get a report with the health status of an Elasticsearch cluster. // The report contains a list of indicators that compose Elasticsearch // functionality. @@ -3293,6 +3381,8 @@ func (p *MethodAPI) HealthReport() *core_health_report.HealthReport { // } // } // +// ``` +// // In this example, the operation will succeed since the supplied version of 2 // is higher than the current document version of 1. // If the document was already updated and its version was set to 2 or higher, @@ -3312,6 +3402,7 @@ func (p *MethodAPI) Index(index string) *core_index.Index { } // Get cluster info. +// // Get basic build, version, and cluster information. // ::: In Serverless, this API is retained for backward compatibility only. Some // response fields, such as the version number, should be ignored. @@ -3321,6 +3412,16 @@ func (p *MethodAPI) Info() *core_info.Info { return _info() } +// Run a knn search. +// +// NOTE: The kNN search API has been replaced by the `knn` option in the search +// API. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search +func (p *MethodAPI) KnnSearch(index string) *core_knn_search.KnnSearch { + _knnsearch := core_knn_search.NewKnnSearchFunc(p.tp) + return _knnsearch(index) +} + // Get multiple documents. // // Get multiple JSON documents by ID from one or more indices. @@ -3491,6 +3592,7 @@ func (p *MethodAPI) OpenPointInTime(index string) *core_open_point_in_time.OpenP } // Ping the cluster. +// // Get information about whether the cluster is running. // https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster func (p *MethodAPI) Ping() *core_ping.Ping { @@ -3499,6 +3601,7 @@ func (p *MethodAPI) Ping() *core_ping.Ping { } // Create or update a script or search template. +// // Creates or updates a stored script or search template. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script func (p *MethodAPI) PutScript(id string) *core_put_script.PutScript { @@ -3584,6 +3687,18 @@ func (p *MethodAPI) RankEval() *core_rank_eval.RankEval { // has successfully indexed `max_docs` documents into the target or it has gone // through every document in the source query. // +// It's recommended to reindex on indices with a green status. Reindexing can +// fail when a node shuts down or crashes. +// * When requested with `wait_for_completion=true` (default), the request fails +// if the node shuts down. +// * When requested with `wait_for_completion=false`, a task id is returned, for +// use with the task management APIs. The task may disappear or fail if the node +// shuts down. +// When retrying a failed reindex operation, it might be necessary to set +// `conflicts=proceed` or to first delete the partial destination index. +// Additionally, dry runs, checking disk space, and fetching index recovery +// information can help address the root cause. +// // Refer to the linked documentation for examples of how to reindex documents. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex func (p *MethodAPI) Reindex() *core_reindex.Reindex { @@ -3973,6 +4088,7 @@ func (p *MethodAPI) Update(index, id string) *core_update.Update { } // 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 @@ -4661,6 +4777,7 @@ func (p *MethodCcr) DeleteAutoFollowPattern(name string) *ccr_delete_auto_follow } // Create a follower. +// // Create a cross-cluster replication follower index that follows a specific // leader index. // When the API returns, the follower index exists and cross-cluster replication @@ -4694,6 +4811,7 @@ func (p *MethodCcr) FollowStats(index string) *ccr_follow_stats.FollowStats { } // Forget a follower. +// // Remove the cross-cluster replication follower retention leases from the // leader. // @@ -4767,6 +4885,7 @@ func (p *MethodCcr) PauseFollow(index string) *ccr_pause_follow.PauseFollow { } // Create or update auto-follow patterns. +// // Create a collection of cross-cluster replication auto-follow patterns for a // remote cluster. // Newly created indices on the remote cluster that match any of the patterns @@ -4798,6 +4917,7 @@ func (p *MethodCcr) ResumeAutoFollowPattern(name string) *ccr_resume_auto_follow } // Resume a follower. +// // Resume a cross-cluster replication follower index that was paused. // The follower index could have been paused with the pause follower API. // Alternatively it could be paused due to replication that cannot be retried @@ -4839,7 +4959,10 @@ func (p *MethodCcr) Unfollow(index string) *ccr_unfollow.Unfollow { } // Explain the shard allocations. +// // Get explanations for shard allocations in the cluster. +// This API accepts the current_node, index, primary and shard parameters in the +// request body or in query parameters, but not in both at the same time. // For unassigned shards, it provides an explanation for why the shard is // unassigned. // For assigned shards, it provides an explanation for why the shard is @@ -4857,6 +4980,7 @@ func (p *MethodCluster) AllocationExplain() *cluster_allocation_explain.Allocati } // Delete component templates. +// // Component templates are building blocks for constructing index templates that // specify index mappings, settings, and aliases. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template @@ -4866,6 +4990,7 @@ func (p *MethodCluster) DeleteComponentTemplate(name string) *cluster_delete_com } // Clear cluster voting config exclusions. +// // Remove master-eligible nodes from the voting configuration exclusion list. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions func (p *MethodCluster) DeleteVotingConfigExclusions() *cluster_delete_voting_config_exclusions.DeleteVotingConfigExclusions { @@ -4874,6 +4999,7 @@ func (p *MethodCluster) DeleteVotingConfigExclusions() *cluster_delete_voting_co } // Check component templates. +// // Returns information about whether a particular component template exists. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template func (p *MethodCluster) ExistsComponentTemplate(name string) *cluster_exists_component_template.ExistsComponentTemplate { @@ -4882,6 +5008,7 @@ func (p *MethodCluster) ExistsComponentTemplate(name string) *cluster_exists_com } // Get component templates. +// // Get information about component templates. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template func (p *MethodCluster) GetComponentTemplate() *cluster_get_component_template.GetComponentTemplate { @@ -4921,6 +5048,7 @@ func (p *MethodCluster) Health() *cluster_health.Health { } // Get cluster info. +// // Returns basic information about the cluster. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-info func (p *MethodCluster) Info(target string) *cluster_info.Info { @@ -4929,6 +5057,7 @@ func (p *MethodCluster) Info(target string) *cluster_info.Info { } // Get the pending cluster tasks. +// // Get information about cluster-level changes (such as create index, update // mapping, allocate or fail shard) that have not yet taken effect. // @@ -4946,6 +5075,7 @@ func (p *MethodCluster) PendingTasks() *cluster_pending_tasks.PendingTasks { } // Update voting configuration exclusions. +// // Update the cluster voting config exclusions by node IDs or node names. // By default, if there are more than three master-eligible nodes in the cluster // and you remove fewer than half of the master-eligible nodes in the cluster at @@ -4991,6 +5121,7 @@ func (p *MethodCluster) PostVotingConfigExclusions() *cluster_post_voting_config } // Create or update a component template. +// // Component templates are building blocks for constructing index templates that // specify index mappings, settings, and aliases. // @@ -5088,6 +5219,7 @@ func (p *MethodCluster) RemoteInfo() *cluster_remote_info.RemoteInfo { } // Reroute the cluster. +// // Manually change the allocation of individual shards in the cluster. // For example, a shard can be moved from one node to another explicitly, an // allocation can be canceled, and an unassigned shard can be explicitly @@ -5123,6 +5255,7 @@ func (p *MethodCluster) Reroute() *cluster_reroute.Reroute { } // Get the cluster state. +// // Get comprehensive information about the state of the cluster. // // The cluster state is an internal data structure which keeps track of a @@ -5161,6 +5294,7 @@ func (p *MethodCluster) State() *cluster_state.State { } // Get cluster statistics. +// // Get basic index metrics (shard numbers, store size, memory usage) and // information about the current nodes that form the cluster (number, roles, os, // jvm versions, memory usage, cpu and installed plugins). @@ -5243,12 +5377,30 @@ func (p *MethodConnector) Put() *connector_put.Put { return _put() } +// Deletes a connector secret. +func (p *MethodConnector) SecretDelete(id string) *connector_secret_delete.SecretDelete { + _secretdelete := connector_secret_delete.NewSecretDeleteFunc(p.tp) + return _secretdelete(id) +} + +// Retrieves a secret stored by Connectors. +func (p *MethodConnector) SecretGet(id string) *connector_secret_get.SecretGet { + _secretget := connector_secret_get.NewSecretGetFunc(p.tp) + return _secretget(id) +} + // Creates a secret for a Connector. func (p *MethodConnector) SecretPost() *connector_secret_post.SecretPost { _secretpost := connector_secret_post.NewSecretPostFunc(p.tp) return _secretpost() } +// Creates or updates a secret for a Connector. +func (p *MethodConnector) SecretPut(id string) *connector_secret_put.SecretPut { + _secretput := connector_secret_put.NewSecretPutFunc(p.tp) + return _secretput(id) +} + // Cancel a connector sync job. // // Cancel a connector sync job, which sets the status to cancelling and updates @@ -5262,6 +5414,7 @@ func (p *MethodConnector) SyncJobCancel(connectorsyncjobid string) *connector_sy } // Check in a connector sync job. +// // Check in a connector sync job and set the `last_seen` field to the current // time before updating it in the internal index. // @@ -5276,6 +5429,7 @@ func (p *MethodConnector) SyncJobCheckIn(connectorsyncjobid string) *connector_s } // Claim a connector sync job. +// // This action updates the job status to `in_progress` and sets the `last_seen` // and `started_at` timestamps to the current time. // Additionally, it can set the `sync_cursor` property for the sync job. @@ -5305,6 +5459,7 @@ func (p *MethodConnector) SyncJobDelete(connectorsyncjobid string) *connector_sy } // Set a connector sync job error. +// // Set the `error` field for a connector sync job and set its `status` to // `error`. // @@ -5346,6 +5501,7 @@ func (p *MethodConnector) SyncJobPost() *connector_sync_job_post.SyncJobPost { } // Set the connector sync job stats. +// // Stats include: `deleted_document_count`, `indexed_document_count`, // `indexed_document_volume`, and `total_document_count`. // You can also update `last_seen`. @@ -5408,6 +5564,7 @@ func (p *MethodConnector) UpdateError(connectorid string) *connector_update_erro } // Update the connector features. +// // Update the connector features in the connector document. // This API can be used to control the following aspects of a connector: // @@ -5508,6 +5665,7 @@ func (p *MethodConnector) UpdateStatus(connectorid string) *connector_update_sta } // Bulk index or delete documents. +// // Perform multiple `index`, `create`, `delete`, and `update` actions in a // single request. // This reduces overhead and can greatly increase indexing speed. @@ -5603,8 +5761,11 @@ func (p *MethodConnector) UpdateStatus(connectorid string) *connector_update_sta // `Search::Elasticsearch::Client::5_0::Scroll` // * Python: Check out `elasticsearch.helpers.*` // * JavaScript: Check out `client.helpers.*` +// * Java: Check out +// `co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester` // * .NET: Check out `BulkAllObservable` // * PHP: Check out bulk indexing. +// * Ruby: Check out `Elasticsearch::Helpers::BulkHelper` // // **Submitting bulk requests with cURL** // @@ -5676,6 +5837,7 @@ func (p *MethodCore) Bulk() *core_bulk.Bulk { } // Clear a scrolling search. +// // Clear the search context and results for a scrolling search. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll func (p *MethodCore) ClearScroll() *core_clear_scroll.ClearScroll { @@ -5684,6 +5846,7 @@ func (p *MethodCore) ClearScroll() *core_clear_scroll.ClearScroll { } // Close a point in time. +// // A point in time must be opened explicitly before being used in search // requests. // The `keep_alive` parameter tells Elasticsearch how long it should persist. @@ -5698,6 +5861,7 @@ func (p *MethodCore) ClosePointInTime() *core_close_point_in_time.ClosePointInTi } // Count search results. +// // Get the number of documents matching a query. // // The query can be provided either by using a simple query string as a @@ -6056,6 +6220,7 @@ func (p *MethodCore) DeleteByQueryRethrottle(taskid string) *core_delete_by_quer } // Delete a script or search template. +// // Deletes a stored script or search template. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script func (p *MethodCore) DeleteScript(id string) *core_delete_script.DeleteScript { @@ -6109,6 +6274,7 @@ func (p *MethodCore) ExistsSource(index, id string) *core_exists_source.ExistsSo } // Explain a document match result. +// // Get information about why a specific document matches, or doesn't match, a // query. // It computes a score explanation for a query and a specific document. @@ -6214,6 +6380,7 @@ func (p *MethodCore) Get(index, id string) *core_get.Get { } // Get a script or search template. +// // Retrieves a stored script or search template. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script func (p *MethodCore) GetScript(id string) *core_get_script.GetScript { @@ -6262,6 +6429,7 @@ func (p *MethodCore) GetSource(index, id string) *core_get_source.GetSource { } // Get the cluster health. +// // Get a report with the health status of an Elasticsearch cluster. // The report contains a list of indicators that compose Elasticsearch // functionality. @@ -6484,6 +6652,8 @@ func (p *MethodCore) HealthReport() *core_health_report.HealthReport { // } // } // +// ``` +// // In this example, the operation will succeed since the supplied version of 2 // is higher than the current document version of 1. // If the document was already updated and its version was set to 2 or higher, @@ -6503,6 +6673,7 @@ func (p *MethodCore) Index(index string) *core_index.Index { } // Get cluster info. +// // Get basic build, version, and cluster information. // ::: In Serverless, this API is retained for backward compatibility only. Some // response fields, such as the version number, should be ignored. @@ -6512,6 +6683,16 @@ func (p *MethodCore) Info() *core_info.Info { return _info() } +// Run a knn search. +// +// NOTE: The kNN search API has been replaced by the `knn` option in the search +// API. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search +func (p *MethodCore) KnnSearch(index string) *core_knn_search.KnnSearch { + _knnsearch := core_knn_search.NewKnnSearchFunc(p.tp) + return _knnsearch(index) +} + // Get multiple documents. // // Get multiple JSON documents by ID from one or more indices. @@ -6682,6 +6863,7 @@ func (p *MethodCore) OpenPointInTime(index string) *core_open_point_in_time.Open } // Ping the cluster. +// // Get information about whether the cluster is running. // https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster func (p *MethodCore) Ping() *core_ping.Ping { @@ -6690,6 +6872,7 @@ func (p *MethodCore) Ping() *core_ping.Ping { } // Create or update a script or search template. +// // Creates or updates a stored script or search template. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script func (p *MethodCore) PutScript(id string) *core_put_script.PutScript { @@ -6775,6 +6958,18 @@ func (p *MethodCore) RankEval() *core_rank_eval.RankEval { // has successfully indexed `max_docs` documents into the target or it has gone // through every document in the source query. // +// It's recommended to reindex on indices with a green status. Reindexing can +// fail when a node shuts down or crashes. +// * When requested with `wait_for_completion=true` (default), the request fails +// if the node shuts down. +// * When requested with `wait_for_completion=false`, a task id is returned, for +// use with the task management APIs. The task may disappear or fail if the node +// shuts down. +// When retrying a failed reindex operation, it might be necessary to set +// `conflicts=proceed` or to first delete the partial destination index. +// Additionally, dry runs, checking disk space, and fetching index recovery +// information can help address the root cause. +// // Refer to the linked documentation for examples of how to reindex documents. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex func (p *MethodCore) Reindex() *core_reindex.Reindex { @@ -7164,6 +7359,7 @@ func (p *MethodCore) Update(index, id string) *core_update.Update { } // 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 @@ -7334,6 +7530,7 @@ func (p *MethodCore) UpdateByQueryRethrottle(taskid string) *core_update_by_quer } // Delete a dangling index. +// // If Elasticsearch encounters index data that is absent from the current // cluster state, those indices are considered to be dangling. // For example, this can happen if you delete more than @@ -7374,6 +7571,7 @@ func (p *MethodDanglingIndices) ListDanglingIndices() *dangling_indices_list_dan } // Delete an enrich policy. +// // Deletes an existing enrich policy and its enrich index. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-delete-policy func (p *MethodEnrich) DeletePolicy(name string) *enrich_delete_policy.DeletePolicy { @@ -7382,6 +7580,7 @@ func (p *MethodEnrich) DeletePolicy(name string) *enrich_delete_policy.DeletePol } // Run an enrich policy. +// // Create the enrich index for an existing enrich policy. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy func (p *MethodEnrich) ExecutePolicy(name string) *enrich_execute_policy.ExecutePolicy { @@ -7390,6 +7589,7 @@ func (p *MethodEnrich) ExecutePolicy(name string) *enrich_execute_policy.Execute } // Get an enrich policy. +// // Returns information about an enrich policy. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-get-policy func (p *MethodEnrich) GetPolicy() *enrich_get_policy.GetPolicy { @@ -7398,6 +7598,7 @@ func (p *MethodEnrich) GetPolicy() *enrich_get_policy.GetPolicy { } // Create an enrich policy. +// // Creates an enrich policy. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy func (p *MethodEnrich) PutPolicy(name string) *enrich_put_policy.PutPolicy { @@ -7406,6 +7607,7 @@ func (p *MethodEnrich) PutPolicy(name string) *enrich_put_policy.PutPolicy { } // Get enrich stats. +// // Returns enrich coordinator statistics and information about enrich policies // that are currently executing. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-stats @@ -7415,6 +7617,7 @@ func (p *MethodEnrich) Stats() *enrich_stats.Stats { } // Delete an async EQL search. +// // Delete an async EQL search or a stored synchronous EQL search. // The API also deletes results for the search. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-delete @@ -7424,6 +7627,7 @@ func (p *MethodEql) Delete(id string) *eql_delete.Delete { } // Get async EQL search results. +// // Get the current status and available results for an async EQL search or a // stored synchronous EQL search. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get @@ -7433,6 +7637,7 @@ func (p *MethodEql) Get(id string) *eql_get.Get { } // Get the async EQL status. +// // Get the current status for an async EQL search or a stored synchronous EQL // search without returning results. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get-status @@ -7442,6 +7647,7 @@ func (p *MethodEql) GetStatus(id string) *eql_get_status.GetStatus { } // Get EQL search results. +// // Returns search results for an Event Query Language (EQL) query. // EQL assumes each document in a data stream or index corresponds to an event. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search @@ -7451,6 +7657,7 @@ func (p *MethodEql) Search(index string) *eql_search.Search { } // Run an async ES|QL query. +// // Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its // progress, and retrieve results when they become available. // @@ -7463,6 +7670,7 @@ func (p *MethodEsql) AsyncQuery() *esql_async_query.AsyncQuery { } // Delete an async ES|QL query. +// // If the query is still running, it is cancelled. // Otherwise, the stored results are deleted. // @@ -7478,6 +7686,7 @@ func (p *MethodEsql) AsyncQueryDelete(id string) *esql_async_query_delete.AsyncQ } // Get async ES|QL query results. +// // Get the current status and available results or stored results for an ES|QL // asynchronous query. // If the Elasticsearch security features are enabled, only the user who first @@ -7500,21 +7709,26 @@ func (p *MethodEsql) AsyncQueryStop(id string) *esql_async_query_stop.AsyncQuery } // Get a specific running ES|QL query information. +// // Returns an object extended information about a running ES|QL query. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-query func (p *MethodEsql) GetQuery(id string) *esql_get_query.GetQuery { _getquery := esql_get_query.NewGetQueryFunc(p.tp) return _getquery(id) } // Get running ES|QL queries information. +// // Returns an object containing IDs and other information about the running // ES|QL queries. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-list-queries func (p *MethodEsql) ListQueries() *esql_list_queries.ListQueries { _listqueries := esql_list_queries.NewListQueriesFunc(p.tp) return _listqueries() } // Run an ES|QL query. +// // Get search results for an ES|QL (Elasticsearch query language) query. // https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest func (p *MethodEsql) Query() *esql_query.Query { @@ -7523,6 +7737,7 @@ func (p *MethodEsql) Query() *esql_query.Query { } // Get the features. +// // Get a list of features that can be included in snapshots using the // `feature_states` field when creating a snapshot. // You can use this API to determine which feature states to include when taking @@ -7547,6 +7762,7 @@ func (p *MethodFeatures) GetFeatures() *features_get_features.GetFeatures { } // Reset the features. +// // Clear all of the state information stored in system indices by Elasticsearch // features, including the security and machine learning indices. // @@ -7577,6 +7793,18 @@ func (p *MethodFeatures) ResetFeatures() *features_reset_features.ResetFeatures return _resetfeatures() } +// Deletes a secret stored by Fleet. +func (p *MethodFleet) DeleteSecret(id string) *fleet_delete_secret.DeleteSecret { + _deletesecret := fleet_delete_secret.NewDeleteSecretFunc(p.tp) + return _deletesecret(id) +} + +// Retrieves a secret stored by Fleet. +func (p *MethodFleet) GetSecret(id string) *fleet_get_secret.GetSecret { + _getsecret := fleet_get_secret.NewGetSecretFunc(p.tp) + return _getsecret(id) +} + // Get global checkpoints. // // Get the current global checkpoints for an index. @@ -7588,6 +7816,7 @@ func (p *MethodFleet) GlobalCheckpoints(index string) *fleet_global_checkpoints. } // Run multiple Fleet searches. +// // Run several Fleet searches with a single API request. // The API follows the same structure as the multi search API. // However, similar to the Fleet search API, it supports the @@ -7605,6 +7834,7 @@ func (p *MethodFleet) PostSecret() *fleet_post_secret.PostSecret { } // Run a Fleet search. +// // The purpose of the Fleet search API is to provide an API where the search // will be run only // after the provided checkpoint has been processed and is visible for searches @@ -7616,6 +7846,7 @@ func (p *MethodFleet) Search(index string) *fleet_search.Search { } // Explore graph analytics. +// // Extract and summarize information about the documents and terms in an // Elasticsearch data stream or index. // The easiest way to understand the behavior of this API is to use the Graph UI @@ -7633,6 +7864,7 @@ func (p *MethodGraph) Explore(index string) *graph_explore.Explore { } // Delete a lifecycle policy. +// // You cannot delete policies that are currently in use. If the policy is being // used to manage any indices, the request fails and returns an error. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-delete-lifecycle @@ -7642,6 +7874,7 @@ func (p *MethodIlm) DeleteLifecycle(policy string) *ilm_delete_lifecycle.DeleteL } // Explain the lifecycle state. +// // Get the current lifecycle status for one or more indices. // For data streams, the API retrieves the current lifecycle status for the // stream's backing indices. @@ -7671,6 +7904,7 @@ func (p *MethodIlm) GetStatus() *ilm_get_status.GetStatus { } // Migrate to data tiers routing. +// // Switch the indices, ILM policies, and legacy, composable, and component // templates from using custom node attributes and attribute-based allocation // filters to using data tiers. @@ -7697,6 +7931,7 @@ func (p *MethodIlm) MigrateToDataTiers() *ilm_migrate_to_data_tiers.MigrateToDat } // Move to a lifecycle step. +// // Manually move an index into a specific step in the lifecycle policy and run // that step. // @@ -7727,6 +7962,7 @@ func (p *MethodIlm) MoveToStep(index string) *ilm_move_to_step.MoveToStep { } // Create or update a lifecycle policy. +// // If the specified policy exists, it is replaced and the policy version is // incremented. // @@ -7739,6 +7975,7 @@ func (p *MethodIlm) PutLifecycle(policy string) *ilm_put_lifecycle.PutLifecycle } // Remove policies from an index. +// // Remove the assigned lifecycle policies from an index or a data stream's // backing indices. // It also stops managing the indices. @@ -7749,6 +7986,7 @@ func (p *MethodIlm) RemovePolicy(index string) *ilm_remove_policy.RemovePolicy { } // Retry a policy. +// // Retry running the lifecycle policy for an index that is in the ERROR step. // The API sets the policy back to the step where the error occurred and runs // the step. @@ -7761,6 +7999,7 @@ func (p *MethodIlm) Retry(index string) *ilm_retry.Retry { } // Start the ILM plugin. +// // Start the index lifecycle management plugin if it is currently stopped. // ILM is started automatically when the cluster is formed. // Restarting ILM is necessary only when it has been stopped using the stop ILM @@ -7772,6 +8011,7 @@ func (p *MethodIlm) Start() *ilm_start.Start { } // Stop the ILM plugin. +// // Halt all lifecycle management operations and stop the index lifecycle // management plugin. // This is useful when you are performing maintenance on the cluster and need to @@ -7799,6 +8039,7 @@ func (p *MethodIndices) AddBlock(index, block string) *indices_add_block.AddBloc } // Get tokens from text analysis. +// // The analyze API performs analysis on a text string and returns the resulting // tokens. // @@ -7824,6 +8065,7 @@ func (p *MethodIndices) CancelMigrateReindex(index string) *indices_cancel_migra } // Clear the cache. +// // Clear the cache of one or more indices. // For data streams, the API clears the caches of the stream's backing indices. // @@ -7838,6 +8080,7 @@ func (p *MethodIndices) ClearCache() *indices_clear_cache.ClearCache { } // Clone an index. +// // Clone an existing index into a new index. // Each original primary shard is cloned into a new primary shard in the new // index. @@ -7915,6 +8158,7 @@ func (p *MethodIndices) Clone(index, target string) *indices_clone.Clone { } // Close an index. +// // A closed index is blocked for read or write operations and does not allow all // operations that opened indices allow. // It is not possible to index documents or to search for documents in a closed @@ -7950,6 +8194,7 @@ func (p *MethodIndices) Close(index string) *indices_close.Close { } // Create an index. +// // You can use the create index API to add a new index to an Elasticsearch // cluster. // When creating an index, you can specify the following: @@ -8019,6 +8264,7 @@ func (p *MethodIndices) DataStreamsStats() *indices_data_streams_stats.DataStrea } // Delete indices. +// // Deleting an index deletes its documents, shards, and metadata. // It does not delete related Kibana components, such as data views, // visualizations, or dashboards. @@ -8034,6 +8280,7 @@ func (p *MethodIndices) Delete(index string) *indices_delete.Delete { } // Delete an alias. +// // Removes a data stream or index from an alias. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias func (p *MethodIndices) DeleteAlias(index, name string) *indices_delete_alias.DeleteAlias { @@ -8042,6 +8289,7 @@ func (p *MethodIndices) DeleteAlias(index, name string) *indices_delete_alias.De } // Delete data stream lifecycles. +// // Removes the data stream lifecycle from a data stream, rendering it not // managed by the data stream lifecycle. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle @@ -8051,6 +8299,7 @@ func (p *MethodIndices) DeleteDataLifecycle(name string) *indices_delete_data_li } // Delete data streams. +// // Deletes one or more data streams and their backing indices. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream func (p *MethodIndices) DeleteDataStream(name string) *indices_delete_data_stream.DeleteDataStream { @@ -8059,14 +8308,16 @@ func (p *MethodIndices) DeleteDataStream(name string) *indices_delete_data_strea } // Delete data stream options. +// // Removes the data stream options from a data stream. -// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options func (p *MethodIndices) DeleteDataStreamOptions(name string) *indices_delete_data_stream_options.DeleteDataStreamOptions { _deletedatastreamoptions := indices_delete_data_stream_options.NewDeleteDataStreamOptionsFunc(p.tp) return _deletedatastreamoptions(name) } // Delete an index template. +// // The provided may contain multiple template names separated // by a comma. If multiple template // names are specified then there is no wildcard support and the provided names @@ -8078,7 +8329,17 @@ func (p *MethodIndices) DeleteIndexTemplate(name string) *indices_delete_index_t return _deleteindextemplate(name) } +// Delete sampling configuration. +// +// Delete the sampling configuration for the specified index. +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func (p *MethodIndices) DeleteSampleConfiguration(index string) *indices_delete_sample_configuration.DeleteSampleConfiguration { + _deletesampleconfiguration := indices_delete_sample_configuration.NewDeleteSampleConfigurationFunc(p.tp) + return _deletesampleconfiguration(index) +} + // Delete a legacy index template. +// // IMPORTANT: This documentation is about legacy index templates, which are // deprecated and will be replaced by the composable templates introduced in // Elasticsearch 7.8. @@ -8089,6 +8350,7 @@ func (p *MethodIndices) DeleteTemplate(name string) *indices_delete_template.Del } // Analyze the index disk usage. +// // Analyze the disk usage of each field of an index or data stream. // This API might not support indices created in previous Elasticsearch // versions. @@ -8103,6 +8365,11 @@ func (p *MethodIndices) DeleteTemplate(name string) *indices_delete_template.Del // stored fields are also estimates and can be inaccurate. // The stored size of the `_id` field is likely underestimated while the // `_source` field is overestimated. +// +// For usage examples see the External documentation or refer to [Analyze the +// index disk usage +// example](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/index-disk-usage) +// for an example. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage func (p *MethodIndices) DiskUsage(index string) *indices_disk_usage.DiskUsage { _diskusage := indices_disk_usage.NewDiskUsageFunc(p.tp) @@ -8110,9 +8377,17 @@ func (p *MethodIndices) DiskUsage(index string) *indices_disk_usage.DiskUsage { } // Downsample an index. -// Aggregate a time series (TSDS) index and store pre-computed statistical -// summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric -// field grouped by a configured time interval. +// +// Downsamples a time series (TSDS) index and reduces its size by keeping the +// last value or by pre-aggregating metrics: +// +// - When running in `aggregate` mode, it pre-calculates and stores statistical +// summaries (`min`, `max`, `sum`, `value_count` and `avg`) +// for each metric field grouped by a configured time interval and their +// dimensions. +// - When running in `last_value` mode, it keeps the last value for each metric +// in the configured interval and their dimensions. +// // For example, a TSDS index that contains metrics sampled every 10 seconds can // be downsampled to an hourly index. // All documents within an hour interval are summarized and stored as a single @@ -8120,7 +8395,7 @@ func (p *MethodIndices) DiskUsage(index string) *indices_disk_usage.DiskUsage { // // NOTE: Only indices in a time series data stream are supported. // Neither field nor document level security can be defined on the source index. -// The source index must be read only (`index.blocks.write: true`). +// The source index must be read-only (`index.blocks.write: true`). // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample func (p *MethodIndices) Downsample(index, targetindex string) *indices_downsample.Downsample { _downsample := indices_downsample.NewDownsampleFunc(p.tp) @@ -8128,6 +8403,7 @@ func (p *MethodIndices) Downsample(index, targetindex string) *indices_downsampl } // Check indices. +// // Check if one or more indices, index aliases, or data streams exist. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists func (p *MethodIndices) Exists(index string) *indices_exists.Exists { @@ -8154,6 +8430,7 @@ func (p *MethodIndices) ExistsIndexTemplate(name string) *indices_exists_index_t } // Check existence of index templates. +// // Get information about whether index templates exist. // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. @@ -8168,6 +8445,7 @@ func (p *MethodIndices) ExistsTemplate(name string) *indices_exists_template.Exi } // Get the status for a data stream lifecycle. +// // Get information about an index or data stream's current data stream lifecycle // status, such as time since index creation, time since rollover, the lifecycle // configuration managing the index, or any errors encountered during lifecycle @@ -8179,6 +8457,7 @@ func (p *MethodIndices) ExplainDataLifecycle(index string) *indices_explain_data } // Get field usage stats. +// // Get field usage information for each shard and field of an index. // Field usage statistics are automatically captured when queries are running on // a cluster. @@ -8196,6 +8475,7 @@ func (p *MethodIndices) FieldUsageStats(index string) *indices_field_usage_stats } // Flush data streams or indices. +// // Flushing a data stream or index is the process of making sure that any data // that is currently only stored in the transaction log is also permanently // stored in the Lucene index. @@ -8226,6 +8506,7 @@ func (p *MethodIndices) Flush() *indices_flush.Flush { } // Force a merge. +// // Perform the force merge operation on the shards of one or more indices. // For data streams, the API forces a merge on the shards of the stream's // backing indices. @@ -8313,6 +8594,7 @@ func (p *MethodIndices) Forcemerge() *indices_forcemerge.Forcemerge { } // Get index information. +// // Get information about one or more indices. For data streams, the API returns // information about the // stream’s backing indices. @@ -8323,6 +8605,7 @@ func (p *MethodIndices) Get(index string) *indices_get.Get { } // Get aliases. +// // Retrieves information for one or more data stream or index aliases. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias func (p *MethodIndices) GetAlias() *indices_get_alias.GetAlias { @@ -8330,6 +8613,15 @@ func (p *MethodIndices) GetAlias() *indices_get_alias.GetAlias { return _getalias() } +// Get all sampling configurations. +// +// Get the sampling configurations for all indices. +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func (p *MethodIndices) GetAllSampleConfiguration() *indices_get_all_sample_configuration.GetAllSampleConfiguration { + _getallsampleconfiguration := indices_get_all_sample_configuration.NewGetAllSampleConfigurationFunc(p.tp) + return _getallsampleconfiguration() +} + // Get data stream lifecycles. // // Get the data stream lifecycle configuration of one or more data streams. @@ -8340,6 +8632,7 @@ func (p *MethodIndices) GetDataLifecycle(name string) *indices_get_data_lifecycl } // Get data stream lifecycle stats. +// // Get statistics about the data streams that are managed by a data stream // lifecycle. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats @@ -8357,10 +8650,19 @@ func (p *MethodIndices) GetDataStream() *indices_get_data_stream.GetDataStream { return _getdatastream() } +// Get data stream mappings. +// +// Get mapping information for one or more data streams. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-mappings +func (p *MethodIndices) GetDataStreamMappings(name string) *indices_get_data_stream_mappings.GetDataStreamMappings { + _getdatastreammappings := indices_get_data_stream_mappings.NewGetDataStreamMappingsFunc(p.tp) + return _getdatastreammappings(name) +} + // Get data stream options. // // Get the data stream options configuration of one or more data streams. -// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-options func (p *MethodIndices) GetDataStreamOptions(name string) *indices_get_data_stream_options.GetDataStreamOptions { _getdatastreamoptions := indices_get_data_stream_options.NewGetDataStreamOptionsFunc(p.tp) return _getdatastreamoptions(name) @@ -8376,6 +8678,7 @@ func (p *MethodIndices) GetDataStreamSettings(name string) *indices_get_data_str } // Get mapping definitions. +// // Retrieves mapping definitions for one or more fields. // For data streams, the API retrieves field mappings for the stream’s backing // indices. @@ -8389,6 +8692,7 @@ func (p *MethodIndices) GetFieldMapping(fields string) *indices_get_field_mappin } // Get index templates. +// // Get information about one or more index templates. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template func (p *MethodIndices) GetIndexTemplate() *indices_get_index_template.GetIndexTemplate { @@ -8397,6 +8701,7 @@ func (p *MethodIndices) GetIndexTemplate() *indices_get_index_template.GetIndexT } // Get mapping definitions. +// // For data streams, the API retrieves mappings for the stream’s backing // indices. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping @@ -8414,7 +8719,33 @@ func (p *MethodIndices) GetMigrateReindexStatus(index string) *indices_get_migra return _getmigratereindexstatus(index) } +// Request for a random sample of raw documents ingested into the given index or +// data stream. +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func (p *MethodIndices) GetSample(index string) *indices_get_sample.GetSample { + _getsample := indices_get_sample.NewGetSampleFunc(p.tp) + return _getsample(index) +} + +// Get sampling configuration. +// +// Get the sampling configuration for the specified index. +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func (p *MethodIndices) GetSampleConfiguration(index string) *indices_get_sample_configuration.GetSampleConfiguration { + _getsampleconfiguration := indices_get_sample_configuration.NewGetSampleConfigurationFunc(p.tp) + return _getsampleconfiguration(index) +} + +// Request stats for a random sample of raw documents ingested into the given +// index or data stream. +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func (p *MethodIndices) GetSampleStats(index string) *indices_get_sample_stats.GetSampleStats { + _getsamplestats := indices_get_sample_stats.NewGetSampleStatsFunc(p.tp) + return _getsamplestats(index) +} + // Get index settings. +// // Get setting information for one or more indices. // For data streams, it returns setting information for the stream's backing // indices. @@ -8425,6 +8756,7 @@ func (p *MethodIndices) GetSettings() *indices_get_settings.GetSettings { } // Get legacy index templates. +// // Get information about one or more index templates. // // IMPORTANT: This documentation is about legacy index templates, which are @@ -8449,6 +8781,7 @@ func (p *MethodIndices) MigrateReindex() *indices_migrate_reindex.MigrateReindex } // 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: @@ -8468,6 +8801,7 @@ func (p *MethodIndices) MigrateToDataStream(name string) *indices_migrate_to_dat } // Update data streams. +// // Performs one or more data stream modification actions in a single atomic // operation. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream @@ -8477,6 +8811,7 @@ func (p *MethodIndices) ModifyDataStream() *indices_modify_data_stream.ModifyDat } // Open a closed index. +// // For data streams, the API opens any closed backing indices. // // A closed index is blocked for read/write operations and does not allow all @@ -8519,6 +8854,7 @@ func (p *MethodIndices) Open(index string) *indices_open.Open { } // Promote a data stream. +// // Promote a data stream from a replicated data stream managed by cross-cluster // replication (CCR) to a regular data stream. // @@ -8544,6 +8880,7 @@ func (p *MethodIndices) PromoteDataStream(name string) *indices_promote_data_str } // Create or update an alias. +// // Adds a data stream or index to an alias. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias func (p *MethodIndices) PutAlias(index, name string) *indices_put_alias.PutAlias { @@ -8552,6 +8889,7 @@ func (p *MethodIndices) PutAlias(index, name string) *indices_put_alias.PutAlias } // Update data stream lifecycles. +// // Update the data stream lifecycle of the specified data streams. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle func (p *MethodIndices) PutDataLifecycle(name string) *indices_put_data_lifecycle.PutDataLifecycle { @@ -8559,9 +8897,24 @@ func (p *MethodIndices) PutDataLifecycle(name string) *indices_put_data_lifecycl return _putdatalifecycle(name) } +// Update data stream mappings. +// +// This API can be used to override mappings on specific data streams. These +// overrides will take precedence over what +// is specified in the template that the data stream matches. The mapping change +// is only applied to new write indices +// that are created during rollover after this API is called. No indices are +// changed by this API. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-mappings +func (p *MethodIndices) PutDataStreamMappings(name string) *indices_put_data_stream_mappings.PutDataStreamMappings { + _putdatastreammappings := indices_put_data_stream_mappings.NewPutDataStreamMappingsFunc(p.tp) + return _putdatastreammappings(name) +} + // Update data stream options. +// // Update the data stream options of the specified data streams. -// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-options func (p *MethodIndices) PutDataStreamOptions(name string) *indices_put_data_stream_options.PutDataStreamOptions { _putdatastreamoptions := indices_put_data_stream_options.NewPutDataStreamOptionsFunc(p.tp) return _putdatastreamoptions(name) @@ -8584,6 +8937,7 @@ func (p *MethodIndices) PutDataStreamSettings(name string) *indices_put_data_str } // Create or update an index template. +// // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. // @@ -8636,6 +8990,7 @@ func (p *MethodIndices) PutIndexTemplate(name string) *indices_put_index_templat } // Update field mappings. +// // Add new fields to an existing data stream or index. // You can use the update mapping API to: // @@ -8649,7 +9004,7 @@ func (p *MethodIndices) PutIndexTemplate(name string) *indices_put_index_templat // // Learn how to use the update mapping API with practical examples in the // [Update mapping API -// examples](https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples) +// examples](https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples) // guide. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping func (p *MethodIndices) PutMapping(index string) *indices_put_mapping.PutMapping { @@ -8657,7 +9012,17 @@ func (p *MethodIndices) PutMapping(index string) *indices_put_mapping.PutMapping return _putmapping(index) } +// Create or update sampling configuration. +// +// Create or update the sampling configuration for the specified index. +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func (p *MethodIndices) PutSampleConfiguration(index string) *indices_put_sample_configuration.PutSampleConfiguration { + _putsampleconfiguration := indices_put_sample_configuration.NewPutSampleConfigurationFunc(p.tp) + return _putsampleconfiguration(index) +} + // Update index settings. +// // Changes dynamic index settings in real time. // For data streams, index setting changes are applied to all backing indices by // default. @@ -8743,6 +9108,7 @@ func (p *MethodIndices) PutSettings() *indices_put_settings.PutSettings { } // Create or update a legacy index template. +// // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. // Elasticsearch applies templates to new indices based on an index pattern that @@ -8781,6 +9147,7 @@ func (p *MethodIndices) PutTemplate(name string) *indices_put_template.PutTempla } // Get index recovery information. +// // Get information about ongoing and completed shard recoveries for one or more // indices. // For data streams, the API returns information for the stream's backing @@ -8823,6 +9190,7 @@ func (p *MethodIndices) Recovery() *indices_recovery.Recovery { } // 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 @@ -8834,6 +9202,9 @@ func (p *MethodIndices) Recovery() *indices_recovery.Recovery { // You can change this default interval with the `index.refresh_interval` // setting. // +// In Elastic Cloud Serverless, the default refresh interval is 5 seconds across +// all indices. +// // Refresh requests are synchronous and do not return a response until the // refresh operation completes. // @@ -8854,6 +9225,7 @@ func (p *MethodIndices) Refresh() *indices_refresh.Refresh { } // Reload search analyzers. +// // Reload an index's search analyzers and their resources. // For data streams, the API reloads search analyzers and resources for the // stream's backing indices. @@ -8983,6 +9355,7 @@ func (p *MethodIndices) ResolveCluster() *indices_resolve_cluster.ResolveCluster } // Resolve indices. +// // Resolve the names and/or index patterns for indices, aliases, and data // streams. // Multiple patterns and remote clusters are supported. @@ -8993,8 +9366,10 @@ func (p *MethodIndices) ResolveIndex(name string) *indices_resolve_index.Resolve } // Roll over to a new index. -// TIP: It is recommended to use the index lifecycle rollover action to automate -// rollovers. +// +// TIP: We recommend using the index lifecycle rollover action to automate +// rollovers. However, Serverless does not support Index Lifecycle Management +// (ILM), so don't use this approach in the Serverless context. // // The rollover API creates a new index for a data stream or index alias. // The API behavior depends on the rollover target. @@ -9054,6 +9429,7 @@ func (p *MethodIndices) Rollover(alias string) *indices_rollover.Rollover { } // Get index segments. +// // Get low-level information about the Lucene segments in index shards. // For data streams, the API returns information about the stream's backing // indices. @@ -9064,6 +9440,7 @@ func (p *MethodIndices) Segments() *indices_segments.Segments { } // Get index shard stores. +// // Get store information about replica shards in one or more indices. // For data streams, the API retrieves store information for the stream's // backing indices. @@ -9085,6 +9462,7 @@ func (p *MethodIndices) ShardStores() *indices_shard_stores.ShardStores { } // Shrink an index. +// // Shrink an index into a new index with fewer primary shards. // // Before you can shrink an index: @@ -9147,6 +9525,7 @@ func (p *MethodIndices) Shrink(index, target string) *indices_shrink.Shrink { } // Simulate an index. +// // Get the index configuration that would be applied to the specified index from // an existing index template. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template @@ -9156,6 +9535,7 @@ func (p *MethodIndices) SimulateIndexTemplate(name string) *indices_simulate_ind } // Simulate an index template. +// // Get the index configuration that would be applied by a particular index // template. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template @@ -9165,6 +9545,7 @@ func (p *MethodIndices) SimulateTemplate() *indices_simulate_template.SimulateTe } // Split an index. +// // Split an index into a new index with more primary shards. // * Before you can split an index: // @@ -9219,6 +9600,7 @@ func (p *MethodIndices) Split(index, target string) *indices_split.Split { } // Get index statistics. +// // For data streams, the API retrieves statistics for the stream's backing // indices. // @@ -9240,6 +9622,7 @@ func (p *MethodIndices) Stats() *indices_stats.Stats { } // Create or update an alias. +// // Adds a data stream or index to an alias. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases func (p *MethodIndices) UpdateAliases() *indices_update_aliases.UpdateAliases { @@ -9248,6 +9631,7 @@ func (p *MethodIndices) UpdateAliases() *indices_update_aliases.UpdateAliases { } // Validate a query. +// // Validates a query without running it. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query func (p *MethodIndices) ValidateQuery() *indices_validate_query.ValidateQuery { @@ -9255,7 +9639,7 @@ func (p *MethodIndices) ValidateQuery() *indices_validate_query.ValidateQuery { return _validatequery() } -// Perform chat completion inference +// Perform chat completion inference on the service. // // The chat completion inference API enables real-time responses for chat // completion tasks by delivering answers incrementally, reducing response times @@ -9277,21 +9661,42 @@ func (p *MethodInference) ChatCompletionUnified(inferenceid string) *inference_c return _chatcompletionunified(inferenceid) } -// Perform completion inference on the service +// Perform completion inference on the service. +// +// Get responses for completion tasks. +// This API works only with the completion task type. +// +// IMPORTANT: The inference APIs enable you to use certain services, such as +// built-in machine learning models (ELSER, E5), models uploaded through Eland, +// Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, +// Watsonx.ai, or Hugging Face. For built-in models and models uploaded through +// Eland, the inference APIs offer an alternative way to use and manage trained +// models. However, if you do not plan to use the inference APIs to use these +// models or if you want to use non-NLP models, use the machine learning trained +// model APIs. +// +// This API requires the `monitor_inference` cluster privilege (the built-in +// `inference_admin` and `inference_user` roles grant this privilege). // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference func (p *MethodInference) Completion(inferenceid string) *inference_completion.Completion { _completion := inference_completion.NewCompletionFunc(p.tp) return _completion(inferenceid) } -// Delete an inference endpoint +// Delete an inference endpoint. +// +// This API requires the manage_inference cluster privilege (the built-in +// `inference_admin` role grants this privilege). // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete func (p *MethodInference) Delete(inferenceid string) *inference_delete.Delete { _delete := inference_delete.NewDeleteFunc(p.tp) return _delete(inferenceid) } -// Get an inference endpoint +// Get an inference endpoint. +// +// This API requires the `monitor_inference` cluster privilege (the built-in +// `inference_admin` and `inference_user` roles grant this privilege). // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get func (p *MethodInference) Get() *inference_get.Get { _get := inference_get.NewGetFunc(p.tp) @@ -9338,33 +9743,47 @@ func (p *MethodInference) Inference(inferenceid string) *inference_inference.Inf // // The following integrations are available through the inference API. You can // find the available task types next to the integration name: +// * AI21 (`chat_completion`, `completion`) // * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, // `text_embedding`) // * Amazon Bedrock (`completion`, `text_embedding`) // * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, // `sparse_embedding`, `text_embedding`) // * Anthropic (`completion`) -// * Azure AI Studio (`completion`, `text_embedding`) +// * Azure AI Studio (`completion`, 'rerank', `text_embedding`) // * Azure OpenAI (`completion`, `text_embedding`) // * Cohere (`completion`, `rerank`, `text_embedding`) -// * DeepSeek (`completion`, `chat_completion`) +// * DeepSeek (`chat_completion`, `completion`) // * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this // service is for built-in models and models uploaded through Eland) // * ELSER (`sparse_embedding`) // * Google AI Studio (`completion`, `text_embedding`) -// * Google Vertex AI (`rerank`, `text_embedding`) +// * Google Vertex AI (`chat_completion`, `completion`, `rerank`, +// `text_embedding`) // * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`) +// * JinaAI (`rerank`, `text_embedding`) +// * Llama (`chat_completion`, `completion`, `text_embedding`) // * Mistral (`chat_completion`, `completion`, `text_embedding`) // * OpenAI (`chat_completion`, `completion`, `text_embedding`) -// * VoyageAI (`text_embedding`, `rerank`) +// * OpenShift AI (`chat_completion`, `completion`, `rerank`, `text_embedding`) +// * VoyageAI (`rerank`, `text_embedding`) // * Watsonx inference integration (`text_embedding`) -// * JinaAI (`text_embedding`, `rerank`) // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put func (p *MethodInference) Put(inferenceid string) *inference_put.Put { _put := inference_put.NewPutFunc(p.tp) return _put(inferenceid) } +// Create a AI21 inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `ai21` +// service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-ai21 +func (p *MethodInference) PutAi21(tasktype, ai21inferenceid string) *inference_put_ai21.PutAi21 { + _putai21 := inference_put_ai21.NewPutAi21Func(p.tp) + return _putai21(tasktype, ai21inferenceid) +} + // Create an AlibabaCloud AI Search inference endpoint. // // Create an inference endpoint to perform an inference task with the @@ -9455,6 +9874,19 @@ func (p *MethodInference) PutCohere(tasktype, cohereinferenceid string) *inferen return _putcohere(tasktype, cohereinferenceid) } +// Create an Contextual AI inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `contexualai` service. +// +// To review the available `rerank` models, refer to +// . +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-contextualai +func (p *MethodInference) PutContextualai(tasktype, contextualaiinferenceid string) *inference_put_contextualai.PutContextualai { + _putcontextualai := inference_put_contextualai.NewPutContextualaiFunc(p.tp) + return _putcontextualai(tasktype, contextualaiinferenceid) +} + // Create a custom inference endpoint. // // The custom service gives more control over how to interact with external @@ -9685,6 +10117,16 @@ func (p *MethodInference) PutJinaai(tasktype, jinaaiinferenceid string) *inferen return _putjinaai(tasktype, jinaaiinferenceid) } +// Create a Llama inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `llama` +// service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-llama +func (p *MethodInference) PutLlama(tasktype, llamainferenceid string) *inference_put_llama.PutLlama { + _putllama := inference_put_llama.NewPutLlamaFunc(p.tp) + return _putllama(tasktype, llamainferenceid) +} + // Create a Mistral inference endpoint. // // Create an inference endpoint to perform an inference task with the `mistral` @@ -9705,6 +10147,16 @@ func (p *MethodInference) PutOpenai(tasktype, openaiinferenceid string) *inferen return _putopenai(tasktype, openaiinferenceid) } +// Create an OpenShift AI inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `openshift_ai` service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openshift-ai +func (p *MethodInference) PutOpenshiftAi(tasktype, openshiftaiinferenceid string) *inference_put_openshift_ai.PutOpenshiftAi { + _putopenshiftai := inference_put_openshift_ai.NewPutOpenshiftAiFunc(p.tp) + return _putopenshiftai(tasktype, openshiftaiinferenceid) +} + // Create a VoyageAI inference endpoint. // // Create an inference endpoint to perform an inference task with the `voyageai` @@ -9732,21 +10184,22 @@ func (p *MethodInference) PutWatsonx(tasktype, watsonxinferenceid string) *infer return _putwatsonx(tasktype, watsonxinferenceid) } -// Perform reranking inference on the service +// Perform reranking inference on the service. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference func (p *MethodInference) Rerank(inferenceid string) *inference_rerank.Rerank { _rerank := inference_rerank.NewRerankFunc(p.tp) return _rerank(inferenceid) } -// Perform sparse embedding inference on the service +// Perform sparse embedding inference on the service. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference func (p *MethodInference) SparseEmbedding(inferenceid string) *inference_sparse_embedding.SparseEmbedding { _sparseembedding := inference_sparse_embedding.NewSparseEmbeddingFunc(p.tp) return _sparseembedding(inferenceid) } -// Perform streaming inference. +// Perform streaming completion inference on the service. +// // Get real-time responses for completion tasks by delivering answers // incrementally, reducing response times during computation. // This API works only with the completion task type. @@ -9769,7 +10222,7 @@ func (p *MethodInference) StreamCompletion(inferenceid string) *inference_stream return _streamcompletion(inferenceid) } -// Perform text embedding inference on the service +// Perform text embedding inference on the service. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference func (p *MethodInference) TextEmbedding(inferenceid string) *inference_text_embedding.TextEmbedding { _textembedding := inference_text_embedding.NewTextEmbeddingFunc(p.tp) @@ -9814,6 +10267,7 @@ func (p *MethodIngest) DeleteIpLocationDatabase(id string) *ingest_delete_ip_loc } // Delete pipelines. +// // Delete one or more ingest pipelines. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline func (p *MethodIngest) DeletePipeline(id string) *ingest_delete_pipeline.DeletePipeline { @@ -9822,6 +10276,7 @@ func (p *MethodIngest) DeletePipeline(id string) *ingest_delete_pipeline.DeleteP } // Get GeoIP statistics. +// // Get download statistics for GeoIP2 databases that are used with the GeoIP // processor. // https://www.elastic.co/docs/reference/enrich-processor/geoip-processor @@ -9857,6 +10312,7 @@ func (p *MethodIngest) GetPipeline() *ingest_get_pipeline.GetPipeline { } // Run a grok processor. +// // Extract structured fields out of a single text field within a document. // You must choose which field to extract matched fields from, as well as the // grok pattern you expect will match. @@ -9885,6 +10341,7 @@ func (p *MethodIngest) PutIpLocationDatabase(id string) *ingest_put_ip_location_ } // Create or update a pipeline. +// // Changes made using this API take effect immediately. // https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines func (p *MethodIngest) PutPipeline(id string) *ingest_put_pipeline.PutPipeline { @@ -9987,6 +10444,7 @@ func (p *MethodLicense) PostStartBasic() *license_post_start_basic.PostStartBasi } // Start a trial. +// // Start a 30-day trial, which gives access to all subscription features. // // NOTE: You are allowed to start a trial only if your cluster has not already @@ -10003,6 +10461,7 @@ func (p *MethodLicense) PostStartTrial() *license_post_start_trial.PostStartTria } // Delete a Logstash pipeline. +// // Delete a pipeline that is used for Logstash Central Management. // If the request succeeds, you receive an empty response with an appropriate // status code. @@ -10013,6 +10472,7 @@ func (p *MethodLogstash) DeletePipeline(id string) *logstash_delete_pipeline.Del } // Get Logstash pipelines. +// // Get pipelines that are used for Logstash Central Management. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-get-pipeline func (p *MethodLogstash) GetPipeline() *logstash_get_pipeline.GetPipeline { @@ -10031,6 +10491,7 @@ func (p *MethodLogstash) PutPipeline(id string) *logstash_put_pipeline.PutPipeli } // Get deprecation information. +// // Get information about different cluster, node, and index level settings that // use deprecated features that will be removed or changed in the next major // version. @@ -10044,6 +10505,7 @@ func (p *MethodMigration) Deprecations() *migration_deprecations.Deprecations { } // Get feature migration information. +// // Version upgrades sometimes require changes to how features store // configuration information and data in system indices. // Check which features need to be migrated and the status of any migrations @@ -10058,6 +10520,7 @@ func (p *MethodMigration) GetFeatureUpgradeStatus() *migration_get_feature_upgra } // Start the feature migration. +// // Version upgrades sometimes require changes to how features store // configuration information and data in system indices. // This API starts the automatic migration process. @@ -10272,6 +10735,7 @@ func (p *MethodMl) ExplainDataFrameAnalytics() *ml_explain_data_frame_analytics. } // 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 @@ -10299,6 +10763,7 @@ func (p *MethodMl) Forecast(jobid string) *ml_forecast.Forecast { } // Get anomaly detection job results for buckets. +// // The API presents a chronological view of the records, grouped by bucket. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-buckets func (p *MethodMl) GetBuckets(jobid string) *ml_get_buckets.GetBuckets { @@ -10328,6 +10793,7 @@ func (p *MethodMl) GetCategories(jobid string) *ml_get_categories.GetCategories } // 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. @@ -10345,6 +10811,7 @@ func (p *MethodMl) GetDataFrameAnalyticsStats() *ml_get_data_frame_analytics_sta } // Get datafeed stats. +// // 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 @@ -10358,6 +10825,7 @@ func (p *MethodMl) GetDatafeedStats() *ml_get_datafeed_stats.GetDatafeedStats { } // 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 @@ -10370,6 +10838,7 @@ func (p *MethodMl) GetDatafeeds() *ml_get_datafeeds.GetDatafeeds { } // Get filters. +// // You can get a single filter or all filters. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-filters func (p *MethodMl) GetFilters() *ml_get_filters.GetFilters { @@ -10378,6 +10847,7 @@ func (p *MethodMl) GetFilters() *ml_get_filters.GetFilters { } // Get anomaly detection job results for influencers. +// // Influencers are the entities that have contributed to, or are to blame for, // the anomalies. Influencer results are available only if an // `influencer_field_name` is specified in the job configuration. @@ -10395,6 +10865,7 @@ func (p *MethodMl) GetJobStats() *ml_get_job_stats.GetJobStats { } // 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 @@ -10406,6 +10877,7 @@ func (p *MethodMl) GetJobs() *ml_get_jobs.GetJobs { } // Get machine learning memory usage info. +// // Get information about how machine learning jobs and trained models are using // memory, // on each node, both within the JVM heap, and natively, outside of the JVM. @@ -10455,6 +10927,7 @@ func (p *MethodMl) GetOverallBuckets(jobid string) *ml_get_overall_buckets.GetOv } // Get anomaly records for an anomaly detection job. +// // Records contain the detailed analytical results. They describe the anomalous // activity that has been identified in the input data based on the detector // configuration. @@ -10479,6 +10952,7 @@ func (p *MethodMl) GetTrainedModels() *ml_get_trained_models.GetTrainedModels { } // 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. @@ -10496,6 +10970,7 @@ func (p *MethodMl) InferTrainedModel(modelid string) *ml_infer_trained_model.Inf } // Get machine learning information. +// // Get defaults and limits used by machine learning. // This endpoint is designed to be used by a user interface that needs to fully // understand machine learning configurations where some options are not @@ -10543,6 +11018,7 @@ func (p *MethodMl) PostData(jobid string) *ml_post_data.PostData { } // Preview features used by data frame analytics. +// // Preview the extracted features used by a data frame analytics config. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics func (p *MethodMl) PreviewDataFrameAnalytics() *ml_preview_data_frame_analytics.PreviewDataFrameAnalytics { @@ -10551,6 +11027,7 @@ func (p *MethodMl) PreviewDataFrameAnalytics() *ml_preview_data_frame_analytics. } // 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 @@ -10585,6 +11062,7 @@ func (p *MethodMl) PutCalendarJob(calendarid, jobid string) *ml_put_calendar_job } // 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. // By default, the query used in the source configuration is `{"match_all": @@ -10603,6 +11081,7 @@ func (p *MethodMl) PutDataFrameAnalytics(id string) *ml_put_data_frame_analytics } // 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. @@ -10628,6 +11107,7 @@ func (p *MethodMl) PutDatafeed(datafeedid string) *ml_put_datafeed.PutDatafeed { } // 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 @@ -10651,6 +11131,7 @@ func (p *MethodMl) PutJob(jobid string) *ml_put_job.PutJob { } // Create a trained model. +// // Enable you to supply a trained model that is not created by data frame // analytics. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model @@ -10660,6 +11141,7 @@ func (p *MethodMl) PutTrainedModel(modelid string) *ml_put_trained_model.PutTrai } // 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 @@ -10690,6 +11172,7 @@ func (p *MethodMl) PutTrainedModelDefinitionPart(modelid, part string) *ml_put_t } // 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. @@ -10700,6 +11183,7 @@ func (p *MethodMl) PutTrainedModelVocabulary(modelid string) *ml_put_trained_mod } // 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 @@ -10711,6 +11195,7 @@ func (p *MethodMl) ResetJob(jobid string) *ml_reset_job.ResetJob { } // Revert to a snapshot. +// // The machine learning features react quickly to anomalous input, learning new // behaviors in data. Highly anomalous input increases the variance in the // models whilst the system learns whether this is a new step-change in behavior @@ -10725,6 +11210,7 @@ func (p *MethodMl) RevertModelSnapshot(jobid, snapshotid string) *ml_revert_mode } // Set upgrade_mode for ML indices. +// // Sets a cluster wide upgrade_mode setting that prepares machine learning // indices for an upgrade. // When upgrading your cluster, in some circumstances you must restart your @@ -10744,6 +11230,7 @@ func (p *MethodMl) SetUpgradeMode() *ml_set_upgrade_mode.SetUpgradeMode { } // 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 @@ -10788,6 +11275,7 @@ func (p *MethodMl) StartDatafeed(datafeedid string) *ml_start_datafeed.StartData } // Start a trained model deployment. +// // It allocates the model to every machine learning node. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-trained-model-deployment func (p *MethodMl) StartTrainedModelDeployment(modelid string) *ml_start_trained_model_deployment.StartTrainedModelDeployment { @@ -10796,6 +11284,7 @@ func (p *MethodMl) StartTrainedModelDeployment(modelid string) *ml_start_trained } // Stop data frame analytics jobs. +// // A data frame analytics job can be started and stopped multiple times // throughout its lifecycle. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-data-frame-analytics @@ -10805,6 +11294,7 @@ func (p *MethodMl) StopDataFrameAnalytics(id string) *ml_stop_data_frame_analyti } // 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. @@ -10829,6 +11319,7 @@ func (p *MethodMl) UpdateDataFrameAnalytics(id string) *ml_update_data_frame_ana } // 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 @@ -10842,6 +11333,7 @@ func (p *MethodMl) UpdateDatafeed(datafeedid string) *ml_update_datafeed.UpdateD } // Update a filter. +// // Updates the description of a filter, adds items, or removes items from the // list. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-filter @@ -10851,6 +11343,7 @@ func (p *MethodMl) UpdateFilter(filterid string) *ml_update_filter.UpdateFilter } // Update an anomaly detection job. +// // Updates certain properties of an anomaly detection job. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-job func (p *MethodMl) UpdateJob(jobid string) *ml_update_job.UpdateJob { @@ -10859,6 +11352,7 @@ func (p *MethodMl) UpdateJob(jobid string) *ml_update_job.UpdateJob { } // Update a snapshot. +// // Updates certain properties of a snapshot. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-model-snapshot func (p *MethodMl) UpdateModelSnapshot(jobid, snapshotid string) *ml_update_model_snapshot.UpdateModelSnapshot { @@ -10874,6 +11368,7 @@ func (p *MethodMl) UpdateTrainedModelDeployment(modelid string) *ml_update_train } // Upgrade a snapshot. +// // Upgrade an anomaly detection model snapshot to the latest major version. // Over time, older snapshot formats are deprecated and removed. Anomaly // detection jobs support only snapshots that are from the current or previous @@ -10904,6 +11399,7 @@ func (p *MethodMl) ValidateDetector() *ml_validate_detector.ValidateDetector { } // Send monitoring data. +// // This API is used by the monitoring features to send monitoring data. // https://www.elastic.co/docs/api/doc/elasticsearch func (p *MethodMonitoring) Bulk() *monitoring_bulk.Bulk { @@ -10912,6 +11408,7 @@ func (p *MethodMonitoring) Bulk() *monitoring_bulk.Bulk { } // Clear the archived repositories metering. +// // Clear the archived repositories metering information in the cluster. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive func (p *MethodNodes) ClearRepositoriesMeteringArchive(nodeid, maxarchiveversion string) *nodes_clear_repositories_metering_archive.ClearRepositoriesMeteringArchive { @@ -10920,6 +11417,7 @@ func (p *MethodNodes) ClearRepositoriesMeteringArchive(nodeid, maxarchiveversion } // Get cluster repositories metering. +// // Get repositories metering information for a cluster. // This API exposes monotonically non-decreasing counters and it is expected // that clients would durably store the information needed to compute @@ -10933,6 +11431,7 @@ func (p *MethodNodes) GetRepositoriesMeteringInfo(nodeid string) *nodes_get_repo } // Get the hot threads for nodes. +// // Get a breakdown of the hot threads on each selected node in the cluster. // The output is plain text with a breakdown of the top hot threads for each // node. @@ -10977,6 +11476,7 @@ func (p *MethodNodes) ReloadSecureSettings() *nodes_reload_secure_settings.Reloa } // Get node statistics. +// // Get statistics for nodes in a cluster. // By default, all stats are returned. You can limit the returned information by // using metrics. @@ -10993,8 +11493,7 @@ func (p *MethodNodes) Usage() *nodes_usage.Usage { return _usage() } -// Extracts a UI-optimized structure to render flamegraphs from Universal -// Profiling. +// Returns basic information about the status of Universal Profiling. // https://www.elastic.co/guide/en/observability/current/universal-profiling.html func (p *MethodProfiling) Flamegraph() *profiling_flamegraph.Flamegraph { _flamegraph := profiling_flamegraph.NewFlamegraphFunc(p.tp) @@ -11015,14 +11514,24 @@ func (p *MethodProfiling) Status() *profiling_status.Status { return _status() } -// Extracts a list of topN functions from Universal Profiling. +// Extracts a list of topN functions from Universal Profiling // https://www.elastic.co/guide/en/observability/current/universal-profiling.html func (p *MethodProfiling) TopnFunctions() *profiling_topn_functions.TopnFunctions { _topnfunctions := profiling_topn_functions.NewTopnFunctionsFunc(p.tp) return _topnfunctions() } +// Get tags. +// +// Get the tags that are defined for the project. +// https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-project-tags +func (p *MethodProject) Tags() *project_tags.Tags { + _tags := project_tags.NewTagsFunc(p.tp) + return _tags() +} + // Delete a query rule. +// // Delete a query rule within a query ruleset. // This is a destructive action that is only recoverable by re-adding the same // rule with the create or update query rule API. @@ -11033,6 +11542,7 @@ func (p *MethodQueryRules) DeleteRule(rulesetid, ruleid string) *query_rules_del } // Delete a query ruleset. +// // Remove a query ruleset and its associated data. // This is a destructive action that is not recoverable. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-ruleset @@ -11042,6 +11552,7 @@ func (p *MethodQueryRules) DeleteRuleset(rulesetid string) *query_rules_delete_r } // Get a query rule. +// // Get details about a query rule within a query ruleset. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-rule func (p *MethodQueryRules) GetRule(rulesetid, ruleid string) *query_rules_get_rule.GetRule { @@ -11050,6 +11561,7 @@ func (p *MethodQueryRules) GetRule(rulesetid, ruleid string) *query_rules_get_ru } // Get a query ruleset. +// // Get details about a query ruleset. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset func (p *MethodQueryRules) GetRuleset(rulesetid string) *query_rules_get_ruleset.GetRuleset { @@ -11058,6 +11570,7 @@ func (p *MethodQueryRules) GetRuleset(rulesetid string) *query_rules_get_ruleset } // Get all query rulesets. +// // Get summarized information about the query rulesets. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets func (p *MethodQueryRules) ListRulesets() *query_rules_list_rulesets.ListRulesets { @@ -11066,6 +11579,7 @@ func (p *MethodQueryRules) ListRulesets() *query_rules_list_rulesets.ListRuleset } // Create or update a query rule. +// // Create or update a query rule within a query ruleset. // // IMPORTANT: Due to limitations within pinned queries, you can only pin @@ -11081,6 +11595,7 @@ func (p *MethodQueryRules) PutRule(rulesetid, ruleid string) *query_rules_put_ru } // Create or update a query ruleset. +// // There is a limit of 100 rules per ruleset. // This limit can be increased by using the // `xpack.applications.rules.max_rules_per_ruleset` cluster setting. @@ -11098,6 +11613,7 @@ func (p *MethodQueryRules) PutRuleset(rulesetid string) *query_rules_put_ruleset } // Test a query ruleset. +// // Evaluate match criteria against a query ruleset to identify the rules that // would match that criteria. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-test @@ -11144,6 +11660,7 @@ func (p *MethodRollup) DeleteJob(id string) *rollup_delete_job.DeleteJob { } // Get rollup job information. +// // Get the configuration, stats, and status of rollup jobs. // // NOTE: This API returns only active (both `STARTED` and `STOPPED`) jobs. @@ -11158,6 +11675,7 @@ func (p *MethodRollup) GetJobs() *rollup_get_jobs.GetJobs { } // Get the rollup job capabilities. +// // Get the capabilities of any rollup jobs that have been configured for a // specific index or index pattern. // @@ -11177,6 +11695,7 @@ func (p *MethodRollup) GetRollupCaps() *rollup_get_rollup_caps.GetRollupCaps { } // Get the rollup index capabilities. +// // Get the rollup capabilities of all jobs inside of a rollup index. // A single rollup index may store the data for multiple rollup jobs and may // have a variety of capabilities depending on those jobs. This API enables you @@ -11215,6 +11734,7 @@ func (p *MethodRollup) PutJob(id string) *rollup_put_job.PutJob { } // Search rolled-up data. +// // The rollup search endpoint is needed because, internally, rolled-up documents // utilize a different document structure than the original data. // It rewrites standard Query DSL into a format that matches the rollup @@ -11239,6 +11759,7 @@ func (p *MethodRollup) RollupSearch(index string) *rollup_rollup_search.RollupSe } // Start rollup jobs. +// // If you try to start a job that does not exist, an exception occurs. // If you try to start a job that is already started, nothing happens. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-start-job @@ -11248,6 +11769,7 @@ func (p *MethodRollup) StartJob(id string) *rollup_start_job.StartJob { } // Stop rollup jobs. +// // If you try to stop a job that does not exist, an exception occurs. // If you try to stop a job that is already stopped, nothing happens. // @@ -11280,6 +11802,7 @@ func (p *MethodSearchApplication) Delete(name string) *search_application_delete } // Delete a behavioral analytics collection. +// // The associated data stream is also deleted. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete-behavioral-analytics func (p *MethodSearchApplication) DeleteBehavioralAnalytics(name string) *search_application_delete_behavioral_analytics.DeleteBehavioralAnalytics { @@ -11302,6 +11825,7 @@ func (p *MethodSearchApplication) GetBehavioralAnalytics() *search_application_g } // Get search applications. +// // Get information about search applications. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics func (p *MethodSearchApplication) List() *search_application_list.List { @@ -11331,6 +11855,7 @@ func (p *MethodSearchApplication) PutBehavioralAnalytics(name string) *search_ap } // Render a search application query. +// // Generate an Elasticsearch query using the specified query parameters and the // search template associated with the search application or a default template // if none is specified. @@ -11348,6 +11873,7 @@ func (p *MethodSearchApplication) RenderQuery(name string) *search_application_r } // Run a search application search. +// // Generate and run an Elasticsearch query that uses the specified query // parameteter and the search template associated with the search application or // default template. @@ -11360,6 +11886,7 @@ func (p *MethodSearchApplication) Search(name string) *search_application_search } // Get cache statistics. +// // Get statistics about the shared cache for partially mounted indices. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-cache-stats func (p *MethodSearchableSnapshots) CacheStats() *searchable_snapshots_cache_stats.CacheStats { @@ -11368,6 +11895,7 @@ func (p *MethodSearchableSnapshots) CacheStats() *searchable_snapshots_cache_sta } // Clear the cache. +// // Clear indices and data streams from the shared cache for partially mounted // indices. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-clear-cache @@ -11377,6 +11905,7 @@ func (p *MethodSearchableSnapshots) ClearCache() *searchable_snapshots_clear_cac } // Mount a snapshot. +// // Mount a snapshot as a searchable snapshot index. // Do not use this API for snapshots managed by index lifecycle management // (ILM). @@ -11465,6 +11994,7 @@ func (p *MethodSecurity) BulkPutRole() *security_bulk_put_role.BulkPutRole { } // Bulk update API keys. +// // Update the attributes for multiple API keys. // // IMPORTANT: It is not possible to use an API key as the authentication @@ -11933,6 +12463,15 @@ func (p *MethodSecurity) GetSettings() *security_get_settings.GetSettings { return _getsettings() } +// Get security stats. +// +// Gather security usage statistics from all node(s) within the cluster. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-stats +func (p *MethodSecurity) GetStats() *security_get_stats.GetStats { + _getstats := security_get_stats.NewGetStatsFunc(p.tp) + return _getstats() +} + // Get a token. // // Create a bearer token for access without requiring basic authentication. @@ -12608,6 +13147,7 @@ func (p *MethodSecurity) UpdateUserProfileData(uid string) *security_update_user } // Cancel node shutdown preparations. +// // Remove a node from the shutdown list so it can resume normal operations. // You must explicitly clear the shutdown request when a node rejoins the // cluster or when a node has permanently left the cluster. @@ -12674,6 +13214,7 @@ func (p *MethodShutdown) PutNode(nodeid string) *shutdown_put_node.PutNode { } // Simulate data ingestion. +// // Run ingest pipelines against a set of provided documents, optionally with // substitute pipeline definitions, to simulate ingesting data into an index. // @@ -12714,6 +13255,7 @@ func (p *MethodSimulate) Ingest() *simulate_ingest.Ingest { } // Delete a policy. +// // Delete a snapshot lifecycle policy definition. // This operation prevents any future snapshots from being taken but does not // cancel in-progress snapshots or remove previously-taken snapshots. @@ -12724,6 +13266,7 @@ func (p *MethodSlm) DeleteLifecycle(policyid string) *slm_delete_lifecycle.Delet } // Run a policy. +// // Immediately create a snapshot according to the snapshot lifecycle policy // without waiting for the scheduled time. // The snapshot policy is normally applied according to its schedule, but you @@ -12736,6 +13279,7 @@ func (p *MethodSlm) ExecuteLifecycle(policyid string) *slm_execute_lifecycle.Exe } // Run a retention policy. +// // Manually apply the retention policy to force immediate removal of snapshots // that are expired according to the snapshot lifecycle policy retention rules. // The retention policy is normally applied according to its schedule. @@ -12746,6 +13290,7 @@ func (p *MethodSlm) ExecuteRetention() *slm_execute_retention.ExecuteRetention { } // Get policy information. +// // Get snapshot lifecycle policy definitions and information about the latest // snapshot attempts. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle @@ -12755,6 +13300,7 @@ func (p *MethodSlm) GetLifecycle() *slm_get_lifecycle.GetLifecycle { } // Get snapshot lifecycle management statistics. +// // Get global and policy-level statistics about actions taken by snapshot // lifecycle management. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-stats @@ -12771,6 +13317,7 @@ func (p *MethodSlm) GetStatus() *slm_get_status.GetStatus { } // Create or update a policy. +// // Create or update a snapshot lifecycle policy. // If the policy already exists, this request increments the policy version. // Only the latest version of a policy is stored. @@ -12781,6 +13328,7 @@ func (p *MethodSlm) PutLifecycle(policyid string) *slm_put_lifecycle.PutLifecycl } // Start snapshot lifecycle management. +// // Snapshot lifecycle management (SLM) starts automatically when a cluster is // formed. // Manually starting SLM is necessary only if it has been stopped using the stop @@ -12792,6 +13340,7 @@ func (p *MethodSlm) Start() *slm_start.Start { } // Stop snapshot lifecycle management. +// // Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. // This API is useful when you are performing maintenance on a cluster and need // to prevent SLM from performing any actions on your data streams or indices. @@ -12811,6 +13360,7 @@ func (p *MethodSlm) Stop() *slm_stop.Stop { } // Clean up the snapshot repository. +// // Trigger the review of the contents of a snapshot repository and delete any // stale data not referenced by existing snapshots. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-cleanup-repository @@ -12820,6 +13370,7 @@ func (p *MethodSnapshot) CleanupRepository(repository string) *snapshot_cleanup_ } // Clone a snapshot. +// // Clone part of all of a snapshot into another snapshot in the same repository. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-clone func (p *MethodSnapshot) Clone(repository, snapshot, targetsnapshot string) *snapshot_clone.Clone { @@ -12828,6 +13379,7 @@ func (p *MethodSnapshot) Clone(repository, snapshot, targetsnapshot string) *sna } // Create a snapshot. +// // Take a snapshot of a cluster or of data streams and indices. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create func (p *MethodSnapshot) Create(repository, snapshot string) *snapshot_create.Create { @@ -12836,6 +13388,7 @@ func (p *MethodSnapshot) Create(repository, snapshot string) *snapshot_create.Cr } // Create or update a snapshot repository. +// // IMPORTANT: If you are migrating searchable snapshots, the repository name // must be identical in the source and destination clusters. // To register a snapshot repository, the cluster's global metadata must be @@ -12861,6 +13414,7 @@ func (p *MethodSnapshot) Delete(repository, snapshot string) *snapshot_delete.De } // Delete snapshot repositories. +// // When a repository is unregistered, Elasticsearch removes only the reference // to the location where the repository is storing the snapshots. // The snapshots themselves are left untouched and in place. @@ -13098,6 +13652,7 @@ func (p *MethodSnapshot) RepositoryAnalyze(repository string) *snapshot_reposito } // Verify the repository integrity. +// // Verify the integrity of the contents of a snapshot repository. // // This API enables you to perform a comprehensive check of the contents of a @@ -13169,6 +13724,7 @@ func (p *MethodSnapshot) RepositoryVerifyIntegrity(repository string) *snapshot_ } // Restore a snapshot. +// // Restore a snapshot of a cluster or data streams and indices. // // You can restore a snapshot only to a running cluster with an elected master @@ -13202,6 +13758,7 @@ func (p *MethodSnapshot) Restore(repository, snapshot string) *snapshot_restore. } // Get the snapshot status. +// // Get a detailed description of the current state for each shard participating // in the snapshot. // @@ -13216,6 +13773,18 @@ func (p *MethodSnapshot) Restore(repository, snapshot string) *snapshot_restore. // If needed, you can specify `` and `` to retrieve // information for specific snapshots, even if they're not currently running. // +// Note that the stats will not be available for any shard snapshots in an +// ongoing snapshot completed by a node that (even momentarily) left the +// cluster. +// Loading the stats from the repository is an expensive operation (see the +// WARNING below). +// Therefore the stats values for such shards will be -1 even though the "stage" +// value will be "DONE", in order to minimize latency. +// A "description" field will be present for a shard snapshot completed by a +// departed node explaining why the shard snapshot's stats results are invalid. +// Consequently, the total stats for the index will be less than expected due to +// the missing values from these shards. +// // WARNING: Using the API to return the status of any snapshots other than // currently running snapshots can be expensive. // The API requires a read from the repository for each shard in each snapshot. @@ -13234,6 +13803,7 @@ func (p *MethodSnapshot) Status() *snapshot_status.Status { } // Verify a snapshot repository. +// // Check for common misconfigurations in a snapshot repository. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository func (p *MethodSnapshot) VerifyRepository(repository string) *snapshot_verify_repository.VerifyRepository { @@ -13249,6 +13819,7 @@ func (p *MethodSql) ClearCursor() *sql_clear_cursor.ClearCursor { } // Delete an async SQL search. +// // Delete an async SQL search or a stored synchronous SQL search. // If the search is still running, the API cancels it. // @@ -13264,6 +13835,7 @@ func (p *MethodSql) DeleteAsync(id string) *sql_delete_async.DeleteAsync { } // Get async SQL search results. +// // Get the current status and available results for an async SQL search or // stored synchronous SQL search. // @@ -13276,6 +13848,7 @@ func (p *MethodSql) GetAsync(id string) *sql_get_async.GetAsync { } // Get the async SQL search status. +// // Get the current status of an async SQL search or a stored synchronous SQL // search. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async-status @@ -13285,6 +13858,7 @@ func (p *MethodSql) GetAsyncStatus(id string) *sql_get_async_status.GetAsyncStat } // Get SQL search results. +// // Run an SQL request. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-query func (p *MethodSql) Query() *sql_query.Query { @@ -13293,6 +13867,7 @@ func (p *MethodSql) Query() *sql_query.Query { } // Translate SQL into Elasticsearch queries. +// // Translate an SQL search into a search API request containing Query DSL. // It accepts the same request body parameters as the SQL search API, excluding // `cursor`. @@ -13338,22 +13913,34 @@ func (p *MethodSsl) Certificates() *ssl_certificates.Certificates { return _certificates() } -// Disable the Logs Streams feature for this cluster -// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-logs-disable.html +// Disable logs stream. +// +// Turn off the logs stream feature for this cluster. +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO func (p *MethodStreams) LogsDisable() *streams_logs_disable.LogsDisable { _logsdisable := streams_logs_disable.NewLogsDisableFunc(p.tp) return _logsdisable() } -// Enable the Logs Streams feature for this cluster -// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-logs-enable.html +// Enable logs stream. +// +// Turn on the logs stream feature for this cluster. +// +// NOTE: To protect existing data, this feature can be turned on only if the +// cluster does not have existing indices or data streams that match the pattern +// `logs|logs.*`. +// If those indices or data streams exist, a `409 - Conflict` response and error +// is returned. +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO func (p *MethodStreams) LogsEnable() *streams_logs_enable.LogsEnable { _logsenable := streams_logs_enable.NewLogsEnableFunc(p.tp) return _logsenable() } -// Return the current status of the streams feature for each streams type -// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-status.html +// Get the status of streams. +// +// Get the current status for all types of streams. +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO func (p *MethodStreams) Status() *streams_status.Status { _status := streams_status.NewStatusFunc(p.tp) return _status() @@ -13392,6 +13979,7 @@ func (p *MethodSynonyms) DeleteSynonym(id string) *synonyms_delete_synonym.Delet } // Delete a synonym rule. +// // Delete a synonym rule from a synonym set. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule func (p *MethodSynonyms) DeleteSynonymRule(setid, ruleid string) *synonyms_delete_synonym_rule.DeleteSynonymRule { @@ -13407,6 +13995,7 @@ func (p *MethodSynonyms) GetSynonym(id string) *synonyms_get_synonym.GetSynonym } // Get a synonym rule. +// // Get a synonym rule from a synonym set. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule func (p *MethodSynonyms) GetSynonymRule(setid, ruleid string) *synonyms_get_synonym_rule.GetSynonymRule { @@ -13415,6 +14004,7 @@ func (p *MethodSynonyms) GetSynonymRule(setid, ruleid string) *synonyms_get_syno } // Get all synonym sets. +// // Get a summary of all defined synonym sets. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym func (p *MethodSynonyms) GetSynonymsSets() *synonyms_get_synonyms_sets.GetSynonymsSets { @@ -13423,6 +14013,7 @@ func (p *MethodSynonyms) GetSynonymsSets() *synonyms_get_synonyms_sets.GetSynony } // Create or update a synonym set. +// // Synonyms sets are limited to a maximum of 10,000 synonym rules per set. // If you need to manage more synonym rules, you can create multiple synonym // sets. @@ -13441,6 +14032,7 @@ func (p *MethodSynonyms) PutSynonym(id string) *synonyms_put_synonym.PutSynonym } // Create or update a synonym rule. +// // Create or update a synonym rule in a synonym set. // // If any of the synonym rules included is invalid, the API returns an error. @@ -13480,6 +14072,7 @@ func (p *MethodTasks) Cancel() *tasks_cancel.Cancel { } // Get task information. +// // Get information about a task currently running in the cluster. // // WARNING: The task management API is new and should still be considered a beta @@ -13495,6 +14088,7 @@ func (p *MethodTasks) Get(taskid string) *tasks_get.Get { } // Get all tasks. +// // Get information about the tasks currently running on one or more nodes in the // cluster. // @@ -13570,6 +14164,7 @@ func (p *MethodTasks) List() *tasks_list.List { } // Find the structure of a text field. +// // Find the structure of a text field in an Elasticsearch index. // // This API provides a starting point for extracting further information from @@ -13603,6 +14198,7 @@ func (p *MethodTextStructure) FindFieldStructure() *text_structure_find_field_st } // Find the structure of text messages. +// // Find the structure of a list of text messages. // The messages must contain data that is suitable to be ingested into // Elasticsearch. @@ -13638,6 +14234,7 @@ func (p *MethodTextStructure) FindMessageStructure() *text_structure_find_messag } // Find the structure of a text file. +// // The text file must contain data that is suitable to be ingested into // Elasticsearch. // @@ -13671,6 +14268,7 @@ func (p *MethodTextStructure) FindStructure() *text_structure_find_structure.Fin } // Test a Grok pattern. +// // Test a Grok pattern on one or more lines of text. // The API indicates whether the lines match the pattern together with the // offsets and lengths of the matched substrings. @@ -13687,7 +14285,7 @@ func (p *MethodTransform) DeleteTransform(transformid string) *transform_delete_ return _deletetransform(transformid) } -// Retrieves transform usage information for transform nodes. +// Retrieves transform usage information for transform nodes // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html func (p *MethodTransform) GetNodeStats() *transform_get_node_stats.GetNodeStats { _getnodestats := transform_get_node_stats.NewGetNodeStatsFunc(p.tp) @@ -13695,6 +14293,7 @@ func (p *MethodTransform) GetNodeStats() *transform_get_node_stats.GetNodeStats } // Get transforms. +// // Get configuration information for transforms. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform func (p *MethodTransform) GetTransform() *transform_get_transform.GetTransform { @@ -13712,6 +14311,7 @@ func (p *MethodTransform) GetTransformStats(transformid string) *transform_get_t } // Preview a transform. +// // Generates a preview of the results that you will get when you create a // transform with the same configuration. // @@ -13727,6 +14327,7 @@ func (p *MethodTransform) PreviewTransform() *transform_preview_transform.Previe } // Create a transform. +// // Creates a transform. // // A transform copies data from source indices, transforms it, and persists it @@ -13792,6 +14393,26 @@ func (p *MethodTransform) ScheduleNowTransform(transformid string) *transform_sc return _schedulenowtransform(transformid) } +// Set upgrade_mode for transform indices. +// +// Sets a cluster wide upgrade_mode setting that prepares transform +// indices for an upgrade. +// When upgrading your cluster, in some circumstances you must restart your +// nodes and reindex your transform indices. In those circumstances, +// there must be no transforms running. You can close the transforms, +// do the upgrade, then open all the transforms again. Alternatively, +// you can use this API to temporarily halt tasks associated with the transforms +// and prevent new transforms from opening. You can also use this API +// during upgrades that do not require you to reindex your transform +// indices, though stopping transforms is not a requirement in that case. +// You can see the current value for the upgrade_mode setting by using the get +// transform info API. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode +func (p *MethodTransform) SetUpgradeMode() *transform_set_upgrade_mode.SetUpgradeMode { + _setupgrademode := transform_set_upgrade_mode.NewSetUpgradeModeFunc(p.tp) + return _setupgrademode() +} + // Start a transform. // // When you start a transform, it creates the destination index if it does not @@ -13827,6 +14448,7 @@ func (p *MethodTransform) StartTransform(transformid string) *transform_start_tr } // Stop transforms. +// // Stops one or more transforms. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-stop-transform func (p *MethodTransform) StopTransform(transformid string) *transform_stop_transform.StopTransform { @@ -13835,6 +14457,7 @@ func (p *MethodTransform) StopTransform(transformid string) *transform_stop_tran } // Update a transform. +// // Updates certain properties of a transform. // // All updated properties except `description` do not take effect until after @@ -13883,6 +14506,7 @@ func (p *MethodTransform) UpgradeTransforms() *transform_upgrade_transforms.Upgr } // Acknowledge a watch. +// // Acknowledging a watch enables you to manually throttle the execution of the // watch's actions. // @@ -13907,6 +14531,7 @@ func (p *MethodWatcher) AckWatch(watchid string) *watcher_ack_watch.AckWatch { } // Activate a watch. +// // A watch can be either active or inactive. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch func (p *MethodWatcher) ActivateWatch(watchid string) *watcher_activate_watch.ActivateWatch { @@ -13915,6 +14540,7 @@ func (p *MethodWatcher) ActivateWatch(watchid string) *watcher_activate_watch.Ac } // Deactivate a watch. +// // A watch can be either active or inactive. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch func (p *MethodWatcher) DeactivateWatch(watchid string) *watcher_deactivate_watch.DeactivateWatch { @@ -13923,6 +14549,7 @@ func (p *MethodWatcher) DeactivateWatch(watchid string) *watcher_deactivate_watc } // Delete a watch. +// // When the watch is removed, the document representing the watch in the // `.watches` index is gone and it will never be run again. // @@ -13941,6 +14568,7 @@ func (p *MethodWatcher) DeleteWatch(id string) *watcher_delete_watch.DeleteWatch } // Run a watch. +// // This API can be used to force execution of the watch outside of its // triggering logic or to simulate the watch execution for debugging purposes. // @@ -13973,6 +14601,7 @@ func (p *MethodWatcher) ExecuteWatch() *watcher_execute_watch.ExecuteWatch { } // Get Watcher index settings. +// // Get settings for the Watcher internal index (`.watches`). // Only a subset of settings are shown, for example `index.auto_expand_replicas` // and `index.number_of_replicas`. @@ -13990,6 +14619,7 @@ func (p *MethodWatcher) GetWatch(id string) *watcher_get_watch.GetWatch { } // Create or update a watch. +// // When a watch is registered, a new document that represents the watch is added // to the `.watches` index and its trigger is immediately registered with the // relevant trigger engine. @@ -14016,6 +14646,7 @@ func (p *MethodWatcher) PutWatch(id string) *watcher_put_watch.PutWatch { } // Query watches. +// // Get all registered watches in a paginated manner and optionally filter // watches by a query. // @@ -14027,6 +14658,7 @@ func (p *MethodWatcher) QueryWatches() *watcher_query_watches.QueryWatches { } // Start the watch service. +// // Start the Watcher service if it is not already running. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start func (p *MethodWatcher) Start() *watcher_start.Start { @@ -14035,6 +14667,7 @@ func (p *MethodWatcher) Start() *watcher_start.Start { } // Get Watcher statistics. +// // This API always returns basic metrics. // You retrieve more metrics by using the metric parameter. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stats @@ -14044,6 +14677,7 @@ func (p *MethodWatcher) Stats() *watcher_stats.Stats { } // Stop the watch service. +// // Stop the Watcher service if it is running. // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop func (p *MethodWatcher) Stop() *watcher_stop.Stop { @@ -14052,6 +14686,7 @@ func (p *MethodWatcher) Stop() *watcher_stop.Stop { } // Update Watcher index settings. +// // Update settings for the Watcher internal index (`.watches`). // Only a subset of settings can be modified. // This includes `index.auto_expand_replicas`, `index.number_of_replicas`, @@ -14068,6 +14703,7 @@ func (p *MethodWatcher) UpdateSettings() *watcher_update_settings.UpdateSettings } // Get information. +// // The information provided by the API includes: // // * Build information including the build number and timestamp. @@ -14081,6 +14717,7 @@ func (p *MethodXpack) Info() *xpack_info.Info { } // Get usage information. +// // Get information about the features that are currently enabled and available // under the current license. // The API also provides some usage statistics. @@ -14119,6 +14756,7 @@ func NewMethodAPI(tp elastictransport.Interface) *MethodAPI { Monitoring: MethodMonitoring{tp: tp}, Nodes: MethodNodes{tp: tp}, Profiling: MethodProfiling{tp: tp}, + Project: MethodProject{tp: tp}, QueryRules: MethodQueryRules{tp: tp}, Rollup: MethodRollup{tp: tp}, SearchApplication: MethodSearchApplication{tp: tp}, diff --git a/typedapi/asyncsearch/delete/delete.go b/typedapi/asyncsearch/delete/delete.go index 1904e8312d..9f880cc80e 100644 --- a/typedapi/asyncsearch/delete/delete.go +++ b/typedapi/asyncsearch/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an async search. // diff --git a/typedapi/asyncsearch/delete/response.go b/typedapi/asyncsearch/delete/response.go index 9cda299057..6045c3e589 100644 --- a/typedapi/asyncsearch/delete/response.go +++ b/typedapi/asyncsearch/delete/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/delete/AsyncSearchDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/async_search/delete/AsyncSearchDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/asyncsearch/get/get.go b/typedapi/asyncsearch/get/get.go index d18d706b28..59809b717e 100644 --- a/typedapi/asyncsearch/get/get.go +++ b/typedapi/asyncsearch/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get async search results. // @@ -34,6 +34,7 @@ import ( "io" "net/http" "net/url" + "slices" "strconv" "strings" @@ -223,7 +224,8 @@ func (r Get) Do(providedCtx context.Context) (*Response, error) { } defer res.Body.Close() - if res.StatusCode < 299 { + if res.StatusCode < 299 || slices.Contains([]int{404, 400, 500, 429}, res.StatusCode) { + err = json.NewDecoder(res.Body).Decode(response) if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { diff --git a/typedapi/asyncsearch/get/response.go b/typedapi/asyncsearch/get/response.go index 0d792f30b8..44b00d41fb 100644 --- a/typedapi/asyncsearch/get/response.go +++ b/typedapi/asyncsearch/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -33,13 +33,13 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/get/AsyncSearchGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/async_search/get/AsyncSearchGetResponse.ts#L25-L34 type Response struct { - // CompletionTime Indicates when the async search completed. // It is present only when the search has completed. - CompletionTime types.DateTime `json:"completion_time,omitempty"` - CompletionTimeInMillis *int64 `json:"completion_time_in_millis,omitempty"` + CompletionTime types.DateTime `json:"completion_time,omitempty"` + CompletionTimeInMillis *int64 `json:"completion_time_in_millis,omitempty"` + Error *types.ErrorCause `json:"error,omitempty"` // ExpirationTime Indicates when the async search will expire. ExpirationTime types.DateTime `json:"expiration_time,omitempty"` ExpirationTimeInMillis int64 `json:"expiration_time_in_millis"` @@ -90,6 +90,11 @@ func (s *Response) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "CompletionTimeInMillis", err) } + case "error": + if err := dec.Decode(&s.Error); err != nil { + return fmt.Errorf("%s | %w", "Error", err) + } + case "expiration_time": if err := dec.Decode(&s.ExpirationTime); err != nil { return fmt.Errorf("%s | %w", "ExpirationTime", err) diff --git a/typedapi/asyncsearch/status/response.go b/typedapi/asyncsearch/status/response.go index 4b0a267a98..43741c0aea 100644 --- a/typedapi/asyncsearch/status/response.go +++ b/typedapi/asyncsearch/status/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package status @@ -33,9 +33,8 @@ import ( // Response holds the response body struct for the package status // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/status/AsyncSearchStatusResponse.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/async_search/status/AsyncSearchStatusResponse.ts#L39-L42 type Response struct { - // Clusters_ Metadata about clusters involved in the cross-cluster search. // It is not shown for local-only searches. Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -47,8 +46,9 @@ type Response struct { CompletionStatus *int `json:"completion_status,omitempty"` // CompletionTime Indicates when the async search completed. // It is present only when the search has completed. - CompletionTime types.DateTime `json:"completion_time,omitempty"` - CompletionTimeInMillis *int64 `json:"completion_time_in_millis,omitempty"` + CompletionTime types.DateTime `json:"completion_time,omitempty"` + CompletionTimeInMillis *int64 `json:"completion_time_in_millis,omitempty"` + Error *types.ErrorCause `json:"error,omitempty"` // ExpirationTime Indicates when the async search will expire. ExpirationTime types.DateTime `json:"expiration_time,omitempty"` ExpirationTimeInMillis int64 `json:"expiration_time_in_millis"` @@ -121,6 +121,11 @@ func (s *Response) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "CompletionTimeInMillis", err) } + case "error": + if err := dec.Decode(&s.Error); err != nil { + return fmt.Errorf("%s | %w", "Error", err) + } + case "expiration_time": if err := dec.Decode(&s.ExpirationTime); err != nil { return fmt.Errorf("%s | %w", "ExpirationTime", err) diff --git a/typedapi/asyncsearch/status/status.go b/typedapi/asyncsearch/status/status.go index f3ff3996db..095d085f34 100644 --- a/typedapi/asyncsearch/status/status.go +++ b/typedapi/asyncsearch/status/status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the async search status. // diff --git a/typedapi/asyncsearch/submit/request.go b/typedapi/asyncsearch/submit/request.go index ddfdced0ae..a4f0f593f1 100644 --- a/typedapi/asyncsearch/submit/request.go +++ b/typedapi/asyncsearch/submit/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package submit @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package submit // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/submit/AsyncSearchSubmitRequest.ts#L54-L294 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/async_search/submit/AsyncSearchSubmitRequest.ts#L55-L325 type Request struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Collapse *types.FieldCollapse `json:"collapse,omitempty"` diff --git a/typedapi/asyncsearch/submit/response.go b/typedapi/asyncsearch/submit/response.go index 408e6eaab3..9056e1cc65 100644 --- a/typedapi/asyncsearch/submit/response.go +++ b/typedapi/asyncsearch/submit/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package submit @@ -33,13 +33,13 @@ import ( // Response holds the response body struct for the package submit // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/submit/AsyncSearchSubmitResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/async_search/submit/AsyncSearchSubmitResponse.ts#L25-L34 type Response struct { - // CompletionTime Indicates when the async search completed. // It is present only when the search has completed. - CompletionTime types.DateTime `json:"completion_time,omitempty"` - CompletionTimeInMillis *int64 `json:"completion_time_in_millis,omitempty"` + CompletionTime types.DateTime `json:"completion_time,omitempty"` + CompletionTimeInMillis *int64 `json:"completion_time_in_millis,omitempty"` + Error *types.ErrorCause `json:"error,omitempty"` // ExpirationTime Indicates when the async search will expire. ExpirationTime types.DateTime `json:"expiration_time,omitempty"` ExpirationTimeInMillis int64 `json:"expiration_time_in_millis"` @@ -90,6 +90,11 @@ func (s *Response) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "CompletionTimeInMillis", err) } + case "error": + if err := dec.Decode(&s.Error); err != nil { + return fmt.Errorf("%s | %w", "Error", err) + } + case "expiration_time": if err := dec.Decode(&s.ExpirationTime); err != nil { return fmt.Errorf("%s | %w", "ExpirationTime", err) diff --git a/typedapi/asyncsearch/submit/submit.go b/typedapi/asyncsearch/submit/submit.go index 9687c35cc6..acbc3b2405 100644 --- a/typedapi/asyncsearch/submit/submit.go +++ b/typedapi/asyncsearch/submit/submit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run an async search. // @@ -42,6 +42,7 @@ import ( "io" "net/http" "net/url" + "slices" "strconv" "strings" @@ -297,7 +298,8 @@ func (r Submit) Do(providedCtx context.Context) (*Response, error) { } defer res.Body.Close() - if res.StatusCode < 299 { + if res.StatusCode < 299 || slices.Contains([]int{404, 400, 500, 429}, res.StatusCode) { + err = json.NewDecoder(res.Body).Decode(response) if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -504,6 +506,24 @@ func (r *Submit) Preference(preference string) *Submit { return r } +// ProjectRouting Specifies a subset of projects to target for the search using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *Submit) ProjectRouting(projectrouting string) *Submit { + r.values.Set("project_routing", projectrouting) + + return r +} + // RequestCache Specify if request cache should be used for this request or not, defaults to // true // API name: request_cache @@ -515,8 +535,8 @@ func (r *Submit) RequestCache(requestcache bool) *Submit { // Routing A comma-separated list of specific routing values // API name: routing -func (r *Submit) Routing(routing string) *Submit { - r.values.Set("routing", routing) +func (r *Submit) Routing(routings ...string) *Submit { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go b/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go index 467ac39d95..d99ed4df42 100644 --- a/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go +++ b/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an autoscaling policy. // diff --git a/typedapi/autoscaling/deleteautoscalingpolicy/response.go b/typedapi/autoscaling/deleteautoscalingpolicy/response.go index d737722c1e..916b4cce60 100644 --- a/typedapi/autoscaling/deleteautoscalingpolicy/response.go +++ b/typedapi/autoscaling/deleteautoscalingpolicy/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteautoscalingpolicy // Response holds the response body struct for the package deleteautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go b/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go index 4362ca50ef..e9366a56b3 100644 --- a/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go +++ b/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the autoscaling capacity. // diff --git a/typedapi/autoscaling/getautoscalingcapacity/response.go b/typedapi/autoscaling/getautoscalingcapacity/response.go index bc2fd2a69c..515f67576f 100644 --- a/typedapi/autoscaling/getautoscalingcapacity/response.go +++ b/typedapi/autoscaling/getautoscalingcapacity/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getautoscalingcapacity @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautoscalingcapacity // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L25-L29 type Response struct { Policies map[string]types.AutoscalingDeciders `json:"policies"` } diff --git a/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go b/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go index 3f97e0cca6..4b7473162b 100644 --- a/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go +++ b/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get an autoscaling policy. // diff --git a/typedapi/autoscaling/getautoscalingpolicy/response.go b/typedapi/autoscaling/getautoscalingpolicy/response.go index aa77271b67..02e978491e 100644 --- a/typedapi/autoscaling/getautoscalingpolicy/response.go +++ b/typedapi/autoscaling/getautoscalingpolicy/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getautoscalingpolicy @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package getautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L25 type Response struct { - // Deciders Decider settings. Deciders map[string]json.RawMessage `json:"deciders"` Roles []string `json:"roles"` diff --git a/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go b/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go index b143641844..19d6e60e4f 100644 --- a/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go +++ b/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update an autoscaling policy. // diff --git a/typedapi/autoscaling/putautoscalingpolicy/request.go b/typedapi/autoscaling/putautoscalingpolicy/request.go index ffb0695f6a..f21af7459f 100644 --- a/typedapi/autoscaling/putautoscalingpolicy/request.go +++ b/typedapi/autoscaling/putautoscalingpolicy/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putautoscalingpolicy @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L25-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L25-L57 type Request = types.AutoscalingPolicy // NewRequest returns a Request diff --git a/typedapi/autoscaling/putautoscalingpolicy/response.go b/typedapi/autoscaling/putautoscalingpolicy/response.go index 2e79de4857..fd7892dc4a 100644 --- a/typedapi/autoscaling/putautoscalingpolicy/response.go +++ b/typedapi/autoscaling/putautoscalingpolicy/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putautoscalingpolicy // Response holds the response body struct for the package putautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/capabilities/capabilities.go b/typedapi/capabilities/capabilities.go index 20fd4a3f80..1c74960679 100644 --- a/typedapi/capabilities/capabilities.go +++ b/typedapi/capabilities/capabilities.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Checks if the specified combination of method, API, parameters, and arbitrary // capabilities are supported diff --git a/typedapi/cat/aliases/aliases.go b/typedapi/cat/aliases/aliases.go index ae2e35ce0f..a04a60279a 100644 --- a/typedapi/cat/aliases/aliases.go +++ b/typedapi/cat/aliases/aliases.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get aliases. // @@ -41,7 +41,10 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cataliasescolumn" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/expandwildcard" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) const ( @@ -320,10 +323,15 @@ func (r *Aliases) Name(name string) *Aliases { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Aliases) H(names ...string) *Aliases { - r.values.Set("h", strings.Join(names, ",")) +func (r *Aliases) H(cataliasescolumns ...cataliasescolumn.CatAliasesColumn) *Aliases { + tmp := []string{} + for _, item := range cataliasescolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -364,6 +372,22 @@ func (r *Aliases) MasterTimeout(duration string) *Aliases { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Aliases) Bytes(bytes bytes.Bytes) *Aliases { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -382,6 +406,19 @@ func (r *Aliases) Help(help bool) *Aliases { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Aliases) Time(time timeunit.TimeUnit) *Aliases { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Aliases) V(v bool) *Aliases { diff --git a/typedapi/cat/aliases/response.go b/typedapi/cat/aliases/response.go index 495db8f107..50560e4ea3 100644 --- a/typedapi/cat/aliases/response.go +++ b/typedapi/cat/aliases/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package aliases @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package aliases // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/aliases/CatAliasesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/aliases/CatAliasesResponse.ts#L22-L25 type Response []types.AliasesRecord diff --git a/typedapi/cat/allocation/allocation.go b/typedapi/cat/allocation/allocation.go index 5fbbc120a9..c8369dcd9d 100644 --- a/typedapi/cat/allocation/allocation.go +++ b/typedapi/cat/allocation/allocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get shard allocation information. // @@ -41,6 +41,8 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catallocationcolumn" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) const ( @@ -318,18 +320,15 @@ func (r *Allocation) NodeId(nodeid string) *Allocation { return r } -// Bytes The unit used to display byte values. -// API name: bytes -func (r *Allocation) Bytes(bytes bytes.Bytes) *Allocation { - r.values.Set("bytes", bytes.String()) - - return r -} - -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Allocation) H(names ...string) *Allocation { - r.values.Set("h", strings.Join(names, ",")) +func (r *Allocation) H(catallocationcolumns ...catallocationcolumn.CatAllocationColumn) *Allocation { + tmp := []string{} + for _, item := range catallocationcolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -363,6 +362,22 @@ func (r *Allocation) MasterTimeout(duration string) *Allocation { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Allocation) Bytes(bytes bytes.Bytes) *Allocation { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -381,6 +396,19 @@ func (r *Allocation) Help(help bool) *Allocation { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Allocation) Time(time timeunit.TimeUnit) *Allocation { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Allocation) V(v bool) *Allocation { diff --git a/typedapi/cat/allocation/response.go b/typedapi/cat/allocation/response.go index 9524228fa8..8fc9bf1b71 100644 --- a/typedapi/cat/allocation/response.go +++ b/typedapi/cat/allocation/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package allocation @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package allocation // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/allocation/CatAllocationResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/allocation/CatAllocationResponse.ts#L22-L25 type Response []types.AllocationRecord diff --git a/typedapi/cat/componenttemplates/component_templates.go b/typedapi/cat/componenttemplates/component_templates.go index 73454cf69c..08a66f51b3 100644 --- a/typedapi/cat/componenttemplates/component_templates.go +++ b/typedapi/cat/componenttemplates/component_templates.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get component templates. // @@ -43,6 +43,9 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catcomponentcolumn" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) const ( @@ -324,10 +327,15 @@ func (r *ComponentTemplates) Name(name string) *ComponentTemplates { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *ComponentTemplates) H(names ...string) *ComponentTemplates { - r.values.Set("h", strings.Join(names, ",")) +func (r *ComponentTemplates) H(catcomponentcolumns ...catcomponentcolumn.CatComponentColumn) *ComponentTemplates { + tmp := []string{} + for _, item := range catcomponentcolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -361,6 +369,22 @@ func (r *ComponentTemplates) MasterTimeout(duration string) *ComponentTemplates return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *ComponentTemplates) Bytes(bytes bytes.Bytes) *ComponentTemplates { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -379,6 +403,19 @@ func (r *ComponentTemplates) Help(help bool) *ComponentTemplates { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *ComponentTemplates) Time(time timeunit.TimeUnit) *ComponentTemplates { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *ComponentTemplates) V(v bool) *ComponentTemplates { diff --git a/typedapi/cat/componenttemplates/response.go b/typedapi/cat/componenttemplates/response.go index 405a5b20af..2ea729861e 100644 --- a/typedapi/cat/componenttemplates/response.go +++ b/typedapi/cat/componenttemplates/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package componenttemplates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package componenttemplates // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/component_templates/CatComponentTemplatesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/component_templates/CatComponentTemplatesResponse.ts#L22-L25 type Response []types.CatComponentTemplate diff --git a/typedapi/cat/count/count.go b/typedapi/cat/count/count.go index 1687fd5850..af58215879 100644 --- a/typedapi/cat/count/count.go +++ b/typedapi/cat/count/count.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a document count. // @@ -44,6 +44,9 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catcountcolumn" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) const ( @@ -328,10 +331,33 @@ func (r *Count) Index(index string) *Count { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Count) H(names ...string) *Count { - r.values.Set("h", strings.Join(names, ",")) +func (r *Count) H(catcountcolumns ...catcountcolumn.CatCountColumn) *Count { + tmp := []string{} + for _, item := range catcountcolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) + + return r +} + +// ProjectRouting Specifies a subset of projects to target for the search using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *Count) ProjectRouting(projectrouting string) *Count { + r.values.Set("project_routing", projectrouting) return r } @@ -346,6 +372,22 @@ func (r *Count) S(names ...string) *Count { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Count) Bytes(bytes bytes.Bytes) *Count { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -364,6 +406,19 @@ func (r *Count) Help(help bool) *Count { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Count) Time(time timeunit.TimeUnit) *Count { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Count) V(v bool) *Count { diff --git a/typedapi/cat/count/response.go b/typedapi/cat/count/response.go index c38a8f3c33..82bed7f828 100644 --- a/typedapi/cat/count/response.go +++ b/typedapi/cat/count/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package count @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/count/CatCountResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/count/CatCountResponse.ts#L22-L25 type Response []types.CountRecord diff --git a/typedapi/cat/fielddata/fielddata.go b/typedapi/cat/fielddata/fielddata.go index ce711390fd..42896f6895 100644 --- a/typedapi/cat/fielddata/fielddata.go +++ b/typedapi/cat/fielddata/fielddata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get field data cache information. // @@ -43,6 +43,8 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catfielddatacolumn" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) const ( @@ -322,18 +324,15 @@ func (r *Fielddata) Fields(fields string) *Fielddata { return r } -// Bytes The unit used to display byte values. -// API name: bytes -func (r *Fielddata) Bytes(bytes bytes.Bytes) *Fielddata { - r.values.Set("bytes", bytes.String()) - - return r -} - -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Fielddata) H(names ...string) *Fielddata { - r.values.Set("h", strings.Join(names, ",")) +func (r *Fielddata) H(catfielddatacolumns ...catfielddatacolumn.CatFieldDataColumn) *Fielddata { + tmp := []string{} + for _, item := range catfielddatacolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -348,6 +347,22 @@ func (r *Fielddata) S(names ...string) *Fielddata { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Fielddata) Bytes(bytes bytes.Bytes) *Fielddata { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -366,6 +381,19 @@ func (r *Fielddata) Help(help bool) *Fielddata { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Fielddata) Time(time timeunit.TimeUnit) *Fielddata { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Fielddata) V(v bool) *Fielddata { diff --git a/typedapi/cat/fielddata/response.go b/typedapi/cat/fielddata/response.go index dd7da1751e..d71387d0da 100644 --- a/typedapi/cat/fielddata/response.go +++ b/typedapi/cat/fielddata/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package fielddata @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package fielddata // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/fielddata/CatFielddataResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/fielddata/CatFielddataResponse.ts#L22-L25 type Response []types.FielddataRecord diff --git a/typedapi/cat/health/health.go b/typedapi/cat/health/health.go index 5cc9897294..fcccc1b676 100644 --- a/typedapi/cat/health/health.go +++ b/typedapi/cat/health/health.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the cluster health status. // @@ -49,6 +49,8 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cathealthcolumn" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) @@ -307,14 +309,6 @@ func (r *Health) Header(key, value string) *Health { return r } -// Time The unit used to display time values. -// API name: time -func (r *Health) Time(time timeunit.TimeUnit) *Health { - r.values.Set("time", time.String()) - - return r -} - // Ts If true, returns `HH:MM:SS` and Unix epoch timestamps. // API name: ts func (r *Health) Ts(ts bool) *Health { @@ -323,10 +317,15 @@ func (r *Health) Ts(ts bool) *Health { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Health) H(names ...string) *Health { - r.values.Set("h", strings.Join(names, ",")) +func (r *Health) H(cathealthcolumns ...cathealthcolumn.CatHealthColumn) *Health { + tmp := []string{} + for _, item := range cathealthcolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -341,6 +340,22 @@ func (r *Health) S(names ...string) *Health { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Health) Bytes(bytes bytes.Bytes) *Health { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -359,6 +374,19 @@ func (r *Health) Help(help bool) *Health { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Health) Time(time timeunit.TimeUnit) *Health { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Health) V(v bool) *Health { diff --git a/typedapi/cat/health/response.go b/typedapi/cat/health/response.go index 5b1b698df4..2f8add837b 100644 --- a/typedapi/cat/health/response.go +++ b/typedapi/cat/health/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package health @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package health // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/health/CatHealthResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/health/CatHealthResponse.ts#L22-L25 type Response []types.HealthRecord diff --git a/typedapi/cat/help/help.go b/typedapi/cat/help/help.go index 2419d1a3b1..c2f283eb08 100644 --- a/typedapi/cat/help/help.go +++ b/typedapi/cat/help/help.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get CAT help. // diff --git a/typedapi/cat/help/response.go b/typedapi/cat/help/response.go index cb41d0486b..c0dbb3c3ca 100644 --- a/typedapi/cat/help/response.go +++ b/typedapi/cat/help/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package help // Response holds the response body struct for the package help // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/help/CatHelpResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/help/CatHelpResponse.ts#L20-L25 type Response struct { } diff --git a/typedapi/cat/indices/indices.go b/typedapi/cat/indices/indices.go index e8d2bc7c34..ff5b242e33 100644 --- a/typedapi/cat/indices/indices.go +++ b/typedapi/cat/indices/indices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get index information. // @@ -57,6 +57,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catindicescolumn" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/expandwildcard" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/healthstatus" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" @@ -355,14 +356,6 @@ func (r *Indices) Index(index string) *Indices { return r } -// Bytes The unit used to display byte values. -// API name: bytes -func (r *Indices) Bytes(bytes bytes.Bytes) *Indices { - r.values.Set("bytes", bytes.String()) - - return r -} - // ExpandWildcards The type of index that wildcard patterns can match. // API name: expand_wildcards func (r *Indices) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Indices { @@ -401,14 +394,6 @@ func (r *Indices) Pri(pri bool) *Indices { return r } -// Time The unit used to display time values. -// API name: time -func (r *Indices) Time(time timeunit.TimeUnit) *Indices { - r.values.Set("time", time.String()) - - return r -} - // MasterTimeout Period to wait for a connection to the master node. // API name: master_timeout func (r *Indices) MasterTimeout(duration string) *Indices { @@ -417,10 +402,15 @@ func (r *Indices) MasterTimeout(duration string) *Indices { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Indices) H(names ...string) *Indices { - r.values.Set("h", strings.Join(names, ",")) +func (r *Indices) H(catindicescolumns ...catindicescolumn.CatIndicesColumn) *Indices { + tmp := []string{} + for _, item := range catindicescolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -435,6 +425,22 @@ func (r *Indices) S(names ...string) *Indices { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Indices) Bytes(bytes bytes.Bytes) *Indices { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -453,6 +459,19 @@ func (r *Indices) Help(help bool) *Indices { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Indices) Time(time timeunit.TimeUnit) *Indices { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Indices) V(v bool) *Indices { diff --git a/typedapi/cat/indices/response.go b/typedapi/cat/indices/response.go index e9eeab15c3..8202d8bb8f 100644 --- a/typedapi/cat/indices/response.go +++ b/typedapi/cat/indices/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package indices @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package indices // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/indices/CatIndicesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/indices/CatIndicesResponse.ts#L22-L25 type Response []types.IndicesRecord diff --git a/typedapi/cat/master/master.go b/typedapi/cat/master/master.go index 19253812ce..96f2b7752c 100644 --- a/typedapi/cat/master/master.go +++ b/typedapi/cat/master/master.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get master node information. // @@ -41,6 +41,9 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catmastercolumn" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -290,10 +293,15 @@ func (r *Master) Header(key, value string) *Master { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Master) H(names ...string) *Master { - r.values.Set("h", strings.Join(names, ",")) +func (r *Master) H(catmastercolumns ...catmastercolumn.CatMasterColumn) *Master { + tmp := []string{} + for _, item := range catmastercolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -327,6 +335,22 @@ func (r *Master) MasterTimeout(duration string) *Master { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Master) Bytes(bytes bytes.Bytes) *Master { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -345,6 +369,19 @@ func (r *Master) Help(help bool) *Master { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Master) Time(time timeunit.TimeUnit) *Master { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Master) V(v bool) *Master { diff --git a/typedapi/cat/master/response.go b/typedapi/cat/master/response.go index d1743ba292..f2303fd6a3 100644 --- a/typedapi/cat/master/response.go +++ b/typedapi/cat/master/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package master @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package master // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/master/CatMasterResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/master/CatMasterResponse.ts#L22-L25 type Response []types.MasterRecord diff --git a/typedapi/cat/mldatafeeds/ml_datafeeds.go b/typedapi/cat/mldatafeeds/ml_datafeeds.go index 10636976c2..603cd285ad 100644 --- a/typedapi/cat/mldatafeeds/ml_datafeeds.go +++ b/typedapi/cat/mldatafeeds/ml_datafeeds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get datafeeds. // @@ -44,6 +44,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catdatafeedcolumn" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) @@ -373,10 +374,18 @@ func (r *MlDatafeeds) S(catdatafeedcolumns ...catdatafeedcolumn.CatDatafeedColum return r } -// Time The unit used to display time values. -// API name: time -func (r *MlDatafeeds) Time(time timeunit.TimeUnit) *MlDatafeeds { - r.values.Set("time", time.String()) +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *MlDatafeeds) Bytes(bytes bytes.Bytes) *MlDatafeeds { + r.values.Set("bytes", bytes.String()) return r } @@ -399,6 +408,19 @@ func (r *MlDatafeeds) Help(help bool) *MlDatafeeds { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *MlDatafeeds) Time(time timeunit.TimeUnit) *MlDatafeeds { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *MlDatafeeds) V(v bool) *MlDatafeeds { diff --git a/typedapi/cat/mldatafeeds/response.go b/typedapi/cat/mldatafeeds/response.go index d98e529ba1..30e337cd02 100644 --- a/typedapi/cat/mldatafeeds/response.go +++ b/typedapi/cat/mldatafeeds/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mldatafeeds @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mldatafeeds // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L25 type Response []types.DatafeedsRecord diff --git a/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go b/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go index cefbceb0aa..ef3e74e26f 100644 --- a/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go +++ b/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get data frame analytics jobs. // @@ -329,8 +329,8 @@ func (r *MlDataFrameAnalytics) Id(id string) *MlDataFrameAnalytics { return r } -// AllowNoMatch Whether to ignore if a wildcard expression matches no configs. (This includes -// `_all` string or when no configs have been specified) +// AllowNoMatch Whether to ignore if a wildcard expression matches no configs. +// (This includes `_all` string or when no configs have been specified.) // API name: allow_no_match func (r *MlDataFrameAnalytics) AllowNoMatch(allownomatch bool) *MlDataFrameAnalytics { r.values.Set("allow_no_match", strconv.FormatBool(allownomatch)) @@ -338,14 +338,6 @@ func (r *MlDataFrameAnalytics) AllowNoMatch(allownomatch bool) *MlDataFrameAnaly return r } -// Bytes The unit in which to display byte values -// API name: bytes -func (r *MlDataFrameAnalytics) Bytes(bytes bytes.Bytes) *MlDataFrameAnalytics { - r.values.Set("bytes", bytes.String()) - - return r -} - // H Comma-separated list of column names to display. // API name: h func (r *MlDataFrameAnalytics) H(catdfacolumns ...catdfacolumn.CatDfaColumn) *MlDataFrameAnalytics { @@ -371,10 +363,18 @@ func (r *MlDataFrameAnalytics) S(catdfacolumns ...catdfacolumn.CatDfaColumn) *Ml return r } -// Time Unit used to display time values. -// API name: time -func (r *MlDataFrameAnalytics) Time(time timeunit.TimeUnit) *MlDataFrameAnalytics { - r.values.Set("time", time.String()) +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *MlDataFrameAnalytics) Bytes(bytes bytes.Bytes) *MlDataFrameAnalytics { + r.values.Set("bytes", bytes.String()) return r } @@ -397,6 +397,19 @@ func (r *MlDataFrameAnalytics) Help(help bool) *MlDataFrameAnalytics { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *MlDataFrameAnalytics) Time(time timeunit.TimeUnit) *MlDataFrameAnalytics { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *MlDataFrameAnalytics) V(v bool) *MlDataFrameAnalytics { diff --git a/typedapi/cat/mldataframeanalytics/response.go b/typedapi/cat/mldataframeanalytics/response.go index 38fe27edfa..eb16aa3542 100644 --- a/typedapi/cat/mldataframeanalytics/response.go +++ b/typedapi/cat/mldataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mldataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mldataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L25 type Response []types.DataFrameAnalyticsRecord diff --git a/typedapi/cat/mljobs/ml_jobs.go b/typedapi/cat/mljobs/ml_jobs.go index 1eccb4b82f..d545edfdae 100644 --- a/typedapi/cat/mljobs/ml_jobs.go +++ b/typedapi/cat/mljobs/ml_jobs.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get anomaly detection jobs. // @@ -349,19 +349,11 @@ func (r *MlJobs) AllowNoMatch(allownomatch bool) *MlJobs { return r } -// Bytes The unit used to display byte values. -// API name: bytes -func (r *MlJobs) Bytes(bytes bytes.Bytes) *MlJobs { - r.values.Set("bytes", bytes.String()) - - return r -} - // H Comma-separated list of column names to display. // API name: h -func (r *MlJobs) H(catanonalydetectorcolumns ...catanomalydetectorcolumn.CatAnomalyDetectorColumn) *MlJobs { +func (r *MlJobs) H(catanomalydetectorcolumns ...catanomalydetectorcolumn.CatAnomalyDetectorColumn) *MlJobs { tmp := []string{} - for _, item := range catanonalydetectorcolumns { + for _, item := range catanomalydetectorcolumns { tmp = append(tmp, item.String()) } r.values.Set("expand_wildcards", strings.Join(tmp, ",")) @@ -372,9 +364,9 @@ func (r *MlJobs) H(catanonalydetectorcolumns ...catanomalydetectorcolumn.CatAnom // S Comma-separated list of column names or column aliases used to sort the // response. // API name: s -func (r *MlJobs) S(catanonalydetectorcolumns ...catanomalydetectorcolumn.CatAnomalyDetectorColumn) *MlJobs { +func (r *MlJobs) S(catanomalydetectorcolumns ...catanomalydetectorcolumn.CatAnomalyDetectorColumn) *MlJobs { tmp := []string{} - for _, item := range catanonalydetectorcolumns { + for _, item := range catanomalydetectorcolumns { tmp = append(tmp, item.String()) } r.values.Set("expand_wildcards", strings.Join(tmp, ",")) @@ -382,10 +374,18 @@ func (r *MlJobs) S(catanonalydetectorcolumns ...catanomalydetectorcolumn.CatAnom return r } -// Time The unit used to display time values. -// API name: time -func (r *MlJobs) Time(time timeunit.TimeUnit) *MlJobs { - r.values.Set("time", time.String()) +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *MlJobs) Bytes(bytes bytes.Bytes) *MlJobs { + r.values.Set("bytes", bytes.String()) return r } @@ -408,6 +408,19 @@ func (r *MlJobs) Help(help bool) *MlJobs { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *MlJobs) Time(time timeunit.TimeUnit) *MlJobs { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *MlJobs) V(v bool) *MlJobs { diff --git a/typedapi/cat/mljobs/response.go b/typedapi/cat/mljobs/response.go index c867b37c1c..a97a084272 100644 --- a/typedapi/cat/mljobs/response.go +++ b/typedapi/cat/mljobs/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mljobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mljobs // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_jobs/CatJobsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/ml_jobs/CatJobsResponse.ts#L22-L25 type Response []types.JobsRecord diff --git a/typedapi/cat/mltrainedmodels/ml_trained_models.go b/typedapi/cat/mltrainedmodels/ml_trained_models.go index 5a064a542d..a8f7016df0 100644 --- a/typedapi/cat/mltrainedmodels/ml_trained_models.go +++ b/typedapi/cat/mltrainedmodels/ml_trained_models.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get trained models. // @@ -338,14 +338,6 @@ func (r *MlTrainedModels) AllowNoMatch(allownomatch bool) *MlTrainedModels { return r } -// Bytes The unit used to display byte values. -// API name: bytes -func (r *MlTrainedModels) Bytes(bytes bytes.Bytes) *MlTrainedModels { - r.values.Set("bytes", bytes.String()) - - return r -} - // H A comma-separated list of column names to display. // API name: h func (r *MlTrainedModels) H(cattrainedmodelscolumns ...cattrainedmodelscolumn.CatTrainedModelsColumn) *MlTrainedModels { @@ -386,10 +378,18 @@ func (r *MlTrainedModels) Size(size int) *MlTrainedModels { return r } -// Time Unit used to display time values. -// API name: time -func (r *MlTrainedModels) Time(time timeunit.TimeUnit) *MlTrainedModels { - r.values.Set("time", time.String()) +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *MlTrainedModels) Bytes(bytes bytes.Bytes) *MlTrainedModels { + r.values.Set("bytes", bytes.String()) return r } @@ -412,6 +412,19 @@ func (r *MlTrainedModels) Help(help bool) *MlTrainedModels { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *MlTrainedModels) Time(time timeunit.TimeUnit) *MlTrainedModels { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *MlTrainedModels) V(v bool) *MlTrainedModels { diff --git a/typedapi/cat/mltrainedmodels/response.go b/typedapi/cat/mltrainedmodels/response.go index 60e83f84ef..fd44129f4c 100644 --- a/typedapi/cat/mltrainedmodels/response.go +++ b/typedapi/cat/mltrainedmodels/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mltrainedmodels @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mltrainedmodels // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L25 type Response []types.TrainedModelsRecord diff --git a/typedapi/cat/nodeattrs/nodeattrs.go b/typedapi/cat/nodeattrs/nodeattrs.go index f7edae0028..c3966d9543 100644 --- a/typedapi/cat/nodeattrs/nodeattrs.go +++ b/typedapi/cat/nodeattrs/nodeattrs.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get node attribute information. // @@ -39,6 +39,9 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catnodeattrscolumn" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -286,10 +289,15 @@ func (r *Nodeattrs) Header(key, value string) *Nodeattrs { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Nodeattrs) H(names ...string) *Nodeattrs { - r.values.Set("h", strings.Join(names, ",")) +func (r *Nodeattrs) H(catnodeattrscolumns ...catnodeattrscolumn.CatNodeattrsColumn) *Nodeattrs { + tmp := []string{} + for _, item := range catnodeattrscolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -323,6 +331,22 @@ func (r *Nodeattrs) MasterTimeout(duration string) *Nodeattrs { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Nodeattrs) Bytes(bytes bytes.Bytes) *Nodeattrs { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -341,6 +365,19 @@ func (r *Nodeattrs) Help(help bool) *Nodeattrs { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Nodeattrs) Time(time timeunit.TimeUnit) *Nodeattrs { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Nodeattrs) V(v bool) *Nodeattrs { diff --git a/typedapi/cat/nodeattrs/response.go b/typedapi/cat/nodeattrs/response.go index 55c3e84021..d604d8890f 100644 --- a/typedapi/cat/nodeattrs/response.go +++ b/typedapi/cat/nodeattrs/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package nodeattrs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package nodeattrs // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L25 type Response []types.NodeAttributesRecord diff --git a/typedapi/cat/nodes/nodes.go b/typedapi/cat/nodes/nodes.go index 4fac136389..d2e0340e81 100644 --- a/typedapi/cat/nodes/nodes.go +++ b/typedapi/cat/nodes/nodes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get node information. // @@ -289,18 +289,10 @@ func (r *Nodes) Header(key, value string) *Nodes { return r } -// Bytes The unit used to display byte values. -// API name: bytes -func (r *Nodes) Bytes(bytes bytes.Bytes) *Nodes { - r.values.Set("bytes", bytes.String()) - - return r -} - // FullId If `true`, return the full node ID. If `false`, return the shortened node ID. // API name: full_id -func (r *Nodes) FullId(fullid string) *Nodes { - r.values.Set("full_id", fullid) +func (r *Nodes) FullId(fullid bool) *Nodes { + r.values.Set("full_id", strconv.FormatBool(fullid)) return r } @@ -346,10 +338,18 @@ func (r *Nodes) MasterTimeout(duration string) *Nodes { return r } -// Time The unit used to display time values. -// API name: time -func (r *Nodes) Time(time timeunit.TimeUnit) *Nodes { - r.values.Set("time", time.String()) +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Nodes) Bytes(bytes bytes.Bytes) *Nodes { + r.values.Set("bytes", bytes.String()) return r } @@ -372,6 +372,19 @@ func (r *Nodes) Help(help bool) *Nodes { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Nodes) Time(time timeunit.TimeUnit) *Nodes { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Nodes) V(v bool) *Nodes { diff --git a/typedapi/cat/nodes/response.go b/typedapi/cat/nodes/response.go index ab9918efaa..7aca20c0b0 100644 --- a/typedapi/cat/nodes/response.go +++ b/typedapi/cat/nodes/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package nodes @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package nodes // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/nodes/CatNodesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/nodes/CatNodesResponse.ts#L22-L25 type Response []types.NodesRecord diff --git a/typedapi/cat/pendingtasks/pending_tasks.go b/typedapi/cat/pendingtasks/pending_tasks.go index a389de9bc8..348a1a6c11 100644 --- a/typedapi/cat/pendingtasks/pending_tasks.go +++ b/typedapi/cat/pendingtasks/pending_tasks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get pending task information. // @@ -39,6 +39,8 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catpendingtaskscolumn" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) @@ -287,10 +289,15 @@ func (r *PendingTasks) Header(key, value string) *PendingTasks { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *PendingTasks) H(names ...string) *PendingTasks { - r.values.Set("h", strings.Join(names, ",")) +func (r *PendingTasks) H(catpendingtaskscolumns ...catpendingtaskscolumn.CatPendingTasksColumn) *PendingTasks { + tmp := []string{} + for _, item := range catpendingtaskscolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -324,10 +331,18 @@ func (r *PendingTasks) MasterTimeout(duration string) *PendingTasks { return r } -// Time Unit used to display time values. -// API name: time -func (r *PendingTasks) Time(time timeunit.TimeUnit) *PendingTasks { - r.values.Set("time", time.String()) +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *PendingTasks) Bytes(bytes bytes.Bytes) *PendingTasks { + r.values.Set("bytes", bytes.String()) return r } @@ -350,6 +365,19 @@ func (r *PendingTasks) Help(help bool) *PendingTasks { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *PendingTasks) Time(time timeunit.TimeUnit) *PendingTasks { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *PendingTasks) V(v bool) *PendingTasks { diff --git a/typedapi/cat/pendingtasks/response.go b/typedapi/cat/pendingtasks/response.go index 6e8406d045..b912de00fc 100644 --- a/typedapi/cat/pendingtasks/response.go +++ b/typedapi/cat/pendingtasks/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package pendingtasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package pendingtasks // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/pending_tasks/CatPendingTasksResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/pending_tasks/CatPendingTasksResponse.ts#L22-L25 type Response []types.PendingTasksRecord diff --git a/typedapi/cat/plugins/plugins.go b/typedapi/cat/plugins/plugins.go index ffd6582766..2bb219a260 100644 --- a/typedapi/cat/plugins/plugins.go +++ b/typedapi/cat/plugins/plugins.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get plugin information. // @@ -39,6 +39,9 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catpluginscolumn" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -286,10 +289,15 @@ func (r *Plugins) Header(key, value string) *Plugins { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Plugins) H(names ...string) *Plugins { - r.values.Set("h", strings.Join(names, ",")) +func (r *Plugins) H(catpluginscolumns ...catpluginscolumn.CatPluginsColumn) *Plugins { + tmp := []string{} + for _, item := range catpluginscolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -331,6 +339,22 @@ func (r *Plugins) MasterTimeout(duration string) *Plugins { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Plugins) Bytes(bytes bytes.Bytes) *Plugins { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -349,6 +373,19 @@ func (r *Plugins) Help(help bool) *Plugins { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Plugins) Time(time timeunit.TimeUnit) *Plugins { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Plugins) V(v bool) *Plugins { diff --git a/typedapi/cat/plugins/response.go b/typedapi/cat/plugins/response.go index 44baa3611d..8b7389f79b 100644 --- a/typedapi/cat/plugins/response.go +++ b/typedapi/cat/plugins/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package plugins @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package plugins // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/plugins/CatPluginsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/plugins/CatPluginsResponse.ts#L22-L25 type Response []types.PluginsRecord diff --git a/typedapi/cat/recovery/recovery.go b/typedapi/cat/recovery/recovery.go index 28f5c48379..49a2aad19d 100644 --- a/typedapi/cat/recovery/recovery.go +++ b/typedapi/cat/recovery/recovery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get shard recovery information. // @@ -340,14 +340,6 @@ func (r *Recovery) ActiveOnly(activeonly bool) *Recovery { return r } -// Bytes The unit used to display byte values. -// API name: bytes -func (r *Recovery) Bytes(bytes bytes.Bytes) *Recovery { - r.values.Set("bytes", bytes.String()) - - return r -} - // Detailed If `true`, the response includes detailed information about shard recoveries. // API name: detailed func (r *Recovery) Detailed(detailed bool) *Recovery { @@ -380,10 +372,18 @@ func (r *Recovery) S(names ...string) *Recovery { return r } -// Time The unit used to display time values. -// API name: time -func (r *Recovery) Time(time timeunit.TimeUnit) *Recovery { - r.values.Set("time", time.String()) +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Recovery) Bytes(bytes bytes.Bytes) *Recovery { + r.values.Set("bytes", bytes.String()) return r } @@ -406,6 +406,19 @@ func (r *Recovery) Help(help bool) *Recovery { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Recovery) Time(time timeunit.TimeUnit) *Recovery { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Recovery) V(v bool) *Recovery { diff --git a/typedapi/cat/recovery/response.go b/typedapi/cat/recovery/response.go index 49ede854ea..63fc4ddac2 100644 --- a/typedapi/cat/recovery/response.go +++ b/typedapi/cat/recovery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package recovery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package recovery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/recovery/CatRecoveryResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/recovery/CatRecoveryResponse.ts#L22-L25 type Response []types.RecoveryRecord diff --git a/typedapi/cat/repositories/repositories.go b/typedapi/cat/repositories/repositories.go index bb141a22e1..9dc538b5ce 100644 --- a/typedapi/cat/repositories/repositories.go +++ b/typedapi/cat/repositories/repositories.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get snapshot repository information. // @@ -39,6 +39,8 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -323,6 +325,22 @@ func (r *Repositories) MasterTimeout(duration string) *Repositories { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Repositories) Bytes(bytes bytes.Bytes) *Repositories { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -341,6 +359,19 @@ func (r *Repositories) Help(help bool) *Repositories { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Repositories) Time(time timeunit.TimeUnit) *Repositories { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Repositories) V(v bool) *Repositories { diff --git a/typedapi/cat/repositories/response.go b/typedapi/cat/repositories/response.go index 41aedf69d9..5080f7168c 100644 --- a/typedapi/cat/repositories/response.go +++ b/typedapi/cat/repositories/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package repositories @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package repositories // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/repositories/CatRepositoriesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/repositories/CatRepositoriesResponse.ts#L22-L25 type Response []types.RepositoriesRecord diff --git a/typedapi/cat/segments/response.go b/typedapi/cat/segments/response.go index ea37b81479..db8f1ae256 100644 --- a/typedapi/cat/segments/response.go +++ b/typedapi/cat/segments/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package segments @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package segments // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/segments/CatSegmentsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/segments/CatSegmentsResponse.ts#L22-L25 type Response []types.SegmentsRecord diff --git a/typedapi/cat/segments/segments.go b/typedapi/cat/segments/segments.go index 5d9a267cbe..6635eb50e3 100644 --- a/typedapi/cat/segments/segments.go +++ b/typedapi/cat/segments/segments.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get segment information. // @@ -42,6 +42,8 @@ import ( "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catsegmentscolumn" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/expandwildcard" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) const ( @@ -322,14 +324,6 @@ func (r *Segments) Index(index string) *Segments { return r } -// Bytes The unit used to display byte values. -// API name: bytes -func (r *Segments) Bytes(bytes bytes.Bytes) *Segments { - r.values.Set("bytes", bytes.String()) - - return r -} - // H A comma-separated list of columns names to display. // It supports simple wildcards. // API name: h @@ -373,6 +367,77 @@ func (r *Segments) MasterTimeout(duration string) *Segments { return r } +// ExpandWildcards Type of index that wildcard expressions can match. If the request can target +// data streams, this argument +// determines whether wildcard expressions match hidden data streams. Supports +// comma-separated values, +// such as open,hidden. +// API name: expand_wildcards +func (r *Segments) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Segments { + tmp := []string{} + for _, item := range expandwildcards { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) + + return r +} + +// AllowNoIndices If false, the request returns an error if any wildcard expression, index +// alias, or _all value targets only +// missing or closed indices. This behavior applies even if the request targets +// other open indices. For example, +// a request targeting foo*,bar* returns an error if an index starts with foo +// but no index starts with bar. +// API name: allow_no_indices +func (r *Segments) AllowNoIndices(allownoindices bool) *Segments { + r.values.Set("allow_no_indices", strconv.FormatBool(allownoindices)) + + return r +} + +// IgnoreThrottled If true, concrete, expanded or aliased indices are ignored when frozen. +// API name: ignore_throttled +func (r *Segments) IgnoreThrottled(ignorethrottled bool) *Segments { + r.values.Set("ignore_throttled", strconv.FormatBool(ignorethrottled)) + + return r +} + +// IgnoreUnavailable If true, missing or closed indices are not included in the response. +// API name: ignore_unavailable +func (r *Segments) IgnoreUnavailable(ignoreunavailable bool) *Segments { + r.values.Set("ignore_unavailable", strconv.FormatBool(ignoreunavailable)) + + return r +} + +// AllowClosed If true, allow closed indices to be returned in the response otherwise if +// false, keep the legacy behaviour +// of throwing an exception if index pattern matches closed indices +// API name: allow_closed +func (r *Segments) AllowClosed(allowclosed bool) *Segments { + r.values.Set("allow_closed", strconv.FormatBool(allowclosed)) + + return r +} + +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Segments) Bytes(bytes bytes.Bytes) *Segments { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -391,6 +456,19 @@ func (r *Segments) Help(help bool) *Segments { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Segments) Time(time timeunit.TimeUnit) *Segments { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Segments) V(v bool) *Segments { diff --git a/typedapi/cat/shards/response.go b/typedapi/cat/shards/response.go index 0c00c4dce1..704c521428 100644 --- a/typedapi/cat/shards/response.go +++ b/typedapi/cat/shards/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package shards @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package shards // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/shards/CatShardsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/shards/CatShardsResponse.ts#L22-L25 type Response []types.ShardsRecord diff --git a/typedapi/cat/shards/shards.go b/typedapi/cat/shards/shards.go index bd490d8ad4..90ac98e4d9 100644 --- a/typedapi/cat/shards/shards.go +++ b/typedapi/cat/shards/shards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get shard information. // @@ -321,14 +321,6 @@ func (r *Shards) Index(index string) *Shards { return r } -// Bytes The unit used to display byte values. -// API name: bytes -func (r *Shards) Bytes(bytes bytes.Bytes) *Shards { - r.values.Set("bytes", bytes.String()) - - return r -} - // H List of columns to appear in the response. Supports simple wildcards. // API name: h func (r *Shards) H(catshardcolumns ...catshardcolumn.CatShardColumn) *Shards { @@ -360,10 +352,18 @@ func (r *Shards) MasterTimeout(duration string) *Shards { return r } -// Time The unit used to display time values. -// API name: time -func (r *Shards) Time(time timeunit.TimeUnit) *Shards { - r.values.Set("time", time.String()) +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Shards) Bytes(bytes bytes.Bytes) *Shards { + r.values.Set("bytes", bytes.String()) return r } @@ -386,6 +386,19 @@ func (r *Shards) Help(help bool) *Shards { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Shards) Time(time timeunit.TimeUnit) *Shards { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Shards) V(v bool) *Shards { diff --git a/typedapi/cat/snapshots/response.go b/typedapi/cat/snapshots/response.go index 5c8be037e5..7f7d3e4cce 100644 --- a/typedapi/cat/snapshots/response.go +++ b/typedapi/cat/snapshots/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package snapshots @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package snapshots // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/snapshots/CatSnapshotsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/snapshots/CatSnapshotsResponse.ts#L22-L25 type Response []types.SnapshotsRecord diff --git a/typedapi/cat/snapshots/snapshots.go b/typedapi/cat/snapshots/snapshots.go index 5bb6f0ca74..b50f29c099 100644 --- a/typedapi/cat/snapshots/snapshots.go +++ b/typedapi/cat/snapshots/snapshots.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get snapshot information. // @@ -40,6 +40,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catsnapshotscolumn" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) @@ -361,10 +362,18 @@ func (r *Snapshots) MasterTimeout(duration string) *Snapshots { return r } -// Time Unit used to display time values. -// API name: time -func (r *Snapshots) Time(time timeunit.TimeUnit) *Snapshots { - r.values.Set("time", time.String()) +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Snapshots) Bytes(bytes bytes.Bytes) *Snapshots { + r.values.Set("bytes", bytes.String()) return r } @@ -387,6 +396,19 @@ func (r *Snapshots) Help(help bool) *Snapshots { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Snapshots) Time(time timeunit.TimeUnit) *Snapshots { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Snapshots) V(v bool) *Snapshots { diff --git a/typedapi/cat/tasks/response.go b/typedapi/cat/tasks/response.go index 1f9f06e853..c890783696 100644 --- a/typedapi/cat/tasks/response.go +++ b/typedapi/cat/tasks/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package tasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package tasks // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/tasks/CatTasksResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/tasks/CatTasksResponse.ts#L22-L25 type Response []types.TasksRecord diff --git a/typedapi/cat/tasks/tasks.go b/typedapi/cat/tasks/tasks.go index 8ed00771e0..cc8d0e8315 100644 --- a/typedapi/cat/tasks/tasks.go +++ b/typedapi/cat/tasks/tasks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get task information. // @@ -39,6 +39,8 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cattaskscolumn" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) @@ -327,10 +329,15 @@ func (r *Tasks) ParentTaskId(parenttaskid string) *Tasks { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Tasks) H(names ...string) *Tasks { - r.values.Set("h", strings.Join(names, ",")) +func (r *Tasks) H(cattaskscolumns ...cattaskscolumn.CatTasksColumn) *Tasks { + tmp := []string{} + for _, item := range cattaskscolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -345,14 +352,6 @@ func (r *Tasks) S(names ...string) *Tasks { return r } -// Time Unit used to display time values. -// API name: time -func (r *Tasks) Time(time timeunit.TimeUnit) *Tasks { - r.values.Set("time", time.String()) - - return r -} - // Timeout Period to wait for a response. // If no response is received before the timeout expires, the request fails and // returns an error. @@ -371,6 +370,22 @@ func (r *Tasks) WaitForCompletion(waitforcompletion bool) *Tasks { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Tasks) Bytes(bytes bytes.Bytes) *Tasks { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -389,6 +404,19 @@ func (r *Tasks) Help(help bool) *Tasks { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Tasks) Time(time timeunit.TimeUnit) *Tasks { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Tasks) V(v bool) *Tasks { diff --git a/typedapi/cat/templates/response.go b/typedapi/cat/templates/response.go index ee7ea0d5e4..aa50139864 100644 --- a/typedapi/cat/templates/response.go +++ b/typedapi/cat/templates/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package templates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package templates // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/templates/CatTemplatesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/templates/CatTemplatesResponse.ts#L22-L25 type Response []types.TemplatesRecord diff --git a/typedapi/cat/templates/templates.go b/typedapi/cat/templates/templates.go index eeb7415b8d..672c4ae7cf 100644 --- a/typedapi/cat/templates/templates.go +++ b/typedapi/cat/templates/templates.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get index template information. // @@ -41,6 +41,9 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cattemplatescolumn" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) const ( @@ -319,10 +322,15 @@ func (r *Templates) Name(name string) *Templates { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. It supports simple +// wildcards. // API name: h -func (r *Templates) H(names ...string) *Templates { - r.values.Set("h", strings.Join(names, ",")) +func (r *Templates) H(cattemplatescolumns ...cattemplatescolumn.CatTemplatesColumn) *Templates { + tmp := []string{} + for _, item := range cattemplatescolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } @@ -356,6 +364,22 @@ func (r *Templates) MasterTimeout(duration string) *Templates { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Templates) Bytes(bytes bytes.Bytes) *Templates { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -374,6 +398,19 @@ func (r *Templates) Help(help bool) *Templates { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Templates) Time(time timeunit.TimeUnit) *Templates { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Templates) V(v bool) *Templates { diff --git a/typedapi/cat/threadpool/response.go b/typedapi/cat/threadpool/response.go index fbfaa5a810..483068d87d 100644 --- a/typedapi/cat/threadpool/response.go +++ b/typedapi/cat/threadpool/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package threadpool @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package threadpool // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/thread_pool/CatThreadPoolResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/thread_pool/CatThreadPoolResponse.ts#L22-L25 type Response []types.ThreadPoolRecord diff --git a/typedapi/cat/threadpool/thread_pool.go b/typedapi/cat/threadpool/thread_pool.go index 4f963dceac..2f5c9c4de9 100644 --- a/typedapi/cat/threadpool/thread_pool.go +++ b/typedapi/cat/threadpool/thread_pool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get thread pool statistics. // @@ -41,6 +41,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catthreadpoolcolumn" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) @@ -344,14 +345,6 @@ func (r *ThreadPool) S(names ...string) *ThreadPool { return r } -// Time The unit used to display time values. -// API name: time -func (r *ThreadPool) Time(time timeunit.TimeUnit) *ThreadPool { - r.values.Set("time", time.String()) - - return r -} - // Local If `true`, the request computes the list of selected nodes from the // local cluster state. If `false` the list of selected nodes are computed // from the cluster state of the master node. In both cases the coordinating @@ -371,6 +364,22 @@ func (r *ThreadPool) MasterTimeout(duration string) *ThreadPool { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *ThreadPool) Bytes(bytes bytes.Bytes) *ThreadPool { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -389,6 +398,19 @@ func (r *ThreadPool) Help(help bool) *ThreadPool { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *ThreadPool) Time(time timeunit.TimeUnit) *ThreadPool { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *ThreadPool) V(v bool) *ThreadPool { diff --git a/typedapi/cat/transforms/response.go b/typedapi/cat/transforms/response.go index 49686677c5..d22b908d31 100644 --- a/typedapi/cat/transforms/response.go +++ b/typedapi/cat/transforms/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package transforms @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package transforms // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/transforms/CatTransformsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/transforms/CatTransformsResponse.ts#L22-L25 type Response []types.TransformsRecord diff --git a/typedapi/cat/transforms/transforms.go b/typedapi/cat/transforms/transforms.go index 92560bee31..4d4f3660f8 100644 --- a/typedapi/cat/transforms/transforms.go +++ b/typedapi/cat/transforms/transforms.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get transform information. // @@ -40,6 +40,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cattransformcolumn" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) @@ -368,14 +369,6 @@ func (r *Transforms) S(cattransformcolumns ...cattransformcolumn.CatTransformCol return r } -// Time The unit used to display time values. -// API name: time -func (r *Transforms) Time(time timeunit.TimeUnit) *Transforms { - r.values.Set("time", time.String()) - - return r -} - // Size The maximum number of transforms to obtain. // API name: size func (r *Transforms) Size(size int) *Transforms { @@ -384,6 +377,22 @@ func (r *Transforms) Size(size int) *Transforms { return r } +// Bytes Sets the units for columns that contain a byte-size value. +// Note that byte-size value units work in terms of powers of 1024. For instance +// `1kb` means 1024 bytes, not 1000 bytes. +// If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, +// or `gb`, chosen such that the numeric value of the column is as small as +// possible whilst still being at least `1.0`. +// If given, byte-size values are rendered as an integer with no suffix, +// representing the value of the column in the chosen unit. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: bytes +func (r *Transforms) Bytes(bytes bytes.Bytes) *Transforms { + r.values.Set("bytes", bytes.String()) + + return r +} + // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format @@ -402,6 +411,19 @@ func (r *Transforms) Help(help bool) *Transforms { return r } +// Time Sets the units for columns that contain a time duration. +// If omitted, time duration values are rendered with a suffix such as `ms`, +// `s`, `m` or `h`, chosen such that the numeric value of the column is as small +// as possible whilst still being at least `1.0`. +// If given, time duration values are rendered as an integer with no suffix. +// Values that are not an exact multiple of the chosen unit are rounded down. +// API name: time +func (r *Transforms) Time(time timeunit.TimeUnit) *Transforms { + r.values.Set("time", time.String()) + + return r +} + // V When set to `true` will enable verbose output. // API name: v func (r *Transforms) V(v bool) *Transforms { diff --git a/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go b/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go index a16128da78..1cbe03d06f 100644 --- a/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go +++ b/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete auto-follow patterns. // diff --git a/typedapi/ccr/deleteautofollowpattern/response.go b/typedapi/ccr/deleteautofollowpattern/response.go index 2b513ee51c..c9e16d1449 100644 --- a/typedapi/ccr/deleteautofollowpattern/response.go +++ b/typedapi/ccr/deleteautofollowpattern/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteautofollowpattern // Response holds the response body struct for the package deleteautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/delete_auto_follow_pattern/DeleteAutoFollowPatternResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/delete_auto_follow_pattern/DeleteAutoFollowPatternResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ccr/follow/follow.go b/typedapi/ccr/follow/follow.go index 73bbff8543..c8bbaf2ec7 100644 --- a/typedapi/ccr/follow/follow.go +++ b/typedapi/ccr/follow/follow.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a follower. +// // Create a cross-cluster replication follower index that follows a specific // leader index. // When the API returns, the follower index exists and cross-cluster replication @@ -86,6 +87,7 @@ func NewFollowFunc(tp elastictransport.Interface) NewFollow { } // Create a follower. +// // Create a cross-cluster replication follower index that follows a specific // leader index. // When the API returns, the follower index exists and cross-cluster replication diff --git a/typedapi/ccr/follow/request.go b/typedapi/ccr/follow/request.go index 98b7e4c09c..9b36059039 100644 --- a/typedapi/ccr/follow/request.go +++ b/typedapi/ccr/follow/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package follow @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package follow // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/follow/CreateFollowIndexRequest.ts#L26-L124 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/follow/CreateFollowIndexRequest.ts#L26-L126 type Request struct { - // DataStreamName If the leader index is part of a data stream, the name to which the local // data stream for the followed index should be renamed. DataStreamName *string `json:"data_stream_name,omitempty"` diff --git a/typedapi/ccr/follow/response.go b/typedapi/ccr/follow/response.go index 5887ae9e76..59a59fb625 100644 --- a/typedapi/ccr/follow/response.go +++ b/typedapi/ccr/follow/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package follow // Response holds the response body struct for the package follow // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/follow/CreateFollowIndexResponse.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/follow/CreateFollowIndexResponse.ts#L20-L26 type Response struct { FollowIndexCreated bool `json:"follow_index_created"` FollowIndexShardsAcked bool `json:"follow_index_shards_acked"` diff --git a/typedapi/ccr/followinfo/follow_info.go b/typedapi/ccr/followinfo/follow_info.go index c6b712371b..f3aac1c314 100644 --- a/typedapi/ccr/followinfo/follow_info.go +++ b/typedapi/ccr/followinfo/follow_info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get follower information. // diff --git a/typedapi/ccr/followinfo/response.go b/typedapi/ccr/followinfo/response.go index 30e186b524..dfdaf50e35 100644 --- a/typedapi/ccr/followinfo/response.go +++ b/typedapi/ccr/followinfo/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package followinfo @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package followinfo // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/follow_info/FollowInfoResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/follow_info/FollowInfoResponse.ts#L22-L24 type Response struct { FollowerIndices []types.FollowerIndex `json:"follower_indices"` } diff --git a/typedapi/ccr/followstats/follow_stats.go b/typedapi/ccr/followstats/follow_stats.go index 90facdaa79..2038dcb3c6 100644 --- a/typedapi/ccr/followstats/follow_stats.go +++ b/typedapi/ccr/followstats/follow_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get follower stats. // diff --git a/typedapi/ccr/followstats/response.go b/typedapi/ccr/followstats/response.go index 38498b5323..9bda73c7f8 100644 --- a/typedapi/ccr/followstats/response.go +++ b/typedapi/ccr/followstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package followstats @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package followstats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/follow_stats/FollowIndexStatsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/follow_stats/FollowIndexStatsResponse.ts#L22-L27 type Response struct { - // Indices An array of follower index statistics. Indices []types.FollowIndexStats `json:"indices"` } diff --git a/typedapi/ccr/forgetfollower/forget_follower.go b/typedapi/ccr/forgetfollower/forget_follower.go index 32c395bd13..e763a3eb47 100644 --- a/typedapi/ccr/forgetfollower/forget_follower.go +++ b/typedapi/ccr/forgetfollower/forget_follower.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Forget a follower. +// // Remove the cross-cluster replication follower retention leases from the // leader. // @@ -106,6 +107,7 @@ func NewForgetFollowerFunc(tp elastictransport.Interface) NewForgetFollower { } // Forget a follower. +// // Remove the cross-cluster replication follower retention leases from the // leader. // diff --git a/typedapi/ccr/forgetfollower/request.go b/typedapi/ccr/forgetfollower/request.go index 955b3ccdcd..4996423040 100644 --- a/typedapi/ccr/forgetfollower/request.go +++ b/typedapi/ccr/forgetfollower/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package forgetfollower @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package forgetfollower // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/forget_follower/ForgetFollowerIndexRequest.ts#L24-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/forget_follower/ForgetFollowerIndexRequest.ts#L24-L66 type Request struct { FollowerCluster *string `json:"follower_cluster,omitempty"` FollowerIndex *string `json:"follower_index,omitempty"` diff --git a/typedapi/ccr/forgetfollower/response.go b/typedapi/ccr/forgetfollower/response.go index 24a53d2892..13363e4f96 100644 --- a/typedapi/ccr/forgetfollower/response.go +++ b/typedapi/ccr/forgetfollower/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package forgetfollower @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package forgetfollower // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/forget_follower/ForgetFollowerIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/forget_follower/ForgetFollowerIndexResponse.ts#L22-L24 type Response struct { Shards_ types.ShardStatistics `json:"_shards"` } diff --git a/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go b/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go index 9c5b108610..6692fbfafe 100644 --- a/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go +++ b/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get auto-follow patterns. // diff --git a/typedapi/ccr/getautofollowpattern/response.go b/typedapi/ccr/getautofollowpattern/response.go index 411e7312db..7509b17578 100644 --- a/typedapi/ccr/getautofollowpattern/response.go +++ b/typedapi/ccr/getautofollowpattern/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getautofollowpattern @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/get_auto_follow_pattern/GetAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/get_auto_follow_pattern/GetAutoFollowPatternResponse.ts#L22-L24 type Response struct { Patterns []types.AutoFollowPattern `json:"patterns"` } diff --git a/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go b/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go index 8bb1799bf1..1a9ce79b28 100644 --- a/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go +++ b/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Pause an auto-follow pattern. // diff --git a/typedapi/ccr/pauseautofollowpattern/response.go b/typedapi/ccr/pauseautofollowpattern/response.go index 5e5d1d5b07..a1c46541d9 100644 --- a/typedapi/ccr/pauseautofollowpattern/response.go +++ b/typedapi/ccr/pauseautofollowpattern/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package pauseautofollowpattern // Response holds the response body struct for the package pauseautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/pause_auto_follow_pattern/PauseAutoFollowPatternResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/pause_auto_follow_pattern/PauseAutoFollowPatternResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ccr/pausefollow/pause_follow.go b/typedapi/ccr/pausefollow/pause_follow.go index a06460658d..b42360cc94 100644 --- a/typedapi/ccr/pausefollow/pause_follow.go +++ b/typedapi/ccr/pausefollow/pause_follow.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Pause a follower. // diff --git a/typedapi/ccr/pausefollow/response.go b/typedapi/ccr/pausefollow/response.go index 9bbbcd16a6..de1e31e010 100644 --- a/typedapi/ccr/pausefollow/response.go +++ b/typedapi/ccr/pausefollow/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package pausefollow // Response holds the response body struct for the package pausefollow // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/pause_follow/PauseFollowIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/pause_follow/PauseFollowIndexResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go b/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go index a9440936cc..5c55bdc1b5 100644 --- a/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go +++ b/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update auto-follow patterns. +// // Create a collection of cross-cluster replication auto-follow patterns for a // remote cluster. // Newly created indices on the remote cluster that match any of the patterns @@ -93,6 +94,7 @@ func NewPutAutoFollowPatternFunc(tp elastictransport.Interface) NewPutAutoFollow } // Create or update auto-follow patterns. +// // Create a collection of cross-cluster replication auto-follow patterns for a // remote cluster. // Newly created indices on the remote cluster that match any of the patterns diff --git a/typedapi/ccr/putautofollowpattern/request.go b/typedapi/ccr/putautofollowpattern/request.go index 4a13a9fbe4..a066e57bb0 100644 --- a/typedapi/ccr/putautofollowpattern/request.go +++ b/typedapi/ccr/putautofollowpattern/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putautofollowpattern @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternRequest.ts#L27-L133 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternRequest.ts#L27-L134 type Request struct { - // FollowIndexPattern The name of follower index. The template {{leader_index}} can be used to // derive the name of the follower index from the name of the leader index. When // following a data stream, use {{leader_index}}; CCR does not support changes diff --git a/typedapi/ccr/putautofollowpattern/response.go b/typedapi/ccr/putautofollowpattern/response.go index 2a29a88d50..561a18f9c6 100644 --- a/typedapi/ccr/putautofollowpattern/response.go +++ b/typedapi/ccr/putautofollowpattern/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putautofollowpattern // Response holds the response body struct for the package putautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ccr/resumeautofollowpattern/response.go b/typedapi/ccr/resumeautofollowpattern/response.go index e2519c6ea1..1a21f3febf 100644 --- a/typedapi/ccr/resumeautofollowpattern/response.go +++ b/typedapi/ccr/resumeautofollowpattern/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package resumeautofollowpattern // Response holds the response body struct for the package resumeautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/resume_auto_follow_pattern/ResumeAutoFollowPatternResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/resume_auto_follow_pattern/ResumeAutoFollowPatternResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go b/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go index 28bfcf276e..431b6e056a 100644 --- a/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go +++ b/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Resume an auto-follow pattern. // diff --git a/typedapi/ccr/resumefollow/request.go b/typedapi/ccr/resumefollow/request.go index 81bd135eef..e97171ad85 100644 --- a/typedapi/ccr/resumefollow/request.go +++ b/typedapi/ccr/resumefollow/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package resumefollow @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package resumefollow // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/resume_follow/ResumeFollowIndexRequest.ts#L25-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/resume_follow/ResumeFollowIndexRequest.ts#L25-L66 type Request struct { MaxOutstandingReadRequests *int64 `json:"max_outstanding_read_requests,omitempty"` MaxOutstandingWriteRequests *int64 `json:"max_outstanding_write_requests,omitempty"` diff --git a/typedapi/ccr/resumefollow/response.go b/typedapi/ccr/resumefollow/response.go index bc70654bc5..582cec3793 100644 --- a/typedapi/ccr/resumefollow/response.go +++ b/typedapi/ccr/resumefollow/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package resumefollow // Response holds the response body struct for the package resumefollow // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/resume_follow/ResumeFollowIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/resume_follow/ResumeFollowIndexResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ccr/resumefollow/resume_follow.go b/typedapi/ccr/resumefollow/resume_follow.go index c5b8d54b8e..053e68f1e1 100644 --- a/typedapi/ccr/resumefollow/resume_follow.go +++ b/typedapi/ccr/resumefollow/resume_follow.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Resume a follower. +// // Resume a cross-cluster replication follower index that was paused. // The follower index could have been paused with the pause follower API. // Alternatively it could be paused due to replication that cannot be retried @@ -88,6 +89,7 @@ func NewResumeFollowFunc(tp elastictransport.Interface) NewResumeFollow { } // Resume a follower. +// // Resume a cross-cluster replication follower index that was paused. // The follower index could have been paused with the pause follower API. // Alternatively it could be paused due to replication that cannot be retried diff --git a/typedapi/ccr/stats/response.go b/typedapi/ccr/stats/response.go index 9d4d1a6c05..4aef314056 100644 --- a/typedapi/ccr/stats/response.go +++ b/typedapi/ccr/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stats @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/stats/CcrStatsResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/stats/CcrStatsResponse.ts#L22-L29 type Response struct { - // AutoFollowStats Statistics for the auto-follow coordinator. AutoFollowStats types.AutoFollowStats `json:"auto_follow_stats"` // FollowStats Shard-level statistics for follower indices. diff --git a/typedapi/ccr/stats/stats.go b/typedapi/ccr/stats/stats.go index 1833c2313c..ce0cd964bf 100644 --- a/typedapi/ccr/stats/stats.go +++ b/typedapi/ccr/stats/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get cross-cluster replication stats. // diff --git a/typedapi/ccr/unfollow/response.go b/typedapi/ccr/unfollow/response.go index 6cc0b73a03..6b0c007f6f 100644 --- a/typedapi/ccr/unfollow/response.go +++ b/typedapi/ccr/unfollow/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package unfollow // Response holds the response body struct for the package unfollow // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/unfollow/UnfollowIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/unfollow/UnfollowIndexResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ccr/unfollow/unfollow.go b/typedapi/ccr/unfollow/unfollow.go index 7b8c1a32d6..783c17f421 100644 --- a/typedapi/ccr/unfollow/unfollow.go +++ b/typedapi/ccr/unfollow/unfollow.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Unfollow an index. // diff --git a/typedapi/cluster/allocationexplain/allocation_explain.go b/typedapi/cluster/allocationexplain/allocation_explain.go index 55afa418a1..77766d2689 100644 --- a/typedapi/cluster/allocationexplain/allocation_explain.go +++ b/typedapi/cluster/allocationexplain/allocation_explain.go @@ -16,10 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Explain the shard allocations. +// // Get explanations for shard allocations in the cluster. +// This API accepts the current_node, index, primary and shard parameters in the +// request body or in query parameters, but not in both at the same time. // For unassigned shards, it provides an explanation for why the shard is // unassigned. // For assigned shards, it provides an explanation for why the shard is @@ -85,7 +88,10 @@ func NewAllocationExplainFunc(tp elastictransport.Interface) NewAllocationExplai } // Explain the shard allocations. +// // Get explanations for shard allocations in the cluster. +// This API accepts the current_node, index, primary and shard parameters in the +// request body or in query parameters, but not in both at the same time. // For unassigned shards, it provides an explanation for why the shard is // unassigned. // For assigned shards, it provides an explanation for why the shard is @@ -382,21 +388,21 @@ func (r *AllocationExplain) Pretty(pretty bool) *AllocationExplain { return r } -// Specifies the node ID or the name of the node to only explain a shard that is -// currently located on the specified node. +// Explain a shard only if it is currently located on the specified node name or +// node ID. // API name: current_node -func (r *AllocationExplain) CurrentNode(currentnode string) *AllocationExplain { +func (r *AllocationExplain) CurrentNode(nodeid string) *AllocationExplain { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.CurrentNode = ¤tnode + r.req.CurrentNode = &nodeid return r } -// Specifies the name of the index that you would like an explanation for. +// The name of the index that you would like an explanation for. // API name: index func (r *AllocationExplain) Index(indexname string) *AllocationExplain { // Initialize the request if it is not already initialized @@ -409,7 +415,8 @@ func (r *AllocationExplain) Index(indexname string) *AllocationExplain { return r } -// If true, returns explanation for the primary shard for the given shard ID. +// If true, returns an explanation for the primary shard for the specified shard +// ID. // API name: primary func (r *AllocationExplain) Primary(primary bool) *AllocationExplain { // Initialize the request if it is not already initialized @@ -422,7 +429,7 @@ func (r *AllocationExplain) Primary(primary bool) *AllocationExplain { return r } -// Specifies the ID of the shard that you would like an explanation for. +// An identifier for the shard that you would like an explanation for. // API name: shard func (r *AllocationExplain) Shard(shard int) *AllocationExplain { // Initialize the request if it is not already initialized diff --git a/typedapi/cluster/allocationexplain/request.go b/typedapi/cluster/allocationexplain/request.go index 1d0707d9f2..31e266338e 100644 --- a/typedapi/cluster/allocationexplain/request.go +++ b/typedapi/cluster/allocationexplain/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package allocationexplain @@ -31,17 +31,17 @@ import ( // Request holds the request body struct for the package allocationexplain // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts#L25-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts#L25-L99 type Request struct { - - // CurrentNode Specifies the node ID or the name of the node to only explain a shard that is - // currently located on the specified node. + // CurrentNode Explain a shard only if it is currently located on the specified node name or + // node ID. CurrentNode *string `json:"current_node,omitempty"` - // Index Specifies the name of the index that you would like an explanation for. + // Index The name of the index that you would like an explanation for. Index *string `json:"index,omitempty"` - // Primary If true, returns explanation for the primary shard for the given shard ID. + // Primary If true, returns an explanation for the primary shard for the specified shard + // ID. Primary *bool `json:"primary,omitempty"` - // Shard Specifies the ID of the shard that you would like an explanation for. + // Shard An identifier for the shard that you would like an explanation for. Shard *int `json:"shard,omitempty"` } @@ -79,16 +79,9 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch t { case "current_node": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { + if err := dec.Decode(&s.CurrentNode); err != nil { return fmt.Errorf("%s | %w", "CurrentNode", err) } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.CurrentNode = &o case "index": if err := dec.Decode(&s.Index); err != nil { diff --git a/typedapi/cluster/allocationexplain/response.go b/typedapi/cluster/allocationexplain/response.go index 87a1c38735..2a7433fb5f 100644 --- a/typedapi/cluster/allocationexplain/response.go +++ b/typedapi/cluster/allocationexplain/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package allocationexplain @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package allocationexplain // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/ClusterAllocationExplainResponse.ts#L32-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/ClusterAllocationExplainResponse.ts#L32-L64 type Response struct { AllocateExplanation *string `json:"allocate_explanation,omitempty"` AllocationDelay types.Duration `json:"allocation_delay,omitempty"` diff --git a/typedapi/cluster/deletecomponenttemplate/delete_component_template.go b/typedapi/cluster/deletecomponenttemplate/delete_component_template.go index abf3e4bf8d..4e31e1d49e 100644 --- a/typedapi/cluster/deletecomponenttemplate/delete_component_template.go +++ b/typedapi/cluster/deletecomponenttemplate/delete_component_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete component templates. +// // Component templates are building blocks for constructing index templates that // specify index mappings, settings, and aliases. package deletecomponenttemplate @@ -79,6 +80,7 @@ func NewDeleteComponentTemplateFunc(tp elastictransport.Interface) NewDeleteComp } // Delete component templates. +// // Component templates are building blocks for constructing index templates that // specify index mappings, settings, and aliases. // diff --git a/typedapi/cluster/deletecomponenttemplate/response.go b/typedapi/cluster/deletecomponenttemplate/response.go index 264ddfd11d..edd0360004 100644 --- a/typedapi/cluster/deletecomponenttemplate/response.go +++ b/typedapi/cluster/deletecomponenttemplate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletecomponenttemplate // Response holds the response body struct for the package deletecomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go b/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go index 5faa6191ca..9efcf51a73 100644 --- a/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go +++ b/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear cluster voting config exclusions. +// // Remove master-eligible nodes from the voting configuration exclusion list. package deletevotingconfigexclusions @@ -68,6 +69,7 @@ func NewDeleteVotingConfigExclusionsFunc(tp elastictransport.Interface) NewDelet } // Clear cluster voting config exclusions. +// // Remove master-eligible nodes from the voting configuration exclusion list. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions diff --git a/typedapi/cluster/existscomponenttemplate/exists_component_template.go b/typedapi/cluster/existscomponenttemplate/exists_component_template.go index fef29743b2..914d1112f3 100644 --- a/typedapi/cluster/existscomponenttemplate/exists_component_template.go +++ b/typedapi/cluster/existscomponenttemplate/exists_component_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check component templates. +// // Returns information about whether a particular component template exists. package existscomponenttemplate @@ -76,6 +77,7 @@ func NewExistsComponentTemplateFunc(tp elastictransport.Interface) NewExistsComp } // Check component templates. +// // Returns information about whether a particular component template exists. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template diff --git a/typedapi/cluster/getcomponenttemplate/get_component_template.go b/typedapi/cluster/getcomponenttemplate/get_component_template.go index b132996dcf..89c993bc2e 100644 --- a/typedapi/cluster/getcomponenttemplate/get_component_template.go +++ b/typedapi/cluster/getcomponenttemplate/get_component_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get component templates. +// // Get information about component templates. package getcomponenttemplate @@ -76,6 +77,7 @@ func NewGetComponentTemplateFunc(tp elastictransport.Interface) NewGetComponentT } // Get component templates. +// // Get information about component templates. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template diff --git a/typedapi/cluster/getcomponenttemplate/response.go b/typedapi/cluster/getcomponenttemplate/response.go index 79ea5752cb..2c92dace89 100644 --- a/typedapi/cluster/getcomponenttemplate/response.go +++ b/typedapi/cluster/getcomponenttemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getcomponenttemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/get_component_template/ClusterGetComponentTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/get_component_template/ClusterGetComponentTemplateResponse.ts#L22-L24 type Response struct { ComponentTemplates []types.ClusterComponentTemplate `json:"component_templates"` } diff --git a/typedapi/cluster/getsettings/get_settings.go b/typedapi/cluster/getsettings/get_settings.go index 32855214e0..2fe3f1aed1 100644 --- a/typedapi/cluster/getsettings/get_settings.go +++ b/typedapi/cluster/getsettings/get_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get cluster-wide settings. // @@ -288,7 +288,17 @@ func (r *GetSettings) FlatSettings(flatsettings bool) *GetSettings { return r } -// IncludeDefaults If `true`, returns default cluster settings from the local node. +// IncludeDefaults If `true`, also returns default values for all other cluster settings, +// reflecting the values +// in the `elasticsearch.yml` file of one of the nodes in the cluster. If the +// nodes in your +// cluster do not all have the same values in their `elasticsearch.yml` config +// files then the +// values returned by this API may vary from invocation to invocation and may +// not reflect the +// values that Elasticsearch uses in all situations. Use the `GET +// _nodes/settings` API to +// fetch the settings for each individual node in your cluster. // API name: include_defaults func (r *GetSettings) IncludeDefaults(includedefaults bool) *GetSettings { r.values.Set("include_defaults", strconv.FormatBool(includedefaults)) diff --git a/typedapi/cluster/getsettings/response.go b/typedapi/cluster/getsettings/response.go index f36d433d51..4d3b61cfd1 100644 --- a/typedapi/cluster/getsettings/response.go +++ b/typedapi/cluster/getsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getsettings @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/get_settings/ClusterGetSettingsResponse.ts#L23-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/get_settings/ClusterGetSettingsResponse.ts#L23-L32 type Response struct { - // Defaults The default setting values. Defaults map[string]json.RawMessage `json:"defaults,omitempty"` // Persistent The settings that persist after the cluster restarts. diff --git a/typedapi/cluster/health/health.go b/typedapi/cluster/health/health.go index 5015af39a6..356ccb73e6 100644 --- a/typedapi/cluster/health/health.go +++ b/typedapi/cluster/health/health.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the cluster health status. // diff --git a/typedapi/cluster/health/response.go b/typedapi/cluster/health/response.go index 226fb9eb4e..dfd717164d 100644 --- a/typedapi/cluster/health/response.go +++ b/typedapi/cluster/health/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package health @@ -27,9 +27,8 @@ import ( // Response holds the response body struct for the package health // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/health/ClusterHealthResponse.ts#L26-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/health/ClusterHealthResponse.ts#L26-L38 type Response struct { - // ActivePrimaryShards The number of active primary shards. ActivePrimaryShards int `json:"active_primary_shards"` // ActiveShards The total number of active primary and replica shards. diff --git a/typedapi/cluster/info/info.go b/typedapi/cluster/info/info.go index 0c97c3a3c5..4da59e7138 100644 --- a/typedapi/cluster/info/info.go +++ b/typedapi/cluster/info/info.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get cluster info. +// // Returns basic information about the cluster. package info @@ -78,6 +79,7 @@ func NewInfoFunc(tp elastictransport.Interface) NewInfo { } // Get cluster info. +// // Returns basic information about the cluster. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-info diff --git a/typedapi/cluster/info/response.go b/typedapi/cluster/info/response.go index 229716ce3a..01d9d8f226 100644 --- a/typedapi/cluster/info/response.go +++ b/typedapi/cluster/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/info/ClusterInfoResponse.ts#L26-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/info/ClusterInfoResponse.ts#L26-L34 type Response struct { ClusterName string `json:"cluster_name"` Http *types.Http `json:"http,omitempty"` diff --git a/typedapi/cluster/pendingtasks/pending_tasks.go b/typedapi/cluster/pendingtasks/pending_tasks.go index 2cf88879a1..5e3ebd9295 100644 --- a/typedapi/cluster/pendingtasks/pending_tasks.go +++ b/typedapi/cluster/pendingtasks/pending_tasks.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the pending cluster tasks. +// // Get information about cluster-level changes (such as create index, update // mapping, allocate or fail shard) that have not yet taken effect. // @@ -79,6 +80,7 @@ func NewPendingTasksFunc(tp elastictransport.Interface) NewPendingTasks { } // Get the pending cluster tasks. +// // Get information about cluster-level changes (such as create index, update // mapping, allocate or fail shard) that have not yet taken effect. // diff --git a/typedapi/cluster/pendingtasks/response.go b/typedapi/cluster/pendingtasks/response.go index 9142db0777..b18453a57f 100644 --- a/typedapi/cluster/pendingtasks/response.go +++ b/typedapi/cluster/pendingtasks/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package pendingtasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package pendingtasks // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/pending_tasks/ClusterPendingTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/pending_tasks/ClusterPendingTasksResponse.ts#L22-L24 type Response struct { Tasks []types.PendingTask `json:"tasks"` } diff --git a/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go b/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go index 6caa60143c..424e798320 100644 --- a/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go +++ b/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update voting configuration exclusions. +// // Update the cluster voting config exclusions by node IDs or node names. // By default, if there are more than three master-eligible nodes in the cluster // and you remove fewer than half of the master-eligible nodes in the cluster at @@ -105,6 +106,7 @@ func NewPostVotingConfigExclusionsFunc(tp elastictransport.Interface) NewPostVot } // Update voting configuration exclusions. +// // Update the cluster voting config exclusions by node IDs or node names. // By default, if there are more than three master-eligible nodes in the cluster // and you remove fewer than half of the master-eligible nodes in the cluster at diff --git a/typedapi/cluster/putcomponenttemplate/put_component_template.go b/typedapi/cluster/putcomponenttemplate/put_component_template.go index f28278df55..4ca704b9f6 100644 --- a/typedapi/cluster/putcomponenttemplate/put_component_template.go +++ b/typedapi/cluster/putcomponenttemplate/put_component_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a component template. +// // Component templates are building blocks for constructing index templates that // specify index mappings, settings, and aliases. // @@ -110,6 +111,7 @@ func NewPutComponentTemplateFunc(tp elastictransport.Interface) NewPutComponentT } // Create or update a component template. +// // Component templates are building blocks for constructing index templates that // specify index mappings, settings, and aliases. // diff --git a/typedapi/cluster/putcomponenttemplate/request.go b/typedapi/cluster/putcomponenttemplate/request.go index a21cc2e153..e1a73d70f9 100644 --- a/typedapi/cluster/putcomponenttemplate/request.go +++ b/typedapi/cluster/putcomponenttemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putcomponenttemplate @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L111 type Request struct { - // Deprecated Marks this index template as deprecated. When creating or updating a // non-deprecated index template // that uses deprecated components, Elasticsearch will emit a deprecation diff --git a/typedapi/cluster/putcomponenttemplate/response.go b/typedapi/cluster/putcomponenttemplate/response.go index 2f35835f65..fc9c09e0ae 100644 --- a/typedapi/cluster/putcomponenttemplate/response.go +++ b/typedapi/cluster/putcomponenttemplate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putcomponenttemplate // Response holds the response body struct for the package putcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/cluster/putsettings/put_settings.go b/typedapi/cluster/putsettings/put_settings.go index 6e1f0d82aa..de91a2aaf1 100644 --- a/typedapi/cluster/putsettings/put_settings.go +++ b/typedapi/cluster/putsettings/put_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the cluster settings. // diff --git a/typedapi/cluster/putsettings/request.go b/typedapi/cluster/putsettings/request.go index af253e5e28..9ccff3b61c 100644 --- a/typedapi/cluster/putsettings/request.go +++ b/typedapi/cluster/putsettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putsettings @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/put_settings/ClusterPutSettingsRequest.ts#L25-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/put_settings/ClusterPutSettingsRequest.ts#L25-L71 type Request struct { - // Persistent The settings that persist after the cluster restarts. Persistent map[string]json.RawMessage `json:"persistent,omitempty"` // Transient The settings that do not persist after the cluster restarts. diff --git a/typedapi/cluster/putsettings/response.go b/typedapi/cluster/putsettings/response.go index 120a9f6437..5ef54aee48 100644 --- a/typedapi/cluster/putsettings/response.go +++ b/typedapi/cluster/putsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/put_settings/ClusterPutSettingsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/put_settings/ClusterPutSettingsResponse.ts#L23-L29 type Response struct { Acknowledged bool `json:"acknowledged"` Persistent map[string]json.RawMessage `json:"persistent"` diff --git a/typedapi/cluster/remoteinfo/remote_info.go b/typedapi/cluster/remoteinfo/remote_info.go index 4b7f6f5348..3d9760b577 100644 --- a/typedapi/cluster/remoteinfo/remote_info.go +++ b/typedapi/cluster/remoteinfo/remote_info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get remote cluster information. // diff --git a/typedapi/cluster/remoteinfo/response.go b/typedapi/cluster/remoteinfo/response.go index 20e3e017e1..47c5b6c825 100644 --- a/typedapi/cluster/remoteinfo/response.go +++ b/typedapi/cluster/remoteinfo/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package remoteinfo @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package remoteinfo // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L24-L27 type Response map[string]types.ClusterRemoteInfo diff --git a/typedapi/cluster/reroute/request.go b/typedapi/cluster/reroute/request.go index 492033ac50..d620dc4441 100644 --- a/typedapi/cluster/reroute/request.go +++ b/typedapi/cluster/reroute/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package reroute @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package reroute // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/ClusterRerouteRequest.ts#L25-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/ClusterRerouteRequest.ts#L24-L91 type Request struct { - // Commands Defines the commands to perform. Commands []types.Command `json:"commands,omitempty"` } diff --git a/typedapi/cluster/reroute/reroute.go b/typedapi/cluster/reroute/reroute.go index 2982784c41..d19d851e0c 100644 --- a/typedapi/cluster/reroute/reroute.go +++ b/typedapi/cluster/reroute/reroute.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Reroute the cluster. +// // Manually change the allocation of individual shards in the cluster. // For example, a shard can be moved from one node to another explicitly, an // allocation can be canceled, and an unassigned shard can be explicitly @@ -102,6 +103,7 @@ func NewRerouteFunc(tp elastictransport.Interface) NewReroute { } // Reroute the cluster. +// // Manually change the allocation of individual shards in the cluster. // For example, a shard can be moved from one node to another explicitly, an // allocation can be canceled, and an unassigned shard can be explicitly @@ -370,7 +372,11 @@ func (r *Reroute) Explain(explain bool) *Reroute { // Metric Limits the information returned to the specified metrics. // API name: metric func (r *Reroute) Metric(metrics ...string) *Reroute { - r.values.Set("metric", strings.Join(metrics, ",")) + tmp := []string{} + for _, item := range metrics { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("metric", strings.Join(tmp, ",")) return r } diff --git a/typedapi/cluster/reroute/response.go b/typedapi/cluster/reroute/response.go index f519179d75..cb9f053c9c 100644 --- a/typedapi/cluster/reroute/response.go +++ b/typedapi/cluster/reroute/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package reroute @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package reroute // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/ClusterRerouteResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/ClusterRerouteResponse.ts#L23-L34 type Response struct { Acknowledged bool `json:"acknowledged"` Explanations []types.RerouteExplanation `json:"explanations,omitempty"` diff --git a/typedapi/cluster/state/response.go b/typedapi/cluster/state/response.go index a60a61f537..81198654e3 100644 --- a/typedapi/cluster/state/response.go +++ b/typedapi/cluster/state/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package state @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package state // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/state/ClusterStateResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/state/ClusterStateResponse.ts#L22-L31 type Response = json.RawMessage diff --git a/typedapi/cluster/state/state.go b/typedapi/cluster/state/state.go index 60eee46284..a8e135ab0a 100644 --- a/typedapi/cluster/state/state.go +++ b/typedapi/cluster/state/state.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the cluster state. +// // Get comprehensive information about the state of the cluster. // // The cluster state is an internal data structure which keeps track of a @@ -110,6 +111,7 @@ func NewStateFunc(tp elastictransport.Interface) NewState { } // Get the cluster state. +// // Get comprehensive information about the state of the cluster. // // The cluster state is an internal data structure which keeps track of a @@ -447,7 +449,7 @@ func (r *State) Local(local bool) *State { return r } -// MasterTimeout Specify timeout for connection to master +// MasterTimeout Timeout for waiting for new cluster state in case it is blocked // API name: master_timeout func (r *State) MasterTimeout(duration string) *State { r.values.Set("master_timeout", duration) diff --git a/typedapi/cluster/stats/response.go b/typedapi/cluster/stats/response.go index 076fc3493c..6632dadae8 100644 --- a/typedapi/cluster/stats/response.go +++ b/typedapi/cluster/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stats @@ -27,9 +27,8 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/ClusterStatsResponse.ts#L71-L74 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/ClusterStatsResponse.ts#L71-L74 type Response struct { - // Ccs Cross-cluster stats Ccs types.CCSStats `json:"ccs"` // ClusterName Name of the cluster, based on the cluster name setting. diff --git a/typedapi/cluster/stats/stats.go b/typedapi/cluster/stats/stats.go index f9d127165b..c9bf8671cb 100644 --- a/typedapi/cluster/stats/stats.go +++ b/typedapi/cluster/stats/stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get cluster statistics. +// // Get basic index metrics (shard numbers, store size, memory usage) and // information about the current nodes that form the cluster (number, roles, os, // jvm versions, memory usage, cpu and installed plugins). @@ -78,6 +79,7 @@ func NewStatsFunc(tp elastictransport.Interface) NewStats { } // Get cluster statistics. +// // Get basic index metrics (shard numbers, store size, memory usage) and // information about the current nodes that form the cluster (number, roles, os, // jvm versions, memory usage, cpu and installed plugins). diff --git a/typedapi/connector/checkin/check_in.go b/typedapi/connector/checkin/check_in.go index ca7014fce8..8654a5ac13 100644 --- a/typedapi/connector/checkin/check_in.go +++ b/typedapi/connector/checkin/check_in.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check in a connector. // diff --git a/typedapi/connector/checkin/response.go b/typedapi/connector/checkin/response.go index 1092874baa..211dd6ca71 100644 --- a/typedapi/connector/checkin/response.go +++ b/typedapi/connector/checkin/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package checkin @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package checkin // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/check_in/ConnectorCheckInResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/check_in/ConnectorCheckInResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/delete/delete.go b/typedapi/connector/delete/delete.go index d781996d6d..67d229e7bc 100644 --- a/typedapi/connector/delete/delete.go +++ b/typedapi/connector/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a connector. // @@ -309,8 +309,7 @@ func (r *Delete) _connectorid(connectorid string) *Delete { return r } -// DeleteSyncJobs A flag indicating if associated sync jobs should be also removed. Defaults to -// false. +// DeleteSyncJobs A flag indicating if associated sync jobs should be also removed. // API name: delete_sync_jobs func (r *Delete) DeleteSyncJobs(deletesyncjobs bool) *Delete { r.values.Set("delete_sync_jobs", strconv.FormatBool(deletesyncjobs)) diff --git a/typedapi/connector/delete/response.go b/typedapi/connector/delete/response.go index 749748e532..c3a42439b3 100644 --- a/typedapi/connector/delete/response.go +++ b/typedapi/connector/delete/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/delete/ConnectorDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/delete/ConnectorDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/connector/get/get.go b/typedapi/connector/get/get.go index aad8e974f6..fe2066f8b9 100644 --- a/typedapi/connector/get/get.go +++ b/typedapi/connector/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a connector. // diff --git a/typedapi/connector/get/response.go b/typedapi/connector/get/response.go index 3253b21dfe..0fdefae069 100644 --- a/typedapi/connector/get/response.go +++ b/typedapi/connector/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -35,7 +35,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/get/ConnectorGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/get/ConnectorGetResponse.ts#L22-L25 type Response struct { ApiKeyId *string `json:"api_key_id,omitempty"` ApiKeySecretId *string `json:"api_key_secret_id,omitempty"` diff --git a/typedapi/connector/lastsync/last_sync.go b/typedapi/connector/lastsync/last_sync.go index 701fd692f8..42203fdaad 100644 --- a/typedapi/connector/lastsync/last_sync.go +++ b/typedapi/connector/lastsync/last_sync.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector last sync stats. // diff --git a/typedapi/connector/lastsync/request.go b/typedapi/connector/lastsync/request.go index 0d8bf15c01..ed463efea8 100644 --- a/typedapi/connector/lastsync/request.go +++ b/typedapi/connector/lastsync/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package lastsync @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package lastsync // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L66 type Request struct { LastAccessControlSyncError *string `json:"last_access_control_sync_error,omitempty"` LastAccessControlSyncScheduledAt types.DateTime `json:"last_access_control_sync_scheduled_at,omitempty"` diff --git a/typedapi/connector/lastsync/response.go b/typedapi/connector/lastsync/response.go index 1d62ebae09..aa5e7abd46 100644 --- a/typedapi/connector/lastsync/response.go +++ b/typedapi/connector/lastsync/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package lastsync @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package lastsync // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/list/list.go b/typedapi/connector/list/list.go index bd103ee7bc..f709917ecc 100644 --- a/typedapi/connector/list/list.go +++ b/typedapi/connector/list/list.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get all connectors. // @@ -278,7 +278,7 @@ func (r *List) Header(key, value string) *List { return r } -// From Starting offset (default: 0) +// From Starting offset // API name: from func (r *List) From(from int) *List { r.values.Set("from", strconv.Itoa(from)) diff --git a/typedapi/connector/list/response.go b/typedapi/connector/list/response.go index 853620bce5..cff623a39f 100644 --- a/typedapi/connector/list/response.go +++ b/typedapi/connector/list/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package list @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/list/ConnectorListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/list/ConnectorListResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Results []types.Connector `json:"results"` diff --git a/typedapi/connector/post/post.go b/typedapi/connector/post/post.go index 3e8c97e7e4..1e0a64d7a0 100644 --- a/typedapi/connector/post/post.go +++ b/typedapi/connector/post/post.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a connector. // diff --git a/typedapi/connector/post/request.go b/typedapi/connector/post/request.go index 6bcb0853b5..155b4f422c 100644 --- a/typedapi/connector/post/request.go +++ b/typedapi/connector/post/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package post @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/post/ConnectorPostRequest.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/post/ConnectorPostRequest.ts#L22-L52 type Request struct { Description *string `json:"description,omitempty"` IndexName *string `json:"index_name,omitempty"` diff --git a/typedapi/connector/post/response.go b/typedapi/connector/post/response.go index 663443b303..ccb9a8559c 100644 --- a/typedapi/connector/post/response.go +++ b/typedapi/connector/post/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package post @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/post/ConnectorPostResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/post/ConnectorPostResponse.ts#L23-L28 type Response struct { Id string `json:"id"` Result result.Result `json:"result"` diff --git a/typedapi/connector/put/put.go b/typedapi/connector/put/put.go index 758687f424..117bedb549 100644 --- a/typedapi/connector/put/put.go +++ b/typedapi/connector/put/put.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a connector. package put diff --git a/typedapi/connector/put/request.go b/typedapi/connector/put/request.go index b27c8287df..5542ece923 100644 --- a/typedapi/connector/put/request.go +++ b/typedapi/connector/put/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package put @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/put/ConnectorPutRequest.ts#L22-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/put/ConnectorPutRequest.ts#L22-L59 type Request struct { Description *string `json:"description,omitempty"` IndexName *string `json:"index_name,omitempty"` diff --git a/typedapi/connector/put/response.go b/typedapi/connector/put/response.go index 3e7b012c44..e5b3025cb6 100644 --- a/typedapi/connector/put/response.go +++ b/typedapi/connector/put/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package put @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/put/ConnectorPutResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/put/ConnectorPutResponse.ts#L23-L28 type Response struct { Id string `json:"id"` Result result.Result `json:"result"` diff --git a/typedapi/connector/secretdelete/response.go b/typedapi/connector/secretdelete/response.go new file mode 100644 index 0000000000..6dbfdfce86 --- /dev/null +++ b/typedapi/connector/secretdelete/response.go @@ -0,0 +1,34 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package secretdelete + +// Response holds the response body struct for the package secretdelete +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/secret_delete/ConnectorSecretDeleteResponse.ts#L20-L24 +type Response struct { + Deleted bool `json:"deleted"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/connector/secretdelete/secret_delete.go b/typedapi/connector/secretdelete/secret_delete.go new file mode 100644 index 0000000000..056b45c49e --- /dev/null +++ b/typedapi/connector/secretdelete/secret_delete.go @@ -0,0 +1,342 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Deletes a connector secret. +package secretdelete + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + idMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type SecretDelete struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + id string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewSecretDelete type alias for index. +type NewSecretDelete func(id string) *SecretDelete + +// NewSecretDeleteFunc returns a new instance of SecretDelete with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewSecretDeleteFunc(tp elastictransport.Interface) NewSecretDelete { + return func(id string) *SecretDelete { + n := New(tp) + + n._id(id) + + return n + } +} + +// Deletes a connector secret. +func New(tp elastictransport.Interface) *SecretDelete { + r := &SecretDelete{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *SecretDelete) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == idMask: + path.WriteString("/") + path.WriteString("_connector") + path.WriteString("/") + path.WriteString("_secret") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.id) + } + path.WriteString(r.id) + + method = http.MethodDelete + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r SecretDelete) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "connector.secret_delete") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "connector.secret_delete") + if reader := instrument.RecordRequestBody(ctx, "connector.secret_delete", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "connector.secret_delete") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the SecretDelete query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a secretdelete.Response +func (r SecretDelete) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "connector.secret_delete") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r SecretDelete) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "connector.secret_delete") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the SecretDelete query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the SecretDelete headers map. +func (r *SecretDelete) Header(key, value string) *SecretDelete { + r.headers.Set(key, value) + + return r +} + +// Id The ID of the secret +// API Name: id +func (r *SecretDelete) _id(id string) *SecretDelete { + r.paramSet |= idMask + r.id = id + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *SecretDelete) ErrorTrace(errortrace bool) *SecretDelete { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *SecretDelete) FilterPath(filterpaths ...string) *SecretDelete { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *SecretDelete) Human(human bool) *SecretDelete { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *SecretDelete) Pretty(pretty bool) *SecretDelete { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/connector/secretget/response.go b/typedapi/connector/secretget/response.go new file mode 100644 index 0000000000..a673a5e736 --- /dev/null +++ b/typedapi/connector/secretget/response.go @@ -0,0 +1,35 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package secretget + +// Response holds the response body struct for the package secretget +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/secret_get/ConnectorSecretGetResponse.ts#L20-L25 +type Response struct { + Id string `json:"id"` + Value string `json:"value"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/connector/secretget/secret_get.go b/typedapi/connector/secretget/secret_get.go new file mode 100644 index 0000000000..732d6c8966 --- /dev/null +++ b/typedapi/connector/secretget/secret_get.go @@ -0,0 +1,342 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Retrieves a secret stored by Connectors. +package secretget + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + idMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type SecretGet struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + id string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewSecretGet type alias for index. +type NewSecretGet func(id string) *SecretGet + +// NewSecretGetFunc returns a new instance of SecretGet with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewSecretGetFunc(tp elastictransport.Interface) NewSecretGet { + return func(id string) *SecretGet { + n := New(tp) + + n._id(id) + + return n + } +} + +// Retrieves a secret stored by Connectors. +func New(tp elastictransport.Interface) *SecretGet { + r := &SecretGet{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *SecretGet) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == idMask: + path.WriteString("/") + path.WriteString("_connector") + path.WriteString("/") + path.WriteString("_secret") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.id) + } + path.WriteString(r.id) + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r SecretGet) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "connector.secret_get") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "connector.secret_get") + if reader := instrument.RecordRequestBody(ctx, "connector.secret_get", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "connector.secret_get") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the SecretGet query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a secretget.Response +func (r SecretGet) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "connector.secret_get") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r SecretGet) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "connector.secret_get") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the SecretGet query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the SecretGet headers map. +func (r *SecretGet) Header(key, value string) *SecretGet { + r.headers.Set(key, value) + + return r +} + +// Id The ID of the secret +// API Name: id +func (r *SecretGet) _id(id string) *SecretGet { + r.paramSet |= idMask + r.id = id + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *SecretGet) ErrorTrace(errortrace bool) *SecretGet { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *SecretGet) FilterPath(filterpaths ...string) *SecretGet { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *SecretGet) Human(human bool) *SecretGet { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *SecretGet) Pretty(pretty bool) *SecretGet { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/connector/secretpost/request.go b/typedapi/connector/secretpost/request.go new file mode 100644 index 0000000000..4a432ed0a0 --- /dev/null +++ b/typedapi/connector/secretpost/request.go @@ -0,0 +1,52 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package secretpost + +import ( + "encoding/json" + "fmt" +) + +// Request holds the request body struct for the package secretpost +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/secret_post/ConnectorSecretPostRequest.ts#L22-L38 +type Request struct { + Value *string `json:"value,omitempty"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Secretpost request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/connector/secretpost/response.go b/typedapi/connector/secretpost/response.go new file mode 100644 index 0000000000..a89518f9d1 --- /dev/null +++ b/typedapi/connector/secretpost/response.go @@ -0,0 +1,34 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package secretpost + +// Response holds the response body struct for the package secretpost +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/secret_post/ConnectorSecretPostResponse.ts#L20-L24 +type Response struct { + Id string `json:"id"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/connector/secretpost/secret_post.go b/typedapi/connector/secretpost/secret_post.go index 661674af0a..066cb6f9fa 100644 --- a/typedapi/connector/secretpost/secret_post.go +++ b/typedapi/connector/secretpost/secret_post.go @@ -16,21 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Creates a secret for a Connector. package secretpost import ( + gobytes "bytes" "context" + "encoding/json" "errors" "fmt" "io" "net/http" "net/url" + "strconv" "strings" "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -45,6 +49,10 @@ type SecretPost struct { raw io.Reader + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + paramSet int spanStarted bool @@ -71,6 +79,8 @@ func New(tp elastictransport.Interface) *SecretPost { transport: tp, values: make(url.Values), headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), } if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { @@ -82,6 +92,21 @@ func New(tp elastictransport.Interface) *SecretPost { return r } +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *SecretPost) Raw(raw io.Reader) *SecretPost { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *SecretPost) Request(req *Request) *SecretPost { + r.req = req + + return r +} + // HttpRequest returns the http.Request object built from the // given parameters. func (r *SecretPost) HttpRequest(ctx context.Context) (*http.Request, error) { @@ -91,6 +116,31 @@ func (r *SecretPost) HttpRequest(ctx context.Context) (*http.Request, error) { var err error + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for SecretPost: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + r.path.Scheme = "http" switch { @@ -172,13 +222,7 @@ func (r SecretPost) Perform(providedCtx context.Context) (*http.Response, error) } // Do runs the request through the transport, handle the response and returns a secretpost.Response -func (r SecretPost) Do(ctx context.Context) (bool, error) { - return r.IsSuccess(ctx) -} - -// IsSuccess allows to run a query with a context and retrieve the result as a boolean. -// This only exists for endpoints without a request payload and allows for quick control flow. -func (r SecretPost) IsSuccess(providedCtx context.Context) (bool, error) { +func (r SecretPost) Do(providedCtx context.Context) (*Response, error) { var ctx context.Context r.spanStarted = true if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -189,30 +233,46 @@ func (r SecretPost) IsSuccess(providedCtx context.Context) (bool, error) { ctx = providedCtx } - res, err := r.Perform(ctx) + response := NewResponse() + res, err := r.Perform(ctx) if err != nil { - return false, err - } - io.Copy(io.Discard, res.Body) - err = res.Body.Close() - if err != nil { - return false, err + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } - if res.StatusCode >= 200 && res.StatusCode < 300 { - return true, nil + return response, nil } - if res.StatusCode != 404 { - err := fmt.Errorf("an error happened during the SecretPost query execution, status code: %d", res.StatusCode) + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { instrument.RecordError(ctx, err) } - return false, err + return nil, err } - return false, nil + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse } // Header set a key, value pair in the SecretPost headers map. @@ -221,3 +281,59 @@ func (r *SecretPost) Header(key, value string) *SecretPost { return r } + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *SecretPost) ErrorTrace(errortrace bool) *SecretPost { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *SecretPost) FilterPath(filterpaths ...string) *SecretPost { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *SecretPost) Human(human bool) *SecretPost { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *SecretPost) Pretty(pretty bool) *SecretPost { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// API name: value +func (r *SecretPost) Value(value string) *SecretPost { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Value = &value + + return r +} diff --git a/typedapi/connector/secretput/request.go b/typedapi/connector/secretput/request.go new file mode 100644 index 0000000000..91460d328f --- /dev/null +++ b/typedapi/connector/secretput/request.go @@ -0,0 +1,52 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package secretput + +import ( + "encoding/json" + "fmt" +) + +// Request holds the request body struct for the package secretput +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/secret_put/ConnectorSecretPutRequest.ts#L22-L42 +type Request struct { + Value string `json:"value"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Secretput request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/connector/secretput/response.go b/typedapi/connector/secretput/response.go new file mode 100644 index 0000000000..21ee5d0ce3 --- /dev/null +++ b/typedapi/connector/secretput/response.go @@ -0,0 +1,38 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package secretput + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/result" +) + +// Response holds the response body struct for the package secretput +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/secret_put/ConnectorSecretPutResponse.ts#L22-L26 +type Response struct { + Result result.Result `json:"result"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/connector/secretput/secret_put.go b/typedapi/connector/secretput/secret_put.go new file mode 100644 index 0000000000..33e3c8eace --- /dev/null +++ b/typedapi/connector/secretput/secret_put.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Creates or updates a secret for a Connector. +package secretput + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + idMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type SecretPut struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + id string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewSecretPut type alias for index. +type NewSecretPut func(id string) *SecretPut + +// NewSecretPutFunc returns a new instance of SecretPut with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewSecretPutFunc(tp elastictransport.Interface) NewSecretPut { + return func(id string) *SecretPut { + n := New(tp) + + n._id(id) + + return n + } +} + +// Creates or updates a secret for a Connector. +func New(tp elastictransport.Interface) *SecretPut { + r := &SecretPut{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *SecretPut) Raw(raw io.Reader) *SecretPut { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *SecretPut) Request(req *Request) *SecretPut { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *SecretPut) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for SecretPut: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == idMask: + path.WriteString("/") + path.WriteString("_connector") + path.WriteString("/") + path.WriteString("_secret") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.id) + } + path.WriteString(r.id) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r SecretPut) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "connector.secret_put") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "connector.secret_put") + if reader := instrument.RecordRequestBody(ctx, "connector.secret_put", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "connector.secret_put") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the SecretPut query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a secretput.Response +func (r SecretPut) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "connector.secret_put") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the SecretPut headers map. +func (r *SecretPut) Header(key, value string) *SecretPut { + r.headers.Set(key, value) + + return r +} + +// Id The ID of the secret +// API Name: id +func (r *SecretPut) _id(id string) *SecretPut { + r.paramSet |= idMask + r.id = id + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *SecretPut) ErrorTrace(errortrace bool) *SecretPut { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *SecretPut) FilterPath(filterpaths ...string) *SecretPut { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *SecretPut) Human(human bool) *SecretPut { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *SecretPut) Pretty(pretty bool) *SecretPut { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// API name: value +func (r *SecretPut) Value(value string) *SecretPut { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Value = value + + return r +} diff --git a/typedapi/connector/syncjobcancel/response.go b/typedapi/connector/syncjobcancel/response.go index 7d0bbbf8f2..268c1c4d0f 100644 --- a/typedapi/connector/syncjobcancel/response.go +++ b/typedapi/connector/syncjobcancel/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobcancel @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package syncjobcancel // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/syncjobcancel/sync_job_cancel.go b/typedapi/connector/syncjobcancel/sync_job_cancel.go index 8b06d48a7b..24bae8692a 100644 --- a/typedapi/connector/syncjobcancel/sync_job_cancel.go +++ b/typedapi/connector/syncjobcancel/sync_job_cancel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Cancel a connector sync job. // diff --git a/typedapi/connector/syncjobcheckin/response.go b/typedapi/connector/syncjobcheckin/response.go index b4d15380c2..99563b18cf 100644 --- a/typedapi/connector/syncjobcheckin/response.go +++ b/typedapi/connector/syncjobcheckin/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobcheckin // Response holds the response body struct for the package syncjobcheckin // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_check_in/SyncJobCheckInResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_check_in/SyncJobCheckInResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/connector/syncjobcheckin/sync_job_check_in.go b/typedapi/connector/syncjobcheckin/sync_job_check_in.go index bbe82d67af..63480005f7 100644 --- a/typedapi/connector/syncjobcheckin/sync_job_check_in.go +++ b/typedapi/connector/syncjobcheckin/sync_job_check_in.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check in a connector sync job. +// // Check in a connector sync job and set the `last_seen` field to the current // time before updating it in the internal index. // @@ -84,6 +85,7 @@ func NewSyncJobCheckInFunc(tp elastictransport.Interface) NewSyncJobCheckIn { } // Check in a connector sync job. +// // Check in a connector sync job and set the `last_seen` field to the current // time before updating it in the internal index. // diff --git a/typedapi/connector/syncjobclaim/request.go b/typedapi/connector/syncjobclaim/request.go index c4273f2398..38ac98a451 100644 --- a/typedapi/connector/syncjobclaim/request.go +++ b/typedapi/connector/syncjobclaim/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobclaim @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package syncjobclaim // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_claim/SyncJobClaimRequest.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_claim/SyncJobClaimRequest.ts#L23-L62 type Request struct { - // SyncCursor The cursor object from the last incremental sync job. // This should reference the `sync_cursor` field in the connector state for // which the job runs. diff --git a/typedapi/connector/syncjobclaim/response.go b/typedapi/connector/syncjobclaim/response.go index 87369f5429..1b13dbc1ea 100644 --- a/typedapi/connector/syncjobclaim/response.go +++ b/typedapi/connector/syncjobclaim/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobclaim // Response holds the response body struct for the package syncjobclaim // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_claim/SyncJobClaimResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_claim/SyncJobClaimResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/connector/syncjobclaim/sync_job_claim.go b/typedapi/connector/syncjobclaim/sync_job_claim.go index 20e10f0f90..c964928248 100644 --- a/typedapi/connector/syncjobclaim/sync_job_claim.go +++ b/typedapi/connector/syncjobclaim/sync_job_claim.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Claim a connector sync job. +// // This action updates the job status to `in_progress` and sets the `last_seen` // and `started_at` timestamps to the current time. // Additionally, it can set the `sync_cursor` property for the sync job. @@ -94,6 +95,7 @@ func NewSyncJobClaimFunc(tp elastictransport.Interface) NewSyncJobClaim { } // Claim a connector sync job. +// // This action updates the job status to `in_progress` and sets the `last_seen` // and `started_at` timestamps to the current time. // Additionally, it can set the `sync_cursor` property for the sync job. diff --git a/typedapi/connector/syncjobdelete/response.go b/typedapi/connector/syncjobdelete/response.go index 077ed7e401..13a184208f 100644 --- a/typedapi/connector/syncjobdelete/response.go +++ b/typedapi/connector/syncjobdelete/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobdelete // Response holds the response body struct for the package syncjobdelete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/connector/syncjobdelete/sync_job_delete.go b/typedapi/connector/syncjobdelete/sync_job_delete.go index c6d0e1cdaf..12cdc82485 100644 --- a/typedapi/connector/syncjobdelete/sync_job_delete.go +++ b/typedapi/connector/syncjobdelete/sync_job_delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a connector sync job. // diff --git a/typedapi/connector/syncjoberror/request.go b/typedapi/connector/syncjoberror/request.go index 8b1dbad69d..297ffea49f 100644 --- a/typedapi/connector/syncjoberror/request.go +++ b/typedapi/connector/syncjoberror/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjoberror @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package syncjoberror // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_error/SyncJobErrorRequest.ts#L23-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_error/SyncJobErrorRequest.ts#L23-L53 type Request struct { - // Error The error for the connector sync job error field. Error string `json:"error"` } diff --git a/typedapi/connector/syncjoberror/response.go b/typedapi/connector/syncjoberror/response.go index ab9888a892..955c5503b9 100644 --- a/typedapi/connector/syncjoberror/response.go +++ b/typedapi/connector/syncjoberror/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjoberror // Response holds the response body struct for the package syncjoberror // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_error/SyncJobErrorResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_error/SyncJobErrorResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/connector/syncjoberror/sync_job_error.go b/typedapi/connector/syncjoberror/sync_job_error.go index c4bab0375d..3573809aa9 100644 --- a/typedapi/connector/syncjoberror/sync_job_error.go +++ b/typedapi/connector/syncjoberror/sync_job_error.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Set a connector sync job error. +// // Set the `error` field for a connector sync job and set its `status` to // `error`. // @@ -89,6 +90,7 @@ func NewSyncJobErrorFunc(tp elastictransport.Interface) NewSyncJobError { } // Set a connector sync job error. +// // Set the `error` field for a connector sync job and set its `status` to // `error`. // diff --git a/typedapi/connector/syncjobget/response.go b/typedapi/connector/syncjobget/response.go index c3cf27afa7..ec8e26b1b4 100644 --- a/typedapi/connector/syncjobget/response.go +++ b/typedapi/connector/syncjobget/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobget @@ -36,7 +36,7 @@ import ( // Response holds the response body struct for the package syncjobget // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_get/SyncJobGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_get/SyncJobGetResponse.ts#L22-L25 type Response struct { CancelationRequestedAt types.DateTime `json:"cancelation_requested_at,omitempty"` CanceledAt types.DateTime `json:"canceled_at,omitempty"` diff --git a/typedapi/connector/syncjobget/sync_job_get.go b/typedapi/connector/syncjobget/sync_job_get.go index 98c333a2c6..a82208bb9e 100644 --- a/typedapi/connector/syncjobget/sync_job_get.go +++ b/typedapi/connector/syncjobget/sync_job_get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a connector sync job. package syncjobget diff --git a/typedapi/connector/syncjoblist/response.go b/typedapi/connector/syncjoblist/response.go index f88a688e75..adbd35e1eb 100644 --- a/typedapi/connector/syncjoblist/response.go +++ b/typedapi/connector/syncjoblist/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjoblist @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package syncjoblist // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_list/SyncJobListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_list/SyncJobListResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Results []types.ConnectorSyncJob `json:"results"` diff --git a/typedapi/connector/syncjoblist/sync_job_list.go b/typedapi/connector/syncjoblist/sync_job_list.go index d9c40100fd..f7629f388b 100644 --- a/typedapi/connector/syncjoblist/sync_job_list.go +++ b/typedapi/connector/syncjoblist/sync_job_list.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get all connector sync jobs. // @@ -284,7 +284,7 @@ func (r *SyncJobList) Header(key, value string) *SyncJobList { return r } -// From Starting offset (default: 0) +// From Starting offset // API name: from func (r *SyncJobList) From(from int) *SyncJobList { r.values.Set("from", strconv.Itoa(from)) diff --git a/typedapi/connector/syncjobpost/request.go b/typedapi/connector/syncjobpost/request.go index b0c4c46f52..82f34fa842 100644 --- a/typedapi/connector/syncjobpost/request.go +++ b/typedapi/connector/syncjobpost/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobpost @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package syncjobpost // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_post/SyncJobPostRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_post/SyncJobPostRequest.ts#L23-L51 type Request struct { - // Id The id of the associated connector Id string `json:"id"` JobType *syncjobtype.SyncJobType `json:"job_type,omitempty"` diff --git a/typedapi/connector/syncjobpost/response.go b/typedapi/connector/syncjobpost/response.go index e5b56d5993..6722978f32 100644 --- a/typedapi/connector/syncjobpost/response.go +++ b/typedapi/connector/syncjobpost/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobpost // Response holds the response body struct for the package syncjobpost // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_post/SyncJobPostResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_post/SyncJobPostResponse.ts#L22-L26 type Response struct { Id string `json:"id"` } diff --git a/typedapi/connector/syncjobpost/sync_job_post.go b/typedapi/connector/syncjobpost/sync_job_post.go index 4ec7cd2112..b1f07f0573 100644 --- a/typedapi/connector/syncjobpost/sync_job_post.go +++ b/typedapi/connector/syncjobpost/sync_job_post.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a connector sync job. // diff --git a/typedapi/connector/syncjobupdatestats/request.go b/typedapi/connector/syncjobupdatestats/request.go index 101f66d0f4..5d197a6a98 100644 --- a/typedapi/connector/syncjobupdatestats/request.go +++ b/typedapi/connector/syncjobupdatestats/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobupdatestats @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package syncjobupdatestats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_update_stats/SyncJobUpdateStatsRequest.ts#L24-L78 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_update_stats/SyncJobUpdateStatsRequest.ts#L24-L79 type Request struct { - // DeletedDocumentCount The number of documents the sync job deleted. DeletedDocumentCount int64 `json:"deleted_document_count"` // IndexedDocumentCount The number of documents the sync job indexed. diff --git a/typedapi/connector/syncjobupdatestats/response.go b/typedapi/connector/syncjobupdatestats/response.go index 7155cdace8..652a1cb122 100644 --- a/typedapi/connector/syncjobupdatestats/response.go +++ b/typedapi/connector/syncjobupdatestats/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package syncjobupdatestats // Response holds the response body struct for the package syncjobupdatestats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_update_stats/SyncJobUpdateStatsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/sync_job_update_stats/SyncJobUpdateStatsResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/connector/syncjobupdatestats/sync_job_update_stats.go b/typedapi/connector/syncjobupdatestats/sync_job_update_stats.go index f7b994ad41..70adf21b1f 100644 --- a/typedapi/connector/syncjobupdatestats/sync_job_update_stats.go +++ b/typedapi/connector/syncjobupdatestats/sync_job_update_stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Set the connector sync job stats. +// // Stats include: `deleted_document_count`, `indexed_document_count`, // `indexed_document_volume`, and `total_document_count`. // You can also update `last_seen`. @@ -92,6 +93,7 @@ func NewSyncJobUpdateStatsFunc(tp elastictransport.Interface) NewSyncJobUpdateSt } // Set the connector sync job stats. +// // Stats include: `deleted_document_count`, `indexed_document_count`, // `indexed_document_volume`, and `total_document_count`. // You can also update `last_seen`. diff --git a/typedapi/connector/updateactivefiltering/response.go b/typedapi/connector/updateactivefiltering/response.go index fde104bfb4..1c34a7dc67 100644 --- a/typedapi/connector/updateactivefiltering/response.go +++ b/typedapi/connector/updateactivefiltering/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateactivefiltering @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateactivefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateactivefiltering/update_active_filtering.go b/typedapi/connector/updateactivefiltering/update_active_filtering.go index 2cea1804a5..177db9bad7 100644 --- a/typedapi/connector/updateactivefiltering/update_active_filtering.go +++ b/typedapi/connector/updateactivefiltering/update_active_filtering.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Activate the connector draft filter. // diff --git a/typedapi/connector/updateapikeyid/request.go b/typedapi/connector/updateapikeyid/request.go index 768ce1b1ac..ed5145046e 100644 --- a/typedapi/connector/updateapikeyid/request.go +++ b/typedapi/connector/updateapikeyid/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateapikeyid @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateapikeyid // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L53 type Request struct { ApiKeyId *string `json:"api_key_id,omitempty"` ApiKeySecretId *string `json:"api_key_secret_id,omitempty"` diff --git a/typedapi/connector/updateapikeyid/response.go b/typedapi/connector/updateapikeyid/response.go index f4e73a6fff..ff2036d343 100644 --- a/typedapi/connector/updateapikeyid/response.go +++ b/typedapi/connector/updateapikeyid/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateapikeyid @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateapikeyid // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateapikeyid/update_api_key_id.go b/typedapi/connector/updateapikeyid/update_api_key_id.go index a1a17bcbc4..29cc4f690e 100644 --- a/typedapi/connector/updateapikeyid/update_api_key_id.go +++ b/typedapi/connector/updateapikeyid/update_api_key_id.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector API key ID. // diff --git a/typedapi/connector/updateconfiguration/request.go b/typedapi/connector/updateconfiguration/request.go index d07915a3d8..8d1de91f13 100644 --- a/typedapi/connector/updateconfiguration/request.go +++ b/typedapi/connector/updateconfiguration/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateconfiguration @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package updateconfiguration // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L55 type Request struct { Configuration types.ConnectorConfiguration `json:"configuration,omitempty"` Values map[string]json.RawMessage `json:"values,omitempty"` diff --git a/typedapi/connector/updateconfiguration/response.go b/typedapi/connector/updateconfiguration/response.go index 689dc869eb..05a4623dd7 100644 --- a/typedapi/connector/updateconfiguration/response.go +++ b/typedapi/connector/updateconfiguration/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateconfiguration @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateconfiguration // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateconfiguration/update_configuration.go b/typedapi/connector/updateconfiguration/update_configuration.go index 55af8d0581..ecb9038a88 100644 --- a/typedapi/connector/updateconfiguration/update_configuration.go +++ b/typedapi/connector/updateconfiguration/update_configuration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector configuration. // diff --git a/typedapi/connector/updateerror/request.go b/typedapi/connector/updateerror/request.go index d96d1578d7..3f941f6613 100644 --- a/typedapi/connector/updateerror/request.go +++ b/typedapi/connector/updateerror/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateerror @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updateerror // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L54 type Request struct { Error any `json:"error"` } diff --git a/typedapi/connector/updateerror/response.go b/typedapi/connector/updateerror/response.go index 3cb07213d9..1f3a116704 100644 --- a/typedapi/connector/updateerror/response.go +++ b/typedapi/connector/updateerror/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateerror @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateerror // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateerror/update_error.go b/typedapi/connector/updateerror/update_error.go index 5ef36e0e19..32f14f3abb 100644 --- a/typedapi/connector/updateerror/update_error.go +++ b/typedapi/connector/updateerror/update_error.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector error field. // diff --git a/typedapi/connector/updatefeatures/request.go b/typedapi/connector/updatefeatures/request.go index 4b5f059d99..97e83f42df 100644 --- a/typedapi/connector/updatefeatures/request.go +++ b/typedapi/connector/updatefeatures/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatefeatures @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefeatures // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_features/ConnectorUpdateFeaturesRequest.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_features/ConnectorUpdateFeaturesRequest.ts#L23-L62 type Request struct { Features types.ConnectorFeatures `json:"features"` } diff --git a/typedapi/connector/updatefeatures/response.go b/typedapi/connector/updatefeatures/response.go index 4fdaedac5e..621060a2c9 100644 --- a/typedapi/connector/updatefeatures/response.go +++ b/typedapi/connector/updatefeatures/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatefeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefeatures // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_features/ConnectorUpdateFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_features/ConnectorUpdateFeaturesResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatefeatures/update_features.go b/typedapi/connector/updatefeatures/update_features.go index 3b424e6c11..b98617da76 100644 --- a/typedapi/connector/updatefeatures/update_features.go +++ b/typedapi/connector/updatefeatures/update_features.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector features. +// // Update the connector features in the connector document. // This API can be used to control the following aspects of a connector: // @@ -97,6 +98,7 @@ func NewUpdateFeaturesFunc(tp elastictransport.Interface) NewUpdateFeatures { } // Update the connector features. +// // Update the connector features in the connector document. // This API can be used to control the following aspects of a connector: // diff --git a/typedapi/connector/updatefiltering/request.go b/typedapi/connector/updatefiltering/request.go index d3db928423..9ae486a809 100644 --- a/typedapi/connector/updatefiltering/request.go +++ b/typedapi/connector/updatefiltering/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatefiltering @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L60 type Request struct { AdvancedSnippet *types.FilteringAdvancedSnippet `json:"advanced_snippet,omitempty"` Filtering []types.FilteringConfig `json:"filtering,omitempty"` diff --git a/typedapi/connector/updatefiltering/response.go b/typedapi/connector/updatefiltering/response.go index 561c5a6db7..3342615494 100644 --- a/typedapi/connector/updatefiltering/response.go +++ b/typedapi/connector/updatefiltering/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatefiltering @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatefiltering/update_filtering.go b/typedapi/connector/updatefiltering/update_filtering.go index 34e30b8d50..7435c2e8de 100644 --- a/typedapi/connector/updatefiltering/update_filtering.go +++ b/typedapi/connector/updatefiltering/update_filtering.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector filtering. // diff --git a/typedapi/connector/updatefilteringvalidation/request.go b/typedapi/connector/updatefilteringvalidation/request.go index a68ef5c802..7a73817410 100644 --- a/typedapi/connector/updatefilteringvalidation/request.go +++ b/typedapi/connector/updatefilteringvalidation/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatefilteringvalidation @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefilteringvalidation // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L48 type Request struct { Validation types.FilteringRulesValidation `json:"validation"` } diff --git a/typedapi/connector/updatefilteringvalidation/response.go b/typedapi/connector/updatefilteringvalidation/response.go index 3fa1df7fe1..46cb52df25 100644 --- a/typedapi/connector/updatefilteringvalidation/response.go +++ b/typedapi/connector/updatefilteringvalidation/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatefilteringvalidation @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefilteringvalidation // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go b/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go index 4963c9050d..6a8796d00b 100644 --- a/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go +++ b/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector draft filtering validation. // diff --git a/typedapi/connector/updateindexname/request.go b/typedapi/connector/updateindexname/request.go index e35af35d59..0cc53d97c5 100644 --- a/typedapi/connector/updateindexname/request.go +++ b/typedapi/connector/updateindexname/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateindexname @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updateindexname // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L51 type Request struct { IndexName any `json:"index_name"` } diff --git a/typedapi/connector/updateindexname/response.go b/typedapi/connector/updateindexname/response.go index 563f76fad4..45fce1ca79 100644 --- a/typedapi/connector/updateindexname/response.go +++ b/typedapi/connector/updateindexname/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateindexname @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateindexname // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateindexname/update_index_name.go b/typedapi/connector/updateindexname/update_index_name.go index 7fceb7bfb1..001a1f94a1 100644 --- a/typedapi/connector/updateindexname/update_index_name.go +++ b/typedapi/connector/updateindexname/update_index_name.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector index name. // diff --git a/typedapi/connector/updatename/request.go b/typedapi/connector/updatename/request.go index 3f25785d96..6d5a4c501a 100644 --- a/typedapi/connector/updatename/request.go +++ b/typedapi/connector/updatename/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatename @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatename // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_name/ConnectorUpdateNameRequest.ts#L22-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_name/ConnectorUpdateNameRequest.ts#L22-L50 type Request struct { Description *string `json:"description,omitempty"` Name *string `json:"name,omitempty"` diff --git a/typedapi/connector/updatename/response.go b/typedapi/connector/updatename/response.go index 03bf7732bf..2000810c73 100644 --- a/typedapi/connector/updatename/response.go +++ b/typedapi/connector/updatename/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatename @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatename // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatename/update_name.go b/typedapi/connector/updatename/update_name.go index e3f980da9a..71a645b353 100644 --- a/typedapi/connector/updatename/update_name.go +++ b/typedapi/connector/updatename/update_name.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector name and description. package updatename diff --git a/typedapi/connector/updatenative/request.go b/typedapi/connector/updatenative/request.go index cbe1518c66..abab36db4f 100644 --- a/typedapi/connector/updatenative/request.go +++ b/typedapi/connector/updatenative/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatenative @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatenative // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L49 type Request struct { IsNative bool `json:"is_native"` } diff --git a/typedapi/connector/updatenative/response.go b/typedapi/connector/updatenative/response.go index 13b681d42f..5ff5fa1ee4 100644 --- a/typedapi/connector/updatenative/response.go +++ b/typedapi/connector/updatenative/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatenative @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatenative // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatenative/update_native.go b/typedapi/connector/updatenative/update_native.go index 0b103e66f3..f35fab010b 100644 --- a/typedapi/connector/updatenative/update_native.go +++ b/typedapi/connector/updatenative/update_native.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector is_native flag. package updatenative diff --git a/typedapi/connector/updatepipeline/request.go b/typedapi/connector/updatepipeline/request.go index b4a391eab0..40d957bdef 100644 --- a/typedapi/connector/updatepipeline/request.go +++ b/typedapi/connector/updatepipeline/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatepipeline @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L52 type Request struct { Pipeline types.IngestPipelineParams `json:"pipeline"` } diff --git a/typedapi/connector/updatepipeline/response.go b/typedapi/connector/updatepipeline/response.go index c196ee2d29..8820a60f08 100644 --- a/typedapi/connector/updatepipeline/response.go +++ b/typedapi/connector/updatepipeline/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatepipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatepipeline/update_pipeline.go b/typedapi/connector/updatepipeline/update_pipeline.go index 0259bc725f..84d9e4cf6c 100644 --- a/typedapi/connector/updatepipeline/update_pipeline.go +++ b/typedapi/connector/updatepipeline/update_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector pipeline. // diff --git a/typedapi/connector/updatescheduling/request.go b/typedapi/connector/updatescheduling/request.go index 753827f31b..8b92e72c29 100644 --- a/typedapi/connector/updatescheduling/request.go +++ b/typedapi/connector/updatescheduling/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatescheduling @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatescheduling // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L51 type Request struct { Scheduling types.SchedulingConfiguration `json:"scheduling"` } diff --git a/typedapi/connector/updatescheduling/response.go b/typedapi/connector/updatescheduling/response.go index 6c90132dbe..b43780697a 100644 --- a/typedapi/connector/updatescheduling/response.go +++ b/typedapi/connector/updatescheduling/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatescheduling @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatescheduling // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatescheduling/update_scheduling.go b/typedapi/connector/updatescheduling/update_scheduling.go index 4ed713a1ec..94299ae9e0 100644 --- a/typedapi/connector/updatescheduling/update_scheduling.go +++ b/typedapi/connector/updatescheduling/update_scheduling.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector scheduling. package updatescheduling diff --git a/typedapi/connector/updateservicetype/request.go b/typedapi/connector/updateservicetype/request.go index 6ec8734b77..918774f32d 100644 --- a/typedapi/connector/updateservicetype/request.go +++ b/typedapi/connector/updateservicetype/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateservicetype @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateservicetype // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L49 type Request struct { ServiceType string `json:"service_type"` } diff --git a/typedapi/connector/updateservicetype/response.go b/typedapi/connector/updateservicetype/response.go index 397ca85f5a..964f771545 100644 --- a/typedapi/connector/updateservicetype/response.go +++ b/typedapi/connector/updateservicetype/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateservicetype @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateservicetype // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateservicetype/update_service_type.go b/typedapi/connector/updateservicetype/update_service_type.go index 06a033c637..c9604eff08 100644 --- a/typedapi/connector/updateservicetype/update_service_type.go +++ b/typedapi/connector/updateservicetype/update_service_type.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector service type. package updateservicetype diff --git a/typedapi/connector/updatestatus/request.go b/typedapi/connector/updatestatus/request.go index 6f1dca7e9c..c8c1f5d019 100644 --- a/typedapi/connector/updatestatus/request.go +++ b/typedapi/connector/updatestatus/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatestatus @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatestatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L50 type Request struct { Status connectorstatus.ConnectorStatus `json:"status"` } diff --git a/typedapi/connector/updatestatus/response.go b/typedapi/connector/updatestatus/response.go index 1b0d3973dc..7b15c50760 100644 --- a/typedapi/connector/updatestatus/response.go +++ b/typedapi/connector/updatestatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatestatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatestatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatestatus/update_status.go b/typedapi/connector/updatestatus/update_status.go index afe4819dc0..1555ed8b32 100644 --- a/typedapi/connector/updatestatus/update_status.go +++ b/typedapi/connector/updatestatus/update_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the connector status. package updatestatus diff --git a/typedapi/core/bulk/bulk.go b/typedapi/core/bulk/bulk.go index e23a991f36..64ffd70600 100644 --- a/typedapi/core/bulk/bulk.go +++ b/typedapi/core/bulk/bulk.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Bulk index or delete documents. +// // Perform multiple `index`, `create`, `delete`, and `update` actions in a // single request. // This reduces overhead and can greatly increase indexing speed. @@ -114,8 +115,11 @@ // `Search::Elasticsearch::Client::5_0::Scroll` // * Python: Check out `elasticsearch.helpers.*` // * JavaScript: Check out `client.helpers.*` +// * Java: Check out +// `co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester` // * .NET: Check out `BulkAllObservable` // * PHP: Check out bulk indexing. +// * Ruby: Check out `Elasticsearch::Helpers::BulkHelper` // // **Submitting bulk requests with cURL** // @@ -242,6 +246,7 @@ func NewBulkFunc(tp elastictransport.Interface) NewBulk { } // Bulk index or delete documents. +// // Perform multiple `index`, `create`, `delete`, and `update` actions in a // single request. // This reduces overhead and can greatly increase indexing speed. @@ -337,8 +342,11 @@ func NewBulkFunc(tp elastictransport.Interface) NewBulk { // `Search::Elasticsearch::Client::5_0::Scroll` // * Python: Check out `elasticsearch.helpers.*` // * JavaScript: Check out `client.helpers.*` +// * Java: Check out +// `co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester` // * .NET: Check out `BulkAllObservable` // * PHP: Check out bulk indexing. +// * Ruby: Check out `Elasticsearch::Helpers::BulkHelper` // // **Submitting bulk requests with cURL** // @@ -687,8 +695,8 @@ func (r *Bulk) Refresh(refresh refresh.Refresh) *Bulk { // Routing A custom value that is used to route operations to a specific shard. // API name: routing -func (r *Bulk) Routing(routing string) *Bulk { - r.values.Set("routing", routing) +func (r *Bulk) Routing(routings ...string) *Bulk { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/bulk/request.go b/typedapi/core/bulk/request.go index 49c8b7d648..fd0ec9a01a 100644 --- a/typedapi/core/bulk/request.go +++ b/typedapi/core/bulk/request.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulk // Request holds the request body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/BulkRequest.ts#L32-L251 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/BulkRequest.ts#L32-L253 type Request = []any diff --git a/typedapi/core/bulk/response.go b/typedapi/core/bulk/response.go index 80c5eee369..fa054e3a16 100644 --- a/typedapi/core/bulk/response.go +++ b/typedapi/core/bulk/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulk @@ -27,9 +27,8 @@ import ( // Response holds the response body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/BulkResponse.ts#L24-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/BulkResponse.ts#L24-L45 type Response struct { - // Errors If `true`, one or more of the operations in the bulk request did not complete // successfully. Errors bool `json:"errors"` diff --git a/typedapi/core/clearscroll/clear_scroll.go b/typedapi/core/clearscroll/clear_scroll.go index 7972503efd..90697e8b7c 100644 --- a/typedapi/core/clearscroll/clear_scroll.go +++ b/typedapi/core/clearscroll/clear_scroll.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear a scrolling search. +// // Clear the search context and results for a scrolling search. package clearscroll @@ -78,6 +79,7 @@ func NewClearScrollFunc(tp elastictransport.Interface) NewClearScroll { } // Clear a scrolling search. +// // Clear the search context and results for a scrolling search. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll diff --git a/typedapi/core/clearscroll/request.go b/typedapi/core/clearscroll/request.go index fa80484ce3..2b1ec4f0e6 100644 --- a/typedapi/core/clearscroll/request.go +++ b/typedapi/core/clearscroll/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearscroll @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package clearscroll // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/clear_scroll/ClearScrollRequest.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/clear_scroll/ClearScrollRequest.ts#L23-L62 type Request struct { - // ScrollId The scroll IDs to clear. // To clear all scroll IDs, use `_all`. ScrollId []string `json:"scroll_id,omitempty"` diff --git a/typedapi/core/clearscroll/response.go b/typedapi/core/clearscroll/response.go index 9f846d3790..23886f5413 100644 --- a/typedapi/core/clearscroll/response.go +++ b/typedapi/core/clearscroll/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearscroll // Response holds the response body struct for the package clearscroll // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/clear_scroll/ClearScrollResponse.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/clear_scroll/ClearScrollResponse.ts#L22-L43 type Response struct { - // NumFreed The number of scrolling search requests cleared. NumFreed int `json:"num_freed"` // Succeeded If `true`, the request succeeded. diff --git a/typedapi/core/closepointintime/close_point_in_time.go b/typedapi/core/closepointintime/close_point_in_time.go index 13e18918e3..ac365597c9 100644 --- a/typedapi/core/closepointintime/close_point_in_time.go +++ b/typedapi/core/closepointintime/close_point_in_time.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Close a point in time. +// // A point in time must be opened explicitly before being used in search // requests. // The `keep_alive` parameter tells Elasticsearch how long it should persist. @@ -82,6 +83,7 @@ func NewClosePointInTimeFunc(tp elastictransport.Interface) NewClosePointInTime } // Close a point in time. +// // A point in time must be opened explicitly before being used in search // requests. // The `keep_alive` parameter tells Elasticsearch how long it should persist. diff --git a/typedapi/core/closepointintime/request.go b/typedapi/core/closepointintime/request.go index 14c3b00c54..3bb8f75b0e 100644 --- a/typedapi/core/closepointintime/request.go +++ b/typedapi/core/closepointintime/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package closepointintime @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package closepointintime // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L49 type Request struct { - // Id The ID of the point-in-time. Id string `json:"id"` } diff --git a/typedapi/core/closepointintime/response.go b/typedapi/core/closepointintime/response.go index 63e133b1ea..e1cd3f4883 100644 --- a/typedapi/core/closepointintime/response.go +++ b/typedapi/core/closepointintime/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package closepointintime // Response holds the response body struct for the package closepointintime // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L42 type Response struct { - // NumFreed The number of search contexts that were successfully closed. NumFreed int `json:"num_freed"` // Succeeded If `true`, all search contexts associated with the point-in-time ID were diff --git a/typedapi/core/count/count.go b/typedapi/core/count/count.go index 42ff6c41ec..299bbbff85 100644 --- a/typedapi/core/count/count.go +++ b/typedapi/core/count/count.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Count search results. +// // Get the number of documents matching a query. // // The query can be provided either by using a simple query string as a @@ -96,6 +97,7 @@ func NewCountFunc(tp elastictransport.Interface) NewCount { } // Count search results. +// // Get the number of documents matching a query. // // The query can be provided either by using a simple query string as a @@ -379,7 +381,7 @@ func (r *Count) AnalyzeWildcard(analyzewildcard bool) *Count { return r } -// DefaultOperator The default operator for query string query: `AND` or `OR`. +// DefaultOperator The default operator for query string query: `and` or `or`. // This parameter can be used only when the `q` query string parameter is // specified. // API name: default_operator @@ -461,10 +463,28 @@ func (r *Count) Preference(preference string) *Count { return r } +// ProjectRouting Specifies a subset of projects to target for the search using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *Count) ProjectRouting(projectrouting string) *Count { + r.values.Set("project_routing", projectrouting) + + return r +} + // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *Count) Routing(routing string) *Count { - r.values.Set("routing", routing) +func (r *Count) Routing(routings ...string) *Count { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/count/request.go b/typedapi/core/count/request.go index 1cec99c538..c9d6ae5620 100644 --- a/typedapi/core/count/request.go +++ b/typedapi/core/count/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package count @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/count/CountRequest.ts#L26-L154 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/count/CountRequest.ts#L31-L172 type Request struct { - // Query Defines the search query using Query DSL. A request body query cannot be used // with the `q` query string parameter. Query *types.Query `json:"query,omitempty"` diff --git a/typedapi/core/count/response.go b/typedapi/core/count/response.go index c6ce444748..31865d1e9d 100644 --- a/typedapi/core/count/response.go +++ b/typedapi/core/count/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package count @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/count/CountResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/count/CountResponse.ts#L23-L25 type Response struct { Count int64 `json:"count"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/core/create/create.go b/typedapi/core/create/create.go index 5793fb2edf..8a37225483 100644 --- a/typedapi/core/create/create.go +++ b/typedapi/core/create/create.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a new document in the index. // @@ -649,8 +649,8 @@ func (r *Create) RequireDataStream(requiredatastream bool) *Create { // Routing A custom value that is used to route operations to a specific shard. // API name: routing -func (r *Create) Routing(routing string) *Create { - r.values.Set("routing", routing) +func (r *Create) Routing(routings ...string) *Create { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/create/request.go b/typedapi/core/create/request.go index b3f8d22c2b..2b3edaa0b3 100644 --- a/typedapi/core/create/request.go +++ b/typedapi/core/create/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package create @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/create/CreateRequest.ts#L32-L199 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/create/CreateRequest.ts#L32-L199 type Request = json.RawMessage // NewRequest returns a Request diff --git a/typedapi/core/create/response.go b/typedapi/core/create/response.go index 4b23635c39..4a75f744ff 100644 --- a/typedapi/core/create/response.go +++ b/typedapi/core/create/response.go @@ -16,20 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package create import ( "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/failurestorestatus" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/result" ) // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/create/CreateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/create/CreateResponse.ts#L22-L25 type Response struct { - ForcedRefresh *bool `json:"forced_refresh,omitempty"` + // FailureStore The role of the failure store in this document response + FailureStore *failurestorestatus.FailureStoreStatus `json:"failure_store,omitempty"` + ForcedRefresh *bool `json:"forced_refresh,omitempty"` // Id_ The unique identifier for the added document. Id_ string `json:"_id"` // Index_ The name of the index the document was added to. diff --git a/typedapi/core/delete/delete.go b/typedapi/core/delete/delete.go index 7aa52e7300..97bcf5c51d 100644 --- a/typedapi/core/delete/delete.go +++ b/typedapi/core/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a document. // @@ -455,8 +455,8 @@ func (r *Delete) Refresh(refresh refresh.Refresh) *Delete { // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *Delete) Routing(routing string) *Delete { - r.values.Set("routing", routing) +func (r *Delete) Routing(routings ...string) *Delete { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/delete/response.go b/typedapi/core/delete/response.go index 2f73f27131..a1e30c6294 100644 --- a/typedapi/core/delete/response.go +++ b/typedapi/core/delete/response.go @@ -16,20 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delete import ( "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/failurestorestatus" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/result" ) // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/delete/DeleteResponse.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/delete/DeleteResponse.ts#L22-L36 type Response struct { - ForcedRefresh *bool `json:"forced_refresh,omitempty"` + // FailureStore The role of the failure store in this document response + FailureStore *failurestorestatus.FailureStoreStatus `json:"failure_store,omitempty"` + ForcedRefresh *bool `json:"forced_refresh,omitempty"` // Id_ The unique identifier for the added document. Id_ string `json:"_id"` // Index_ The name of the index the document was added to. diff --git a/typedapi/core/deletebyquery/delete_by_query.go b/typedapi/core/deletebyquery/delete_by_query.go index 86f52bd415..6ae1ec4c93 100644 --- a/typedapi/core/deletebyquery/delete_by_query.go +++ b/typedapi/core/deletebyquery/delete_by_query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete documents. // @@ -610,7 +610,7 @@ func (r *DeleteByQuery) Conflicts(conflicts conflicts.Conflicts) *DeleteByQuery return r } -// DefaultOperator The default operator for query string query: `AND` or `OR`. +// DefaultOperator The default operator for query string query: `and` or `or`. // This parameter can be used only when the `q` query string parameter is // specified. // API name: default_operator @@ -714,8 +714,8 @@ func (r *DeleteByQuery) RequestsPerSecond(requestspersecond string) *DeleteByQue // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *DeleteByQuery) Routing(routing string) *DeleteByQuery { - r.values.Set("routing", routing) +func (r *DeleteByQuery) Routing(routings ...string) *DeleteByQuery { + r.values.Set("routing", strings.Join(routings, ",")) return r } @@ -770,18 +770,6 @@ func (r *DeleteByQuery) Slices(slices string) *DeleteByQuery { return r } -// Sort A comma-separated list of `:` pairs. -// API name: sort -func (r *DeleteByQuery) Sort(sorts ...string) *DeleteByQuery { - tmp := []string{} - for _, item := range sorts { - tmp = append(tmp, fmt.Sprintf("%v", item)) - } - r.values.Set("sort", strings.Join(tmp, ",")) - - return r -} - // Stats The specific `tag` of the request for logging and statistical purposes. // API name: stats func (r *DeleteByQuery) Stats(stats ...string) *DeleteByQuery { @@ -935,3 +923,18 @@ func (r *DeleteByQuery) Slice(slice types.SlicedScrollVariant) *DeleteByQuery { return r } + +// A sort object that specifies the order of deleted documents. +// API name: sort +func (r *DeleteByQuery) Sort(sorts ...types.SortCombinationsVariant) *DeleteByQuery { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + for _, v := range sorts { + r.req.Sort = append(r.req.Sort, *v.SortCombinationsCaster()) + } + + return r +} diff --git a/typedapi/core/deletebyquery/request.go b/typedapi/core/deletebyquery/request.go index 76b724125e..2554ed840d 100644 --- a/typedapi/core/deletebyquery/request.go +++ b/typedapi/core/deletebyquery/request.go @@ -16,22 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletebyquery import ( + "bytes" "encoding/json" + "errors" "fmt" + "io" + "strconv" "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // Request holds the request body struct for the package deletebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/delete_by_query/DeleteByQueryRequest.ts#L36-L314 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/delete_by_query/DeleteByQueryRequest.ts#L37-L320 type Request struct { - // MaxDocs The maximum number of documents to delete. MaxDocs *int64 `json:"max_docs,omitempty"` // Query The documents to delete specified with Query DSL. @@ -39,6 +42,8 @@ type Request struct { // Slice Slice the request manually using the provided slice ID and total number of // slices. Slice *types.SlicedScroll `json:"slice,omitempty"` + // Sort A sort object that specifies the order of deleted documents. + Sort []types.SortCombinations `json:"sort,omitempty"` } // NewRequest returns a Request @@ -59,3 +64,63 @@ func (r *Request) FromJSON(data string) (*Request, error) { return &req, nil } + +func (s *Request) UnmarshalJSON(data []byte) error { + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "max_docs": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "MaxDocs", err) + } + s.MaxDocs = &value + case float64: + f := int64(v) + s.MaxDocs = &f + } + + case "query": + if err := dec.Decode(&s.Query); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + + case "slice": + if err := dec.Decode(&s.Slice); err != nil { + return fmt.Errorf("%s | %w", "Slice", err) + } + + case "sort": + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(types.SortCombinations) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Sort", err) + } + + s.Sort = append(s.Sort, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Sort); err != nil { + return fmt.Errorf("%s | %w", "Sort", err) + } + } + + } + } + return nil +} diff --git a/typedapi/core/deletebyquery/response.go b/typedapi/core/deletebyquery/response.go index f209ee408a..c030fa2ec6 100644 --- a/typedapi/core/deletebyquery/response.go +++ b/typedapi/core/deletebyquery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletebyquery @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package deletebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/delete_by_query/DeleteByQueryResponse.ts#L26-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/delete_by_query/DeleteByQueryResponse.ts#L26-L88 type Response struct { - // Batches The number of scroll responses pulled back by the delete by query. Batches *int64 `json:"batches,omitempty"` // Deleted The number of documents that were successfully deleted. diff --git a/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go b/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go index 194c76078b..3862b3f430 100644 --- a/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go +++ b/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Throttle a delete by query operation. // diff --git a/typedapi/core/deletebyqueryrethrottle/response.go b/typedapi/core/deletebyqueryrethrottle/response.go index 959d582117..86fbae913c 100644 --- a/typedapi/core/deletebyqueryrethrottle/response.go +++ b/typedapi/core/deletebyqueryrethrottle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletebyqueryrethrottle @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package deletebyqueryrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L25 type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the diff --git a/typedapi/core/deletescript/delete_script.go b/typedapi/core/deletescript/delete_script.go index cc7ade9796..3c72374afe 100644 --- a/typedapi/core/deletescript/delete_script.go +++ b/typedapi/core/deletescript/delete_script.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a script or search template. +// // Deletes a stored script or search template. package deletescript @@ -78,6 +79,7 @@ func NewDeleteScriptFunc(tp elastictransport.Interface) NewDeleteScript { } // Delete a script or search template. +// // Deletes a stored script or search template. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script diff --git a/typedapi/core/deletescript/response.go b/typedapi/core/deletescript/response.go index 022b6047aa..66a5cf101c 100644 --- a/typedapi/core/deletescript/response.go +++ b/typedapi/core/deletescript/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletescript // Response holds the response body struct for the package deletescript // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/delete_script/DeleteScriptResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/delete_script/DeleteScriptResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/core/exists/exists.go b/typedapi/core/exists/exists.go index a518b6953f..08940bdea5 100644 --- a/typedapi/core/exists/exists.go +++ b/typedapi/core/exists/exists.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check a document. // @@ -350,8 +350,8 @@ func (r *Exists) Refresh(refresh bool) *Exists { // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *Exists) Routing(routing string) *Exists { - r.values.Set("routing", routing) +func (r *Exists) Routing(routings ...string) *Exists { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/existssource/exists_source.go b/typedapi/core/existssource/exists_source.go index dde0a283bf..d629f04a78 100644 --- a/typedapi/core/existssource/exists_source.go +++ b/typedapi/core/existssource/exists_source.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check for a document source. // @@ -316,8 +316,8 @@ func (r *ExistsSource) Refresh(refresh bool) *ExistsSource { // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *ExistsSource) Routing(routing string) *ExistsSource { - r.values.Set("routing", routing) +func (r *ExistsSource) Routing(routings ...string) *ExistsSource { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/explain/explain.go b/typedapi/core/explain/explain.go index 69c128f05a..ac0f9b7214 100644 --- a/typedapi/core/explain/explain.go +++ b/typedapi/core/explain/explain.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Explain a document match result. +// // Get information about why a specific document matches, or doesn't match, a // query. // It computes a score explanation for a query and a specific document. @@ -91,6 +92,7 @@ func NewExplainFunc(tp elastictransport.Interface) NewExplain { } // Explain a document match result. +// // Get information about why a specific document matches, or doesn't match, a // query. // It computes a score explanation for a query and a specific document. @@ -359,7 +361,7 @@ func (r *Explain) AnalyzeWildcard(analyzewildcard bool) *Explain { return r } -// DefaultOperator The default operator for query string query: `AND` or `OR`. +// DefaultOperator The default operator for query string query: `and` or `or`. // This parameter can be used only when the `q` query string parameter is // specified. // API name: default_operator @@ -402,8 +404,8 @@ func (r *Explain) Preference(preference string) *Explain { // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *Explain) Routing(routing string) *Explain { - r.values.Set("routing", routing) +func (r *Explain) Routing(routings ...string) *Explain { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/explain/request.go b/typedapi/core/explain/request.go index 28b2784dec..d220552956 100644 --- a/typedapi/core/explain/request.go +++ b/typedapi/core/explain/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package explain @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package explain // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/explain/ExplainRequest.ts#L26-L125 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/explain/ExplainRequest.ts#L26-L126 type Request struct { - // Query Defines the search definition using the Query DSL. Query *types.Query `json:"query,omitempty"` } diff --git a/typedapi/core/explain/response.go b/typedapi/core/explain/response.go index ffb4e50aa7..98b221b055 100644 --- a/typedapi/core/explain/response.go +++ b/typedapi/core/explain/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package explain @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explain // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/explain/ExplainResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/explain/ExplainResponse.ts#L23-L31 type Response struct { Explanation *types.ExplanationDetail `json:"explanation,omitempty"` Get *types.InlineGet `json:"get,omitempty"` diff --git a/typedapi/core/fieldcaps/field_caps.go b/typedapi/core/fieldcaps/field_caps.go index 5daf91b764..975361e08f 100644 --- a/typedapi/core/fieldcaps/field_caps.go +++ b/typedapi/core/fieldcaps/field_caps.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the field capabilities. // @@ -378,8 +378,12 @@ func (r *FieldCaps) IncludeUnmapped(includeunmapped bool) *FieldCaps { // Filters A comma-separated list of filters to apply to the response. // API name: filters -func (r *FieldCaps) Filters(filters string) *FieldCaps { - r.values.Set("filters", filters) +func (r *FieldCaps) Filters(filters ...string) *FieldCaps { + tmp := []string{} + for _, item := range filters { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filters", strings.Join(tmp, ",")) return r } @@ -407,6 +411,25 @@ func (r *FieldCaps) IncludeEmptyFields(includeemptyfields bool) *FieldCaps { return r } +// ProjectRouting Specifies a subset of projects to target for the field-caps query using +// project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *FieldCaps) ProjectRouting(projectrouting string) *FieldCaps { + r.values.Set("project_routing", projectrouting) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/core/fieldcaps/request.go b/typedapi/core/fieldcaps/request.go index b8eb2db52d..513ef24adc 100644 --- a/typedapi/core/fieldcaps/request.go +++ b/typedapi/core/fieldcaps/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package fieldcaps @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package fieldcaps // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/field_caps/FieldCapabilitiesRequest.ts#L25-L130 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/field_caps/FieldCapabilitiesRequest.ts#L30-L147 type Request struct { - // Fields A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are // supported. Fields []string `json:"fields,omitempty"` diff --git a/typedapi/core/fieldcaps/response.go b/typedapi/core/fieldcaps/response.go index d69f7fa7b3..cad8aa37f5 100644 --- a/typedapi/core/fieldcaps/response.go +++ b/typedapi/core/fieldcaps/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package fieldcaps @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package fieldcaps // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/field_caps/FieldCapabilitiesResponse.ts#L24-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/field_caps/FieldCapabilitiesResponse.ts#L24-L38 type Response struct { Fields map[string]map[string]types.FieldCapability `json:"fields"` // Indices The list of indices where this field has the same type family, or null if all diff --git a/typedapi/core/get/get.go b/typedapi/core/get/get.go index a275e2993e..316e5874de 100644 --- a/typedapi/core/get/get.go +++ b/typedapi/core/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a document by its ID. // @@ -516,8 +516,8 @@ func (r *Get) Refresh(refresh bool) *Get { // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *Get) Routing(routing string) *Get { - r.values.Set("routing", routing) +func (r *Get) Routing(routings ...string) *Get { + r.values.Set("routing", strings.Join(routings, ",")) return r } @@ -542,6 +542,14 @@ func (r *Get) SourceExcludes_(fields ...string) *Get { return r } +// SourceExcludeVectors_ Whether vectors should be excluded from _source +// API name: _source_exclude_vectors +func (r *Get) SourceExcludeVectors_(sourceexcludevectors_ bool) *Get { + r.values.Set("_source_exclude_vectors", strconv.FormatBool(sourceexcludevectors_)) + + return r +} + // SourceIncludes_ A comma-separated list of source fields to include in the response. // If this parameter is specified, only these source fields are returned. // You can exclude fields from this subset using the `_source_excludes` query diff --git a/typedapi/core/get/response.go b/typedapi/core/get/response.go index e7a441b517..634d325b22 100644 --- a/typedapi/core/get/response.go +++ b/typedapi/core/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get/GetResponse.ts#L23-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get/GetResponse.ts#L23-L36 type Response struct { - // Fields If the `stored_fields` parameter is set to `true` and `found` is `true`, it // contains the document fields stored in the index. Fields map[string]json.RawMessage `json:"fields,omitempty"` diff --git a/typedapi/core/getscript/get_script.go b/typedapi/core/getscript/get_script.go index d6b14a44be..4438fac8e4 100644 --- a/typedapi/core/getscript/get_script.go +++ b/typedapi/core/getscript/get_script.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a script or search template. +// // Retrieves a stored script or search template. package getscript @@ -78,6 +79,7 @@ func NewGetScriptFunc(tp elastictransport.Interface) NewGetScript { } // Get a script or search template. +// // Retrieves a stored script or search template. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script diff --git a/typedapi/core/getscript/response.go b/typedapi/core/getscript/response.go index 670f75e5a7..fd426c25a2 100644 --- a/typedapi/core/getscript/response.go +++ b/typedapi/core/getscript/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getscript @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscript // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get_script/GetScriptResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get_script/GetScriptResponse.ts#L23-L29 type Response struct { Found bool `json:"found"` Id_ string `json:"_id"` diff --git a/typedapi/core/getscriptcontext/get_script_context.go b/typedapi/core/getscriptcontext/get_script_context.go index 9375ef20f6..405a8754f5 100644 --- a/typedapi/core/getscriptcontext/get_script_context.go +++ b/typedapi/core/getscriptcontext/get_script_context.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get script contexts. // diff --git a/typedapi/core/getscriptcontext/response.go b/typedapi/core/getscriptcontext/response.go index cb99754461..2b94715c86 100644 --- a/typedapi/core/getscriptcontext/response.go +++ b/typedapi/core/getscriptcontext/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getscriptcontext @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscriptcontext // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get_script_context/GetScriptContextResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get_script_context/GetScriptContextResponse.ts#L22-L26 type Response struct { Contexts []types.GetScriptContext `json:"contexts"` } diff --git a/typedapi/core/getscriptlanguages/get_script_languages.go b/typedapi/core/getscriptlanguages/get_script_languages.go index 98cf89037f..b6acf835d4 100644 --- a/typedapi/core/getscriptlanguages/get_script_languages.go +++ b/typedapi/core/getscriptlanguages/get_script_languages.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get script languages. // diff --git a/typedapi/core/getscriptlanguages/response.go b/typedapi/core/getscriptlanguages/response.go index b2b0e99a59..fb22dd8dff 100644 --- a/typedapi/core/getscriptlanguages/response.go +++ b/typedapi/core/getscriptlanguages/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getscriptlanguages @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscriptlanguages // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get_script_languages/GetScriptLanguagesResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get_script_languages/GetScriptLanguagesResponse.ts#L22-L27 type Response struct { LanguageContexts []types.LanguageContext `json:"language_contexts"` TypesAllowed []string `json:"types_allowed"` diff --git a/typedapi/core/getsource/get_source.go b/typedapi/core/getsource/get_source.go index c4ad5a0493..0e207a0dae 100644 --- a/typedapi/core/getsource/get_source.go +++ b/typedapi/core/getsource/get_source.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a document's source. // @@ -378,8 +378,8 @@ func (r *GetSource) Refresh(refresh bool) *GetSource { // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *GetSource) Routing(routing string) *GetSource { - r.values.Set("routing", routing) +func (r *GetSource) Routing(routings ...string) *GetSource { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/getsource/response.go b/typedapi/core/getsource/response.go index 3aa5dec8e0..c6dc5686f9 100644 --- a/typedapi/core/getsource/response.go +++ b/typedapi/core/getsource/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getsource @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsource // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get_source/SourceResponse.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get_source/SourceResponse.ts#L20-L23 type Response = json.RawMessage diff --git a/typedapi/core/healthreport/health_report.go b/typedapi/core/healthreport/health_report.go index 1183b46a7b..b92522e851 100644 --- a/typedapi/core/healthreport/health_report.go +++ b/typedapi/core/healthreport/health_report.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the cluster health. +// // Get a report with the health status of an Elasticsearch cluster. // The report contains a list of indicators that compose Elasticsearch // functionality. @@ -104,6 +105,7 @@ func NewHealthReportFunc(tp elastictransport.Interface) NewHealthReport { } // Get the cluster health. +// // Get a report with the health status of an Elasticsearch cluster. // The report contains a list of indicators that compose Elasticsearch // functionality. diff --git a/typedapi/core/healthreport/response.go b/typedapi/core/healthreport/response.go index 79628d1d5c..09fb5c7f81 100644 --- a/typedapi/core/healthreport/response.go +++ b/typedapi/core/healthreport/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package healthreport @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package healthreport // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/Response.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/Response.ts#L22-L28 type Response struct { ClusterName string `json:"cluster_name"` Indicators types.Indicators `json:"indicators"` diff --git a/typedapi/core/index/index.go b/typedapi/core/index/index.go index 7fd88ea560..c6bc014faa 100644 --- a/typedapi/core/index/index.go +++ b/typedapi/core/index/index.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a document in an index. // @@ -205,6 +205,8 @@ // } // } // +// ``` +// // In this example, the operation will succeed since the supplied version of 2 // is higher than the current document version of 1. // If the document was already updated and its version was set to 2 or higher, @@ -472,6 +474,8 @@ func NewIndexFunc(tp elastictransport.Interface) NewIndex { // } // } // +// ``` +// // In this example, the operation will succeed since the supplied version of 2 // is higher than the current document version of 1. // If the document was already updated and its version was set to 2 or higher, @@ -820,8 +824,8 @@ func (r *Index) Refresh(refresh refresh.Refresh) *Index { // Routing A custom value that is used to route operations to a specific shard. // API name: routing -func (r *Index) Routing(routing string) *Index { - r.values.Set("routing", routing) +func (r *Index) Routing(routings ...string) *Index { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/index/request.go b/typedapi/core/index/request.go index c75babefbb..6a1497567d 100644 --- a/typedapi/core/index/request.go +++ b/typedapi/core/index/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package index @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package index // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/index/IndexRequest.ts#L35-L273 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/index/IndexRequest.ts#L35-L275 type Request = json.RawMessage // NewRequest returns a Request diff --git a/typedapi/core/index/response.go b/typedapi/core/index/response.go index bd8d433fc2..bfc0cc8cad 100644 --- a/typedapi/core/index/response.go +++ b/typedapi/core/index/response.go @@ -16,20 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package index import ( "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/failurestorestatus" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/result" ) // Response holds the response body struct for the package index // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/index/IndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/index/IndexResponse.ts#L22-L25 type Response struct { - ForcedRefresh *bool `json:"forced_refresh,omitempty"` + // FailureStore The role of the failure store in this document response + FailureStore *failurestorestatus.FailureStoreStatus `json:"failure_store,omitempty"` + ForcedRefresh *bool `json:"forced_refresh,omitempty"` // Id_ The unique identifier for the added document. Id_ string `json:"_id"` // Index_ The name of the index the document was added to. diff --git a/typedapi/core/info/info.go b/typedapi/core/info/info.go index e75ee2b467..bf89a3976e 100644 --- a/typedapi/core/info/info.go +++ b/typedapi/core/info/info.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get cluster info. +// // Get basic build, version, and cluster information. // ::: In Serverless, this API is retained for backward compatibility only. Some // response fields, such as the version number, should be ignored. @@ -72,6 +73,7 @@ func NewInfoFunc(tp elastictransport.Interface) NewInfo { } // Get cluster info. +// // Get basic build, version, and cluster information. // ::: In Serverless, this API is retained for backward compatibility only. Some // response fields, such as the version number, should be ignored. diff --git a/typedapi/core/info/response.go b/typedapi/core/info/response.go index ec98bd1101..ba3a6c2a6b 100644 --- a/typedapi/core/info/response.go +++ b/typedapi/core/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package info @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/info/RootNodeInfoResponse.ts#L23-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/info/RootNodeInfoResponse.ts#L23-L40 type Response struct { - // ClusterName The responding cluster's name. ClusterName string `json:"cluster_name"` ClusterUuid string `json:"cluster_uuid"` diff --git a/typedapi/core/knnsearch/knn_search.go b/typedapi/core/knnsearch/knn_search.go new file mode 100644 index 0000000000..a8e46183df --- /dev/null +++ b/typedapi/core/knnsearch/knn_search.go @@ -0,0 +1,469 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Run a knn search. +// +// NOTE: The kNN search API has been replaced by the `knn` option in the search +// API. +package knnsearch + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + indexMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type KnnSearch struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + index string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewKnnSearch type alias for index. +type NewKnnSearch func(index string) *KnnSearch + +// NewKnnSearchFunc returns a new instance of KnnSearch with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewKnnSearchFunc(tp elastictransport.Interface) NewKnnSearch { + return func(index string) *KnnSearch { + n := New(tp) + + n._index(index) + + return n + } +} + +// Run a knn search. +// +// NOTE: The kNN search API has been replaced by the `knn` option in the search +// API. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search +func New(tp elastictransport.Interface) *KnnSearch { + r := &KnnSearch{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *KnnSearch) Raw(raw io.Reader) *KnnSearch { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *KnnSearch) Request(req *Request) *KnnSearch { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *KnnSearch) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for KnnSearch: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == indexMask: + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.index) + } + path.WriteString(r.index) + path.WriteString("/") + path.WriteString("_knn_search") + + method = http.MethodPost + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r KnnSearch) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "knn_search") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "knn_search") + if reader := instrument.RecordRequestBody(ctx, "knn_search", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "knn_search") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the KnnSearch query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a knnsearch.Response +func (r KnnSearch) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "knn_search") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the KnnSearch headers map. +func (r *KnnSearch) Header(key, value string) *KnnSearch { + r.headers.Set(key, value) + + return r +} + +// Index A comma-separated list of index names to search; +// use `_all` or to perform the operation on all indices. +// API Name: index +func (r *KnnSearch) _index(index string) *KnnSearch { + r.paramSet |= indexMask + r.index = index + + return r +} + +// Routing A comma-separated list of specific routing values. +// API name: routing +func (r *KnnSearch) Routing(routings ...string) *KnnSearch { + r.values.Set("routing", strings.Join(routings, ",")) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *KnnSearch) ErrorTrace(errortrace bool) *KnnSearch { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *KnnSearch) FilterPath(filterpaths ...string) *KnnSearch { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *KnnSearch) Human(human bool) *KnnSearch { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *KnnSearch) Pretty(pretty bool) *KnnSearch { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// The request returns doc values for field names matching these patterns +// in the `hits.fields` property of the response. +// It accepts wildcard (`*`) patterns. +// API name: docvalue_fields +func (r *KnnSearch) DocvalueFields(docvaluefields ...types.FieldAndFormatVariant) *KnnSearch { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + for _, v := range docvaluefields { + + r.req.DocvalueFields = append(r.req.DocvalueFields, *v.FieldAndFormatCaster()) + + } + return r +} + +// The request returns values for field names matching these patterns +// in the `hits.fields` property of the response. +// It accepts wildcard (`*`) patterns. +// API name: fields +func (r *KnnSearch) Fields(fields ...string) *KnnSearch { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Fields = fields + + return r +} + +// A query to filter the documents that can match. The kNN search will return +// the top +// `k` documents that also match this filter. The value can be a single query or +// a +// list of queries. If `filter` isn't provided, all documents are allowed to +// match. +// API name: filter +func (r *KnnSearch) Filter(filters ...types.QueryVariant) *KnnSearch { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Filter = make([]types.Query, len(filters)) + for i, v := range filters { + r.req.Filter[i] = *v.QueryCaster() + } + + return r +} + +// The kNN query to run. +// API name: knn +func (r *KnnSearch) Knn(knn types.KnnSearchQueryVariant) *KnnSearch { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Knn = *knn.KnnSearchQueryCaster() + + return r +} + +// Indicates which source fields are returned for matching documents. These +// fields are returned in the `hits._source` property of the search response. +// API name: _source +func (r *KnnSearch) Source_(sourceconfig types.SourceConfigVariant) *KnnSearch { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Source_ = *sourceconfig.SourceConfigCaster() + + return r +} + +// A list of stored fields to return as part of a hit. If no fields are +// specified, +// no stored fields are included in the response. If this field is specified, +// the `_source` +// parameter defaults to `false`. You can pass `_source: true` to return both +// source fields +// and stored fields in the search response. +// API name: stored_fields +func (r *KnnSearch) StoredFields(fields ...string) *KnnSearch { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.StoredFields = fields + + return r +} diff --git a/typedapi/core/knnsearch/request.go b/typedapi/core/knnsearch/request.go new file mode 100644 index 0000000000..aed285b301 --- /dev/null +++ b/typedapi/core/knnsearch/request.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package knnsearch + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Request holds the request body struct for the package knnsearch +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/knn_search/KnnSearchRequest.ts#L26-L99 +type Request struct { + // DocvalueFields The request returns doc values for field names matching these patterns + // in the `hits.fields` property of the response. + // It accepts wildcard (`*`) patterns. + DocvalueFields []types.FieldAndFormat `json:"docvalue_fields,omitempty"` + // Fields The request returns values for field names matching these patterns + // in the `hits.fields` property of the response. + // It accepts wildcard (`*`) patterns. + Fields []string `json:"fields,omitempty"` + // Filter A query to filter the documents that can match. The kNN search will return + // the top + // `k` documents that also match this filter. The value can be a single query or + // a + // list of queries. If `filter` isn't provided, all documents are allowed to + // match. + Filter []types.Query `json:"filter,omitempty"` + // Knn The kNN query to run. + Knn types.KnnSearchQuery `json:"knn"` + // Source_ Indicates which source fields are returned for matching documents. These + // fields are returned in the `hits._source` property of the search response. + Source_ types.SourceConfig `json:"_source,omitempty"` + // StoredFields A list of stored fields to return as part of a hit. If no fields are + // specified, + // no stored fields are included in the response. If this field is specified, + // the `_source` + // parameter defaults to `false`. You can pass `_source: true` to return both + // source fields + // and stored fields in the search response. + StoredFields []string `json:"stored_fields,omitempty"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Knnsearch request: %w", err) + } + + return &req, nil +} + +func (s *Request) UnmarshalJSON(data []byte) error { + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "docvalue_fields": + if err := dec.Decode(&s.DocvalueFields); err != nil { + return fmt.Errorf("%s | %w", "DocvalueFields", err) + } + + case "fields": + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) + } + + s.Fields = append(s.Fields, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Fields); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) + } + } + + case "filter": + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := types.NewQuery() + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Filter", err) + } + + s.Filter = append(s.Filter, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Filter); err != nil { + return fmt.Errorf("%s | %w", "Filter", err) + } + } + + case "knn": + if err := dec.Decode(&s.Knn); err != nil { + return fmt.Errorf("%s | %w", "Knn", err) + } + + case "_source": + message := json.RawMessage{} + if err := dec.Decode(&message); err != nil { + return fmt.Errorf("%s | %w", "Source_", err) + } + keyDec := json.NewDecoder(bytes.NewReader(message)) + source__field: + for { + t, err := keyDec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return fmt.Errorf("%s | %w", "Source_", err) + } + + switch t { + + case "exclude_vectors", "excludes", "includes": + o := types.NewSourceFilter() + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Source_", err) + } + s.Source_ = o + break source__field + + } + } + if s.Source_ == nil { + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&s.Source_); err != nil { + return fmt.Errorf("%s | %w", "Source_", err) + } + } + + case "stored_fields": + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "StoredFields", err) + } + + s.StoredFields = append(s.StoredFields, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.StoredFields); err != nil { + return fmt.Errorf("%s | %w", "StoredFields", err) + } + } + + } + } + return nil +} diff --git a/typedapi/core/knnsearch/response.go b/typedapi/core/knnsearch/response.go new file mode 100644 index 0000000000..51b75eee2a --- /dev/null +++ b/typedapi/core/knnsearch/response.go @@ -0,0 +1,56 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package knnsearch + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package knnsearch +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/knn_search/KnnSearchResponse.ts#L26-L54 +type Response struct { + // Fields The field values for the documents. These fields + // must be specified in the request using the `fields` parameter. + Fields map[string]json.RawMessage `json:"fields,omitempty"` + // Hits The returned documents and metadata. + Hits types.HitsMetadata `json:"hits"` + // MaxScore The highest returned document score. This value is null for requests + // that do not sort by score. + MaxScore *types.Float64 `json:"max_score,omitempty"` + // Shards_ A count of shards used for the request. + Shards_ types.ShardStatistics `json:"_shards"` + // TimedOut If true, the request timed out before completion; + // returned results may be partial or empty. + TimedOut bool `json:"timed_out"` + // Took The milliseconds it took Elasticsearch to run the request. + Took int64 `json:"took"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{ + Fields: make(map[string]json.RawMessage, 0), + } + return r +} diff --git a/typedapi/core/mget/mget.go b/typedapi/core/mget/mget.go index 64c4c78292..2d6a5d116b 100644 --- a/typedapi/core/mget/mget.go +++ b/typedapi/core/mget/mget.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get multiple documents. // @@ -400,8 +400,8 @@ func (r *Mget) Refresh(refresh bool) *Mget { // Routing Custom value used to route operations to a specific shard. // API name: routing -func (r *Mget) Routing(routing string) *Mget { - r.values.Set("routing", routing) +func (r *Mget) Routing(routings ...string) *Mget { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/mget/request.go b/typedapi/core/mget/request.go index e77f932123..647ea1566b 100644 --- a/typedapi/core/mget/request.go +++ b/typedapi/core/mget/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mget @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package mget // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mget/MultiGetRequest.ts#L25-L127 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/mget/MultiGetRequest.ts#L25-L127 type Request struct { - // Docs The documents you want to retrieve. Required if no index is specified in the // request URI. Docs []types.MgetOperation `json:"docs,omitempty"` diff --git a/typedapi/core/mget/response.go b/typedapi/core/mget/response.go index f95332b14d..5b375c97e4 100644 --- a/typedapi/core/mget/response.go +++ b/typedapi/core/mget/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mget @@ -32,9 +32,8 @@ import ( // Response holds the response body struct for the package mget // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mget/MultiGetResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/mget/MultiGetResponse.ts#L22-L31 type Response struct { - // Docs The response includes a docs array that contains the documents in the order // specified in the request. // The structure of the returned documents is similar to that returned by the diff --git a/typedapi/core/msearch/msearch.go b/typedapi/core/msearch/msearch.go index d2745a8cdc..ae4634c082 100644 --- a/typedapi/core/msearch/msearch.go +++ b/typedapi/core/msearch/msearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run multiple searches. // @@ -458,6 +458,22 @@ func (r *Msearch) PreFilterShardSize(prefiltershardsize string) *Msearch { return r } +// ProjectRouting Specifies a subset of projects to target for a search using project metadata +// tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag +// and a single value (possible wildcarded). Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *Msearch) ProjectRouting(projectrouting string) *Msearch { + r.values.Set("project_routing", projectrouting) + + return r +} + // RestTotalHitsAsInt If true, hits.total are returned as an integer in the response. Defaults to // false, which returns an object. // API name: rest_total_hits_as_int @@ -469,8 +485,8 @@ func (r *Msearch) RestTotalHitsAsInt(resttotalhitsasint bool) *Msearch { // Routing Custom routing value used to route search operations to a specific shard. // API name: routing -func (r *Msearch) Routing(routing string) *Msearch { - r.values.Set("routing", routing) +func (r *Msearch) Routing(routings ...string) *Msearch { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/msearch/request.go b/typedapi/core/msearch/request.go index cb7c72c3d4..4be8be650b 100644 --- a/typedapi/core/msearch/request.go +++ b/typedapi/core/msearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package msearch @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/MultiSearchRequest.ts#L25-L140 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch/MultiSearchRequest.ts#L31-L159 type Request = []types.MsearchRequestItem diff --git a/typedapi/core/msearch/response.go b/typedapi/core/msearch/response.go index 7f74b31005..2377e51ac6 100644 --- a/typedapi/core/msearch/response.go +++ b/typedapi/core/msearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package msearch @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/MultiSearchResponse.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch/MultiSearchResponse.ts#L25-L28 type Response struct { Responses []types.MsearchResponseItem `json:"responses"` Took int64 `json:"took"` diff --git a/typedapi/core/msearchtemplate/msearch_template.go b/typedapi/core/msearchtemplate/msearch_template.go index 3a913014d9..3d9beb4640 100644 --- a/typedapi/core/msearchtemplate/msearch_template.go +++ b/typedapi/core/msearchtemplate/msearch_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run multiple templated searches. // @@ -379,6 +379,24 @@ func (r *MsearchTemplate) MaxConcurrentSearches(maxconcurrentsearches string) *M return r } +// ProjectRouting Specifies a subset of projects to target for the search using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *MsearchTemplate) ProjectRouting(projectrouting string) *MsearchTemplate { + r.values.Set("project_routing", projectrouting) + + return r +} + // SearchType The type of the search operation. // API name: search_type func (r *MsearchTemplate) SearchType(searchtype searchtype.SearchType) *MsearchTemplate { diff --git a/typedapi/core/msearchtemplate/request.go b/typedapi/core/msearchtemplate/request.go index b31a418cc2..11a377a208 100644 --- a/typedapi/core/msearchtemplate/request.go +++ b/typedapi/core/msearchtemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package msearchtemplate @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L116 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L128 type Request = []types.RequestItem diff --git a/typedapi/core/msearchtemplate/response.go b/typedapi/core/msearchtemplate/response.go index 5d71cbd82c..4e4c1f1748 100644 --- a/typedapi/core/msearchtemplate/response.go +++ b/typedapi/core/msearchtemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package msearchtemplate @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package msearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L33 type Response struct { Responses []types.MsearchResponseItem `json:"responses"` Took int64 `json:"took"` diff --git a/typedapi/core/mtermvectors/mtermvectors.go b/typedapi/core/mtermvectors/mtermvectors.go index 8ad642dda6..504938b264 100644 --- a/typedapi/core/mtermvectors/mtermvectors.go +++ b/typedapi/core/mtermvectors/mtermvectors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get multiple term vectors. // @@ -404,8 +404,8 @@ func (r *Mtermvectors) Realtime(realtime bool) *Mtermvectors { // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *Mtermvectors) Routing(routing string) *Mtermvectors { - r.values.Set("routing", routing) +func (r *Mtermvectors) Routing(routings ...string) *Mtermvectors { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/mtermvectors/request.go b/typedapi/core/mtermvectors/request.go index 70f531d5a0..4a0d3c6d38 100644 --- a/typedapi/core/mtermvectors/request.go +++ b/typedapi/core/mtermvectors/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mtermvectors @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package mtermvectors // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L134 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L134 type Request struct { - // Docs An array of existing or artificial documents. Docs []types.MTermVectorsOperation `json:"docs,omitempty"` // Ids A simplified syntax to specify documents by their ID if they're in the same diff --git a/typedapi/core/mtermvectors/response.go b/typedapi/core/mtermvectors/response.go index 206c7d3172..a3c1e8be36 100644 --- a/typedapi/core/mtermvectors/response.go +++ b/typedapi/core/mtermvectors/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mtermvectors @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mtermvectors // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24 type Response struct { Docs []types.TermVectorsResult `json:"docs"` } diff --git a/typedapi/core/openpointintime/open_point_in_time.go b/typedapi/core/openpointintime/open_point_in_time.go index 4bd85164f1..6cb4fda7f1 100644 --- a/typedapi/core/openpointintime/open_point_in_time.go +++ b/typedapi/core/openpointintime/open_point_in_time.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Open a point in time. // @@ -463,10 +463,28 @@ func (r *OpenPointInTime) Preference(preference string) *OpenPointInTime { return r } +// ProjectRouting Specifies a subset of projects to target for the PIT request using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *OpenPointInTime) ProjectRouting(projectrouting string) *OpenPointInTime { + r.values.Set("project_routing", projectrouting) + + return r +} + // Routing A custom value that is used to route operations to a specific shard. // API name: routing -func (r *OpenPointInTime) Routing(routing string) *OpenPointInTime { - r.values.Set("routing", routing) +func (r *OpenPointInTime) Routing(routings ...string) *OpenPointInTime { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/openpointintime/request.go b/typedapi/core/openpointintime/request.go index eac8393852..3fb498fb95 100644 --- a/typedapi/core/openpointintime/request.go +++ b/typedapi/core/openpointintime/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package openpointintime @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package openpointintime // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts#L26-L127 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts#L31-L144 type Request struct { - // IndexFilter Filter indices if the provided query rewrites to `match_none` on every shard. IndexFilter *types.Query `json:"index_filter,omitempty"` } diff --git a/typedapi/core/openpointintime/response.go b/typedapi/core/openpointintime/response.go index 3e0d253d74..0f7a6b137e 100644 --- a/typedapi/core/openpointintime/response.go +++ b/typedapi/core/openpointintime/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package openpointintime @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package openpointintime // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29 type Response struct { Id string `json:"id"` // Shards_ Shards used to create the PIT diff --git a/typedapi/core/ping/ping.go b/typedapi/core/ping/ping.go index 1aa770959b..a39f359e89 100644 --- a/typedapi/core/ping/ping.go +++ b/typedapi/core/ping/ping.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Ping the cluster. +// // Get information about whether the cluster is running. package ping @@ -68,6 +69,7 @@ func NewPingFunc(tp elastictransport.Interface) NewPing { } // Ping the cluster. +// // Get information about whether the cluster is running. // // https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster diff --git a/typedapi/core/putscript/put_script.go b/typedapi/core/putscript/put_script.go index 9106c5a40c..bcd4dbb47f 100644 --- a/typedapi/core/putscript/put_script.go +++ b/typedapi/core/putscript/put_script.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a script or search template. +// // Creates or updates a stored script or search template. package putscript @@ -86,6 +87,7 @@ func NewPutScriptFunc(tp elastictransport.Interface) NewPutScript { } // Create or update a script or search template. +// // Creates or updates a stored script or search template. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script diff --git a/typedapi/core/putscript/request.go b/typedapi/core/putscript/request.go index 7e4277b9d5..f20757eb64 100644 --- a/typedapi/core/putscript/request.go +++ b/typedapi/core/putscript/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putscript @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package putscript // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/put_script/PutScriptRequest.ts#L25-L87 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/put_script/PutScriptRequest.ts#L25-L88 type Request struct { - // Script The script or search template, its parameters, and its language. Script types.StoredScript `json:"script"` } diff --git a/typedapi/core/putscript/response.go b/typedapi/core/putscript/response.go index a164122589..cf12bb698d 100644 --- a/typedapi/core/putscript/response.go +++ b/typedapi/core/putscript/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putscript // Response holds the response body struct for the package putscript // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/put_script/PutScriptResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/put_script/PutScriptResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/core/rankeval/rank_eval.go b/typedapi/core/rankeval/rank_eval.go index 3557626bee..2489137c3c 100644 --- a/typedapi/core/rankeval/rank_eval.go +++ b/typedapi/core/rankeval/rank_eval.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Evaluate ranked search results. // @@ -39,6 +39,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/expandwildcard" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/searchtype" ) const ( @@ -360,8 +361,8 @@ func (r *RankEval) IgnoreUnavailable(ignoreunavailable bool) *RankEval { // SearchType Search operation type // API name: search_type -func (r *RankEval) SearchType(searchtype string) *RankEval { - r.values.Set("search_type", searchtype) +func (r *RankEval) SearchType(searchtype searchtype.SearchType) *RankEval { + r.values.Set("search_type", searchtype.String()) return r } diff --git a/typedapi/core/rankeval/request.go b/typedapi/core/rankeval/request.go index c899100c98..ee756efac4 100644 --- a/typedapi/core/rankeval/request.go +++ b/typedapi/core/rankeval/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rankeval @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package rankeval // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/RankEvalRequest.ts#L24-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/RankEvalRequest.ts#L24-L79 type Request struct { - // Metric Definition of the evaluation metric to calculate. Metric *types.RankEvalMetric `json:"metric,omitempty"` // Requests A set of typical search requests, together with their provided ratings. diff --git a/typedapi/core/rankeval/response.go b/typedapi/core/rankeval/response.go index 7a7f07d843..fcad4c6a55 100644 --- a/typedapi/core/rankeval/response.go +++ b/typedapi/core/rankeval/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rankeval @@ -28,9 +28,8 @@ import ( // Response holds the response body struct for the package rankeval // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/RankEvalResponse.ts#L26-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/RankEvalResponse.ts#L26-L34 type Response struct { - // Details The details section contains one entry for every query in the original // requests section, keyed by the search request id Details map[string]types.RankEvalMetricDetail `json:"details"` diff --git a/typedapi/core/reindex/reindex.go b/typedapi/core/reindex/reindex.go index b106e0221a..2c86bee231 100644 --- a/typedapi/core/reindex/reindex.go +++ b/typedapi/core/reindex/reindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Reindex documents. // @@ -86,6 +86,18 @@ // has successfully indexed `max_docs` documents into the target or it has gone // through every document in the source query. // +// It's recommended to reindex on indices with a green status. Reindexing can +// fail when a node shuts down or crashes. +// * When requested with `wait_for_completion=true` (default), the request fails +// if the node shuts down. +// * When requested with `wait_for_completion=false`, a task id is returned, for +// use with the task management APIs. The task may disappear or fail if the node +// shuts down. +// When retrying a failed reindex operation, it might be necessary to set +// `conflicts=proceed` or to first delete the partial destination index. +// Additionally, dry runs, checking disk space, and fetching index recovery +// information can help address the root cause. +// // Refer to the linked documentation for examples of how to reindex documents. package reindex @@ -210,6 +222,18 @@ func NewReindexFunc(tp elastictransport.Interface) NewReindex { // has successfully indexed `max_docs` documents into the target or it has gone // through every document in the source query. // +// It's recommended to reindex on indices with a green status. Reindexing can +// fail when a node shuts down or crashes. +// * When requested with `wait_for_completion=true` (default), the request fails +// if the node shuts down. +// * When requested with `wait_for_completion=false`, a task id is returned, for +// use with the task management APIs. The task may disappear or fail if the node +// shuts down. +// When retrying a failed reindex operation, it might be necessary to set +// `conflicts=proceed` or to first delete the partial destination index. +// Additionally, dry runs, checking disk space, and fetching index recovery +// information can help address the root cause. +// // Refer to the linked documentation for examples of how to reindex documents. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex @@ -615,18 +639,6 @@ func (r *Reindex) Script(script types.ScriptVariant) *Reindex { return r } -// API name: size -func (r *Reindex) Size(size int64) *Reindex { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - r.req.Size = &size - - return r -} - // The source you are copying from. // API name: source func (r *Reindex) Source(source types.ReindexSourceVariant) *Reindex { diff --git a/typedapi/core/reindex/request.go b/typedapi/core/reindex/request.go index 6f82d0dc97..c678e7a898 100644 --- a/typedapi/core/reindex/request.go +++ b/typedapi/core/reindex/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package reindex @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package reindex // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex/ReindexRequest.ts#L27-L178 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/reindex/ReindexRequest.ts#L27-L184 type Request struct { - // Conflicts Indicates whether to continue reindexing even when there are conflicts. Conflicts *conflicts.Conflicts `json:"conflicts,omitempty"` // Dest The destination you are copying to. @@ -49,7 +48,6 @@ type Request struct { MaxDocs *int64 `json:"max_docs,omitempty"` // Script The script to run to update the document source or metadata when reindexing. Script *types.Script `json:"script,omitempty"` - Size *int64 `json:"size,omitempty"` // Source The source you are copying from. Source types.ReindexSource `json:"source"` } diff --git a/typedapi/core/reindex/response.go b/typedapi/core/reindex/response.go index 37e64596e9..970d01546c 100644 --- a/typedapi/core/reindex/response.go +++ b/typedapi/core/reindex/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package reindex @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package reindex // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex/ReindexResponse.ts#L26-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/reindex/ReindexResponse.ts#L26-L92 type Response struct { - // Batches The number of scroll responses that were pulled back by the reindex. Batches *int64 `json:"batches,omitempty"` // Created The number of documents that were successfully created. diff --git a/typedapi/core/reindexrethrottle/reindex_rethrottle.go b/typedapi/core/reindexrethrottle/reindex_rethrottle.go index 4eb8273248..72d672662b 100644 --- a/typedapi/core/reindexrethrottle/reindex_rethrottle.go +++ b/typedapi/core/reindexrethrottle/reindex_rethrottle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Throttle a reindex operation. // diff --git a/typedapi/core/reindexrethrottle/response.go b/typedapi/core/reindexrethrottle/response.go index e68cdfe9be..6823c7a2d6 100644 --- a/typedapi/core/reindexrethrottle/response.go +++ b/typedapi/core/reindexrethrottle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package reindexrethrottle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reindexrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex_rethrottle/ReindexRethrottleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/reindex_rethrottle/ReindexRethrottleResponse.ts#L23-L25 type Response struct { Nodes map[string]types.ReindexNode `json:"nodes"` } diff --git a/typedapi/core/rendersearchtemplate/render_search_template.go b/typedapi/core/rendersearchtemplate/render_search_template.go index 275b321550..fec0b85b80 100644 --- a/typedapi/core/rendersearchtemplate/render_search_template.go +++ b/typedapi/core/rendersearchtemplate/render_search_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Render a search template. // diff --git a/typedapi/core/rendersearchtemplate/request.go b/typedapi/core/rendersearchtemplate/request.go index 6277b0609f..b411a5e15d 100644 --- a/typedapi/core/rendersearchtemplate/request.go +++ b/typedapi/core/rendersearchtemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rendersearchtemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package rendersearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/render_search_template/RenderSearchTemplateRequest.ts#L26-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/render_search_template/RenderSearchTemplateRequest.ts#L26-L77 type Request struct { File *string `json:"file,omitempty"` // Id The ID of the search template to render. diff --git a/typedapi/core/rendersearchtemplate/response.go b/typedapi/core/rendersearchtemplate/response.go index e71baea20f..96977383b7 100644 --- a/typedapi/core/rendersearchtemplate/response.go +++ b/typedapi/core/rendersearchtemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rendersearchtemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package rendersearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25 type Response struct { TemplateOutput map[string]json.RawMessage `json:"template_output"` } diff --git a/typedapi/core/scriptspainlessexecute/request.go b/typedapi/core/scriptspainlessexecute/request.go index 066f8e44c7..a1e73fac97 100644 --- a/typedapi/core/scriptspainlessexecute/request.go +++ b/typedapi/core/scriptspainlessexecute/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package scriptspainlessexecute @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package scriptspainlessexecute // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L64 type Request struct { - // Context The context that the script should run in. // NOTE: Result ordering in the field contexts is not guaranteed. Context *painlesscontext.PainlessContext `json:"context,omitempty"` diff --git a/typedapi/core/scriptspainlessexecute/response.go b/typedapi/core/scriptspainlessexecute/response.go index 143666c67a..7422aeb400 100644 --- a/typedapi/core/scriptspainlessexecute/response.go +++ b/typedapi/core/scriptspainlessexecute/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package scriptspainlessexecute @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package scriptspainlessexecute // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24 type Response struct { Result json.RawMessage `json:"result,omitempty"` } diff --git a/typedapi/core/scriptspainlessexecute/scripts_painless_execute.go b/typedapi/core/scriptspainlessexecute/scripts_painless_execute.go index cc414447d0..e1b843f874 100644 --- a/typedapi/core/scriptspainlessexecute/scripts_painless_execute.go +++ b/typedapi/core/scriptspainlessexecute/scripts_painless_execute.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a script. // diff --git a/typedapi/core/scroll/request.go b/typedapi/core/scroll/request.go index fe8936b5f3..b308a829d9 100644 --- a/typedapi/core/scroll/request.go +++ b/typedapi/core/scroll/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package scroll @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package scroll // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/scroll/ScrollRequest.ts#L24-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/scroll/ScrollRequest.ts#L24-L88 type Request struct { - // Scroll The period to retain the search context for scrolling. Scroll types.Duration `json:"scroll,omitempty"` // ScrollId The scroll ID of the search. diff --git a/typedapi/core/scroll/response.go b/typedapi/core/scroll/response.go index d1c501bc70..b910e91aad 100644 --- a/typedapi/core/scroll/response.go +++ b/typedapi/core/scroll/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package scroll @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package scroll // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/scroll/ScrollResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/scroll/ScrollResponse.ts#L22-L25 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -234,6 +234,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := types.NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := types.NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -262,6 +269,20 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := types.NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := types.NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := types.NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/core/scroll/scroll.go b/typedapi/core/scroll/scroll.go index c190ed676d..f6106df803 100644 --- a/typedapi/core/scroll/scroll.go +++ b/typedapi/core/scroll/scroll.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a scrolling search. // diff --git a/typedapi/core/search/request.go b/typedapi/core/search/request.go index c22fca598e..5449dc1fa1 100644 --- a/typedapi/core/search/request.go +++ b/typedapi/core/search/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package search @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/SearchRequest.ts#L53-L588 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/SearchRequest.ts#L54-L608 type Request struct { - // Aggregations Defines the aggregations that are run as part of the search request. Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` // Collapse Collapses search results the values of the specified field. diff --git a/typedapi/core/search/response.go b/typedapi/core/search/response.go index 12ab062450..d319f67325 100644 --- a/typedapi/core/search/response.go +++ b/typedapi/core/search/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/SearchResponse.ts#L34-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/SearchResponse.ts#L34-L37 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -234,6 +234,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := types.NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := types.NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -262,6 +269,20 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := types.NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := types.NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := types.NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/core/search/search.go b/typedapi/core/search/search.go index 5fb51766ec..15c225126a 100644 --- a/typedapi/core/search/search.go +++ b/typedapi/core/search/search.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a search. // @@ -451,7 +451,7 @@ func (r *Search) CcsMinimizeRoundtrips(ccsminimizeroundtrips bool) *Search { return r } -// DefaultOperator The default operator for the query string query: `AND` or `OR`. +// DefaultOperator The default operator for the query string query: `and` or `or`. // This parameter can be used only when the `q` query string parameter is // specified. // API name: default_operator @@ -588,6 +588,24 @@ func (r *Search) PreFilterShardSize(prefiltershardsize string) *Search { return r } +// ProjectRouting Specifies a subset of projects to target for the search using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *Search) ProjectRouting(projectrouting string) *Search { + r.values.Set("project_routing", projectrouting) + + return r +} + // RequestCache If `true`, the caching of search results is enabled for requests where `size` // is `0`. // It defaults to index level settings. @@ -600,8 +618,8 @@ func (r *Search) RequestCache(requestcache bool) *Search { // Routing A custom value that is used to route operations to a specific shard. // API name: routing -func (r *Search) Routing(routing string) *Search { - r.values.Set("routing", routing) +func (r *Search) Routing(routings ...string) *Search { + r.values.Set("routing", strings.Join(routings, ",")) return r } @@ -693,6 +711,14 @@ func (r *Search) SourceExcludes_(fields ...string) *Search { return r } +// SourceExcludeVectors_ Whether vectors should be excluded from _source +// API name: _source_exclude_vectors +func (r *Search) SourceExcludeVectors_(sourceexcludevectors_ bool) *Search { + r.values.Set("_source_exclude_vectors", strconv.FormatBool(sourceexcludevectors_)) + + return r +} + // SourceIncludes_ A comma-separated list of source fields to include in the response. // If this parameter is specified, only these source fields are returned. // You can exclude fields from this subset using the `_source_excludes` query diff --git a/typedapi/core/searchmvt/request.go b/typedapi/core/searchmvt/request.go index 59aaba720c..55a20af0fe 100644 --- a/typedapi/core/searchmvt/request.go +++ b/typedapi/core/searchmvt/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package searchmvt @@ -35,9 +35,8 @@ import ( // Request holds the request body struct for the package searchmvt // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_mvt/SearchMvtRequest.ts#L33-L334 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search_mvt/SearchMvtRequest.ts#L33-L348 type Request struct { - // Aggs Sub-aggregations for the geotile_grid. // // It supports the following aggregation types: diff --git a/typedapi/core/searchmvt/response.go b/typedapi/core/searchmvt/response.go index c7d9038188..9d7687913e 100644 --- a/typedapi/core/searchmvt/response.go +++ b/typedapi/core/searchmvt/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package searchmvt // Response holds the response body struct for the package searchmvt // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_mvt/SearchMvtResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search_mvt/SearchMvtResponse.ts#L22-L25 type Response = []byte diff --git a/typedapi/core/searchmvt/search_mvt.go b/typedapi/core/searchmvt/search_mvt.go index 7b925d6fb6..1c9fbe72b3 100644 --- a/typedapi/core/searchmvt/search_mvt.go +++ b/typedapi/core/searchmvt/search_mvt.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Search a vector tile. // @@ -635,6 +635,24 @@ func (r *SearchMvt) _y(y string) *SearchMvt { return r } +// ProjectRouting Specifies a subset of projects to target for the search using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *SearchMvt) ProjectRouting(projectrouting string) *SearchMvt { + r.values.Set("project_routing", projectrouting) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/core/searchshards/response.go b/typedapi/core/searchshards/response.go index c16e3479e2..9e23248b78 100644 --- a/typedapi/core/searchshards/response.go +++ b/typedapi/core/searchshards/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package searchshards @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package searchshards // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_shards/SearchShardsResponse.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search_shards/SearchShardsResponse.ts#L34-L40 type Response struct { Indices map[string]types.ShardStoreIndex `json:"indices"` Nodes map[string]types.SearchShardsNodeAttributes `json:"nodes"` diff --git a/typedapi/core/searchshards/search_shards.go b/typedapi/core/searchshards/search_shards.go index a4e2af56c1..8367f4de05 100644 --- a/typedapi/core/searchshards/search_shards.go +++ b/typedapi/core/searchshards/search_shards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the search shards. // @@ -390,8 +390,8 @@ func (r *SearchShards) Preference(preference string) *SearchShards { // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *SearchShards) Routing(routing string) *SearchShards { - r.values.Set("routing", routing) +func (r *SearchShards) Routing(routings ...string) *SearchShards { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/searchtemplate/request.go b/typedapi/core/searchtemplate/request.go index 0d0a23e934..a175725b89 100644 --- a/typedapi/core/searchtemplate/request.go +++ b/typedapi/core/searchtemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package searchtemplate @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package searchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_template/SearchTemplateRequest.ts#L33-L153 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search_template/SearchTemplateRequest.ts#L34-L169 type Request struct { - // Explain If `true`, returns detailed information about score calculation as part of // each hit. // If you specify both this and the `explain` query parameter, the API uses only diff --git a/typedapi/core/searchtemplate/response.go b/typedapi/core/searchtemplate/response.go index ceba19944a..a11dd81ae4 100644 --- a/typedapi/core/searchtemplate/response.go +++ b/typedapi/core/searchtemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package searchtemplate @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package searchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_template/SearchTemplateResponse.ts#L30-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search_template/SearchTemplateResponse.ts#L30-L48 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -210,6 +210,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := types.NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := types.NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -238,6 +245,20 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := types.NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := types.NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := types.NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/core/searchtemplate/search_template.go b/typedapi/core/searchtemplate/search_template.go index 309b38f6ac..4f7cd43a01 100644 --- a/typedapi/core/searchtemplate/search_template.go +++ b/typedapi/core/searchtemplate/search_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a search with a search template. package searchtemplate @@ -386,10 +386,28 @@ func (r *SearchTemplate) Preference(preference string) *SearchTemplate { return r } +// ProjectRouting Specifies a subset of projects to target for the search using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *SearchTemplate) ProjectRouting(projectrouting string) *SearchTemplate { + r.values.Set("project_routing", projectrouting) + + return r +} + // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *SearchTemplate) Routing(routing string) *SearchTemplate { - r.values.Set("routing", routing) +func (r *SearchTemplate) Routing(routings ...string) *SearchTemplate { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/termsenum/request.go b/typedapi/core/termsenum/request.go index 81713c5d6f..be76ebcce1 100644 --- a/typedapi/core/termsenum/request.go +++ b/typedapi/core/termsenum/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package termsenum @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package termsenum // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/terms_enum/TermsEnumRequest.ts#L26-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/terms_enum/TermsEnumRequest.ts#L26-L93 type Request struct { - // CaseInsensitive When `true`, the provided search string is matched against index terms // without case sensitivity. CaseInsensitive *bool `json:"case_insensitive,omitempty"` diff --git a/typedapi/core/termsenum/response.go b/typedapi/core/termsenum/response.go index e9cc174b34..3c8d7b8a5e 100644 --- a/typedapi/core/termsenum/response.go +++ b/typedapi/core/termsenum/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package termsenum @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package termsenum // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/terms_enum/TermsEnumResponse.ts#L22-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/terms_enum/TermsEnumResponse.ts#L22-L32 type Response struct { - // Complete If `false`, the returned terms set may be incomplete and should be treated as // approximate. // This can occur due to a few reasons, such as a request timeout or a node diff --git a/typedapi/core/termsenum/terms_enum.go b/typedapi/core/termsenum/terms_enum.go index 01a4f2922d..518c03c7ae 100644 --- a/typedapi/core/termsenum/terms_enum.go +++ b/typedapi/core/termsenum/terms_enum.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get terms in an index. // diff --git a/typedapi/core/termvectors/request.go b/typedapi/core/termvectors/request.go index be39c309e2..b1746284e1 100644 --- a/typedapi/core/termvectors/request.go +++ b/typedapi/core/termvectors/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package termvectors @@ -34,9 +34,8 @@ import ( // Request holds the request body struct for the package termvectors // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/termvectors/TermVectorsRequest.ts#L33-L241 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/termvectors/TermVectorsRequest.ts#L33-L241 type Request struct { - // Doc An artificial document (a document not present in the index) for which you // want to retrieve term vectors. Doc json.RawMessage `json:"doc,omitempty"` @@ -71,7 +70,7 @@ type Request struct { // Positions If `true`, the response includes term positions. Positions *bool `json:"positions,omitempty"` // Routing A custom value that is used to route operations to a specific shard. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` // TermStatistics If `true`, the response includes: // // * The total term frequency (how often a term occurs in all documents). @@ -142,19 +141,8 @@ func (s *Request) UnmarshalJSON(data []byte) error { } case "fields": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Fields", err) - } - - s.Fields = append(s.Fields, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Fields); err != nil { - return fmt.Errorf("%s | %w", "Fields", err) - } + if err := dec.Decode(&s.Fields); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) } case "filter": @@ -213,8 +201,19 @@ func (s *Request) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "term_statistics": diff --git a/typedapi/core/termvectors/response.go b/typedapi/core/termvectors/response.go index 5a9c1e9a46..b8acc46d76 100644 --- a/typedapi/core/termvectors/response.go +++ b/typedapi/core/termvectors/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package termvectors @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package termvectors // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/termvectors/TermVectorsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/termvectors/TermVectorsResponse.ts#L25-L34 type Response struct { Found bool `json:"found"` Id_ *string `json:"_id,omitempty"` diff --git a/typedapi/core/termvectors/termvectors.go b/typedapi/core/termvectors/termvectors.go index f7ef507c8e..9abe91f127 100644 --- a/typedapi/core/termvectors/termvectors.go +++ b/typedapi/core/termvectors/termvectors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get term vector information. // @@ -564,9 +564,11 @@ func (r *Termvectors) Fields(fields ...string) *Termvectors { if r.req == nil { r.req = NewRequest() } + for _, v := range fields { - r.req.Fields = fields + r.req.Fields = append(r.req.Fields, v) + } return r } @@ -662,13 +664,13 @@ func (r *Termvectors) Positions(positions bool) *Termvectors { // A custom value that is used to route operations to a specific shard. // API name: routing -func (r *Termvectors) Routing(routing string) *Termvectors { +func (r *Termvectors) Routing(routings ...string) *Termvectors { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Routing = &routing + r.req.Routing = routings return r } diff --git a/typedapi/core/update/request.go b/typedapi/core/update/request.go index b4e29cfe69..3afacb57de 100644 --- a/typedapi/core/update/request.go +++ b/typedapi/core/update/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package update @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/update/UpdateRequest.ts#L38-L196 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/update/UpdateRequest.ts#L38-L196 type Request struct { - // DetectNoop If `true`, the `result` in the response is set to `noop` (no operation) when // there are no changes to the document. DetectNoop *bool `json:"detect_noop,omitempty"` diff --git a/typedapi/core/update/response.go b/typedapi/core/update/response.go index c39ede28bc..df6b2cd464 100644 --- a/typedapi/core/update/response.go +++ b/typedapi/core/update/response.go @@ -16,21 +16,24 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package update import ( "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/failurestorestatus" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/result" ) // Response holds the response body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/update/UpdateResponse.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/update/UpdateResponse.ts#L27-L30 type Response struct { - ForcedRefresh *bool `json:"forced_refresh,omitempty"` - Get *types.InlineGet `json:"get,omitempty"` + // FailureStore The role of the failure store in this document response + FailureStore *failurestorestatus.FailureStoreStatus `json:"failure_store,omitempty"` + ForcedRefresh *bool `json:"forced_refresh,omitempty"` + Get *types.InlineGet `json:"get,omitempty"` // Id_ The unique identifier for the added document. Id_ string `json:"_id"` // Index_ The name of the index the document was added to. diff --git a/typedapi/core/update/update.go b/typedapi/core/update/update.go index 06e86cf95e..bd37f2e039 100644 --- a/typedapi/core/update/update.go +++ b/typedapi/core/update/update.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update a document. // @@ -448,8 +448,8 @@ func (r *Update) RetryOnConflict(retryonconflict int) *Update { // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *Update) Routing(routing string) *Update { - r.values.Set("routing", routing) +func (r *Update) Routing(routings ...string) *Update { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/updatebyquery/request.go b/typedapi/core/updatebyquery/request.go index d6a378991e..d97b24129f 100644 --- a/typedapi/core/updatebyquery/request.go +++ b/typedapi/core/updatebyquery/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatebyquery @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package updatebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/update_by_query/UpdateByQueryRequest.ts#L37-L349 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/update_by_query/UpdateByQueryRequest.ts#L37-L351 type Request struct { - // Conflicts The preferred behavior when update by query hits version conflicts: `abort` // or `proceed`. Conflicts *conflicts.Conflicts `json:"conflicts,omitempty"` diff --git a/typedapi/core/updatebyquery/response.go b/typedapi/core/updatebyquery/response.go index a71e180848..11334d21c4 100644 --- a/typedapi/core/updatebyquery/response.go +++ b/typedapi/core/updatebyquery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatebyquery @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package updatebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/update_by_query/UpdateByQueryResponse.ts#L26-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/update_by_query/UpdateByQueryResponse.ts#L26-L71 type Response struct { - // Batches The number of scroll responses pulled back by the update by query. Batches *int64 `json:"batches,omitempty"` // Deleted The number of documents that were successfully deleted. diff --git a/typedapi/core/updatebyquery/update_by_query.go b/typedapi/core/updatebyquery/update_by_query.go index 132fb05ca0..b5885d9fcf 100644 --- a/typedapi/core/updatebyquery/update_by_query.go +++ b/typedapi/core/updatebyquery/update_by_query.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -236,6 +237,7 @@ func NewUpdateByQueryFunc(tp elastictransport.Interface) NewUpdateByQuery { } // 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 @@ -650,7 +652,7 @@ func (r *UpdateByQuery) AnalyzeWildcard(analyzewildcard bool) *UpdateByQuery { return r } -// DefaultOperator The default operator for query string query: `AND` or `OR`. +// DefaultOperator The default operator for query string query: `and` or `or`. // This parameter can be used only when the `q` query string parameter is // specified. // API name: default_operator @@ -773,8 +775,8 @@ func (r *UpdateByQuery) RequestsPerSecond(requestspersecond string) *UpdateByQue // Routing A custom value used to route operations to a specific shard. // API name: routing -func (r *UpdateByQuery) Routing(routing string) *UpdateByQuery { - r.values.Set("routing", routing) +func (r *UpdateByQuery) Routing(routings ...string) *UpdateByQuery { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/core/updatebyqueryrethrottle/response.go b/typedapi/core/updatebyqueryrethrottle/response.go index c2bf9ddfa8..ee9934320e 100644 --- a/typedapi/core/updatebyqueryrethrottle/response.go +++ b/typedapi/core/updatebyqueryrethrottle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatebyqueryrethrottle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatebyqueryrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25 type Response struct { Nodes map[string]types.UpdateByQueryRethrottleNode `json:"nodes"` } diff --git a/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go b/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go index df381bbe7b..0bdcc035e6 100644 --- a/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go +++ b/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Throttle an update by query operation. // diff --git a/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go b/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go index 3c0ec581a7..d83af75170 100644 --- a/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go +++ b/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a dangling index. +// // If Elasticsearch encounters index data that is absent from the current // cluster state, those indices are considered to be dangling. // For example, this can happen if you delete more than @@ -82,6 +83,7 @@ func NewDeleteDanglingIndexFunc(tp elastictransport.Interface) NewDeleteDangling } // Delete a dangling index. +// // If Elasticsearch encounters index data that is absent from the current // cluster state, those indices are considered to be dangling. // For example, this can happen if you delete more than diff --git a/typedapi/danglingindices/deletedanglingindex/response.go b/typedapi/danglingindices/deletedanglingindex/response.go index 4ef1919ec1..0467e4f356 100644 --- a/typedapi/danglingindices/deletedanglingindex/response.go +++ b/typedapi/danglingindices/deletedanglingindex/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletedanglingindex // Response holds the response body struct for the package deletedanglingindex // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/danglingindices/importdanglingindex/import_dangling_index.go b/typedapi/danglingindices/importdanglingindex/import_dangling_index.go index 2e8b6f0165..955e53e9ad 100644 --- a/typedapi/danglingindices/importdanglingindex/import_dangling_index.go +++ b/typedapi/danglingindices/importdanglingindex/import_dangling_index.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Import a dangling index. // diff --git a/typedapi/danglingindices/importdanglingindex/response.go b/typedapi/danglingindices/importdanglingindex/response.go index 0825ad9593..61b53ccda9 100644 --- a/typedapi/danglingindices/importdanglingindex/response.go +++ b/typedapi/danglingindices/importdanglingindex/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package importdanglingindex // Response holds the response body struct for the package importdanglingindex // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go b/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go index 1a8d732450..1dfd0771d2 100644 --- a/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go +++ b/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the dangling indices. // diff --git a/typedapi/danglingindices/listdanglingindices/response.go b/typedapi/danglingindices/listdanglingindices/response.go index 5644daa1e4..5bef6bc2f7 100644 --- a/typedapi/danglingindices/listdanglingindices/response.go +++ b/typedapi/danglingindices/listdanglingindices/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package listdanglingindices @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listdanglingindices // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L23-L27 type Response struct { DanglingIndices []types.DanglingIndex `json:"dangling_indices"` } diff --git a/typedapi/enrich/deletepolicy/delete_policy.go b/typedapi/enrich/deletepolicy/delete_policy.go index 9d9b9d512c..cbd033faf8 100644 --- a/typedapi/enrich/deletepolicy/delete_policy.go +++ b/typedapi/enrich/deletepolicy/delete_policy.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an enrich policy. +// // Deletes an existing enrich policy and its enrich index. package deletepolicy @@ -78,6 +79,7 @@ func NewDeletePolicyFunc(tp elastictransport.Interface) NewDeletePolicy { } // Delete an enrich policy. +// // Deletes an existing enrich policy and its enrich index. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-delete-policy diff --git a/typedapi/enrich/deletepolicy/response.go b/typedapi/enrich/deletepolicy/response.go index 8af6f84606..d51540764a 100644 --- a/typedapi/enrich/deletepolicy/response.go +++ b/typedapi/enrich/deletepolicy/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletepolicy // Response holds the response body struct for the package deletepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/enrich/executepolicy/execute_policy.go b/typedapi/enrich/executepolicy/execute_policy.go index fac69a2c40..b2dd18bb47 100644 --- a/typedapi/enrich/executepolicy/execute_policy.go +++ b/typedapi/enrich/executepolicy/execute_policy.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run an enrich policy. +// // Create the enrich index for an existing enrich policy. package executepolicy @@ -78,6 +79,7 @@ func NewExecutePolicyFunc(tp elastictransport.Interface) NewExecutePolicy { } // Run an enrich policy. +// // Create the enrich index for an existing enrich policy. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy diff --git a/typedapi/enrich/executepolicy/response.go b/typedapi/enrich/executepolicy/response.go index 924deea5e4..fc12046bbb 100644 --- a/typedapi/enrich/executepolicy/response.go +++ b/typedapi/enrich/executepolicy/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package executepolicy @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package executepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28 type Response struct { Status *types.ExecuteEnrichPolicyStatus `json:"status,omitempty"` Task *string `json:"task,omitempty"` diff --git a/typedapi/enrich/getpolicy/get_policy.go b/typedapi/enrich/getpolicy/get_policy.go index a5184dc7b9..cd6fc90b69 100644 --- a/typedapi/enrich/getpolicy/get_policy.go +++ b/typedapi/enrich/getpolicy/get_policy.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get an enrich policy. +// // Returns information about an enrich policy. package getpolicy @@ -76,6 +77,7 @@ func NewGetPolicyFunc(tp elastictransport.Interface) NewGetPolicy { } // Get an enrich policy. +// // Returns information about an enrich policy. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-get-policy diff --git a/typedapi/enrich/getpolicy/response.go b/typedapi/enrich/getpolicy/response.go index 5a658d69ff..e0c7c3b050 100644 --- a/typedapi/enrich/getpolicy/response.go +++ b/typedapi/enrich/getpolicy/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getpolicy @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/get_policy/GetEnrichPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/get_policy/GetEnrichPolicyResponse.ts#L22-L24 type Response struct { Policies []types.Summary `json:"policies"` } diff --git a/typedapi/enrich/putpolicy/put_policy.go b/typedapi/enrich/putpolicy/put_policy.go index 6434bad360..c7c93fedf4 100644 --- a/typedapi/enrich/putpolicy/put_policy.go +++ b/typedapi/enrich/putpolicy/put_policy.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an enrich policy. +// // Creates an enrich policy. package putpolicy @@ -83,6 +84,7 @@ func NewPutPolicyFunc(tp elastictransport.Interface) NewPutPolicy { } // Create an enrich policy. +// // Creates an enrich policy. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy diff --git a/typedapi/enrich/putpolicy/request.go b/typedapi/enrich/putpolicy/request.go index 8e7b93b7ae..9716b215eb 100644 --- a/typedapi/enrich/putpolicy/request.go +++ b/typedapi/enrich/putpolicy/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putpolicy @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package putpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/put_policy/PutEnrichPolicyRequest.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/put_policy/PutEnrichPolicyRequest.ts#L25-L68 type Request struct { - // GeoMatch Matches enrich data to incoming documents based on a `geo_shape` query. GeoMatch *types.EnrichPolicy `json:"geo_match,omitempty"` // Match Matches enrich data to incoming documents based on a `term` query. diff --git a/typedapi/enrich/putpolicy/response.go b/typedapi/enrich/putpolicy/response.go index 5dc2368317..f9a5d12a80 100644 --- a/typedapi/enrich/putpolicy/response.go +++ b/typedapi/enrich/putpolicy/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putpolicy // Response holds the response body struct for the package putpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/enrich/stats/response.go b/typedapi/enrich/stats/response.go index 82fa737760..10937f1894 100644 --- a/typedapi/enrich/stats/response.go +++ b/typedapi/enrich/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stats @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/stats/EnrichStatsResponse.ts#L22-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/stats/EnrichStatsResponse.ts#L22-L39 type Response struct { - // CacheStats Objects containing information about the enrich cache stats on each ingest // node. CacheStats []types.CacheStats `json:"cache_stats,omitempty"` diff --git a/typedapi/enrich/stats/stats.go b/typedapi/enrich/stats/stats.go index 04033c2182..9f192cabdc 100644 --- a/typedapi/enrich/stats/stats.go +++ b/typedapi/enrich/stats/stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get enrich stats. +// // Returns enrich coordinator statistics and information about enrich policies // that are currently executing. package stats @@ -71,6 +72,7 @@ func NewStatsFunc(tp elastictransport.Interface) NewStats { } // Get enrich stats. +// // Returns enrich coordinator statistics and information about enrich policies // that are currently executing. // diff --git a/typedapi/eql/delete/delete.go b/typedapi/eql/delete/delete.go index 5a4aa61111..f7b12bbf88 100644 --- a/typedapi/eql/delete/delete.go +++ b/typedapi/eql/delete/delete.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an async EQL search. +// // Delete an async EQL search or a stored synchronous EQL search. // The API also deletes results for the search. package delete @@ -79,6 +80,7 @@ func NewDeleteFunc(tp elastictransport.Interface) NewDelete { } // Delete an async EQL search. +// // Delete an async EQL search or a stored synchronous EQL search. // The API also deletes results for the search. // diff --git a/typedapi/eql/delete/response.go b/typedapi/eql/delete/response.go index 277868ffbf..170a973a0a 100644 --- a/typedapi/eql/delete/response.go +++ b/typedapi/eql/delete/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/delete/EqlDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/eql/delete/EqlDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/eql/get/get.go b/typedapi/eql/get/get.go index f69e975d29..62f41781c2 100644 --- a/typedapi/eql/get/get.go +++ b/typedapi/eql/get/get.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get async EQL search results. +// // Get the current status and available results for an async EQL search or a // stored synchronous EQL search. package get @@ -79,6 +80,7 @@ func NewGetFunc(tp elastictransport.Interface) NewGet { } // Get async EQL search results. +// // Get the current status and available results for an async EQL search or a // stored synchronous EQL search. // diff --git a/typedapi/eql/get/response.go b/typedapi/eql/get/response.go index 2ac4d159de..061e061621 100644 --- a/typedapi/eql/get/response.go +++ b/typedapi/eql/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/get/EqlGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/eql/get/EqlGetResponse.ts#L22-L25 type Response struct { - // Hits Contains matching events and sequences. Also contains related metadata. Hits types.EqlHits `json:"hits"` // Id Identifier for the search. diff --git a/typedapi/eql/getstatus/get_status.go b/typedapi/eql/getstatus/get_status.go index af1be62757..e685da6ddf 100644 --- a/typedapi/eql/getstatus/get_status.go +++ b/typedapi/eql/getstatus/get_status.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the async EQL status. +// // Get the current status for an async EQL search or a stored synchronous EQL // search without returning results. package getstatus @@ -79,6 +80,7 @@ func NewGetStatusFunc(tp elastictransport.Interface) NewGetStatus { } // Get the async EQL status. +// // Get the current status for an async EQL search or a stored synchronous EQL // search without returning results. // diff --git a/typedapi/eql/getstatus/response.go b/typedapi/eql/getstatus/response.go index a5ad629275..080e43ffc6 100644 --- a/typedapi/eql/getstatus/response.go +++ b/typedapi/eql/getstatus/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getstatus // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/get_status/EqlGetStatusResponse.ts#L24-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/eql/get_status/EqlGetStatusResponse.ts#L24-L51 type Response struct { - // CompletionStatus For a completed search shows the http status code of the completed search. CompletionStatus *int `json:"completion_status,omitempty"` // ExpirationTimeInMillis Shows a timestamp when the eql search will be expired, in milliseconds since diff --git a/typedapi/eql/search/request.go b/typedapi/eql/search/request.go index 77702d3f7f..f0ba864bca 100644 --- a/typedapi/eql/search/request.go +++ b/typedapi/eql/search/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package search @@ -34,9 +34,8 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/search/EqlSearchRequest.ts#L28-L166 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/eql/search/EqlSearchRequest.ts#L28-L180 type Request struct { - // AllowPartialSearchResults Allow query execution also in case of shard failures. // If true, the query will keep running and will return results based on the // available shards. @@ -78,7 +77,7 @@ type Request struct { Size *uint `json:"size,omitempty"` // TiebreakerField Field used to sort hits with the same timestamp in ascending order TiebreakerField *string `json:"tiebreaker_field,omitempty"` - // TimestampField Field containing event timestamp. Default "@timestamp" + // TimestampField Field containing event timestamp. TimestampField *string `json:"timestamp_field,omitempty"` WaitForCompletionTimeout types.Duration `json:"wait_for_completion_timeout,omitempty"` } diff --git a/typedapi/eql/search/response.go b/typedapi/eql/search/response.go index 0dbb80343e..d89c426be0 100644 --- a/typedapi/eql/search/response.go +++ b/typedapi/eql/search/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package search @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/search/EqlSearchResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/eql/search/EqlSearchResponse.ts#L22-L25 type Response struct { - // Hits Contains matching events and sequences. Also contains related metadata. Hits types.EqlHits `json:"hits"` // Id Identifier for the search. diff --git a/typedapi/eql/search/search.go b/typedapi/eql/search/search.go index 08950ab82f..1e5e6c9732 100644 --- a/typedapi/eql/search/search.go +++ b/typedapi/eql/search/search.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get EQL search results. +// // Returns search results for an Event Query Language (EQL) query. // EQL assumes each document in a data stream or index corresponds to an event. package search @@ -86,6 +87,7 @@ func NewSearchFunc(tp elastictransport.Interface) NewSearch { } // Get EQL search results. +// // Returns search results for an Event Query Language (EQL) query. // EQL assumes each document in a data stream or index corresponds to an event. // @@ -310,7 +312,7 @@ func (r *Search) Header(key, value string) *Search { return r } -// Index The name of the index to scope the operation +// Index Comma-separated list of index names to scope the operation // API Name: index func (r *Search) _index(index string) *Search { r.paramSet |= indexMask @@ -358,6 +360,24 @@ func (r *Search) IgnoreUnavailable(ignoreunavailable bool) *Search { return r } +// ProjectRouting Specifies a subset of projects to target for the search using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *Search) ProjectRouting(projectrouting string) *Search { + r.values.Set("project_routing", projectrouting) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -610,7 +630,7 @@ func (r *Search) TiebreakerField(field string) *Search { return r } -// Field containing event timestamp. Default "@timestamp" +// Field containing event timestamp. // API name: timestamp_field func (r *Search) TimestampField(field string) *Search { // Initialize the request if it is not already initialized diff --git a/typedapi/esdsl/access.go b/typedapi/esdsl/access.go index d1b6d867ce..e849863e7f 100644 --- a/typedapi/esdsl/access.go +++ b/typedapi/esdsl/access.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/acknowledgestate.go b/typedapi/esdsl/acknowledgestate.go index 9fd3735016..e483f480ea 100644 --- a/typedapi/esdsl/acknowledgestate.go +++ b/typedapi/esdsl/acknowledgestate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/actionstatus.go b/typedapi/esdsl/actionstatus.go index 3ef84b81e7..52142179c8 100644 --- a/typedapi/esdsl/actionstatus.go +++ b/typedapi/esdsl/actionstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/activationstate.go b/typedapi/esdsl/activationstate.go index 70deef366e..a18875a119 100644 --- a/typedapi/esdsl/activationstate.go +++ b/typedapi/esdsl/activationstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/adaptiveallocations.go b/typedapi/esdsl/adaptiveallocations.go index 38c4001670..0b89bfc38f 100644 --- a/typedapi/esdsl/adaptiveallocations.go +++ b/typedapi/esdsl/adaptiveallocations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/adaptiveallocationssettings.go b/typedapi/esdsl/adaptiveallocationssettings.go index edd0a2d761..45e978f8d8 100644 --- a/typedapi/esdsl/adaptiveallocationssettings.go +++ b/typedapi/esdsl/adaptiveallocationssettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/addaction.go b/typedapi/esdsl/addaction.go index 5f4e84a01f..08ab3b3d77 100644 --- a/typedapi/esdsl/addaction.go +++ b/typedapi/esdsl/addaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -63,9 +63,9 @@ func (s *_addAction) Index(indexname string) *_addAction { return s } -func (s *_addAction) IndexRouting(routing string) *_addAction { +func (s *_addAction) IndexRouting(routings ...string) *_addAction { - s.v.IndexRouting = &routing + s.v.IndexRouting = routings return s } @@ -98,16 +98,16 @@ func (s *_addAction) MustExist(mustexist bool) *_addAction { return s } -func (s *_addAction) Routing(routing string) *_addAction { +func (s *_addAction) Routing(routings ...string) *_addAction { - s.v.Routing = &routing + s.v.Routing = routings return s } -func (s *_addAction) SearchRouting(routing string) *_addAction { +func (s *_addAction) SearchRouting(routings ...string) *_addAction { - s.v.SearchRouting = &routing + s.v.SearchRouting = routings return s } diff --git a/typedapi/esdsl/adjacencymatrixaggregation.go b/typedapi/esdsl/adjacencymatrixaggregation.go index abb9d5ac4d..ee390e89f5 100644 --- a/typedapi/esdsl/adjacencymatrixaggregation.go +++ b/typedapi/esdsl/adjacencymatrixaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/aggregatemetricdoubleproperty.go b/typedapi/esdsl/aggregatemetricdoubleproperty.go index 1ef5786204..3ddb6f7079 100644 --- a/typedapi/esdsl/aggregatemetricdoubleproperty.go +++ b/typedapi/esdsl/aggregatemetricdoubleproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/aggregateorder.go b/typedapi/esdsl/aggregateorder.go index 7268c57f22..2ebcb4af8c 100644 --- a/typedapi/esdsl/aggregateorder.go +++ b/typedapi/esdsl/aggregateorder.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/aggregateoutput.go b/typedapi/esdsl/aggregateoutput.go index 342746e945..624daba27c 100644 --- a/typedapi/esdsl/aggregateoutput.go +++ b/typedapi/esdsl/aggregateoutput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/aggregationrange.go b/typedapi/esdsl/aggregationrange.go index 0700d7a198..3b7610b3cb 100644 --- a/typedapi/esdsl/aggregationrange.go +++ b/typedapi/esdsl/aggregationrange.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/aggregations.go b/typedapi/esdsl/aggregations.go index 214d142980..a13f9f5f6a 100644 --- a/typedapi/esdsl/aggregations.go +++ b/typedapi/esdsl/aggregations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -144,6 +144,20 @@ func (s *_aggregations) Cardinality(cardinality types.CardinalityAggregationVari return s } +func (s *_aggregations) CartesianBounds(cartesianbounds types.CartesianBoundsAggregationVariant) *_aggregations { + + s.v.CartesianBounds = cartesianbounds.CartesianBoundsAggregationCaster() + + return s +} + +func (s *_aggregations) CartesianCentroid(cartesiancentroid types.CartesianCentroidAggregationVariant) *_aggregations { + + s.v.CartesianCentroid = cartesiancentroid.CartesianCentroidAggregationCaster() + + return s +} + func (s *_aggregations) CategorizeText(categorizetext types.CategorizeTextAggregationVariant) *_aggregations { s.v.CategorizeText = categorizetext.CategorizeTextAggregationCaster() @@ -151,6 +165,13 @@ func (s *_aggregations) CategorizeText(categorizetext types.CategorizeTextAggreg return s } +func (s *_aggregations) ChangePoint(changepoint types.ChangePointAggregationVariant) *_aggregations { + + s.v.ChangePoint = changepoint.ChangePointAggregationCaster() + + return s +} + func (s *_aggregations) Children(children types.ChildrenAggregationVariant) *_aggregations { s.v.Children = children.ChildrenAggregationCaster() diff --git a/typedapi/esdsl/ai21servicesettings.go b/typedapi/esdsl/ai21servicesettings.go new file mode 100644 index 0000000000..0e40380bd6 --- /dev/null +++ b/typedapi/esdsl/ai21servicesettings.go @@ -0,0 +1,62 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _ai21ServiceSettings struct { + v *types.Ai21ServiceSettings +} + +func NewAi21ServiceSettings(modelid string) *_ai21ServiceSettings { + + tmp := &_ai21ServiceSettings{v: types.NewAi21ServiceSettings()} + + tmp.ModelId(modelid) + + return tmp + +} + +func (s *_ai21ServiceSettings) ApiKey(apikey string) *_ai21ServiceSettings { + + s.v.ApiKey = &apikey + + return s +} + +func (s *_ai21ServiceSettings) ModelId(modelid string) *_ai21ServiceSettings { + + s.v.ModelId = modelid + + return s +} + +func (s *_ai21ServiceSettings) RateLimit(ratelimit types.RateLimitSettingVariant) *_ai21ServiceSettings { + + s.v.RateLimit = ratelimit.RateLimitSettingCaster() + + return s +} + +func (s *_ai21ServiceSettings) Ai21ServiceSettingsCaster() *types.Ai21ServiceSettings { + return s.v +} diff --git a/typedapi/esdsl/alias.go b/typedapi/esdsl/alias.go index 3b743a5abc..d00029d031 100644 --- a/typedapi/esdsl/alias.go +++ b/typedapi/esdsl/alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -39,9 +39,9 @@ func (s *_alias) Filter(filter types.QueryVariant) *_alias { return s } -func (s *_alias) IndexRouting(routing string) *_alias { +func (s *_alias) IndexRouting(routings ...string) *_alias { - s.v.IndexRouting = &routing + s.v.IndexRouting = routings return s } @@ -60,16 +60,16 @@ func (s *_alias) IsWriteIndex(iswriteindex bool) *_alias { return s } -func (s *_alias) Routing(routing string) *_alias { +func (s *_alias) Routing(routings ...string) *_alias { - s.v.Routing = &routing + s.v.Routing = routings return s } -func (s *_alias) SearchRouting(routing string) *_alias { +func (s *_alias) SearchRouting(routings ...string) *_alias { - s.v.SearchRouting = &routing + s.v.SearchRouting = routings return s } diff --git a/typedapi/esdsl/aliasdefinition.go b/typedapi/esdsl/aliasdefinition.go index 0973cb7d84..ad4323ae6a 100644 --- a/typedapi/esdsl/aliasdefinition.go +++ b/typedapi/esdsl/aliasdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/alibabacloudservicesettings.go b/typedapi/esdsl/alibabacloudservicesettings.go index 7e9ee5b955..8207c6ef3d 100644 --- a/typedapi/esdsl/alibabacloudservicesettings.go +++ b/typedapi/esdsl/alibabacloudservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/alibabacloudtasksettings.go b/typedapi/esdsl/alibabacloudtasksettings.go index 6fcec1a870..b4804ffd84 100644 --- a/typedapi/esdsl/alibabacloudtasksettings.go +++ b/typedapi/esdsl/alibabacloudtasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/allfield.go b/typedapi/esdsl/allfield.go index a9b614ba9e..29ec36c410 100644 --- a/typedapi/esdsl/allfield.go +++ b/typedapi/esdsl/allfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/allocateaction.go b/typedapi/esdsl/allocateaction.go index c93e87db6a..de91319536 100644 --- a/typedapi/esdsl/allocateaction.go +++ b/typedapi/esdsl/allocateaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/alwayscondition.go b/typedapi/esdsl/alwayscondition.go index 3494e67fd1..46896bae18 100644 --- a/typedapi/esdsl/alwayscondition.go +++ b/typedapi/esdsl/alwayscondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/amazonbedrockservicesettings.go b/typedapi/esdsl/amazonbedrockservicesettings.go index 819ab761f7..c61b2de09a 100644 --- a/typedapi/esdsl/amazonbedrockservicesettings.go +++ b/typedapi/esdsl/amazonbedrockservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/amazonbedrocktasksettings.go b/typedapi/esdsl/amazonbedrocktasksettings.go index b1b8906c93..734eb5722f 100644 --- a/typedapi/esdsl/amazonbedrocktasksettings.go +++ b/typedapi/esdsl/amazonbedrocktasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/amazonsagemakerservicesettings.go b/typedapi/esdsl/amazonsagemakerservicesettings.go index 12c4e172da..e8af9de38e 100644 --- a/typedapi/esdsl/amazonsagemakerservicesettings.go +++ b/typedapi/esdsl/amazonsagemakerservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/amazonsagemakertasksettings.go b/typedapi/esdsl/amazonsagemakertasksettings.go index 6522192c7d..b4633438dc 100644 --- a/typedapi/esdsl/amazonsagemakertasksettings.go +++ b/typedapi/esdsl/amazonsagemakertasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/analysisconfig.go b/typedapi/esdsl/analysisconfig.go index db9a4c7ea7..8c7456c5a7 100644 --- a/typedapi/esdsl/analysisconfig.go +++ b/typedapi/esdsl/analysisconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/analysislimits.go b/typedapi/esdsl/analysislimits.go index 887760e941..4fbf7773bd 100644 --- a/typedapi/esdsl/analysislimits.go +++ b/typedapi/esdsl/analysislimits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/analysismemorylimit.go b/typedapi/esdsl/analysismemorylimit.go index fb46984cae..b04061174f 100644 --- a/typedapi/esdsl/analysismemorylimit.go +++ b/typedapi/esdsl/analysismemorylimit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/analyzer.go b/typedapi/esdsl/analyzer.go index af310ebc0a..ee6bc5a71a 100644 --- a/typedapi/esdsl/analyzer.go +++ b/typedapi/esdsl/analyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/anthropicservicesettings.go b/typedapi/esdsl/anthropicservicesettings.go index 58afa70249..b357d9a01a 100644 --- a/typedapi/esdsl/anthropicservicesettings.go +++ b/typedapi/esdsl/anthropicservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/anthropictasksettings.go b/typedapi/esdsl/anthropictasksettings.go index c40a8f380c..1a998f9aa7 100644 --- a/typedapi/esdsl/anthropictasksettings.go +++ b/typedapi/esdsl/anthropictasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/apikeyaggregationcontainer.go b/typedapi/esdsl/apikeyaggregationcontainer.go index 70e2a1891b..cc1fdbb65f 100644 --- a/typedapi/esdsl/apikeyaggregationcontainer.go +++ b/typedapi/esdsl/apikeyaggregationcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/apikeyfiltersaggregation.go b/typedapi/esdsl/apikeyfiltersaggregation.go index 583a48468d..dcb37b05fd 100644 --- a/typedapi/esdsl/apikeyfiltersaggregation.go +++ b/typedapi/esdsl/apikeyfiltersaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/apikeyquerycontainer.go b/typedapi/esdsl/apikeyquerycontainer.go index 1633ece5af..a13e427bd6 100644 --- a/typedapi/esdsl/apikeyquerycontainer.go +++ b/typedapi/esdsl/apikeyquerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/apostrophetokenfilter.go b/typedapi/esdsl/apostrophetokenfilter.go index 91e99f6521..f28f9b5261 100644 --- a/typedapi/esdsl/apostrophetokenfilter.go +++ b/typedapi/esdsl/apostrophetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/appendprocessor.go b/typedapi/esdsl/appendprocessor.go index d428b7eee2..0972ec65da 100644 --- a/typedapi/esdsl/appendprocessor.go +++ b/typedapi/esdsl/appendprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -49,6 +49,13 @@ func (s *_appendProcessor) AllowDuplicates(allowduplicates bool) *_appendProcess return s } +func (s *_appendProcessor) CopyFrom(field string) *_appendProcessor { + + s.v.CopyFrom = &field + + return s +} + func (s *_appendProcessor) Description(description string) *_appendProcessor { s.v.Description = &description diff --git a/typedapi/esdsl/applicationglobaluserprivileges.go b/typedapi/esdsl/applicationglobaluserprivileges.go index 0b06034ff5..35878ee2dd 100644 --- a/typedapi/esdsl/applicationglobaluserprivileges.go +++ b/typedapi/esdsl/applicationglobaluserprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/applicationprivileges.go b/typedapi/esdsl/applicationprivileges.go index 802917f3c3..ccb25cba71 100644 --- a/typedapi/esdsl/applicationprivileges.go +++ b/typedapi/esdsl/applicationprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/applicationprivilegescheck.go b/typedapi/esdsl/applicationprivilegescheck.go index 16879cd053..2d2bf95082 100644 --- a/typedapi/esdsl/applicationprivilegescheck.go +++ b/typedapi/esdsl/applicationprivilegescheck.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/arabicanalyzer.go b/typedapi/esdsl/arabicanalyzer.go index 102ab5a4fb..0f2d5b7116 100644 --- a/typedapi/esdsl/arabicanalyzer.go +++ b/typedapi/esdsl/arabicanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/arabicnormalizationtokenfilter.go b/typedapi/esdsl/arabicnormalizationtokenfilter.go index 4df2d39c9f..c011288a91 100644 --- a/typedapi/esdsl/arabicnormalizationtokenfilter.go +++ b/typedapi/esdsl/arabicnormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/arabicstemtokenfilter.go b/typedapi/esdsl/arabicstemtokenfilter.go index 7d3287a99d..aa0c50d00e 100644 --- a/typedapi/esdsl/arabicstemtokenfilter.go +++ b/typedapi/esdsl/arabicstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/armeniananalyzer.go b/typedapi/esdsl/armeniananalyzer.go index 566baae218..18a74958cd 100644 --- a/typedapi/esdsl/armeniananalyzer.go +++ b/typedapi/esdsl/armeniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/arraycomparecondition.go b/typedapi/esdsl/arraycomparecondition.go index 39c138b836..5808800c24 100644 --- a/typedapi/esdsl/arraycomparecondition.go +++ b/typedapi/esdsl/arraycomparecondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/arraycompareopparams.go b/typedapi/esdsl/arraycompareopparams.go index 02d1e91b5a..8c0e91f32c 100644 --- a/typedapi/esdsl/arraycompareopparams.go +++ b/typedapi/esdsl/arraycompareopparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/asciifoldingtokenfilter.go b/typedapi/esdsl/asciifoldingtokenfilter.go index 73a111cf25..5a5c5bc542 100644 --- a/typedapi/esdsl/asciifoldingtokenfilter.go +++ b/typedapi/esdsl/asciifoldingtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/attachmentprocessor.go b/typedapi/esdsl/attachmentprocessor.go index 27cbf20a0a..c428ae47d8 100644 --- a/typedapi/esdsl/attachmentprocessor.go +++ b/typedapi/esdsl/attachmentprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/autodatehistogramaggregation.go b/typedapi/esdsl/autodatehistogramaggregation.go index 4a22152ba5..9c7a506c2f 100644 --- a/typedapi/esdsl/autodatehistogramaggregation.go +++ b/typedapi/esdsl/autodatehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/autoscalingpolicy.go b/typedapi/esdsl/autoscalingpolicy.go index 454b8c92b9..e3f1628820 100644 --- a/typedapi/esdsl/autoscalingpolicy.go +++ b/typedapi/esdsl/autoscalingpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/averageaggregation.go b/typedapi/esdsl/averageaggregation.go index 7e3d73bd8e..7a40eea0f3 100644 --- a/typedapi/esdsl/averageaggregation.go +++ b/typedapi/esdsl/averageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/averagebucketaggregation.go b/typedapi/esdsl/averagebucketaggregation.go index d4f2cacc4e..2abdd06df5 100644 --- a/typedapi/esdsl/averagebucketaggregation.go +++ b/typedapi/esdsl/averagebucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/azureaistudioservicesettings.go b/typedapi/esdsl/azureaistudioservicesettings.go index c608ec5844..9d9cfcd0df 100644 --- a/typedapi/esdsl/azureaistudioservicesettings.go +++ b/typedapi/esdsl/azureaistudioservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/azureaistudiotasksettings.go b/typedapi/esdsl/azureaistudiotasksettings.go index 3ba7992a76..af8d80dc75 100644 --- a/typedapi/esdsl/azureaistudiotasksettings.go +++ b/typedapi/esdsl/azureaistudiotasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -46,6 +46,13 @@ func (s *_azureAiStudioTaskSettings) MaxNewTokens(maxnewtokens int) *_azureAiStu return s } +func (s *_azureAiStudioTaskSettings) ReturnDocuments(returndocuments bool) *_azureAiStudioTaskSettings { + + s.v.ReturnDocuments = &returndocuments + + return s +} + func (s *_azureAiStudioTaskSettings) Temperature(temperature float32) *_azureAiStudioTaskSettings { s.v.Temperature = &temperature @@ -53,6 +60,13 @@ func (s *_azureAiStudioTaskSettings) Temperature(temperature float32) *_azureAiS return s } +func (s *_azureAiStudioTaskSettings) TopN(topn int) *_azureAiStudioTaskSettings { + + s.v.TopN = &topn + + return s +} + func (s *_azureAiStudioTaskSettings) TopP(topp float32) *_azureAiStudioTaskSettings { s.v.TopP = &topp diff --git a/typedapi/esdsl/azureopenaiservicesettings.go b/typedapi/esdsl/azureopenaiservicesettings.go index 5139a2e998..b9b041b825 100644 --- a/typedapi/esdsl/azureopenaiservicesettings.go +++ b/typedapi/esdsl/azureopenaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/azureopenaitasksettings.go b/typedapi/esdsl/azureopenaitasksettings.go index 5c38d33bbe..801f2b0f94 100644 --- a/typedapi/esdsl/azureopenaitasksettings.go +++ b/typedapi/esdsl/azureopenaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/azurerepository.go b/typedapi/esdsl/azurerepository.go index 3517ae2488..3135e57310 100644 --- a/typedapi/esdsl/azurerepository.go +++ b/typedapi/esdsl/azurerepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/azurerepositorysettings.go b/typedapi/esdsl/azurerepositorysettings.go index 336a3b3802..7b0787b934 100644 --- a/typedapi/esdsl/azurerepositorysettings.go +++ b/typedapi/esdsl/azurerepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/basqueanalyzer.go b/typedapi/esdsl/basqueanalyzer.go index df98812e2d..a7965eb8e5 100644 --- a/typedapi/esdsl/basqueanalyzer.go +++ b/typedapi/esdsl/basqueanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bengalianalyzer.go b/typedapi/esdsl/bengalianalyzer.go index 5976fc49db..f0c2ffdaac 100644 --- a/typedapi/esdsl/bengalianalyzer.go +++ b/typedapi/esdsl/bengalianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bengalinormalizationtokenfilter.go b/typedapi/esdsl/bengalinormalizationtokenfilter.go index 9bdd8c083b..02936bef0f 100644 --- a/typedapi/esdsl/bengalinormalizationtokenfilter.go +++ b/typedapi/esdsl/bengalinormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/binaryproperty.go b/typedapi/esdsl/binaryproperty.go index fee80d0975..677f51dcbb 100644 --- a/typedapi/esdsl/binaryproperty.go +++ b/typedapi/esdsl/binaryproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/booleanproperty.go b/typedapi/esdsl/booleanproperty.go index 3a1bacbc9e..d32c17a800 100644 --- a/typedapi/esdsl/booleanproperty.go +++ b/typedapi/esdsl/booleanproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/boolquery.go b/typedapi/esdsl/boolquery.go index e763a7841e..b76b94d11f 100644 --- a/typedapi/esdsl/boolquery.go +++ b/typedapi/esdsl/boolquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/boostingquery.go b/typedapi/esdsl/boostingquery.go index ac42355af9..2f4d006025 100644 --- a/typedapi/esdsl/boostingquery.go +++ b/typedapi/esdsl/boostingquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/boxplotaggregation.go b/typedapi/esdsl/boxplotaggregation.go index 8636d281ed..5e9dbcd105 100644 --- a/typedapi/esdsl/boxplotaggregation.go +++ b/typedapi/esdsl/boxplotaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/braziliananalyzer.go b/typedapi/esdsl/braziliananalyzer.go index 246ab46ada..7168b92001 100644 --- a/typedapi/esdsl/braziliananalyzer.go +++ b/typedapi/esdsl/braziliananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/brazilianstemtokenfilter.go b/typedapi/esdsl/brazilianstemtokenfilter.go index 20154e5ea4..4743861f38 100644 --- a/typedapi/esdsl/brazilianstemtokenfilter.go +++ b/typedapi/esdsl/brazilianstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketcorrelationaggregation.go b/typedapi/esdsl/bucketcorrelationaggregation.go index ab9786b3f3..1e919e7c0b 100644 --- a/typedapi/esdsl/bucketcorrelationaggregation.go +++ b/typedapi/esdsl/bucketcorrelationaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketcorrelationfunction.go b/typedapi/esdsl/bucketcorrelationfunction.go index 0d44a2fe3a..4ee0807fdd 100644 --- a/typedapi/esdsl/bucketcorrelationfunction.go +++ b/typedapi/esdsl/bucketcorrelationfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketcorrelationfunctioncountcorrelation.go b/typedapi/esdsl/bucketcorrelationfunctioncountcorrelation.go index 5f2daf1ad6..bee6f7efb5 100644 --- a/typedapi/esdsl/bucketcorrelationfunctioncountcorrelation.go +++ b/typedapi/esdsl/bucketcorrelationfunctioncountcorrelation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketcorrelationfunctioncountcorrelationindicator.go b/typedapi/esdsl/bucketcorrelationfunctioncountcorrelationindicator.go index c3a0f598b0..620fe2a212 100644 --- a/typedapi/esdsl/bucketcorrelationfunctioncountcorrelationindicator.go +++ b/typedapi/esdsl/bucketcorrelationfunctioncountcorrelationindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketksaggregation.go b/typedapi/esdsl/bucketksaggregation.go index fa09d231fd..1b22a0d11a 100644 --- a/typedapi/esdsl/bucketksaggregation.go +++ b/typedapi/esdsl/bucketksaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketsapikeyquerycontainer.go b/typedapi/esdsl/bucketsapikeyquerycontainer.go index e69477e273..b9513c1a25 100644 --- a/typedapi/esdsl/bucketsapikeyquerycontainer.go +++ b/typedapi/esdsl/bucketsapikeyquerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketscriptaggregation.go b/typedapi/esdsl/bucketscriptaggregation.go index 4eb480e38f..9ba6892175 100644 --- a/typedapi/esdsl/bucketscriptaggregation.go +++ b/typedapi/esdsl/bucketscriptaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketselectoraggregation.go b/typedapi/esdsl/bucketselectoraggregation.go index 6e5413a55d..85fb92354d 100644 --- a/typedapi/esdsl/bucketselectoraggregation.go +++ b/typedapi/esdsl/bucketselectoraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketsortaggregation.go b/typedapi/esdsl/bucketsortaggregation.go index 96f5df5d27..1bc6ef9ea6 100644 --- a/typedapi/esdsl/bucketsortaggregation.go +++ b/typedapi/esdsl/bucketsortaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketspath.go b/typedapi/esdsl/bucketspath.go index 76f892e265..719f2883bb 100644 --- a/typedapi/esdsl/bucketspath.go +++ b/typedapi/esdsl/bucketspath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bucketsquery.go b/typedapi/esdsl/bucketsquery.go index 0d7744cf8d..d7e04042c4 100644 --- a/typedapi/esdsl/bucketsquery.go +++ b/typedapi/esdsl/bucketsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bulgariananalyzer.go b/typedapi/esdsl/bulgariananalyzer.go index 95242ceaf1..c6c268920c 100644 --- a/typedapi/esdsl/bulgariananalyzer.go +++ b/typedapi/esdsl/bulgariananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bytenumberproperty.go b/typedapi/esdsl/bytenumberproperty.go index 91396449d4..4ece964665 100644 --- a/typedapi/esdsl/bytenumberproperty.go +++ b/typedapi/esdsl/bytenumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bytesize.go b/typedapi/esdsl/bytesize.go index c4f53f726c..4702b8306f 100644 --- a/typedapi/esdsl/bytesize.go +++ b/typedapi/esdsl/bytesize.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/bytesprocessor.go b/typedapi/esdsl/bytesprocessor.go index 194163d523..5ff720bc19 100644 --- a/typedapi/esdsl/bytesprocessor.go +++ b/typedapi/esdsl/bytesprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/cachequeries.go b/typedapi/esdsl/cachequeries.go index 0906cf5149..7755f7146f 100644 --- a/typedapi/esdsl/cachequeries.go +++ b/typedapi/esdsl/cachequeries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/calendarevent.go b/typedapi/esdsl/calendarevent.go index 333082b70b..716b8869ab 100644 --- a/typedapi/esdsl/calendarevent.go +++ b/typedapi/esdsl/calendarevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/cardinalityaggregation.go b/typedapi/esdsl/cardinalityaggregation.go index dcc3cb8314..b585b3a94a 100644 --- a/typedapi/esdsl/cardinalityaggregation.go +++ b/typedapi/esdsl/cardinalityaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/cartesianboundsaggregation.go b/typedapi/esdsl/cartesianboundsaggregation.go new file mode 100644 index 0000000000..91709fd1ad --- /dev/null +++ b/typedapi/esdsl/cartesianboundsaggregation.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _cartesianBoundsAggregation struct { + v *types.CartesianBoundsAggregation +} + +// A metric aggregation that computes the spatial bounding box containing all +// values for a Point or Shape field. +func NewCartesianBoundsAggregation() *_cartesianBoundsAggregation { + + return &_cartesianBoundsAggregation{v: types.NewCartesianBoundsAggregation()} + +} + +func (s *_cartesianBoundsAggregation) Field(field string) *_cartesianBoundsAggregation { + + s.v.Field = &field + + return s +} + +func (s *_cartesianBoundsAggregation) Missing(missing types.MissingVariant) *_cartesianBoundsAggregation { + + s.v.Missing = *missing.MissingCaster() + + return s +} + +func (s *_cartesianBoundsAggregation) Script(script types.ScriptVariant) *_cartesianBoundsAggregation { + + s.v.Script = script.ScriptCaster() + + return s +} + +func (s *_cartesianBoundsAggregation) AggregationsCaster() *types.Aggregations { + container := types.NewAggregations() + + container.CartesianBounds = s.v + + return container +} + +func (s *_cartesianBoundsAggregation) CartesianBoundsAggregationCaster() *types.CartesianBoundsAggregation { + return s.v +} diff --git a/typedapi/esdsl/cartesiancentroidaggregation.go b/typedapi/esdsl/cartesiancentroidaggregation.go new file mode 100644 index 0000000000..2cdbe5369b --- /dev/null +++ b/typedapi/esdsl/cartesiancentroidaggregation.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _cartesianCentroidAggregation struct { + v *types.CartesianCentroidAggregation +} + +// A metric aggregation that computes the weighted centroid from all coordinate +// values for point and shape fields. +func NewCartesianCentroidAggregation() *_cartesianCentroidAggregation { + + return &_cartesianCentroidAggregation{v: types.NewCartesianCentroidAggregation()} + +} + +func (s *_cartesianCentroidAggregation) Field(field string) *_cartesianCentroidAggregation { + + s.v.Field = &field + + return s +} + +func (s *_cartesianCentroidAggregation) Missing(missing types.MissingVariant) *_cartesianCentroidAggregation { + + s.v.Missing = *missing.MissingCaster() + + return s +} + +func (s *_cartesianCentroidAggregation) Script(script types.ScriptVariant) *_cartesianCentroidAggregation { + + s.v.Script = script.ScriptCaster() + + return s +} + +func (s *_cartesianCentroidAggregation) AggregationsCaster() *types.Aggregations { + container := types.NewAggregations() + + container.CartesianCentroid = s.v + + return container +} + +func (s *_cartesianCentroidAggregation) CartesianCentroidAggregationCaster() *types.CartesianCentroidAggregation { + return s.v +} diff --git a/typedapi/esdsl/catalananalyzer.go b/typedapi/esdsl/catalananalyzer.go index b11960e5f5..4e67f1caf2 100644 --- a/typedapi/esdsl/catalananalyzer.go +++ b/typedapi/esdsl/catalananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/categorizationanalyzer.go b/typedapi/esdsl/categorizationanalyzer.go index 868fbc633e..322fb1c5a2 100644 --- a/typedapi/esdsl/categorizationanalyzer.go +++ b/typedapi/esdsl/categorizationanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/categorizationanalyzerdefinition.go b/typedapi/esdsl/categorizationanalyzerdefinition.go index 5ad4aa6fd0..2353fe5d08 100644 --- a/typedapi/esdsl/categorizationanalyzerdefinition.go +++ b/typedapi/esdsl/categorizationanalyzerdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/categorizetextaggregation.go b/typedapi/esdsl/categorizetextaggregation.go index f16b29691a..290d0dd0c8 100644 --- a/typedapi/esdsl/categorizetextaggregation.go +++ b/typedapi/esdsl/categorizetextaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/categorizetextanalyzer.go b/typedapi/esdsl/categorizetextanalyzer.go index ed9ae13e59..335bd9fe24 100644 --- a/typedapi/esdsl/categorizetextanalyzer.go +++ b/typedapi/esdsl/categorizetextanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/chaininput.go b/typedapi/esdsl/chaininput.go index e0dd1e1647..71008b0715 100644 --- a/typedapi/esdsl/chaininput.go +++ b/typedapi/esdsl/chaininput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/changepointaggregation.go b/typedapi/esdsl/changepointaggregation.go new file mode 100644 index 0000000000..41862a99c1 --- /dev/null +++ b/typedapi/esdsl/changepointaggregation.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/gappolicy" +) + +type _changePointAggregation struct { + v *types.ChangePointAggregation +} + +// A sibling pipeline that detects, spikes, dips, and change points in a metric. +// Given a distribution of values provided by the sibling multi-bucket +// aggregation, +// this aggregation indicates the bucket of any spike or dip and/or the bucket +// at which +// the largest change in the distribution of values, if they are statistically +// significant. +// There must be at least 22 bucketed values. Fewer than 1,000 is preferred. +func NewChangePointAggregation() *_changePointAggregation { + + return &_changePointAggregation{v: types.NewChangePointAggregation()} + +} + +func (s *_changePointAggregation) BucketsPath(bucketspath types.BucketsPathVariant) *_changePointAggregation { + + s.v.BucketsPath = *bucketspath.BucketsPathCaster() + + return s +} + +func (s *_changePointAggregation) Format(format string) *_changePointAggregation { + + s.v.Format = &format + + return s +} + +func (s *_changePointAggregation) GapPolicy(gappolicy gappolicy.GapPolicy) *_changePointAggregation { + + s.v.GapPolicy = &gappolicy + return s +} + +func (s *_changePointAggregation) AggregationsCaster() *types.Aggregations { + container := types.NewAggregations() + + container.ChangePoint = s.v + + return container +} + +func (s *_changePointAggregation) ChangePointAggregationCaster() *types.ChangePointAggregation { + return s.v +} diff --git a/typedapi/esdsl/charfilter.go b/typedapi/esdsl/charfilter.go index c509468508..45bc31ce01 100644 --- a/typedapi/esdsl/charfilter.go +++ b/typedapi/esdsl/charfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/charfilterdefinition.go b/typedapi/esdsl/charfilterdefinition.go index 395dd41d23..36179b515a 100644 --- a/typedapi/esdsl/charfilterdefinition.go +++ b/typedapi/esdsl/charfilterdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/chargrouptokenizer.go b/typedapi/esdsl/chargrouptokenizer.go index 2d2e1c9ad5..543edd0ad4 100644 --- a/typedapi/esdsl/chargrouptokenizer.go +++ b/typedapi/esdsl/chargrouptokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/childrenaggregation.go b/typedapi/esdsl/childrenaggregation.go index 8d11a38a19..2bd363c3f6 100644 --- a/typedapi/esdsl/childrenaggregation.go +++ b/typedapi/esdsl/childrenaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/chineseanalyzer.go b/typedapi/esdsl/chineseanalyzer.go index 39aa9397ac..6912ca4b93 100644 --- a/typedapi/esdsl/chineseanalyzer.go +++ b/typedapi/esdsl/chineseanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/chisquareheuristic.go b/typedapi/esdsl/chisquareheuristic.go index 95a9cf3650..514fb74a0b 100644 --- a/typedapi/esdsl/chisquareheuristic.go +++ b/typedapi/esdsl/chisquareheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/chunkingconfig.go b/typedapi/esdsl/chunkingconfig.go index 41fe2bb8c7..68a899eb19 100644 --- a/typedapi/esdsl/chunkingconfig.go +++ b/typedapi/esdsl/chunkingconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/chunkingsettings.go b/typedapi/esdsl/chunkingsettings.go index 43056a069f..710ddcb404 100644 --- a/typedapi/esdsl/chunkingsettings.go +++ b/typedapi/esdsl/chunkingsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -59,6 +59,23 @@ func (s *_chunkingSettings) SentenceOverlap(sentenceoverlap int) *_chunkingSetti return s } +func (s *_chunkingSettings) SeparatorGroup(separatorgroup string) *_chunkingSettings { + + s.v.SeparatorGroup = &separatorgroup + + return s +} + +func (s *_chunkingSettings) Separators(separators ...string) *_chunkingSettings { + + for _, v := range separators { + + s.v.Separators = append(s.v.Separators, v) + + } + return s +} + func (s *_chunkingSettings) Strategy(strategy string) *_chunkingSettings { s.v.Strategy = strategy diff --git a/typedapi/esdsl/chunkrescorer.go b/typedapi/esdsl/chunkrescorer.go new file mode 100644 index 0000000000..5b7c71526b --- /dev/null +++ b/typedapi/esdsl/chunkrescorer.go @@ -0,0 +1,51 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _chunkRescorer struct { + v *types.ChunkRescorer +} + +func NewChunkRescorer() *_chunkRescorer { + + return &_chunkRescorer{v: types.NewChunkRescorer()} + +} + +func (s *_chunkRescorer) ChunkingSettings(chunkingsettings types.ChunkRescorerChunkingSettingsVariant) *_chunkRescorer { + + s.v.ChunkingSettings = chunkingsettings.ChunkRescorerChunkingSettingsCaster() + + return s +} + +func (s *_chunkRescorer) Size(size int) *_chunkRescorer { + + s.v.Size = &size + + return s +} + +func (s *_chunkRescorer) ChunkRescorerCaster() *types.ChunkRescorer { + return s.v +} diff --git a/typedapi/esdsl/chunkrescorerchunkingsettings.go b/typedapi/esdsl/chunkrescorerchunkingsettings.go new file mode 100644 index 0000000000..d08432009f --- /dev/null +++ b/typedapi/esdsl/chunkrescorerchunkingsettings.go @@ -0,0 +1,86 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _chunkRescorerChunkingSettings struct { + v *types.ChunkRescorerChunkingSettings +} + +func NewChunkRescorerChunkingSettings(maxchunksize int) *_chunkRescorerChunkingSettings { + + tmp := &_chunkRescorerChunkingSettings{v: types.NewChunkRescorerChunkingSettings()} + + tmp.MaxChunkSize(maxchunksize) + + return tmp + +} + +func (s *_chunkRescorerChunkingSettings) MaxChunkSize(maxchunksize int) *_chunkRescorerChunkingSettings { + + s.v.MaxChunkSize = maxchunksize + + return s +} + +func (s *_chunkRescorerChunkingSettings) Overlap(overlap int) *_chunkRescorerChunkingSettings { + + s.v.Overlap = &overlap + + return s +} + +func (s *_chunkRescorerChunkingSettings) SentenceOverlap(sentenceoverlap int) *_chunkRescorerChunkingSettings { + + s.v.SentenceOverlap = &sentenceoverlap + + return s +} + +func (s *_chunkRescorerChunkingSettings) SeparatorGroup(separatorgroup string) *_chunkRescorerChunkingSettings { + + s.v.SeparatorGroup = &separatorgroup + + return s +} + +func (s *_chunkRescorerChunkingSettings) Separators(separators ...string) *_chunkRescorerChunkingSettings { + + for _, v := range separators { + + s.v.Separators = append(s.v.Separators, v) + + } + return s +} + +func (s *_chunkRescorerChunkingSettings) Strategy(strategy string) *_chunkRescorerChunkingSettings { + + s.v.Strategy = &strategy + + return s +} + +func (s *_chunkRescorerChunkingSettings) ChunkRescorerChunkingSettingsCaster() *types.ChunkRescorerChunkingSettings { + return s.v +} diff --git a/typedapi/esdsl/circleprocessor.go b/typedapi/esdsl/circleprocessor.go index 3bb8264d18..1eca99d705 100644 --- a/typedapi/esdsl/circleprocessor.go +++ b/typedapi/esdsl/circleprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/cjkanalyzer.go b/typedapi/esdsl/cjkanalyzer.go index 32d204e7fa..3acac0c89a 100644 --- a/typedapi/esdsl/cjkanalyzer.go +++ b/typedapi/esdsl/cjkanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/cjkbigramtokenfilter.go b/typedapi/esdsl/cjkbigramtokenfilter.go index 6d09a6e386..b7a681baf5 100644 --- a/typedapi/esdsl/cjkbigramtokenfilter.go +++ b/typedapi/esdsl/cjkbigramtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/cjkwidthtokenfilter.go b/typedapi/esdsl/cjkwidthtokenfilter.go index 58003021e4..3f555dd06e 100644 --- a/typedapi/esdsl/cjkwidthtokenfilter.go +++ b/typedapi/esdsl/cjkwidthtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/classictokenfilter.go b/typedapi/esdsl/classictokenfilter.go index b8825dd4e2..634e2c029d 100644 --- a/typedapi/esdsl/classictokenfilter.go +++ b/typedapi/esdsl/classictokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/classictokenizer.go b/typedapi/esdsl/classictokenizer.go index 5d0dad08b3..65eb39f058 100644 --- a/typedapi/esdsl/classictokenizer.go +++ b/typedapi/esdsl/classictokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/classificationinferenceoptions.go b/typedapi/esdsl/classificationinferenceoptions.go index 151add920e..fe381a6f0c 100644 --- a/typedapi/esdsl/classificationinferenceoptions.go +++ b/typedapi/esdsl/classificationinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/cohereservicesettings.go b/typedapi/esdsl/cohereservicesettings.go index 0af62e17b3..625b5cee87 100644 --- a/typedapi/esdsl/cohereservicesettings.go +++ b/typedapi/esdsl/cohereservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -30,12 +30,14 @@ type _cohereServiceSettings struct { v *types.CohereServiceSettings } -func NewCohereServiceSettings(apikey string) *_cohereServiceSettings { +func NewCohereServiceSettings(apikey string, modelid string) *_cohereServiceSettings { tmp := &_cohereServiceSettings{v: types.NewCohereServiceSettings()} tmp.ApiKey(apikey) + tmp.ModelId(modelid) + return tmp } @@ -55,7 +57,7 @@ func (s *_cohereServiceSettings) EmbeddingType(embeddingtype cohereembeddingtype func (s *_cohereServiceSettings) ModelId(modelid string) *_cohereServiceSettings { - s.v.ModelId = &modelid + s.v.ModelId = modelid return s } diff --git a/typedapi/esdsl/coheretasksettings.go b/typedapi/esdsl/coheretasksettings.go index 5a1a305d2b..1ee6d0892e 100644 --- a/typedapi/esdsl/coheretasksettings.go +++ b/typedapi/esdsl/coheretasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -30,15 +30,19 @@ type _cohereTaskSettings struct { v *types.CohereTaskSettings } -func NewCohereTaskSettings() *_cohereTaskSettings { +func NewCohereTaskSettings(inputtype cohereinputtype.CohereInputType) *_cohereTaskSettings { - return &_cohereTaskSettings{v: types.NewCohereTaskSettings()} + tmp := &_cohereTaskSettings{v: types.NewCohereTaskSettings()} + + tmp.InputType(inputtype) + + return tmp } func (s *_cohereTaskSettings) InputType(inputtype cohereinputtype.CohereInputType) *_cohereTaskSettings { - s.v.InputType = &inputtype + s.v.InputType = inputtype return s } diff --git a/typedapi/esdsl/combinedfieldsquery.go b/typedapi/esdsl/combinedfieldsquery.go index 7ae7288dfd..bc0cc72fc8 100644 --- a/typedapi/esdsl/combinedfieldsquery.go +++ b/typedapi/esdsl/combinedfieldsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/command.go b/typedapi/esdsl/command.go index a3b2f4c261..67a343a5d0 100644 --- a/typedapi/esdsl/command.go +++ b/typedapi/esdsl/command.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/commandallocateprimaryaction.go b/typedapi/esdsl/commandallocateprimaryaction.go index 2265506dbd..05501d8c0d 100644 --- a/typedapi/esdsl/commandallocateprimaryaction.go +++ b/typedapi/esdsl/commandallocateprimaryaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/commandallocatereplicaaction.go b/typedapi/esdsl/commandallocatereplicaaction.go index 9a3b3a1ea1..00806f6364 100644 --- a/typedapi/esdsl/commandallocatereplicaaction.go +++ b/typedapi/esdsl/commandallocatereplicaaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/commandcancelaction.go b/typedapi/esdsl/commandcancelaction.go index 5dae7a62c4..d46f7713f2 100644 --- a/typedapi/esdsl/commandcancelaction.go +++ b/typedapi/esdsl/commandcancelaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/commandmoveaction.go b/typedapi/esdsl/commandmoveaction.go index b9c4c8b627..d39d48b9ca 100644 --- a/typedapi/esdsl/commandmoveaction.go +++ b/typedapi/esdsl/commandmoveaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/commongramstokenfilter.go b/typedapi/esdsl/commongramstokenfilter.go index 3180c17001..48ae214094 100644 --- a/typedapi/esdsl/commongramstokenfilter.go +++ b/typedapi/esdsl/commongramstokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/commontermsquery.go b/typedapi/esdsl/commontermsquery.go index 4d191722a5..5f7610ac9f 100644 --- a/typedapi/esdsl/commontermsquery.go +++ b/typedapi/esdsl/commontermsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/communityidprocessor.go b/typedapi/esdsl/communityidprocessor.go index 124226dbf6..071dbf32dc 100644 --- a/typedapi/esdsl/communityidprocessor.go +++ b/typedapi/esdsl/communityidprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/completioncontext.go b/typedapi/esdsl/completioncontext.go index d44d88e1e2..515d56527f 100644 --- a/typedapi/esdsl/completioncontext.go +++ b/typedapi/esdsl/completioncontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/completionproperty.go b/typedapi/esdsl/completionproperty.go index 08a3db1e8a..1cdd04bbc1 100644 --- a/typedapi/esdsl/completionproperty.go +++ b/typedapi/esdsl/completionproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/completionsuggester.go b/typedapi/esdsl/completionsuggester.go index 34a399a3ad..939c60cf2f 100644 --- a/typedapi/esdsl/completionsuggester.go +++ b/typedapi/esdsl/completionsuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -33,50 +33,50 @@ func NewCompletionSuggester() *_completionSuggester { } -func (s *_completionSuggester) Analyzer(analyzer string) *_completionSuggester { - - s.v.Analyzer = &analyzer +func (s *_completionSuggester) Contexts(contexts map[string][]types.CompletionContext) *_completionSuggester { + s.v.Contexts = contexts return s } -func (s *_completionSuggester) Contexts(contexts map[string][]types.CompletionContext) *_completionSuggester { +func (s *_completionSuggester) Fuzzy(fuzzy types.SuggestFuzzinessVariant) *_completionSuggester { + + s.v.Fuzzy = fuzzy.SuggestFuzzinessCaster() - s.v.Contexts = contexts return s } -func (s *_completionSuggester) Field(field string) *_completionSuggester { +func (s *_completionSuggester) Regex(regex types.RegexOptionsVariant) *_completionSuggester { - s.v.Field = field + s.v.Regex = regex.RegexOptionsCaster() return s } -func (s *_completionSuggester) Fuzzy(fuzzy types.SuggestFuzzinessVariant) *_completionSuggester { +func (s *_completionSuggester) SkipDuplicates(skipduplicates bool) *_completionSuggester { - s.v.Fuzzy = fuzzy.SuggestFuzzinessCaster() + s.v.SkipDuplicates = &skipduplicates return s } -func (s *_completionSuggester) Regex(regex types.RegexOptionsVariant) *_completionSuggester { +func (s *_completionSuggester) Analyzer(analyzer string) *_completionSuggester { - s.v.Regex = regex.RegexOptionsCaster() + s.v.Analyzer = &analyzer return s } -func (s *_completionSuggester) Size(size int) *_completionSuggester { +func (s *_completionSuggester) Field(field string) *_completionSuggester { - s.v.Size = &size + s.v.Field = field return s } -func (s *_completionSuggester) SkipDuplicates(skipduplicates bool) *_completionSuggester { +func (s *_completionSuggester) Size(size int) *_completionSuggester { - s.v.SkipDuplicates = &skipduplicates + s.v.Size = &size return s } diff --git a/typedapi/esdsl/completiontool.go b/typedapi/esdsl/completiontool.go index 85bb32317b..9d93396a11 100644 --- a/typedapi/esdsl/completiontool.go +++ b/typedapi/esdsl/completiontool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/completiontoolchoice.go b/typedapi/esdsl/completiontoolchoice.go index a386689ef6..76940fa1f4 100644 --- a/typedapi/esdsl/completiontoolchoice.go +++ b/typedapi/esdsl/completiontoolchoice.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/completiontoolchoicefunction.go b/typedapi/esdsl/completiontoolchoicefunction.go index 4fffd416d9..e06c80b747 100644 --- a/typedapi/esdsl/completiontoolchoicefunction.go +++ b/typedapi/esdsl/completiontoolchoicefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/completiontoolfunction.go b/typedapi/esdsl/completiontoolfunction.go index 12ad5af4a3..608ab78503 100644 --- a/typedapi/esdsl/completiontoolfunction.go +++ b/typedapi/esdsl/completiontoolfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/completiontooltype.go b/typedapi/esdsl/completiontooltype.go index ce9531d33d..db065a527b 100644 --- a/typedapi/esdsl/completiontooltype.go +++ b/typedapi/esdsl/completiontooltype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/componenttemplatenode.go b/typedapi/esdsl/componenttemplatenode.go index 42b6c039ac..d6e037c551 100644 --- a/typedapi/esdsl/componenttemplatenode.go +++ b/typedapi/esdsl/componenttemplatenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -36,6 +36,20 @@ func NewComponentTemplateNode(template types.ComponentTemplateSummaryVariant) *_ } +func (s *_componentTemplateNode) CreatedDate(datetime types.DateTimeVariant) *_componentTemplateNode { + + s.v.CreatedDate = *datetime.DateTimeCaster() + + return s +} + +func (s *_componentTemplateNode) CreatedDateMillis(epochtimeunitmillis int64) *_componentTemplateNode { + + s.v.CreatedDateMillis = &epochtimeunitmillis + + return s +} + func (s *_componentTemplateNode) Deprecated(deprecated bool) *_componentTemplateNode { s.v.Deprecated = &deprecated @@ -50,6 +64,20 @@ func (s *_componentTemplateNode) Meta_(metadata types.MetadataVariant) *_compone return s } +func (s *_componentTemplateNode) ModifiedDate(datetime types.DateTimeVariant) *_componentTemplateNode { + + s.v.ModifiedDate = *datetime.DateTimeCaster() + + return s +} + +func (s *_componentTemplateNode) ModifiedDateMillis(epochtimeunitmillis int64) *_componentTemplateNode { + + s.v.ModifiedDateMillis = &epochtimeunitmillis + + return s +} + func (s *_componentTemplateNode) Template(template types.ComponentTemplateSummaryVariant) *_componentTemplateNode { s.v.Template = *template.ComponentTemplateSummaryCaster() diff --git a/typedapi/esdsl/componenttemplatesummary.go b/typedapi/esdsl/componenttemplatesummary.go index 3038ec144c..c73b37ca0a 100644 --- a/typedapi/esdsl/componenttemplatesummary.go +++ b/typedapi/esdsl/componenttemplatesummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/compositeaggregatekey.go b/typedapi/esdsl/compositeaggregatekey.go index 4375adc08e..24670e5bc7 100644 --- a/typedapi/esdsl/compositeaggregatekey.go +++ b/typedapi/esdsl/compositeaggregatekey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/compositeaggregation.go b/typedapi/esdsl/compositeaggregation.go index 9fb52f059b..14ca9b29eb 100644 --- a/typedapi/esdsl/compositeaggregation.go +++ b/typedapi/esdsl/compositeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/compositeaggregationsource.go b/typedapi/esdsl/compositeaggregationsource.go index ad2a043dff..7ef6ce67d2 100644 --- a/typedapi/esdsl/compositeaggregationsource.go +++ b/typedapi/esdsl/compositeaggregationsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -27,9 +27,7 @@ type _compositeAggregationSource struct { } func NewCompositeAggregationSource() *_compositeAggregationSource { - return &_compositeAggregationSource{v: types.NewCompositeAggregationSource()} - } func (s *_compositeAggregationSource) DateHistogram(datehistogram types.CompositeDateHistogramAggregationVariant) *_compositeAggregationSource { diff --git a/typedapi/esdsl/compositedatehistogramaggregation.go b/typedapi/esdsl/compositedatehistogramaggregation.go index cc6343b7aa..b52604fe88 100644 --- a/typedapi/esdsl/compositedatehistogramaggregation.go +++ b/typedapi/esdsl/compositedatehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -31,6 +31,7 @@ type _compositeDateHistogramAggregation struct { v *types.CompositeDateHistogramAggregation } +// A date histogram aggregation. func NewCompositeDateHistogramAggregation() *_compositeDateHistogramAggregation { return &_compositeDateHistogramAggregation{v: types.NewCompositeDateHistogramAggregation()} @@ -111,6 +112,14 @@ func (s *_compositeDateHistogramAggregation) ValueType(valuetype valuetype.Value return s } +func (s *_compositeDateHistogramAggregation) CompositeAggregationSourceCaster() *types.CompositeAggregationSource { + container := types.NewCompositeAggregationSource() + + container.DateHistogram = s.v + + return container +} + func (s *_compositeDateHistogramAggregation) CompositeDateHistogramAggregationCaster() *types.CompositeDateHistogramAggregation { return s.v } diff --git a/typedapi/esdsl/compositegeotilegridaggregation.go b/typedapi/esdsl/compositegeotilegridaggregation.go index 5934d6f09c..fcb2708eee 100644 --- a/typedapi/esdsl/compositegeotilegridaggregation.go +++ b/typedapi/esdsl/compositegeotilegridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -31,6 +31,7 @@ type _compositeGeoTileGridAggregation struct { v *types.CompositeGeoTileGridAggregation } +// A geotile grid aggregation. func NewCompositeGeoTileGridAggregation() *_compositeGeoTileGridAggregation { return &_compositeGeoTileGridAggregation{v: types.NewCompositeGeoTileGridAggregation()} @@ -90,6 +91,14 @@ func (s *_compositeGeoTileGridAggregation) ValueType(valuetype valuetype.ValueTy return s } +func (s *_compositeGeoTileGridAggregation) CompositeAggregationSourceCaster() *types.CompositeAggregationSource { + container := types.NewCompositeAggregationSource() + + container.GeotileGrid = s.v + + return container +} + func (s *_compositeGeoTileGridAggregation) CompositeGeoTileGridAggregationCaster() *types.CompositeGeoTileGridAggregation { return s.v } diff --git a/typedapi/esdsl/compositehistogramaggregation.go b/typedapi/esdsl/compositehistogramaggregation.go index 4bf2624204..5208396cf0 100644 --- a/typedapi/esdsl/compositehistogramaggregation.go +++ b/typedapi/esdsl/compositehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -31,6 +31,7 @@ type _compositeHistogramAggregation struct { v *types.CompositeHistogramAggregation } +// A histogram aggregation. func NewCompositeHistogramAggregation(interval types.Float64) *_compositeHistogramAggregation { tmp := &_compositeHistogramAggregation{v: types.NewCompositeHistogramAggregation()} @@ -87,6 +88,14 @@ func (s *_compositeHistogramAggregation) ValueType(valuetype valuetype.ValueType return s } +func (s *_compositeHistogramAggregation) CompositeAggregationSourceCaster() *types.CompositeAggregationSource { + container := types.NewCompositeAggregationSource() + + container.Histogram = s.v + + return container +} + func (s *_compositeHistogramAggregation) CompositeHistogramAggregationCaster() *types.CompositeHistogramAggregation { return s.v } diff --git a/typedapi/esdsl/compositesubfield.go b/typedapi/esdsl/compositesubfield.go index 1a9fa1db9a..858f476b75 100644 --- a/typedapi/esdsl/compositesubfield.go +++ b/typedapi/esdsl/compositesubfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/compositetermsaggregation.go b/typedapi/esdsl/compositetermsaggregation.go index 1346372227..84870a2952 100644 --- a/typedapi/esdsl/compositetermsaggregation.go +++ b/typedapi/esdsl/compositetermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -31,6 +31,7 @@ type _compositeTermsAggregation struct { v *types.CompositeTermsAggregation } +// A terms aggregation. func NewCompositeTermsAggregation() *_compositeTermsAggregation { return &_compositeTermsAggregation{v: types.NewCompositeTermsAggregation()} @@ -76,6 +77,14 @@ func (s *_compositeTermsAggregation) ValueType(valuetype valuetype.ValueType) *_ return s } +func (s *_compositeTermsAggregation) CompositeAggregationSourceCaster() *types.CompositeAggregationSource { + container := types.NewCompositeAggregationSource() + + container.Terms = s.v + + return container +} + func (s *_compositeTermsAggregation) CompositeTermsAggregationCaster() *types.CompositeTermsAggregation { return s.v } diff --git a/typedapi/esdsl/conditiontokenfilter.go b/typedapi/esdsl/conditiontokenfilter.go index 1bd20b5887..07566f41a0 100644 --- a/typedapi/esdsl/conditiontokenfilter.go +++ b/typedapi/esdsl/conditiontokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/configuration.go b/typedapi/esdsl/configuration.go index 2745fc2d2b..2bfbdc4832 100644 --- a/typedapi/esdsl/configuration.go +++ b/typedapi/esdsl/configuration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/connectorconfigproperties.go b/typedapi/esdsl/connectorconfigproperties.go index 1d67ec8cea..c9434bd799 100644 --- a/typedapi/esdsl/connectorconfigproperties.go +++ b/typedapi/esdsl/connectorconfigproperties.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/connectorconfiguration.go b/typedapi/esdsl/connectorconfiguration.go index 5706143a06..037a8d9915 100644 --- a/typedapi/esdsl/connectorconfiguration.go +++ b/typedapi/esdsl/connectorconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/connectorfeatures.go b/typedapi/esdsl/connectorfeatures.go index 44efd70694..041359661f 100644 --- a/typedapi/esdsl/connectorfeatures.go +++ b/typedapi/esdsl/connectorfeatures.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/connectorscheduling.go b/typedapi/esdsl/connectorscheduling.go index cef9886c40..d80eeb1f1e 100644 --- a/typedapi/esdsl/connectorscheduling.go +++ b/typedapi/esdsl/connectorscheduling.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/constantkeywordproperty.go b/typedapi/esdsl/constantkeywordproperty.go index b9e95cca60..561cc4ad91 100644 --- a/typedapi/esdsl/constantkeywordproperty.go +++ b/typedapi/esdsl/constantkeywordproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/constantscorequery.go b/typedapi/esdsl/constantscorequery.go index 54bfdd7395..d8c3a193d4 100644 --- a/typedapi/esdsl/constantscorequery.go +++ b/typedapi/esdsl/constantscorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/contentobject.go b/typedapi/esdsl/contentobject.go index 54d6d546c4..17982c44ac 100644 --- a/typedapi/esdsl/contentobject.go +++ b/typedapi/esdsl/contentobject.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/context.go b/typedapi/esdsl/context.go index d255872dd6..7a10f9756b 100644 --- a/typedapi/esdsl/context.go +++ b/typedapi/esdsl/context.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/contextualaiservicesettings.go b/typedapi/esdsl/contextualaiservicesettings.go new file mode 100644 index 0000000000..35cc3e84ea --- /dev/null +++ b/typedapi/esdsl/contextualaiservicesettings.go @@ -0,0 +1,64 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _contextualAIServiceSettings struct { + v *types.ContextualAIServiceSettings +} + +func NewContextualAIServiceSettings(apikey string, modelid string) *_contextualAIServiceSettings { + + tmp := &_contextualAIServiceSettings{v: types.NewContextualAIServiceSettings()} + + tmp.ApiKey(apikey) + + tmp.ModelId(modelid) + + return tmp + +} + +func (s *_contextualAIServiceSettings) ApiKey(apikey string) *_contextualAIServiceSettings { + + s.v.ApiKey = apikey + + return s +} + +func (s *_contextualAIServiceSettings) ModelId(modelid string) *_contextualAIServiceSettings { + + s.v.ModelId = modelid + + return s +} + +func (s *_contextualAIServiceSettings) RateLimit(ratelimit types.RateLimitSettingVariant) *_contextualAIServiceSettings { + + s.v.RateLimit = ratelimit.RateLimitSettingCaster() + + return s +} + +func (s *_contextualAIServiceSettings) ContextualAIServiceSettingsCaster() *types.ContextualAIServiceSettings { + return s.v +} diff --git a/typedapi/esdsl/contextualaitasksettings.go b/typedapi/esdsl/contextualaitasksettings.go new file mode 100644 index 0000000000..7192c23ff7 --- /dev/null +++ b/typedapi/esdsl/contextualaitasksettings.go @@ -0,0 +1,58 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _contextualAITaskSettings struct { + v *types.ContextualAITaskSettings +} + +func NewContextualAITaskSettings() *_contextualAITaskSettings { + + return &_contextualAITaskSettings{v: types.NewContextualAITaskSettings()} + +} + +func (s *_contextualAITaskSettings) Instruction(instruction string) *_contextualAITaskSettings { + + s.v.Instruction = &instruction + + return s +} + +func (s *_contextualAITaskSettings) ReturnDocuments(returndocuments bool) *_contextualAITaskSettings { + + s.v.ReturnDocuments = &returndocuments + + return s +} + +func (s *_contextualAITaskSettings) TopK(topk int) *_contextualAITaskSettings { + + s.v.TopK = &topk + + return s +} + +func (s *_contextualAITaskSettings) ContextualAITaskSettingsCaster() *types.ContextualAITaskSettings { + return s.v +} diff --git a/typedapi/esdsl/convertprocessor.go b/typedapi/esdsl/convertprocessor.go index 1280eb4d88..457aa49345 100644 --- a/typedapi/esdsl/convertprocessor.go +++ b/typedapi/esdsl/convertprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/coordsgeobounds.go b/typedapi/esdsl/coordsgeobounds.go index 1eea2bdbde..bb5aa25597 100644 --- a/typedapi/esdsl/coordsgeobounds.go +++ b/typedapi/esdsl/coordsgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/countedkeywordproperty.go b/typedapi/esdsl/countedkeywordproperty.go index e420219aa8..c9384cbd55 100644 --- a/typedapi/esdsl/countedkeywordproperty.go +++ b/typedapi/esdsl/countedkeywordproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/createfrom.go b/typedapi/esdsl/createfrom.go index 753531560f..65a73540ad 100644 --- a/typedapi/esdsl/createfrom.go +++ b/typedapi/esdsl/createfrom.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/createoperation.go b/typedapi/esdsl/createoperation.go index 05d8896610..826f5a05da 100644 --- a/typedapi/esdsl/createoperation.go +++ b/typedapi/esdsl/createoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -100,9 +100,9 @@ func (s *_createOperation) RequireAlias(requirealias bool) *_createOperation { return s } -func (s *_createOperation) Routing(routing string) *_createOperation { +func (s *_createOperation) Routing(routings ...string) *_createOperation { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/csvprocessor.go b/typedapi/esdsl/csvprocessor.go index 51a052e2d9..98be6f85b1 100644 --- a/typedapi/esdsl/csvprocessor.go +++ b/typedapi/esdsl/csvprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/cumulativecardinalityaggregation.go b/typedapi/esdsl/cumulativecardinalityaggregation.go index 8fea75ff6c..bb5016dd00 100644 --- a/typedapi/esdsl/cumulativecardinalityaggregation.go +++ b/typedapi/esdsl/cumulativecardinalityaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/cumulativesumaggregation.go b/typedapi/esdsl/cumulativesumaggregation.go index ecf3625610..0076004d8b 100644 --- a/typedapi/esdsl/cumulativesumaggregation.go +++ b/typedapi/esdsl/cumulativesumaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/customanalyzer.go b/typedapi/esdsl/customanalyzer.go index 2a6f88bd4e..1a97c81f29 100644 --- a/typedapi/esdsl/customanalyzer.go +++ b/typedapi/esdsl/customanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/customcategorizetextanalyzer.go b/typedapi/esdsl/customcategorizetextanalyzer.go index 6e13447002..f47b2ba282 100644 --- a/typedapi/esdsl/customcategorizetextanalyzer.go +++ b/typedapi/esdsl/customcategorizetextanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/customnormalizer.go b/typedapi/esdsl/customnormalizer.go index 3eb8942fda..10c8453ac4 100644 --- a/typedapi/esdsl/customnormalizer.go +++ b/typedapi/esdsl/customnormalizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/customrequestparams.go b/typedapi/esdsl/customrequestparams.go index ae970d11e2..d6cbc2b88f 100644 --- a/typedapi/esdsl/customrequestparams.go +++ b/typedapi/esdsl/customrequestparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/customresponseparams.go b/typedapi/esdsl/customresponseparams.go index 422c4b9f3c..1c423eda60 100644 --- a/typedapi/esdsl/customresponseparams.go +++ b/typedapi/esdsl/customresponseparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/customservicesettings.go b/typedapi/esdsl/customservicesettings.go index 32d0629345..fd5e3dd8bd 100644 --- a/typedapi/esdsl/customservicesettings.go +++ b/typedapi/esdsl/customservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -44,6 +44,13 @@ func NewCustomServiceSettings(request types.CustomRequestParamsVariant, response } +func (s *_customServiceSettings) BatchSize(batchsize int) *_customServiceSettings { + + s.v.BatchSize = &batchsize + + return s +} + func (s *_customServiceSettings) Headers(headers json.RawMessage) *_customServiceSettings { s.v.Headers = headers diff --git a/typedapi/esdsl/customtasksettings.go b/typedapi/esdsl/customtasksettings.go index a4db4cf76d..531596ea59 100644 --- a/typedapi/esdsl/customtasksettings.go +++ b/typedapi/esdsl/customtasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/czechanalyzer.go b/typedapi/esdsl/czechanalyzer.go index fb470c2407..60c004f714 100644 --- a/typedapi/esdsl/czechanalyzer.go +++ b/typedapi/esdsl/czechanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/czechstemtokenfilter.go b/typedapi/esdsl/czechstemtokenfilter.go index dcc788c19c..577026e408 100644 --- a/typedapi/esdsl/czechstemtokenfilter.go +++ b/typedapi/esdsl/czechstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dailyschedule.go b/typedapi/esdsl/dailyschedule.go index fa0b6b06eb..c77fadcab4 100644 --- a/typedapi/esdsl/dailyschedule.go +++ b/typedapi/esdsl/dailyschedule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/danishanalyzer.go b/typedapi/esdsl/danishanalyzer.go index 5f5d3c1717..99a868a9ec 100644 --- a/typedapi/esdsl/danishanalyzer.go +++ b/typedapi/esdsl/danishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/databaseconfiguration.go b/typedapi/esdsl/databaseconfiguration.go index ccb4ee6085..1e7813363c 100644 --- a/typedapi/esdsl/databaseconfiguration.go +++ b/typedapi/esdsl/databaseconfiguration.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _databaseConfiguration struct { v *types.DatabaseConfiguration @@ -34,18 +30,6 @@ func NewDatabaseConfiguration() *_databaseConfiguration { return &_databaseConfiguration{v: types.NewDatabaseConfiguration()} } -// AdditionalDatabaseConfigurationProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_databaseConfiguration) AdditionalDatabaseConfigurationProperty(key string, value json.RawMessage) *_databaseConfiguration { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalDatabaseConfigurationProperty = tmp - return s -} - func (s *_databaseConfiguration) Ipinfo(ipinfo types.IpinfoVariant) *_databaseConfiguration { s.v.Ipinfo = ipinfo.IpinfoCaster() diff --git a/typedapi/esdsl/datadescription.go b/typedapi/esdsl/datadescription.go index 4cabc0bdd4..d855052bab 100644 --- a/typedapi/esdsl/datadescription.go +++ b/typedapi/esdsl/datadescription.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataemailattachment.go b/typedapi/esdsl/dataemailattachment.go index 6d39cddd39..9df086611f 100644 --- a/typedapi/esdsl/dataemailattachment.go +++ b/typedapi/esdsl/dataemailattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datafeedconfig.go b/typedapi/esdsl/datafeedconfig.go index 7ef3878104..dabb3a921c 100644 --- a/typedapi/esdsl/datafeedconfig.go +++ b/typedapi/esdsl/datafeedconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalysisanalyzedfields.go b/typedapi/esdsl/dataframeanalysisanalyzedfields.go index 6deff3863d..aa9a9eb8bd 100644 --- a/typedapi/esdsl/dataframeanalysisanalyzedfields.go +++ b/typedapi/esdsl/dataframeanalysisanalyzedfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalysisclassification.go b/typedapi/esdsl/dataframeanalysisclassification.go index a2402b805f..a94ce3c952 100644 --- a/typedapi/esdsl/dataframeanalysisclassification.go +++ b/typedapi/esdsl/dataframeanalysisclassification.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalysiscontainer.go b/typedapi/esdsl/dataframeanalysiscontainer.go index a0897651e0..a3acd0ee69 100644 --- a/typedapi/esdsl/dataframeanalysiscontainer.go +++ b/typedapi/esdsl/dataframeanalysiscontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _dataframeAnalysisContainer struct { v *types.DataframeAnalysisContainer @@ -34,18 +30,6 @@ func NewDataframeAnalysisContainer() *_dataframeAnalysisContainer { return &_dataframeAnalysisContainer{v: types.NewDataframeAnalysisContainer()} } -// AdditionalDataframeAnalysisContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_dataframeAnalysisContainer) AdditionalDataframeAnalysisContainerProperty(key string, value json.RawMessage) *_dataframeAnalysisContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalDataframeAnalysisContainerProperty = tmp - return s -} - func (s *_dataframeAnalysisContainer) Classification(classification types.DataframeAnalysisClassificationVariant) *_dataframeAnalysisContainer { s.v.Classification = classification.DataframeAnalysisClassificationCaster() diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessor.go b/typedapi/esdsl/dataframeanalysisfeatureprocessor.go index ce8a16a2ca..a7db39b4c9 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessor.go +++ b/typedapi/esdsl/dataframeanalysisfeatureprocessor.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _dataframeAnalysisFeatureProcessor struct { v *types.DataframeAnalysisFeatureProcessor @@ -34,18 +30,6 @@ func NewDataframeAnalysisFeatureProcessor() *_dataframeAnalysisFeatureProcessor return &_dataframeAnalysisFeatureProcessor{v: types.NewDataframeAnalysisFeatureProcessor()} } -// AdditionalDataframeAnalysisFeatureProcessorProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_dataframeAnalysisFeatureProcessor) AdditionalDataframeAnalysisFeatureProcessorProperty(key string, value json.RawMessage) *_dataframeAnalysisFeatureProcessor { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalDataframeAnalysisFeatureProcessorProperty = tmp - return s -} - func (s *_dataframeAnalysisFeatureProcessor) FrequencyEncoding(frequencyencoding types.DataframeAnalysisFeatureProcessorFrequencyEncodingVariant) *_dataframeAnalysisFeatureProcessor { s.v.FrequencyEncoding = frequencyencoding.DataframeAnalysisFeatureProcessorFrequencyEncodingCaster() diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessorfrequencyencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessorfrequencyencoding.go index a780c83d4c..d094345b16 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessorfrequencyencoding.go +++ b/typedapi/esdsl/dataframeanalysisfeatureprocessorfrequencyencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessormultiencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessormultiencoding.go index 02be1e7b88..1c5f4b0a7f 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessormultiencoding.go +++ b/typedapi/esdsl/dataframeanalysisfeatureprocessormultiencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessorngramencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessorngramencoding.go index 524ee809a3..b057136b64 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessorngramencoding.go +++ b/typedapi/esdsl/dataframeanalysisfeatureprocessorngramencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessoronehotencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessoronehotencoding.go index 4985ff1f2e..0447798bc3 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessoronehotencoding.go +++ b/typedapi/esdsl/dataframeanalysisfeatureprocessoronehotencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessortargetmeanencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessortargetmeanencoding.go index 7d31ced09c..b2727fd79c 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessortargetmeanencoding.go +++ b/typedapi/esdsl/dataframeanalysisfeatureprocessortargetmeanencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalysisoutlierdetection.go b/typedapi/esdsl/dataframeanalysisoutlierdetection.go index 0eec4014e8..b8560afee6 100644 --- a/typedapi/esdsl/dataframeanalysisoutlierdetection.go +++ b/typedapi/esdsl/dataframeanalysisoutlierdetection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalysisregression.go b/typedapi/esdsl/dataframeanalysisregression.go index 26baebc988..01bcf48e53 100644 --- a/typedapi/esdsl/dataframeanalysisregression.go +++ b/typedapi/esdsl/dataframeanalysisregression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalyticsdestination.go b/typedapi/esdsl/dataframeanalyticsdestination.go index 952c4a7de4..741bbccdde 100644 --- a/typedapi/esdsl/dataframeanalyticsdestination.go +++ b/typedapi/esdsl/dataframeanalyticsdestination.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeanalyticssource.go b/typedapi/esdsl/dataframeanalyticssource.go index 90572669c4..ffa4849fb3 100644 --- a/typedapi/esdsl/dataframeanalyticssource.go +++ b/typedapi/esdsl/dataframeanalyticssource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeevaluationclassification.go b/typedapi/esdsl/dataframeevaluationclassification.go index d52e817e3b..e2dd140d3f 100644 --- a/typedapi/esdsl/dataframeevaluationclassification.go +++ b/typedapi/esdsl/dataframeevaluationclassification.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeevaluationclassificationmetrics.go b/typedapi/esdsl/dataframeevaluationclassificationmetrics.go index 692b025b04..996ab42045 100644 --- a/typedapi/esdsl/dataframeevaluationclassificationmetrics.go +++ b/typedapi/esdsl/dataframeevaluationclassificationmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeevaluationclassificationmetricsaucroc.go b/typedapi/esdsl/dataframeevaluationclassificationmetricsaucroc.go index 7048640801..c87b3a6c51 100644 --- a/typedapi/esdsl/dataframeevaluationclassificationmetricsaucroc.go +++ b/typedapi/esdsl/dataframeevaluationclassificationmetricsaucroc.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeevaluationcontainer.go b/typedapi/esdsl/dataframeevaluationcontainer.go index 24f556103c..c6869d2b36 100644 --- a/typedapi/esdsl/dataframeevaluationcontainer.go +++ b/typedapi/esdsl/dataframeevaluationcontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _dataframeEvaluationContainer struct { v *types.DataframeEvaluationContainer @@ -34,18 +30,6 @@ func NewDataframeEvaluationContainer() *_dataframeEvaluationContainer { return &_dataframeEvaluationContainer{v: types.NewDataframeEvaluationContainer()} } -// AdditionalDataframeEvaluationContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_dataframeEvaluationContainer) AdditionalDataframeEvaluationContainerProperty(key string, value json.RawMessage) *_dataframeEvaluationContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalDataframeEvaluationContainerProperty = tmp - return s -} - func (s *_dataframeEvaluationContainer) Classification(classification types.DataframeEvaluationClassificationVariant) *_dataframeEvaluationContainer { s.v.Classification = classification.DataframeEvaluationClassificationCaster() diff --git a/typedapi/esdsl/dataframeevaluationoutlierdetection.go b/typedapi/esdsl/dataframeevaluationoutlierdetection.go index b2a27c719e..9b5e7c199a 100644 --- a/typedapi/esdsl/dataframeevaluationoutlierdetection.go +++ b/typedapi/esdsl/dataframeevaluationoutlierdetection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeevaluationoutlierdetectionmetrics.go b/typedapi/esdsl/dataframeevaluationoutlierdetectionmetrics.go index 05b87177d8..fd5e9f7b39 100644 --- a/typedapi/esdsl/dataframeevaluationoutlierdetectionmetrics.go +++ b/typedapi/esdsl/dataframeevaluationoutlierdetectionmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeevaluationregression.go b/typedapi/esdsl/dataframeevaluationregression.go index fa940db8c4..f156a51bd9 100644 --- a/typedapi/esdsl/dataframeevaluationregression.go +++ b/typedapi/esdsl/dataframeevaluationregression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeevaluationregressionmetrics.go b/typedapi/esdsl/dataframeevaluationregressionmetrics.go index 512206debf..e7cab46c79 100644 --- a/typedapi/esdsl/dataframeevaluationregressionmetrics.go +++ b/typedapi/esdsl/dataframeevaluationregressionmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeevaluationregressionmetricshuber.go b/typedapi/esdsl/dataframeevaluationregressionmetricshuber.go index 2b85f5464e..345840b335 100644 --- a/typedapi/esdsl/dataframeevaluationregressionmetricshuber.go +++ b/typedapi/esdsl/dataframeevaluationregressionmetricshuber.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframeevaluationregressionmetricsmsle.go b/typedapi/esdsl/dataframeevaluationregressionmetricsmsle.go index 9d99669914..3f413e553e 100644 --- a/typedapi/esdsl/dataframeevaluationregressionmetricsmsle.go +++ b/typedapi/esdsl/dataframeevaluationregressionmetricsmsle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dataframepreviewconfig.go b/typedapi/esdsl/dataframepreviewconfig.go index ad883e61f5..e0ff019af6 100644 --- a/typedapi/esdsl/dataframepreviewconfig.go +++ b/typedapi/esdsl/dataframepreviewconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datastreamfailurestore.go b/typedapi/esdsl/datastreamfailurestore.go index 135ee02bff..2457b30350 100644 --- a/typedapi/esdsl/datastreamfailurestore.go +++ b/typedapi/esdsl/datastreamfailurestore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datastreamfailurestoretemplate.go b/typedapi/esdsl/datastreamfailurestoretemplate.go index ac5b08e17b..553b2de2e8 100644 --- a/typedapi/esdsl/datastreamfailurestoretemplate.go +++ b/typedapi/esdsl/datastreamfailurestoretemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datastreamlifecycle.go b/typedapi/esdsl/datastreamlifecycle.go index fa179ebe13..6d6f4d6c90 100644 --- a/typedapi/esdsl/datastreamlifecycle.go +++ b/typedapi/esdsl/datastreamlifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datastreamlifecycledownsampling.go b/typedapi/esdsl/datastreamlifecycledownsampling.go index 6c844ef9f4..50f17c3518 100644 --- a/typedapi/esdsl/datastreamlifecycledownsampling.go +++ b/typedapi/esdsl/datastreamlifecycledownsampling.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datastreamlifecyclerolloverconditions.go b/typedapi/esdsl/datastreamlifecyclerolloverconditions.go index 67fa0789c7..0b9ea7da63 100644 --- a/typedapi/esdsl/datastreamlifecyclerolloverconditions.go +++ b/typedapi/esdsl/datastreamlifecyclerolloverconditions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datastreamlifecyclewithrollover.go b/typedapi/esdsl/datastreamlifecyclewithrollover.go index cc338be3e4..1df3c3daff 100644 --- a/typedapi/esdsl/datastreamlifecyclewithrollover.go +++ b/typedapi/esdsl/datastreamlifecyclewithrollover.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datastreamoptionstemplate.go b/typedapi/esdsl/datastreamoptionstemplate.go index 85d6dd6d12..774e28ca52 100644 --- a/typedapi/esdsl/datastreamoptionstemplate.go +++ b/typedapi/esdsl/datastreamoptionstemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datastreamtimestamp.go b/typedapi/esdsl/datastreamtimestamp.go index 27cd2d0258..4b11f2e5ac 100644 --- a/typedapi/esdsl/datastreamtimestamp.go +++ b/typedapi/esdsl/datastreamtimestamp.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datastreamvisibility.go b/typedapi/esdsl/datastreamvisibility.go index 7db92c9c75..65550ee53f 100644 --- a/typedapi/esdsl/datastreamvisibility.go +++ b/typedapi/esdsl/datastreamvisibility.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datedecayfunction.go b/typedapi/esdsl/datedecayfunction.go index f1f7bdcfbf..9b16eadc20 100644 --- a/typedapi/esdsl/datedecayfunction.go +++ b/typedapi/esdsl/datedecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datedistancefeaturequery.go b/typedapi/esdsl/datedistancefeaturequery.go index 995bd50694..3c7bf92b3c 100644 --- a/typedapi/esdsl/datedistancefeaturequery.go +++ b/typedapi/esdsl/datedistancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datehistogramaggregation.go b/typedapi/esdsl/datehistogramaggregation.go index 9501631560..e9d09608e9 100644 --- a/typedapi/esdsl/datehistogramaggregation.go +++ b/typedapi/esdsl/datehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datehistogramgrouping.go b/typedapi/esdsl/datehistogramgrouping.go index 0b945c1b94..23fd9ecce1 100644 --- a/typedapi/esdsl/datehistogramgrouping.go +++ b/typedapi/esdsl/datehistogramgrouping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dateindexnameprocessor.go b/typedapi/esdsl/dateindexnameprocessor.go index 27b36a6dd3..200d724ede 100644 --- a/typedapi/esdsl/dateindexnameprocessor.go +++ b/typedapi/esdsl/dateindexnameprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datenanosproperty.go b/typedapi/esdsl/datenanosproperty.go index d77f8a4920..7ab2bb8956 100644 --- a/typedapi/esdsl/datenanosproperty.go +++ b/typedapi/esdsl/datenanosproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dateprocessor.go b/typedapi/esdsl/dateprocessor.go index 077d26f4e1..712859fdf0 100644 --- a/typedapi/esdsl/dateprocessor.go +++ b/typedapi/esdsl/dateprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dateproperty.go b/typedapi/esdsl/dateproperty.go index 71f3c42e92..6744bed385 100644 --- a/typedapi/esdsl/dateproperty.go +++ b/typedapi/esdsl/dateproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/daterangeaggregation.go b/typedapi/esdsl/daterangeaggregation.go index 18e671b03b..e28a8c95f6 100644 --- a/typedapi/esdsl/daterangeaggregation.go +++ b/typedapi/esdsl/daterangeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/daterangeexpression.go b/typedapi/esdsl/daterangeexpression.go index 579944d199..23e6433ce6 100644 --- a/typedapi/esdsl/daterangeexpression.go +++ b/typedapi/esdsl/daterangeexpression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/daterangeproperty.go b/typedapi/esdsl/daterangeproperty.go index 61df4ec8b9..eed5e213f9 100644 --- a/typedapi/esdsl/daterangeproperty.go +++ b/typedapi/esdsl/daterangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/daterangequery.go b/typedapi/esdsl/daterangequery.go index 83b13ef6ca..ffdb5cdb4e 100644 --- a/typedapi/esdsl/daterangequery.go +++ b/typedapi/esdsl/daterangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/datetime.go b/typedapi/esdsl/datetime.go index ecdaa8b3fc..6d4c0cb8ba 100644 --- a/typedapi/esdsl/datetime.go +++ b/typedapi/esdsl/datetime.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/decayfunction.go b/typedapi/esdsl/decayfunction.go index cce522e482..ebbd7512b1 100644 --- a/typedapi/esdsl/decayfunction.go +++ b/typedapi/esdsl/decayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/decayplacement.go b/typedapi/esdsl/decayplacement.go index 44ef4e08de..f6d5186bf6 100644 --- a/typedapi/esdsl/decayplacement.go +++ b/typedapi/esdsl/decayplacement.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/decayplacementdatemathduration.go b/typedapi/esdsl/decayplacementdatemathduration.go index fdf098488e..c3eebf4a95 100644 --- a/typedapi/esdsl/decayplacementdatemathduration.go +++ b/typedapi/esdsl/decayplacementdatemathduration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/decayplacementdoubledouble.go b/typedapi/esdsl/decayplacementdoubledouble.go index 3ced90da94..a622b07a69 100644 --- a/typedapi/esdsl/decayplacementdoubledouble.go +++ b/typedapi/esdsl/decayplacementdoubledouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/decayplacementgeolocationdistance.go b/typedapi/esdsl/decayplacementgeolocationdistance.go index 3c33cd6320..2dde7386ef 100644 --- a/typedapi/esdsl/decayplacementgeolocationdistance.go +++ b/typedapi/esdsl/decayplacementgeolocationdistance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/decimaldigittokenfilter.go b/typedapi/esdsl/decimaldigittokenfilter.go index 6ef07544d2..264393590f 100644 --- a/typedapi/esdsl/decimaldigittokenfilter.go +++ b/typedapi/esdsl/decimaldigittokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/deepseekservicesettings.go b/typedapi/esdsl/deepseekservicesettings.go index 05a275d81f..b9b57ce008 100644 --- a/typedapi/esdsl/deepseekservicesettings.go +++ b/typedapi/esdsl/deepseekservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/definition.go b/typedapi/esdsl/definition.go index 1d1c25bfeb..6c8bb047fd 100644 --- a/typedapi/esdsl/definition.go +++ b/typedapi/esdsl/definition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/delayeddatacheckconfig.go b/typedapi/esdsl/delayeddatacheckconfig.go index 7b83a0e6fe..de9a473828 100644 --- a/typedapi/esdsl/delayeddatacheckconfig.go +++ b/typedapi/esdsl/delayeddatacheckconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/deleteaction.go b/typedapi/esdsl/deleteaction.go index d496fbd318..32aaf57c0e 100644 --- a/typedapi/esdsl/deleteaction.go +++ b/typedapi/esdsl/deleteaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/deleteoperation.go b/typedapi/esdsl/deleteoperation.go index b316e0d8e5..9c7dc9586b 100644 --- a/typedapi/esdsl/deleteoperation.go +++ b/typedapi/esdsl/deleteoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -64,9 +64,9 @@ func (s *_deleteOperation) Index_(indexname string) *_deleteOperation { return s } -func (s *_deleteOperation) Routing(routing string) *_deleteOperation { +func (s *_deleteOperation) Routing(routings ...string) *_deleteOperation { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/delimitedpayloadtokenfilter.go b/typedapi/esdsl/delimitedpayloadtokenfilter.go index 7a960d627f..05f32aefb1 100644 --- a/typedapi/esdsl/delimitedpayloadtokenfilter.go +++ b/typedapi/esdsl/delimitedpayloadtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/densevectorindexoptions.go b/typedapi/esdsl/densevectorindexoptions.go index 6f0a465801..efa7e76f28 100644 --- a/typedapi/esdsl/densevectorindexoptions.go +++ b/typedapi/esdsl/densevectorindexoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -60,6 +60,13 @@ func (s *_denseVectorIndexOptions) M(m int) *_denseVectorIndexOptions { return s } +func (s *_denseVectorIndexOptions) OnDiskRescore(ondiskrescore bool) *_denseVectorIndexOptions { + + s.v.OnDiskRescore = &ondiskrescore + + return s +} + func (s *_denseVectorIndexOptions) RescoreVector(rescorevector types.DenseVectorIndexOptionsRescoreVectorVariant) *_denseVectorIndexOptions { s.v.RescoreVector = rescorevector.DenseVectorIndexOptionsRescoreVectorCaster() diff --git a/typedapi/esdsl/densevectorindexoptionsrescorevector.go b/typedapi/esdsl/densevectorindexoptionsrescorevector.go index 309f1fd007..11e638ad1e 100644 --- a/typedapi/esdsl/densevectorindexoptionsrescorevector.go +++ b/typedapi/esdsl/densevectorindexoptionsrescorevector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/densevectorproperty.go b/typedapi/esdsl/densevectorproperty.go index 3d8aa8f8d8..f22d7341eb 100644 --- a/typedapi/esdsl/densevectorproperty.go +++ b/typedapi/esdsl/densevectorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dependency.go b/typedapi/esdsl/dependency.go index 4e53af3c42..8367b6b128 100644 --- a/typedapi/esdsl/dependency.go +++ b/typedapi/esdsl/dependency.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/derivativeaggregation.go b/typedapi/esdsl/derivativeaggregation.go index 5921e3206f..fa05de6b1e 100644 --- a/typedapi/esdsl/derivativeaggregation.go +++ b/typedapi/esdsl/derivativeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/detectionrule.go b/typedapi/esdsl/detectionrule.go index 44c44d15dc..fb651eff42 100644 --- a/typedapi/esdsl/detectionrule.go +++ b/typedapi/esdsl/detectionrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/detector.go b/typedapi/esdsl/detector.go index 9f07ea24a7..7680405644 100644 --- a/typedapi/esdsl/detector.go +++ b/typedapi/esdsl/detector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/detectorupdate.go b/typedapi/esdsl/detectorupdate.go index efd8768913..181050b715 100644 --- a/typedapi/esdsl/detectorupdate.go +++ b/typedapi/esdsl/detectorupdate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dictionarydecompoundertokenfilter.go b/typedapi/esdsl/dictionarydecompoundertokenfilter.go index 258ab8c8a1..1cb47fdff1 100644 --- a/typedapi/esdsl/dictionarydecompoundertokenfilter.go +++ b/typedapi/esdsl/dictionarydecompoundertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/directgenerator.go b/typedapi/esdsl/directgenerator.go index 2b3a237921..eba691170a 100644 --- a/typedapi/esdsl/directgenerator.go +++ b/typedapi/esdsl/directgenerator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dismaxquery.go b/typedapi/esdsl/dismaxquery.go index 6f3fca0a92..ebc3b464ce 100644 --- a/typedapi/esdsl/dismaxquery.go +++ b/typedapi/esdsl/dismaxquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dissectprocessor.go b/typedapi/esdsl/dissectprocessor.go index 87cbd14715..2e4248af3a 100644 --- a/typedapi/esdsl/dissectprocessor.go +++ b/typedapi/esdsl/dissectprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/distancefeaturequery.go b/typedapi/esdsl/distancefeaturequery.go index f99e690186..b969a07e6a 100644 --- a/typedapi/esdsl/distancefeaturequery.go +++ b/typedapi/esdsl/distancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/diversifiedsampleraggregation.go b/typedapi/esdsl/diversifiedsampleraggregation.go index c30b00a310..6f3f30956d 100644 --- a/typedapi/esdsl/diversifiedsampleraggregation.go +++ b/typedapi/esdsl/diversifiedsampleraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/document.go b/typedapi/esdsl/document.go index 2932608a14..1ea5047f50 100644 --- a/typedapi/esdsl/document.go +++ b/typedapi/esdsl/document.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/documentrating.go b/typedapi/esdsl/documentrating.go index 5c64982022..41fb2f8bb3 100644 --- a/typedapi/esdsl/documentrating.go +++ b/typedapi/esdsl/documentrating.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dotexpanderprocessor.go b/typedapi/esdsl/dotexpanderprocessor.go index 76f628f012..d21cd6ac04 100644 --- a/typedapi/esdsl/dotexpanderprocessor.go +++ b/typedapi/esdsl/dotexpanderprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/doublenumberproperty.go b/typedapi/esdsl/doublenumberproperty.go index 1a151deeb7..9319657303 100644 --- a/typedapi/esdsl/doublenumberproperty.go +++ b/typedapi/esdsl/doublenumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/doublerangeproperty.go b/typedapi/esdsl/doublerangeproperty.go index 3ebc368b2c..23ad7355c2 100644 --- a/typedapi/esdsl/doublerangeproperty.go +++ b/typedapi/esdsl/doublerangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/downsampleaction.go b/typedapi/esdsl/downsampleaction.go index 29c6066f10..a7845fc947 100644 --- a/typedapi/esdsl/downsampleaction.go +++ b/typedapi/esdsl/downsampleaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/downsampleconfig.go b/typedapi/esdsl/downsampleconfig.go index bca2f79689..81b89770a3 100644 --- a/typedapi/esdsl/downsampleconfig.go +++ b/typedapi/esdsl/downsampleconfig.go @@ -16,11 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import "github.com/elastic/go-elasticsearch/v9/typedapi/types" +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/samplingmethod" +) type _downsampleConfig struct { v *types.DownsampleConfig @@ -39,6 +42,12 @@ func (s *_downsampleConfig) FixedInterval(durationlarge string) *_downsampleConf return s } +func (s *_downsampleConfig) SamplingMethod(samplingmethod samplingmethod.SamplingMethod) *_downsampleConfig { + + s.v.SamplingMethod = &samplingmethod + return s +} + func (s *_downsampleConfig) DownsampleConfigCaster() *types.DownsampleConfig { return s.v } diff --git a/typedapi/esdsl/downsamplinground.go b/typedapi/esdsl/downsamplinground.go index 6eb0be0d6f..6d9459b8e6 100644 --- a/typedapi/esdsl/downsamplinground.go +++ b/typedapi/esdsl/downsamplinground.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -26,13 +26,9 @@ type _downsamplingRound struct { v *types.DownsamplingRound } -func NewDownsamplingRound(config types.DownsampleConfigVariant) *_downsamplingRound { +func NewDownsamplingRound() *_downsamplingRound { - tmp := &_downsamplingRound{v: types.NewDownsamplingRound()} - - tmp.Config(config) - - return tmp + return &_downsamplingRound{v: types.NewDownsamplingRound()} } @@ -43,9 +39,9 @@ func (s *_downsamplingRound) After(duration types.DurationVariant) *_downsamplin return s } -func (s *_downsamplingRound) Config(config types.DownsampleConfigVariant) *_downsamplingRound { +func (s *_downsamplingRound) FixedInterval(durationlarge string) *_downsamplingRound { - s.v.Config = *config.DownsampleConfigCaster() + s.v.FixedInterval = durationlarge return s } diff --git a/typedapi/esdsl/dropprocessor.go b/typedapi/esdsl/dropprocessor.go index dae2fa7994..250b2a9bac 100644 --- a/typedapi/esdsl/dropprocessor.go +++ b/typedapi/esdsl/dropprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/duration.go b/typedapi/esdsl/duration.go index 67defc9809..4dc0482250 100644 --- a/typedapi/esdsl/duration.go +++ b/typedapi/esdsl/duration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/durationvalueunitmillis.go b/typedapi/esdsl/durationvalueunitmillis.go index 4b86f8063d..4e5dbb76f6 100644 --- a/typedapi/esdsl/durationvalueunitmillis.go +++ b/typedapi/esdsl/durationvalueunitmillis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dutchanalyzer.go b/typedapi/esdsl/dutchanalyzer.go index afb998c717..45ea871a25 100644 --- a/typedapi/esdsl/dutchanalyzer.go +++ b/typedapi/esdsl/dutchanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dutchstemtokenfilter.go b/typedapi/esdsl/dutchstemtokenfilter.go index ebf44bdd77..be3f9378d4 100644 --- a/typedapi/esdsl/dutchstemtokenfilter.go +++ b/typedapi/esdsl/dutchstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dynamicproperty.go b/typedapi/esdsl/dynamicproperty.go index 7f4cbb358d..f0f5b1d5e6 100644 --- a/typedapi/esdsl/dynamicproperty.go +++ b/typedapi/esdsl/dynamicproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/dynamictemplate.go b/typedapi/esdsl/dynamictemplate.go index 337492e9f5..4f120e4048 100644 --- a/typedapi/esdsl/dynamictemplate.go +++ b/typedapi/esdsl/dynamictemplate.go @@ -16,13 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl import ( - "encoding/json" - "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/matchtype" ) @@ -35,18 +33,6 @@ func NewDynamicTemplate() *_dynamicTemplate { return &_dynamicTemplate{v: types.NewDynamicTemplate()} } -// AdditionalDynamicTemplateProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_dynamicTemplate) AdditionalDynamicTemplateProperty(key string, value json.RawMessage) *_dynamicTemplate { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalDynamicTemplateProperty = tmp - return s -} - func (s *_dynamicTemplate) Mapping(property types.PropertyVariant) *_dynamicTemplate { s.v.Mapping = *property.PropertyCaster() diff --git a/typedapi/esdsl/edgengramtokenfilter.go b/typedapi/esdsl/edgengramtokenfilter.go index eabc617613..4b13a9d2d3 100644 --- a/typedapi/esdsl/edgengramtokenfilter.go +++ b/typedapi/esdsl/edgengramtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/edgengramtokenizer.go b/typedapi/esdsl/edgengramtokenizer.go index eebfe80463..3db7a8be67 100644 --- a/typedapi/esdsl/edgengramtokenizer.go +++ b/typedapi/esdsl/edgengramtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/elasticsearchservicesettings.go b/typedapi/esdsl/elasticsearchservicesettings.go index 4f5d8a1099..32ff64fbd7 100644 --- a/typedapi/esdsl/elasticsearchservicesettings.go +++ b/typedapi/esdsl/elasticsearchservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -52,6 +52,20 @@ func (s *_elasticsearchServiceSettings) DeploymentId(deploymentid string) *_elas return s } +func (s *_elasticsearchServiceSettings) LongDocumentStrategy(longdocumentstrategy string) *_elasticsearchServiceSettings { + + s.v.LongDocumentStrategy = &longdocumentstrategy + + return s +} + +func (s *_elasticsearchServiceSettings) MaxChunksPerDoc(maxchunksperdoc int) *_elasticsearchServiceSettings { + + s.v.MaxChunksPerDoc = &maxchunksperdoc + + return s +} + func (s *_elasticsearchServiceSettings) ModelId(modelid string) *_elasticsearchServiceSettings { s.v.ModelId = modelid diff --git a/typedapi/esdsl/elasticsearchtasksettings.go b/typedapi/esdsl/elasticsearchtasksettings.go index 623d774c55..4e0a8c09dd 100644 --- a/typedapi/esdsl/elasticsearchtasksettings.go +++ b/typedapi/esdsl/elasticsearchtasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/elisiontokenfilter.go b/typedapi/esdsl/elisiontokenfilter.go index f98f9b7a3e..9c776e7ff4 100644 --- a/typedapi/esdsl/elisiontokenfilter.go +++ b/typedapi/esdsl/elisiontokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/elserservicesettings.go b/typedapi/esdsl/elserservicesettings.go index 66bde3685c..df996e16e5 100644 --- a/typedapi/esdsl/elserservicesettings.go +++ b/typedapi/esdsl/elserservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/emailaction.go b/typedapi/esdsl/emailaction.go index 7de2c96f92..2e24062026 100644 --- a/typedapi/esdsl/emailaction.go +++ b/typedapi/esdsl/emailaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/emailattachmentcontainer.go b/typedapi/esdsl/emailattachmentcontainer.go index a5587647c8..3ce367daac 100644 --- a/typedapi/esdsl/emailattachmentcontainer.go +++ b/typedapi/esdsl/emailattachmentcontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _emailAttachmentContainer struct { v *types.EmailAttachmentContainer @@ -34,18 +30,6 @@ func NewEmailAttachmentContainer() *_emailAttachmentContainer { return &_emailAttachmentContainer{v: types.NewEmailAttachmentContainer()} } -// AdditionalEmailAttachmentContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_emailAttachmentContainer) AdditionalEmailAttachmentContainerProperty(key string, value json.RawMessage) *_emailAttachmentContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalEmailAttachmentContainerProperty = tmp - return s -} - func (s *_emailAttachmentContainer) Data(data types.DataEmailAttachmentVariant) *_emailAttachmentContainer { s.v.Data = data.DataEmailAttachmentCaster() diff --git a/typedapi/esdsl/emailbody.go b/typedapi/esdsl/emailbody.go index 8f39efa9e0..02b9eeacc6 100644 --- a/typedapi/esdsl/emailbody.go +++ b/typedapi/esdsl/emailbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/emptyobject.go b/typedapi/esdsl/emptyobject.go index 5dfe9d0a31..51b98d525c 100644 --- a/typedapi/esdsl/emptyobject.go +++ b/typedapi/esdsl/emptyobject.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/englishanalyzer.go b/typedapi/esdsl/englishanalyzer.go index b38ad932c1..3eadc34dc5 100644 --- a/typedapi/esdsl/englishanalyzer.go +++ b/typedapi/esdsl/englishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/enrichpolicy.go b/typedapi/esdsl/enrichpolicy.go index 26647ed8e0..c943ed1146 100644 --- a/typedapi/esdsl/enrichpolicy.go +++ b/typedapi/esdsl/enrichpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/enrichprocessor.go b/typedapi/esdsl/enrichprocessor.go index b878b05355..7e85d8cf0c 100644 --- a/typedapi/esdsl/enrichprocessor.go +++ b/typedapi/esdsl/enrichprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ensemble.go b/typedapi/esdsl/ensemble.go index 0e89cb1fc5..e17925c087 100644 --- a/typedapi/esdsl/ensemble.go +++ b/typedapi/esdsl/ensemble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/epochtimeunitmillis.go b/typedapi/esdsl/epochtimeunitmillis.go index 32f3e4d467..6b8c671092 100644 --- a/typedapi/esdsl/epochtimeunitmillis.go +++ b/typedapi/esdsl/epochtimeunitmillis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/epochtimeunitseconds.go b/typedapi/esdsl/epochtimeunitseconds.go index fe9a8ddb05..8b38ec0ebf 100644 --- a/typedapi/esdsl/epochtimeunitseconds.go +++ b/typedapi/esdsl/epochtimeunitseconds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/estoniananalyzer.go b/typedapi/esdsl/estoniananalyzer.go index bcbd04cf75..b703791009 100644 --- a/typedapi/esdsl/estoniananalyzer.go +++ b/typedapi/esdsl/estoniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ewmamodelsettings.go b/typedapi/esdsl/ewmamodelsettings.go index 02ab41cb95..8d90cc7349 100644 --- a/typedapi/esdsl/ewmamodelsettings.go +++ b/typedapi/esdsl/ewmamodelsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ewmamovingaverageaggregation.go b/typedapi/esdsl/ewmamovingaverageaggregation.go index 33de26fbcb..328fc47b18 100644 --- a/typedapi/esdsl/ewmamovingaverageaggregation.go +++ b/typedapi/esdsl/ewmamovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/executionstate.go b/typedapi/esdsl/executionstate.go index ad47dadfbf..41d9806246 100644 --- a/typedapi/esdsl/executionstate.go +++ b/typedapi/esdsl/executionstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/existsquery.go b/typedapi/esdsl/existsquery.go index e5127ed811..2cb36b0258 100644 --- a/typedapi/esdsl/existsquery.go +++ b/typedapi/esdsl/existsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/expandwildcards.go b/typedapi/esdsl/expandwildcards.go index 2a641e21c4..2a226b76f8 100644 --- a/typedapi/esdsl/expandwildcards.go +++ b/typedapi/esdsl/expandwildcards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/explorecontrols.go b/typedapi/esdsl/explorecontrols.go index b978ace850..9801db83ed 100644 --- a/typedapi/esdsl/explorecontrols.go +++ b/typedapi/esdsl/explorecontrols.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/extendedboundsdouble.go b/typedapi/esdsl/extendedboundsdouble.go index a2c8b6f857..aee3b41ed0 100644 --- a/typedapi/esdsl/extendedboundsdouble.go +++ b/typedapi/esdsl/extendedboundsdouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/extendedboundsfielddatemath.go b/typedapi/esdsl/extendedboundsfielddatemath.go index a1047b5272..a2a9b4efce 100644 --- a/typedapi/esdsl/extendedboundsfielddatemath.go +++ b/typedapi/esdsl/extendedboundsfielddatemath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/extendedstatsaggregation.go b/typedapi/esdsl/extendedstatsaggregation.go index abaebe6ccb..a3e4ac0ca9 100644 --- a/typedapi/esdsl/extendedstatsaggregation.go +++ b/typedapi/esdsl/extendedstatsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/extendedstatsbucketaggregation.go b/typedapi/esdsl/extendedstatsbucketaggregation.go index 48e45a3701..e42ca74024 100644 --- a/typedapi/esdsl/extendedstatsbucketaggregation.go +++ b/typedapi/esdsl/extendedstatsbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/failprocessor.go b/typedapi/esdsl/failprocessor.go index 7359e93028..190797fe8a 100644 --- a/typedapi/esdsl/failprocessor.go +++ b/typedapi/esdsl/failprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/failurestorelifecycle.go b/typedapi/esdsl/failurestorelifecycle.go index 1316081713..a2e9f03a15 100644 --- a/typedapi/esdsl/failurestorelifecycle.go +++ b/typedapi/esdsl/failurestorelifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/failurestorelifecycletemplate.go b/typedapi/esdsl/failurestorelifecycletemplate.go index 22fe3e3000..1cfc9fc20c 100644 --- a/typedapi/esdsl/failurestorelifecycletemplate.go +++ b/typedapi/esdsl/failurestorelifecycletemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/featureenabled.go b/typedapi/esdsl/featureenabled.go index 39943545b6..e75eb9b50c 100644 --- a/typedapi/esdsl/featureenabled.go +++ b/typedapi/esdsl/featureenabled.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/featureextractor.go b/typedapi/esdsl/featureextractor.go index e8bb44d925..d8d8f60654 100644 --- a/typedapi/esdsl/featureextractor.go +++ b/typedapi/esdsl/featureextractor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldaliasproperty.go b/typedapi/esdsl/fieldaliasproperty.go index b608299526..c6d8b2b85f 100644 --- a/typedapi/esdsl/fieldaliasproperty.go +++ b/typedapi/esdsl/fieldaliasproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldandformat.go b/typedapi/esdsl/fieldandformat.go index cacaa6041b..b85343bad0 100644 --- a/typedapi/esdsl/fieldandformat.go +++ b/typedapi/esdsl/fieldandformat.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldcollapse.go b/typedapi/esdsl/fieldcollapse.go index 92b73b53dd..39c1f60eab 100644 --- a/typedapi/esdsl/fieldcollapse.go +++ b/typedapi/esdsl/fieldcollapse.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fielddatafrequencyfilter.go b/typedapi/esdsl/fielddatafrequencyfilter.go index 6c6f1d02f7..018150254e 100644 --- a/typedapi/esdsl/fielddatafrequencyfilter.go +++ b/typedapi/esdsl/fielddatafrequencyfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fielddatemath.go b/typedapi/esdsl/fielddatemath.go index f0d2bf37e2..e0a29d6ee3 100644 --- a/typedapi/esdsl/fielddatemath.go +++ b/typedapi/esdsl/fielddatemath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldlookup.go b/typedapi/esdsl/fieldlookup.go index 736522a845..f0ce1e53e9 100644 --- a/typedapi/esdsl/fieldlookup.go +++ b/typedapi/esdsl/fieldlookup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -53,9 +53,9 @@ func (s *_fieldLookup) Path(field string) *_fieldLookup { return s } -func (s *_fieldLookup) Routing(routing string) *_fieldLookup { +func (s *_fieldLookup) Routing(routings ...string) *_fieldLookup { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/fieldmetric.go b/typedapi/esdsl/fieldmetric.go index 6958a1de94..45cb9d682c 100644 --- a/typedapi/esdsl/fieldmetric.go +++ b/typedapi/esdsl/fieldmetric.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldnamesfield.go b/typedapi/esdsl/fieldnamesfield.go index e343bd1377..0cf2f21f99 100644 --- a/typedapi/esdsl/fieldnamesfield.go +++ b/typedapi/esdsl/fieldnamesfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fields.go b/typedapi/esdsl/fields.go index 0b5d39eecd..72bc524115 100644 --- a/typedapi/esdsl/fields.go +++ b/typedapi/esdsl/fields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldsecurity.go b/typedapi/esdsl/fieldsecurity.go index c12b056ea5..2dc0a35fc1 100644 --- a/typedapi/esdsl/fieldsecurity.go +++ b/typedapi/esdsl/fieldsecurity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldsort.go b/typedapi/esdsl/fieldsort.go index 23690cd65d..0bbb35ffef 100644 --- a/typedapi/esdsl/fieldsort.go +++ b/typedapi/esdsl/fieldsort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldsuggester.go b/typedapi/esdsl/fieldsuggester.go index 4626f5b2fc..de11c1a4e3 100644 --- a/typedapi/esdsl/fieldsuggester.go +++ b/typedapi/esdsl/fieldsuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldvalue.go b/typedapi/esdsl/fieldvalue.go index e5c50d5938..844156b797 100644 --- a/typedapi/esdsl/fieldvalue.go +++ b/typedapi/esdsl/fieldvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fieldvaluefactorscorefunction.go b/typedapi/esdsl/fieldvaluefactorscorefunction.go index 4ec7148e6c..3658117a73 100644 --- a/typedapi/esdsl/fieldvaluefactorscorefunction.go +++ b/typedapi/esdsl/fieldvaluefactorscorefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fillmaskinferenceoptions.go b/typedapi/esdsl/fillmaskinferenceoptions.go index 02b45256db..ffb91a1032 100644 --- a/typedapi/esdsl/fillmaskinferenceoptions.go +++ b/typedapi/esdsl/fillmaskinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -27,13 +27,9 @@ type _fillMaskInferenceOptions struct { } // Fill mask configuration for inference. -func NewFillMaskInferenceOptions(vocabulary types.VocabularyVariant) *_fillMaskInferenceOptions { +func NewFillMaskInferenceOptions() *_fillMaskInferenceOptions { - tmp := &_fillMaskInferenceOptions{v: types.NewFillMaskInferenceOptions()} - - tmp.Vocabulary(vocabulary) - - return tmp + return &_fillMaskInferenceOptions{v: types.NewFillMaskInferenceOptions()} } @@ -67,7 +63,7 @@ func (s *_fillMaskInferenceOptions) Tokenization(tokenization types.Tokenization func (s *_fillMaskInferenceOptions) Vocabulary(vocabulary types.VocabularyVariant) *_fillMaskInferenceOptions { - s.v.Vocabulary = *vocabulary.VocabularyCaster() + s.v.Vocabulary = vocabulary.VocabularyCaster() return s } diff --git a/typedapi/esdsl/fillmaskinferenceupdateoptions.go b/typedapi/esdsl/fillmaskinferenceupdateoptions.go index c5e232dd9d..067249cde0 100644 --- a/typedapi/esdsl/fillmaskinferenceupdateoptions.go +++ b/typedapi/esdsl/fillmaskinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/filteringadvancedsnippet.go b/typedapi/esdsl/filteringadvancedsnippet.go index 78b7bbaae9..349c7287ef 100644 --- a/typedapi/esdsl/filteringadvancedsnippet.go +++ b/typedapi/esdsl/filteringadvancedsnippet.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/filteringconfig.go b/typedapi/esdsl/filteringconfig.go index af1efbdd89..6ecd7fb819 100644 --- a/typedapi/esdsl/filteringconfig.go +++ b/typedapi/esdsl/filteringconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/filteringrule.go b/typedapi/esdsl/filteringrule.go index 20ec6f110b..bb0f2491f1 100644 --- a/typedapi/esdsl/filteringrule.go +++ b/typedapi/esdsl/filteringrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/filteringrules.go b/typedapi/esdsl/filteringrules.go index 098d80f6c0..40563e4b69 100644 --- a/typedapi/esdsl/filteringrules.go +++ b/typedapi/esdsl/filteringrules.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/filteringrulesvalidation.go b/typedapi/esdsl/filteringrulesvalidation.go index 61217b7663..c915269a56 100644 --- a/typedapi/esdsl/filteringrulesvalidation.go +++ b/typedapi/esdsl/filteringrulesvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/filteringvalidation.go b/typedapi/esdsl/filteringvalidation.go index eda668681f..11ac1f1847 100644 --- a/typedapi/esdsl/filteringvalidation.go +++ b/typedapi/esdsl/filteringvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/filterref.go b/typedapi/esdsl/filterref.go index 64f5a057dc..04f56ec900 100644 --- a/typedapi/esdsl/filterref.go +++ b/typedapi/esdsl/filterref.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/filtersaggregation.go b/typedapi/esdsl/filtersaggregation.go index 151e4d10b3..99f00a8aaa 100644 --- a/typedapi/esdsl/filtersaggregation.go +++ b/typedapi/esdsl/filtersaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fingerprintanalyzer.go b/typedapi/esdsl/fingerprintanalyzer.go index 958eb03ed8..4a8b85bd2c 100644 --- a/typedapi/esdsl/fingerprintanalyzer.go +++ b/typedapi/esdsl/fingerprintanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fingerprintprocessor.go b/typedapi/esdsl/fingerprintprocessor.go index 3906576187..57d2473d44 100644 --- a/typedapi/esdsl/fingerprintprocessor.go +++ b/typedapi/esdsl/fingerprintprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fingerprinttokenfilter.go b/typedapi/esdsl/fingerprinttokenfilter.go index 8dba5f6bc1..92e16eac69 100644 --- a/typedapi/esdsl/fingerprinttokenfilter.go +++ b/typedapi/esdsl/fingerprinttokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/finnishanalyzer.go b/typedapi/esdsl/finnishanalyzer.go index d49bf44908..9f1264f25f 100644 --- a/typedapi/esdsl/finnishanalyzer.go +++ b/typedapi/esdsl/finnishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/flattenedproperty.go b/typedapi/esdsl/flattenedproperty.go index 0a595311d0..6bac62cd26 100644 --- a/typedapi/esdsl/flattenedproperty.go +++ b/typedapi/esdsl/flattenedproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/flattengraphtokenfilter.go b/typedapi/esdsl/flattengraphtokenfilter.go index 94b77686bf..44513a4930 100644 --- a/typedapi/esdsl/flattengraphtokenfilter.go +++ b/typedapi/esdsl/flattengraphtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/floatnumberproperty.go b/typedapi/esdsl/floatnumberproperty.go index 825f2c7157..29a98b1155 100644 --- a/typedapi/esdsl/floatnumberproperty.go +++ b/typedapi/esdsl/floatnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/floatrangeproperty.go b/typedapi/esdsl/floatrangeproperty.go index f6caf4faa4..e213d32f08 100644 --- a/typedapi/esdsl/floatrangeproperty.go +++ b/typedapi/esdsl/floatrangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/forcemergeaction.go b/typedapi/esdsl/forcemergeaction.go index 97ea7f2c88..7aa2253d91 100644 --- a/typedapi/esdsl/forcemergeaction.go +++ b/typedapi/esdsl/forcemergeaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/foreachprocessor.go b/typedapi/esdsl/foreachprocessor.go index 2589cd2f64..8343c23709 100644 --- a/typedapi/esdsl/foreachprocessor.go +++ b/typedapi/esdsl/foreachprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/frenchanalyzer.go b/typedapi/esdsl/frenchanalyzer.go index 4fc31c665b..e69893b001 100644 --- a/typedapi/esdsl/frenchanalyzer.go +++ b/typedapi/esdsl/frenchanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/frenchstemtokenfilter.go b/typedapi/esdsl/frenchstemtokenfilter.go index 5ef1a7743e..769968d00d 100644 --- a/typedapi/esdsl/frenchstemtokenfilter.go +++ b/typedapi/esdsl/frenchstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/frequencyencodingpreprocessor.go b/typedapi/esdsl/frequencyencodingpreprocessor.go index 18a55996c4..a6b4cf4fdd 100644 --- a/typedapi/esdsl/frequencyencodingpreprocessor.go +++ b/typedapi/esdsl/frequencyencodingpreprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/frequentitemsetsaggregation.go b/typedapi/esdsl/frequentitemsetsaggregation.go index 303e0f1e28..a1207f6082 100644 --- a/typedapi/esdsl/frequentitemsetsaggregation.go +++ b/typedapi/esdsl/frequentitemsetsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/frequentitemsetsfield.go b/typedapi/esdsl/frequentitemsetsfield.go index 7fc6c3c541..e32b9fc040 100644 --- a/typedapi/esdsl/frequentitemsetsfield.go +++ b/typedapi/esdsl/frequentitemsetsfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/functionscore.go b/typedapi/esdsl/functionscore.go index a907d3f04c..194ce6a7cb 100644 --- a/typedapi/esdsl/functionscore.go +++ b/typedapi/esdsl/functionscore.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _functionScore struct { v *types.FunctionScore @@ -34,18 +30,6 @@ func NewFunctionScore() *_functionScore { return &_functionScore{v: types.NewFunctionScore()} } -// AdditionalFunctionScoreProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_functionScore) AdditionalFunctionScoreProperty(key string, value json.RawMessage) *_functionScore { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalFunctionScoreProperty = tmp - return s -} - func (s *_functionScore) Exp(decayfunction types.DecayFunctionVariant) *_functionScore { s.v.Exp = *decayfunction.DecayFunctionCaster() diff --git a/typedapi/esdsl/functionscorequery.go b/typedapi/esdsl/functionscorequery.go index 73aca7d412..5a1f510e38 100644 --- a/typedapi/esdsl/functionscorequery.go +++ b/typedapi/esdsl/functionscorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fuzziness.go b/typedapi/esdsl/fuzziness.go index 0beab25303..c410f587c2 100644 --- a/typedapi/esdsl/fuzziness.go +++ b/typedapi/esdsl/fuzziness.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/fuzzyquery.go b/typedapi/esdsl/fuzzyquery.go index 5a7ccf3e32..9740f5f494 100644 --- a/typedapi/esdsl/fuzzyquery.go +++ b/typedapi/esdsl/fuzzyquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/galiciananalyzer.go b/typedapi/esdsl/galiciananalyzer.go index ead754d9c6..38721ba84b 100644 --- a/typedapi/esdsl/galiciananalyzer.go +++ b/typedapi/esdsl/galiciananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/gcsrepository.go b/typedapi/esdsl/gcsrepository.go index 85b216fe83..7b33547b45 100644 --- a/typedapi/esdsl/gcsrepository.go +++ b/typedapi/esdsl/gcsrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/gcsrepositorysettings.go b/typedapi/esdsl/gcsrepositorysettings.go index 4181277808..42cc9760cd 100644 --- a/typedapi/esdsl/gcsrepositorysettings.go +++ b/typedapi/esdsl/gcsrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geoboundingboxquery.go b/typedapi/esdsl/geoboundingboxquery.go index b23036d691..06f336a350 100644 --- a/typedapi/esdsl/geoboundingboxquery.go +++ b/typedapi/esdsl/geoboundingboxquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geobounds.go b/typedapi/esdsl/geobounds.go index e26cce75e5..8f3e3332e0 100644 --- a/typedapi/esdsl/geobounds.go +++ b/typedapi/esdsl/geobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geoboundsaggregation.go b/typedapi/esdsl/geoboundsaggregation.go index e629e77161..a3ad4bf042 100644 --- a/typedapi/esdsl/geoboundsaggregation.go +++ b/typedapi/esdsl/geoboundsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geocentroidaggregation.go b/typedapi/esdsl/geocentroidaggregation.go index b8576e4a12..d448394d8e 100644 --- a/typedapi/esdsl/geocentroidaggregation.go +++ b/typedapi/esdsl/geocentroidaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geodecayfunction.go b/typedapi/esdsl/geodecayfunction.go index 91898093da..1659c145b8 100644 --- a/typedapi/esdsl/geodecayfunction.go +++ b/typedapi/esdsl/geodecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geodistanceaggregation.go b/typedapi/esdsl/geodistanceaggregation.go index 9b4fba90aa..2c118eaf39 100644 --- a/typedapi/esdsl/geodistanceaggregation.go +++ b/typedapi/esdsl/geodistanceaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geodistancefeaturequery.go b/typedapi/esdsl/geodistancefeaturequery.go index d345bd7675..8db3075bb6 100644 --- a/typedapi/esdsl/geodistancefeaturequery.go +++ b/typedapi/esdsl/geodistancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geodistancequery.go b/typedapi/esdsl/geodistancequery.go index d672e6f335..c5b59cfcf5 100644 --- a/typedapi/esdsl/geodistancequery.go +++ b/typedapi/esdsl/geodistancequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geodistancesort.go b/typedapi/esdsl/geodistancesort.go index 76a5f22678..44078f81d2 100644 --- a/typedapi/esdsl/geodistancesort.go +++ b/typedapi/esdsl/geodistancesort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geogridprocessor.go b/typedapi/esdsl/geogridprocessor.go index b290fcdba4..aa30766e55 100644 --- a/typedapi/esdsl/geogridprocessor.go +++ b/typedapi/esdsl/geogridprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geogridquery.go b/typedapi/esdsl/geogridquery.go index 6059b27e36..42b582714c 100644 --- a/typedapi/esdsl/geogridquery.go +++ b/typedapi/esdsl/geogridquery.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _geoGridQuery struct { v *types.GeoGridQuery @@ -34,18 +30,6 @@ func NewGeoGridQuery() *_geoGridQuery { return &_geoGridQuery{v: types.NewGeoGridQuery()} } -// AdditionalGeoGridQueryProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_geoGridQuery) AdditionalGeoGridQueryProperty(key string, value json.RawMessage) *_geoGridQuery { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalGeoGridQueryProperty = tmp - return s -} - func (s *_geoGridQuery) Boost(boost float32) *_geoGridQuery { s.v.Boost = &boost diff --git a/typedapi/esdsl/geohashgridaggregation.go b/typedapi/esdsl/geohashgridaggregation.go index bbb7729ff9..2e4dd3b239 100644 --- a/typedapi/esdsl/geohashgridaggregation.go +++ b/typedapi/esdsl/geohashgridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geohashlocation.go b/typedapi/esdsl/geohashlocation.go index 9b17b24e02..bd1b80e393 100644 --- a/typedapi/esdsl/geohashlocation.go +++ b/typedapi/esdsl/geohashlocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geohashprecision.go b/typedapi/esdsl/geohashprecision.go index f8f1681cb5..9ed75a5c61 100644 --- a/typedapi/esdsl/geohashprecision.go +++ b/typedapi/esdsl/geohashprecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geohexgridaggregation.go b/typedapi/esdsl/geohexgridaggregation.go index 2e4d694fb3..1d869a55e6 100644 --- a/typedapi/esdsl/geohexgridaggregation.go +++ b/typedapi/esdsl/geohexgridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geoipprocessor.go b/typedapi/esdsl/geoipprocessor.go index 0f4576f819..c84d7875d3 100644 --- a/typedapi/esdsl/geoipprocessor.go +++ b/typedapi/esdsl/geoipprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geolineaggregation.go b/typedapi/esdsl/geolineaggregation.go index 1d8d4417cb..c221feea9b 100644 --- a/typedapi/esdsl/geolineaggregation.go +++ b/typedapi/esdsl/geolineaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -29,14 +29,12 @@ type _geoLineAggregation struct { v *types.GeoLineAggregation } -func NewGeoLineAggregation(point types.GeoLinePointVariant, sort types.GeoLineSortVariant) *_geoLineAggregation { +func NewGeoLineAggregation(point types.GeoLinePointVariant) *_geoLineAggregation { tmp := &_geoLineAggregation{v: types.NewGeoLineAggregation()} tmp.Point(point) - tmp.Sort(sort) - return tmp } @@ -64,7 +62,7 @@ func (s *_geoLineAggregation) Size(size int) *_geoLineAggregation { func (s *_geoLineAggregation) Sort(sort types.GeoLineSortVariant) *_geoLineAggregation { - s.v.Sort = *sort.GeoLineSortCaster() + s.v.Sort = sort.GeoLineSortCaster() return s } diff --git a/typedapi/esdsl/geolinepoint.go b/typedapi/esdsl/geolinepoint.go index 04f3c81f43..d18a249cbe 100644 --- a/typedapi/esdsl/geolinepoint.go +++ b/typedapi/esdsl/geolinepoint.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geolinesort.go b/typedapi/esdsl/geolinesort.go index e03b47519b..551c066037 100644 --- a/typedapi/esdsl/geolinesort.go +++ b/typedapi/esdsl/geolinesort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geolocation.go b/typedapi/esdsl/geolocation.go index 070f888baf..1ae2aff2a1 100644 --- a/typedapi/esdsl/geolocation.go +++ b/typedapi/esdsl/geolocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geopointproperty.go b/typedapi/esdsl/geopointproperty.go index 5de53f1551..d6625e566b 100644 --- a/typedapi/esdsl/geopointproperty.go +++ b/typedapi/esdsl/geopointproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geopolygonpoints.go b/typedapi/esdsl/geopolygonpoints.go index ebb182c222..6c88bcc08a 100644 --- a/typedapi/esdsl/geopolygonpoints.go +++ b/typedapi/esdsl/geopolygonpoints.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geopolygonquery.go b/typedapi/esdsl/geopolygonquery.go index 59d64a1fb9..52622566d7 100644 --- a/typedapi/esdsl/geopolygonquery.go +++ b/typedapi/esdsl/geopolygonquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geoshapefieldquery.go b/typedapi/esdsl/geoshapefieldquery.go index 918dd4c2b7..28b21472b9 100644 --- a/typedapi/esdsl/geoshapefieldquery.go +++ b/typedapi/esdsl/geoshapefieldquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geoshapeproperty.go b/typedapi/esdsl/geoshapeproperty.go index f02ac63a12..aed2e820a6 100644 --- a/typedapi/esdsl/geoshapeproperty.go +++ b/typedapi/esdsl/geoshapeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geoshapequery.go b/typedapi/esdsl/geoshapequery.go index 9717a1d1ad..e9f197619c 100644 --- a/typedapi/esdsl/geoshapequery.go +++ b/typedapi/esdsl/geoshapequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/geotilegridaggregation.go b/typedapi/esdsl/geotilegridaggregation.go index b71ab0fb4b..7978e18b86 100644 --- a/typedapi/esdsl/geotilegridaggregation.go +++ b/typedapi/esdsl/geotilegridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/germananalyzer.go b/typedapi/esdsl/germananalyzer.go index 67901f56be..def5ea1fd0 100644 --- a/typedapi/esdsl/germananalyzer.go +++ b/typedapi/esdsl/germananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/germannormalizationtokenfilter.go b/typedapi/esdsl/germannormalizationtokenfilter.go index 366729b516..7224502d32 100644 --- a/typedapi/esdsl/germannormalizationtokenfilter.go +++ b/typedapi/esdsl/germannormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/germanstemtokenfilter.go b/typedapi/esdsl/germanstemtokenfilter.go index 8fb28d56a3..c766367558 100644 --- a/typedapi/esdsl/germanstemtokenfilter.go +++ b/typedapi/esdsl/germanstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/globalaggregation.go b/typedapi/esdsl/globalaggregation.go index 82e63e1bc8..223774b0a6 100644 --- a/typedapi/esdsl/globalaggregation.go +++ b/typedapi/esdsl/globalaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/globalprivilege.go b/typedapi/esdsl/globalprivilege.go index d5abacebd0..18f3009b92 100644 --- a/typedapi/esdsl/globalprivilege.go +++ b/typedapi/esdsl/globalprivilege.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/googleaistudioservicesettings.go b/typedapi/esdsl/googleaistudioservicesettings.go index 9cb52a9882..dfe0c38a6f 100644 --- a/typedapi/esdsl/googleaistudioservicesettings.go +++ b/typedapi/esdsl/googleaistudioservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/googlenormalizeddistanceheuristic.go b/typedapi/esdsl/googlenormalizeddistanceheuristic.go index 3335420451..1e4b8ac7ac 100644 --- a/typedapi/esdsl/googlenormalizeddistanceheuristic.go +++ b/typedapi/esdsl/googlenormalizeddistanceheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/googlevertexaiservicesettings.go b/typedapi/esdsl/googlevertexaiservicesettings.go index 9cf6fd7150..991b630e11 100644 --- a/typedapi/esdsl/googlevertexaiservicesettings.go +++ b/typedapi/esdsl/googlevertexaiservicesettings.go @@ -16,50 +16,60 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import "github.com/elastic/go-elasticsearch/v9/typedapi/types" +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/googlemodelgardenprovider" +) type _googleVertexAIServiceSettings struct { v *types.GoogleVertexAIServiceSettings } -func NewGoogleVertexAIServiceSettings(location string, modelid string, projectid string, serviceaccountjson string) *_googleVertexAIServiceSettings { +func NewGoogleVertexAIServiceSettings(serviceaccountjson string) *_googleVertexAIServiceSettings { tmp := &_googleVertexAIServiceSettings{v: types.NewGoogleVertexAIServiceSettings()} - tmp.Location(location) + tmp.ServiceAccountJson(serviceaccountjson) - tmp.ModelId(modelid) + return tmp - tmp.ProjectId(projectid) +} - tmp.ServiceAccountJson(serviceaccountjson) +func (s *_googleVertexAIServiceSettings) Dimensions(dimensions int) *_googleVertexAIServiceSettings { - return tmp + s.v.Dimensions = &dimensions + return s } func (s *_googleVertexAIServiceSettings) Location(location string) *_googleVertexAIServiceSettings { - s.v.Location = location + s.v.Location = &location return s } func (s *_googleVertexAIServiceSettings) ModelId(modelid string) *_googleVertexAIServiceSettings { - s.v.ModelId = modelid + s.v.ModelId = &modelid return s } func (s *_googleVertexAIServiceSettings) ProjectId(projectid string) *_googleVertexAIServiceSettings { - s.v.ProjectId = projectid + s.v.ProjectId = &projectid + + return s +} + +func (s *_googleVertexAIServiceSettings) Provider(provider googlemodelgardenprovider.GoogleModelGardenProvider) *_googleVertexAIServiceSettings { + s.v.Provider = &provider return s } @@ -77,6 +87,20 @@ func (s *_googleVertexAIServiceSettings) ServiceAccountJson(serviceaccountjson s return s } +func (s *_googleVertexAIServiceSettings) StreamingUrl(streamingurl string) *_googleVertexAIServiceSettings { + + s.v.StreamingUrl = &streamingurl + + return s +} + +func (s *_googleVertexAIServiceSettings) Url(url string) *_googleVertexAIServiceSettings { + + s.v.Url = &url + + return s +} + func (s *_googleVertexAIServiceSettings) GoogleVertexAIServiceSettingsCaster() *types.GoogleVertexAIServiceSettings { return s.v } diff --git a/typedapi/esdsl/googlevertexaitasksettings.go b/typedapi/esdsl/googlevertexaitasksettings.go index bd06014466..09ee4bc2c9 100644 --- a/typedapi/esdsl/googlevertexaitasksettings.go +++ b/typedapi/esdsl/googlevertexaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -39,6 +39,20 @@ func (s *_googleVertexAITaskSettings) AutoTruncate(autotruncate bool) *_googleVe return s } +func (s *_googleVertexAITaskSettings) MaxTokens(maxtokens int) *_googleVertexAITaskSettings { + + s.v.MaxTokens = &maxtokens + + return s +} + +func (s *_googleVertexAITaskSettings) ThinkingConfig(thinkingconfig types.ThinkingConfigVariant) *_googleVertexAITaskSettings { + + s.v.ThinkingConfig = thinkingconfig.ThinkingConfigCaster() + + return s +} + func (s *_googleVertexAITaskSettings) TopN(topn int) *_googleVertexAITaskSettings { s.v.TopN = &topn diff --git a/typedapi/esdsl/grantapikey.go b/typedapi/esdsl/grantapikey.go index 75f2cad61b..a7f4eccd29 100644 --- a/typedapi/esdsl/grantapikey.go +++ b/typedapi/esdsl/grantapikey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/greaterthanvalidation.go b/typedapi/esdsl/greaterthanvalidation.go index 200ad41619..9b9e8e09a2 100644 --- a/typedapi/esdsl/greaterthanvalidation.go +++ b/typedapi/esdsl/greaterthanvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/greekanalyzer.go b/typedapi/esdsl/greekanalyzer.go index 0152409187..70d47dd796 100644 --- a/typedapi/esdsl/greekanalyzer.go +++ b/typedapi/esdsl/greekanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/grokprocessor.go b/typedapi/esdsl/grokprocessor.go index fe9a9d51ce..8d87f895b1 100644 --- a/typedapi/esdsl/grokprocessor.go +++ b/typedapi/esdsl/grokprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/groupings.go b/typedapi/esdsl/groupings.go index c0638ed996..e29303b1e9 100644 --- a/typedapi/esdsl/groupings.go +++ b/typedapi/esdsl/groupings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/gsubprocessor.go b/typedapi/esdsl/gsubprocessor.go index f8f846d34e..e4d8436223 100644 --- a/typedapi/esdsl/gsubprocessor.go +++ b/typedapi/esdsl/gsubprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/halffloatnumberproperty.go b/typedapi/esdsl/halffloatnumberproperty.go index af50c127af..86a2de92cc 100644 --- a/typedapi/esdsl/halffloatnumberproperty.go +++ b/typedapi/esdsl/halffloatnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/haschildquery.go b/typedapi/esdsl/haschildquery.go index 04ecd8720b..cbf9f6c9e5 100644 --- a/typedapi/esdsl/haschildquery.go +++ b/typedapi/esdsl/haschildquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hasparentquery.go b/typedapi/esdsl/hasparentquery.go index f693a511ff..07d509a873 100644 --- a/typedapi/esdsl/hasparentquery.go +++ b/typedapi/esdsl/hasparentquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hdrmethod.go b/typedapi/esdsl/hdrmethod.go index 5de94c24d2..099648a465 100644 --- a/typedapi/esdsl/hdrmethod.go +++ b/typedapi/esdsl/hdrmethod.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/highlight.go b/typedapi/esdsl/highlight.go index 7e582917d6..e0119483c6 100644 --- a/typedapi/esdsl/highlight.go +++ b/typedapi/esdsl/highlight.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -42,90 +42,79 @@ func NewHighlight() *_highlight { } -func (s *_highlight) BoundaryChars(boundarychars string) *_highlight { - - s.v.BoundaryChars = &boundarychars +func (s *_highlight) Encoder(encoder highlighterencoder.HighlighterEncoder) *_highlight { + s.v.Encoder = &encoder return s } -func (s *_highlight) BoundaryMaxScan(boundarymaxscan int) *_highlight { - - s.v.BoundaryMaxScan = &boundarymaxscan - - return s -} +func (s *_highlight) Fields(fields []map[string]types.HighlightField) *_highlight { -func (s *_highlight) BoundaryScanner(boundaryscanner boundaryscanner.BoundaryScanner) *_highlight { + s.v.Fields = fields - s.v.BoundaryScanner = &boundaryscanner return s } -func (s *_highlight) BoundaryScannerLocale(boundaryscannerlocale string) *_highlight { +func (s *_highlight) BoundaryChars(boundarychars string) *_highlight { - s.v.BoundaryScannerLocale = &boundaryscannerlocale + s.v.BoundaryChars = &boundarychars return s } -func (s *_highlight) Encoder(encoder highlighterencoder.HighlighterEncoder) *_highlight { +func (s *_highlight) FragmentSize(fragmentsize int) *_highlight { + + s.v.FragmentSize = &fragmentsize - s.v.Encoder = &encoder return s } -func (s *_highlight) Fields(fields []map[string]types.HighlightField) *_highlight { +func (s *_highlight) HighlightFilter(highlightfilter bool) *_highlight { - s.v.Fields = fields + s.v.HighlightFilter = &highlightfilter return s } -func (s *_highlight) ForceSource(forcesource bool) *_highlight { +func (s *_highlight) HighlightQuery(highlightquery types.QueryVariant) *_highlight { - s.v.ForceSource = &forcesource + s.v.HighlightQuery = highlightquery.QueryCaster() return s } -func (s *_highlight) FragmentSize(fragmentsize int) *_highlight { +func (s *_highlight) MaxFragmentLength(maxfragmentlength int) *_highlight { - s.v.FragmentSize = &fragmentsize + s.v.MaxFragmentLength = &maxfragmentlength return s } -func (s *_highlight) Fragmenter(fragmenter highlighterfragmenter.HighlighterFragmenter) *_highlight { +func (s *_highlight) Order(order highlighterorder.HighlighterOrder) *_highlight { - s.v.Fragmenter = &fragmenter + s.v.Order = &order return s } -func (s *_highlight) HighlightFilter(highlightfilter bool) *_highlight { - - s.v.HighlightFilter = &highlightfilter - - return s -} +func (s *_highlight) PreTags(pretags ...string) *_highlight { -func (s *_highlight) HighlightQuery(highlightquery types.QueryVariant) *_highlight { + for _, v := range pretags { - s.v.HighlightQuery = highlightquery.QueryCaster() + s.v.PreTags = append(s.v.PreTags, v) + } return s } -func (s *_highlight) MaxAnalyzedOffset(maxanalyzedoffset int) *_highlight { - - s.v.MaxAnalyzedOffset = &maxanalyzedoffset +func (s *_highlight) TagsSchema(tagsschema highlightertagsschema.HighlighterTagsSchema) *_highlight { + s.v.TagsSchema = &tagsschema return s } -func (s *_highlight) MaxFragmentLength(maxfragmentlength int) *_highlight { +func (s *_highlight) BoundaryMaxScan(boundarymaxscan int) *_highlight { - s.v.MaxFragmentLength = &maxfragmentlength + s.v.BoundaryMaxScan = &boundarymaxscan return s } @@ -144,30 +133,28 @@ func (s *_highlight) NumberOfFragments(numberoffragments int) *_highlight { return s } -func (s *_highlight) Options(options map[string]json.RawMessage) *_highlight { +func (s *_highlight) Type(type_ highlightertype.HighlighterType) *_highlight { - s.v.Options = options + s.v.Type = &type_ return s } -func (s *_highlight) AddOption(key string, value json.RawMessage) *_highlight { +func (s *_highlight) BoundaryScanner(boundaryscanner boundaryscanner.BoundaryScanner) *_highlight { - var tmp map[string]json.RawMessage - if s.v.Options == nil { - s.v.Options = make(map[string]json.RawMessage) - } else { - tmp = s.v.Options - } + s.v.BoundaryScanner = &boundaryscanner + return s +} - tmp[key] = value +func (s *_highlight) Fragmenter(fragmenter highlighterfragmenter.HighlighterFragmenter) *_highlight { - s.v.Options = tmp + s.v.Fragmenter = &fragmenter return s } -func (s *_highlight) Order(order highlighterorder.HighlighterOrder) *_highlight { +func (s *_highlight) MaxAnalyzedOffset(maxanalyzedoffset int) *_highlight { + + s.v.MaxAnalyzedOffset = &maxanalyzedoffset - s.v.Order = &order return s } @@ -178,42 +165,55 @@ func (s *_highlight) PhraseLimit(phraselimit int) *_highlight { return s } -func (s *_highlight) PostTags(posttags ...string) *_highlight { - - for _, v := range posttags { +func (s *_highlight) RequireFieldMatch(requirefieldmatch bool) *_highlight { - s.v.PostTags = append(s.v.PostTags, v) + s.v.RequireFieldMatch = &requirefieldmatch - } return s } -func (s *_highlight) PreTags(pretags ...string) *_highlight { - - for _, v := range pretags { +func (s *_highlight) BoundaryScannerLocale(boundaryscannerlocale string) *_highlight { - s.v.PreTags = append(s.v.PreTags, v) + s.v.BoundaryScannerLocale = &boundaryscannerlocale - } return s } -func (s *_highlight) RequireFieldMatch(requirefieldmatch bool) *_highlight { +func (s *_highlight) ForceSource(forcesource bool) *_highlight { - s.v.RequireFieldMatch = &requirefieldmatch + s.v.ForceSource = &forcesource return s } -func (s *_highlight) TagsSchema(tagsschema highlightertagsschema.HighlighterTagsSchema) *_highlight { +func (s *_highlight) Options(options map[string]json.RawMessage) *_highlight { - s.v.TagsSchema = &tagsschema + s.v.Options = options return s } -func (s *_highlight) Type(type_ highlightertype.HighlighterType) *_highlight { +func (s *_highlight) AddOption(key string, value json.RawMessage) *_highlight { - s.v.Type = &type_ + var tmp map[string]json.RawMessage + if s.v.Options == nil { + s.v.Options = make(map[string]json.RawMessage) + } else { + tmp = s.v.Options + } + + tmp[key] = value + + s.v.Options = tmp + return s +} + +func (s *_highlight) PostTags(posttags ...string) *_highlight { + + for _, v := range posttags { + + s.v.PostTags = append(s.v.PostTags, v) + + } return s } diff --git a/typedapi/esdsl/highlightfield.go b/typedapi/esdsl/highlightfield.go index ff0bb7acb7..44d2a90c6d 100644 --- a/typedapi/esdsl/highlightfield.go +++ b/typedapi/esdsl/highlightfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -41,16 +41,23 @@ func NewHighlightField() *_highlightField { } -func (s *_highlightField) BoundaryChars(boundarychars string) *_highlightField { +func (s *_highlightField) FragmentOffset(fragmentoffset int) *_highlightField { - s.v.BoundaryChars = &boundarychars + s.v.FragmentOffset = &fragmentoffset return s } -func (s *_highlightField) BoundaryMaxScan(boundarymaxscan int) *_highlightField { +func (s *_highlightField) MatchedFields(fields ...string) *_highlightField { - s.v.BoundaryMaxScan = &boundarymaxscan + s.v.MatchedFields = fields + + return s +} + +func (s *_highlightField) BoundaryChars(boundarychars string) *_highlightField { + + s.v.BoundaryChars = &boundarychars return s } @@ -61,30 +68,29 @@ func (s *_highlightField) BoundaryScanner(boundaryscanner boundaryscanner.Bounda return s } -func (s *_highlightField) BoundaryScannerLocale(boundaryscannerlocale string) *_highlightField { +func (s *_highlightField) HighlightFilter(highlightfilter bool) *_highlightField { - s.v.BoundaryScannerLocale = &boundaryscannerlocale + s.v.HighlightFilter = &highlightfilter return s } -func (s *_highlightField) ForceSource(forcesource bool) *_highlightField { +func (s *_highlightField) NumberOfFragments(numberoffragments int) *_highlightField { - s.v.ForceSource = &forcesource + s.v.NumberOfFragments = &numberoffragments return s } -func (s *_highlightField) FragmentOffset(fragmentoffset int) *_highlightField { - - s.v.FragmentOffset = &fragmentoffset +func (s *_highlightField) Order(order highlighterorder.HighlighterOrder) *_highlightField { + s.v.Order = &order return s } -func (s *_highlightField) FragmentSize(fragmentsize int) *_highlightField { +func (s *_highlightField) BoundaryMaxScan(boundarymaxscan int) *_highlightField { - s.v.FragmentSize = &fragmentsize + s.v.BoundaryMaxScan = &boundarymaxscan return s } @@ -95,30 +101,30 @@ func (s *_highlightField) Fragmenter(fragmenter highlighterfragmenter.Highlighte return s } -func (s *_highlightField) HighlightFilter(highlightfilter bool) *_highlightField { +func (s *_highlightField) HighlightQuery(highlightquery types.QueryVariant) *_highlightField { - s.v.HighlightFilter = &highlightfilter + s.v.HighlightQuery = highlightquery.QueryCaster() return s } -func (s *_highlightField) HighlightQuery(highlightquery types.QueryVariant) *_highlightField { +func (s *_highlightField) MaxAnalyzedOffset(maxanalyzedoffset int) *_highlightField { - s.v.HighlightQuery = highlightquery.QueryCaster() + s.v.MaxAnalyzedOffset = &maxanalyzedoffset return s } -func (s *_highlightField) MatchedFields(fields ...string) *_highlightField { +func (s *_highlightField) BoundaryScannerLocale(boundaryscannerlocale string) *_highlightField { - s.v.MatchedFields = fields + s.v.BoundaryScannerLocale = &boundaryscannerlocale return s } -func (s *_highlightField) MaxAnalyzedOffset(maxanalyzedoffset int) *_highlightField { +func (s *_highlightField) ForceSource(forcesource bool) *_highlightField { - s.v.MaxAnalyzedOffset = &maxanalyzedoffset + s.v.ForceSource = &forcesource return s } @@ -130,78 +136,78 @@ func (s *_highlightField) MaxFragmentLength(maxfragmentlength int) *_highlightFi return s } -func (s *_highlightField) NoMatchSize(nomatchsize int) *_highlightField { +func (s *_highlightField) PhraseLimit(phraselimit int) *_highlightField { - s.v.NoMatchSize = &nomatchsize + s.v.PhraseLimit = &phraselimit return s } -func (s *_highlightField) NumberOfFragments(numberoffragments int) *_highlightField { - - s.v.NumberOfFragments = &numberoffragments +func (s *_highlightField) PreTags(pretags ...string) *_highlightField { - return s -} + for _, v := range pretags { -func (s *_highlightField) Options(options map[string]json.RawMessage) *_highlightField { + s.v.PreTags = append(s.v.PreTags, v) - s.v.Options = options + } return s } -func (s *_highlightField) AddOption(key string, value json.RawMessage) *_highlightField { - - var tmp map[string]json.RawMessage - if s.v.Options == nil { - s.v.Options = make(map[string]json.RawMessage) - } else { - tmp = s.v.Options - } +func (s *_highlightField) RequireFieldMatch(requirefieldmatch bool) *_highlightField { - tmp[key] = value + s.v.RequireFieldMatch = &requirefieldmatch - s.v.Options = tmp return s } -func (s *_highlightField) Order(order highlighterorder.HighlighterOrder) *_highlightField { +func (s *_highlightField) Type(type_ highlightertype.HighlighterType) *_highlightField { - s.v.Order = &order + s.v.Type = &type_ return s } -func (s *_highlightField) PhraseLimit(phraselimit int) *_highlightField { +func (s *_highlightField) FragmentSize(fragmentsize int) *_highlightField { - s.v.PhraseLimit = &phraselimit + s.v.FragmentSize = &fragmentsize return s } -func (s *_highlightField) PostTags(posttags ...string) *_highlightField { - - for _, v := range posttags { +func (s *_highlightField) NoMatchSize(nomatchsize int) *_highlightField { - s.v.PostTags = append(s.v.PostTags, v) + s.v.NoMatchSize = &nomatchsize - } return s } -func (s *_highlightField) PreTags(pretags ...string) *_highlightField { +func (s *_highlightField) Options(options map[string]json.RawMessage) *_highlightField { - for _, v := range pretags { + s.v.Options = options + return s +} - s.v.PreTags = append(s.v.PreTags, v) +func (s *_highlightField) AddOption(key string, value json.RawMessage) *_highlightField { + var tmp map[string]json.RawMessage + if s.v.Options == nil { + s.v.Options = make(map[string]json.RawMessage) + } else { + tmp = s.v.Options } + + tmp[key] = value + + s.v.Options = tmp return s } -func (s *_highlightField) RequireFieldMatch(requirefieldmatch bool) *_highlightField { +func (s *_highlightField) PostTags(posttags ...string) *_highlightField { - s.v.RequireFieldMatch = &requirefieldmatch + for _, v := range posttags { + + s.v.PostTags = append(s.v.PostTags, v) + } return s } @@ -211,12 +217,6 @@ func (s *_highlightField) TagsSchema(tagsschema highlightertagsschema.Highlighte return s } -func (s *_highlightField) Type(type_ highlightertype.HighlighterType) *_highlightField { - - s.v.Type = &type_ - return s -} - func (s *_highlightField) HighlightFieldCaster() *types.HighlightField { return s.v } diff --git a/typedapi/esdsl/hindianalyzer.go b/typedapi/esdsl/hindianalyzer.go index c1631e8b92..25e760f40b 100644 --- a/typedapi/esdsl/hindianalyzer.go +++ b/typedapi/esdsl/hindianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hindinormalizationtokenfilter.go b/typedapi/esdsl/hindinormalizationtokenfilter.go index 2f0c029539..4767e90222 100644 --- a/typedapi/esdsl/hindinormalizationtokenfilter.go +++ b/typedapi/esdsl/hindinormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hint.go b/typedapi/esdsl/hint.go index b291b6d7f6..3997629035 100644 --- a/typedapi/esdsl/hint.go +++ b/typedapi/esdsl/hint.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/histogramaggregation.go b/typedapi/esdsl/histogramaggregation.go index 82e685c879..56af78bdf2 100644 --- a/typedapi/esdsl/histogramaggregation.go +++ b/typedapi/esdsl/histogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -26,9 +26,6 @@ type _histogramAggregation struct { v *types.HistogramAggregation } -// A multi-bucket values source based aggregation that can be applied on numeric -// values or numeric range values extracted from the documents. -// It dynamically builds fixed size (interval) buckets over the values. func NewHistogramAggregation() *_histogramAggregation { return &_histogramAggregation{v: types.NewHistogramAggregation()} diff --git a/typedapi/esdsl/histogramgrouping.go b/typedapi/esdsl/histogramgrouping.go index 70b341e2e0..b798849064 100644 --- a/typedapi/esdsl/histogramgrouping.go +++ b/typedapi/esdsl/histogramgrouping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/histogramproperty.go b/typedapi/esdsl/histogramproperty.go index e997c812ba..75f7051932 100644 --- a/typedapi/esdsl/histogramproperty.go +++ b/typedapi/esdsl/histogramproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/holtlinearmodelsettings.go b/typedapi/esdsl/holtlinearmodelsettings.go index 38d893fe68..99a72d834c 100644 --- a/typedapi/esdsl/holtlinearmodelsettings.go +++ b/typedapi/esdsl/holtlinearmodelsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/holtmovingaverageaggregation.go b/typedapi/esdsl/holtmovingaverageaggregation.go index e88fe087af..aadeda590e 100644 --- a/typedapi/esdsl/holtmovingaverageaggregation.go +++ b/typedapi/esdsl/holtmovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/holtwintersmodelsettings.go b/typedapi/esdsl/holtwintersmodelsettings.go index 7623804e98..1f359bb546 100644 --- a/typedapi/esdsl/holtwintersmodelsettings.go +++ b/typedapi/esdsl/holtwintersmodelsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/holtwintersmovingaverageaggregation.go b/typedapi/esdsl/holtwintersmovingaverageaggregation.go index d07355a8d8..1990aa2fd7 100644 --- a/typedapi/esdsl/holtwintersmovingaverageaggregation.go +++ b/typedapi/esdsl/holtwintersmovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hop.go b/typedapi/esdsl/hop.go index 44fb089b2c..face1c3731 100644 --- a/typedapi/esdsl/hop.go +++ b/typedapi/esdsl/hop.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hourandminute.go b/typedapi/esdsl/hourandminute.go index ca99a8be42..91aa483c2c 100644 --- a/typedapi/esdsl/hourandminute.go +++ b/typedapi/esdsl/hourandminute.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hourlyschedule.go b/typedapi/esdsl/hourlyschedule.go index c14146a2a8..43b62324c6 100644 --- a/typedapi/esdsl/hourlyschedule.go +++ b/typedapi/esdsl/hourlyschedule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/htmlstripcharfilter.go b/typedapi/esdsl/htmlstripcharfilter.go index 8906f9267a..fc24799df8 100644 --- a/typedapi/esdsl/htmlstripcharfilter.go +++ b/typedapi/esdsl/htmlstripcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/htmlstripprocessor.go b/typedapi/esdsl/htmlstripprocessor.go index 87678610db..51b5ce6d20 100644 --- a/typedapi/esdsl/htmlstripprocessor.go +++ b/typedapi/esdsl/htmlstripprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/httpemailattachment.go b/typedapi/esdsl/httpemailattachment.go index 9a092d39ee..ffd33f11c9 100644 --- a/typedapi/esdsl/httpemailattachment.go +++ b/typedapi/esdsl/httpemailattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/httpheaders.go b/typedapi/esdsl/httpheaders.go index 53a7fdffcb..14d95df629 100644 --- a/typedapi/esdsl/httpheaders.go +++ b/typedapi/esdsl/httpheaders.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/httpinput.go b/typedapi/esdsl/httpinput.go index 75f2842eaf..ce2556fc52 100644 --- a/typedapi/esdsl/httpinput.go +++ b/typedapi/esdsl/httpinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/httpinputauthentication.go b/typedapi/esdsl/httpinputauthentication.go index f43dd4877c..4f1cb42729 100644 --- a/typedapi/esdsl/httpinputauthentication.go +++ b/typedapi/esdsl/httpinputauthentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/httpinputbasicauthentication.go b/typedapi/esdsl/httpinputbasicauthentication.go index d75d46ea00..b140fae3e3 100644 --- a/typedapi/esdsl/httpinputbasicauthentication.go +++ b/typedapi/esdsl/httpinputbasicauthentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/httpinputproxy.go b/typedapi/esdsl/httpinputproxy.go index a27d20f93f..d8defefe87 100644 --- a/typedapi/esdsl/httpinputproxy.go +++ b/typedapi/esdsl/httpinputproxy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/httpinputrequestdefinition.go b/typedapi/esdsl/httpinputrequestdefinition.go index e30d3f997f..cde34d94f4 100644 --- a/typedapi/esdsl/httpinputrequestdefinition.go +++ b/typedapi/esdsl/httpinputrequestdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/huggingfaceservicesettings.go b/typedapi/esdsl/huggingfaceservicesettings.go index 7e11fe8610..e83f80cf3e 100644 --- a/typedapi/esdsl/huggingfaceservicesettings.go +++ b/typedapi/esdsl/huggingfaceservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/huggingfacetasksettings.go b/typedapi/esdsl/huggingfacetasksettings.go index 7559898c45..1f8e20e99b 100644 --- a/typedapi/esdsl/huggingfacetasksettings.go +++ b/typedapi/esdsl/huggingfacetasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hungariananalyzer.go b/typedapi/esdsl/hungariananalyzer.go index 00326ae38d..2d21662c31 100644 --- a/typedapi/esdsl/hungariananalyzer.go +++ b/typedapi/esdsl/hungariananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hunspelltokenfilter.go b/typedapi/esdsl/hunspelltokenfilter.go index 773fdde024..3792f5e0ee 100644 --- a/typedapi/esdsl/hunspelltokenfilter.go +++ b/typedapi/esdsl/hunspelltokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/hyphenationdecompoundertokenfilter.go b/typedapi/esdsl/hyphenationdecompoundertokenfilter.go index dfe36a5773..2d8cc474bc 100644 --- a/typedapi/esdsl/hyphenationdecompoundertokenfilter.go +++ b/typedapi/esdsl/hyphenationdecompoundertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/icuanalyzer.go b/typedapi/esdsl/icuanalyzer.go index 5bb1dc4554..5b10646b6c 100644 --- a/typedapi/esdsl/icuanalyzer.go +++ b/typedapi/esdsl/icuanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/icucollationproperty.go b/typedapi/esdsl/icucollationproperty.go index 0f4ec6611f..2f608cd452 100644 --- a/typedapi/esdsl/icucollationproperty.go +++ b/typedapi/esdsl/icucollationproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/icucollationtokenfilter.go b/typedapi/esdsl/icucollationtokenfilter.go index 95f6ce4153..34f9b098b6 100644 --- a/typedapi/esdsl/icucollationtokenfilter.go +++ b/typedapi/esdsl/icucollationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/icufoldingtokenfilter.go b/typedapi/esdsl/icufoldingtokenfilter.go index 3ae5f455d1..0b0af09602 100644 --- a/typedapi/esdsl/icufoldingtokenfilter.go +++ b/typedapi/esdsl/icufoldingtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/icunormalizationcharfilter.go b/typedapi/esdsl/icunormalizationcharfilter.go index ddd0d618d6..f72c9d3647 100644 --- a/typedapi/esdsl/icunormalizationcharfilter.go +++ b/typedapi/esdsl/icunormalizationcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/icunormalizationtokenfilter.go b/typedapi/esdsl/icunormalizationtokenfilter.go index c93de7e8a0..2d83d9b552 100644 --- a/typedapi/esdsl/icunormalizationtokenfilter.go +++ b/typedapi/esdsl/icunormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/icutokenizer.go b/typedapi/esdsl/icutokenizer.go index 029fbaf5a6..8484ad70ad 100644 --- a/typedapi/esdsl/icutokenizer.go +++ b/typedapi/esdsl/icutokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/icutransformtokenfilter.go b/typedapi/esdsl/icutransformtokenfilter.go index b947c4816b..23aa4634fa 100644 --- a/typedapi/esdsl/icutransformtokenfilter.go +++ b/typedapi/esdsl/icutransformtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ids.go b/typedapi/esdsl/ids.go index 3c9cf038fd..e973713995 100644 --- a/typedapi/esdsl/ids.go +++ b/typedapi/esdsl/ids.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/idsquery.go b/typedapi/esdsl/idsquery.go index e9f9e7c5bc..1aaa63baf0 100644 --- a/typedapi/esdsl/idsquery.go +++ b/typedapi/esdsl/idsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -26,8 +26,8 @@ type _idsQuery struct { v *types.IdsQuery } -// Returns documents based on their IDs. -// This query uses document IDs stored in the `_id` field. +// Returns roles based on their IDs. +// This query uses role document IDs stored in the `_id` field. func NewIdsQuery() *_idsQuery { return &_idsQuery{v: types.NewIdsQuery()} diff --git a/typedapi/esdsl/ilmactions.go b/typedapi/esdsl/ilmactions.go index f3d08d5de2..7fbc39601a 100644 --- a/typedapi/esdsl/ilmactions.go +++ b/typedapi/esdsl/ilmactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ilmpolicy.go b/typedapi/esdsl/ilmpolicy.go index 85e3be199c..6f8937dc47 100644 --- a/typedapi/esdsl/ilmpolicy.go +++ b/typedapi/esdsl/ilmpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/includedinvalidation.go b/typedapi/esdsl/includedinvalidation.go index 6a83b3986e..2fbbfece24 100644 --- a/typedapi/esdsl/includedinvalidation.go +++ b/typedapi/esdsl/includedinvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexaction.go b/typedapi/esdsl/indexaction.go index e2dcc2be63..048dd7cabe 100644 --- a/typedapi/esdsl/indexaction.go +++ b/typedapi/esdsl/indexaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexanddatastreamaction.go b/typedapi/esdsl/indexanddatastreamaction.go index 9283ba85d4..4aa79be0ee 100644 --- a/typedapi/esdsl/indexanddatastreamaction.go +++ b/typedapi/esdsl/indexanddatastreamaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexfield.go b/typedapi/esdsl/indexfield.go index 365469f24b..7f1358a2bc 100644 --- a/typedapi/esdsl/indexfield.go +++ b/typedapi/esdsl/indexfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexingslowlogsettings.go b/typedapi/esdsl/indexingslowlogsettings.go index 4cd8fc8494..ffc98e28a5 100644 --- a/typedapi/esdsl/indexingslowlogsettings.go +++ b/typedapi/esdsl/indexingslowlogsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexingslowlogtresholds.go b/typedapi/esdsl/indexingslowlogtresholds.go index 216aa5e05f..847060c695 100644 --- a/typedapi/esdsl/indexingslowlogtresholds.go +++ b/typedapi/esdsl/indexingslowlogtresholds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexoperation.go b/typedapi/esdsl/indexoperation.go index 3399e28af7..1a1bb9bbe4 100644 --- a/typedapi/esdsl/indexoperation.go +++ b/typedapi/esdsl/indexoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -101,9 +101,9 @@ func (s *_indexOperation) RequireAlias(requirealias bool) *_indexOperation { return s } -func (s *_indexOperation) Routing(routing string) *_indexOperation { +func (s *_indexOperation) Routing(routings ...string) *_indexOperation { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/indexprivilegescheck.go b/typedapi/esdsl/indexprivilegescheck.go index 637082c01c..e97e30628e 100644 --- a/typedapi/esdsl/indexprivilegescheck.go +++ b/typedapi/esdsl/indexprivilegescheck.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexrouting.go b/typedapi/esdsl/indexrouting.go index e971f1964b..273b373197 100644 --- a/typedapi/esdsl/indexrouting.go +++ b/typedapi/esdsl/indexrouting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexroutingallocation.go b/typedapi/esdsl/indexroutingallocation.go index e8c1c4bfe9..c31e7a9fa5 100644 --- a/typedapi/esdsl/indexroutingallocation.go +++ b/typedapi/esdsl/indexroutingallocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexroutingallocationdisk.go b/typedapi/esdsl/indexroutingallocationdisk.go index 2861a44e2b..03b8f743b3 100644 --- a/typedapi/esdsl/indexroutingallocationdisk.go +++ b/typedapi/esdsl/indexroutingallocationdisk.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexroutingallocationinclude.go b/typedapi/esdsl/indexroutingallocationinclude.go index 4b55569273..f209605f5a 100644 --- a/typedapi/esdsl/indexroutingallocationinclude.go +++ b/typedapi/esdsl/indexroutingallocationinclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexroutingallocationinitialrecovery.go b/typedapi/esdsl/indexroutingallocationinitialrecovery.go index fceffaacd7..8418b39112 100644 --- a/typedapi/esdsl/indexroutingallocationinitialrecovery.go +++ b/typedapi/esdsl/indexroutingallocationinitialrecovery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexroutingrebalance.go b/typedapi/esdsl/indexroutingrebalance.go index 8cf5620d4d..522e339b27 100644 --- a/typedapi/esdsl/indexroutingrebalance.go +++ b/typedapi/esdsl/indexroutingrebalance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexsegmentsort.go b/typedapi/esdsl/indexsegmentsort.go index 2ccd97d4d8..20544bad67 100644 --- a/typedapi/esdsl/indexsegmentsort.go +++ b/typedapi/esdsl/indexsegmentsort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexsettingblocks.go b/typedapi/esdsl/indexsettingblocks.go index ec4a0c358f..24fff0ccc6 100644 --- a/typedapi/esdsl/indexsettingblocks.go +++ b/typedapi/esdsl/indexsettingblocks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexsettings.go b/typedapi/esdsl/indexsettings.go index 0dadd2b307..a4f2b8c720 100644 --- a/typedapi/esdsl/indexsettings.go +++ b/typedapi/esdsl/indexsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexsettingsanalysis.go b/typedapi/esdsl/indexsettingsanalysis.go index c15e2b261b..52f0b0a913 100644 --- a/typedapi/esdsl/indexsettingsanalysis.go +++ b/typedapi/esdsl/indexsettingsanalysis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexsettingslifecycle.go b/typedapi/esdsl/indexsettingslifecycle.go index 9673fe8c62..5014f0e693 100644 --- a/typedapi/esdsl/indexsettingslifecycle.go +++ b/typedapi/esdsl/indexsettingslifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexsettingslifecyclestep.go b/typedapi/esdsl/indexsettingslifecyclestep.go index 2c9fa8da22..ebe509f9a4 100644 --- a/typedapi/esdsl/indexsettingslifecyclestep.go +++ b/typedapi/esdsl/indexsettingslifecyclestep.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexsettingstimeseries.go b/typedapi/esdsl/indexsettingstimeseries.go index 1c0b13c86b..2aac533a7d 100644 --- a/typedapi/esdsl/indexsettingstimeseries.go +++ b/typedapi/esdsl/indexsettingstimeseries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexstate.go b/typedapi/esdsl/indexstate.go index fccfd475e5..5234f472d2 100644 --- a/typedapi/esdsl/indexstate.go +++ b/typedapi/esdsl/indexstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indextemplate.go b/typedapi/esdsl/indextemplate.go index 05a200e1a9..a7d553a601 100644 --- a/typedapi/esdsl/indextemplate.go +++ b/typedapi/esdsl/indextemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -49,6 +49,20 @@ func (s *_indexTemplate) ComposedOf(composedofs ...string) *_indexTemplate { return s } +func (s *_indexTemplate) CreatedDate(datetime types.DateTimeVariant) *_indexTemplate { + + s.v.CreatedDate = *datetime.DateTimeCaster() + + return s +} + +func (s *_indexTemplate) CreatedDateMillis(epochtimeunitmillis int64) *_indexTemplate { + + s.v.CreatedDateMillis = &epochtimeunitmillis + + return s +} + func (s *_indexTemplate) DataStream(datastream types.IndexTemplateDataStreamConfigurationVariant) *_indexTemplate { s.v.DataStream = datastream.IndexTemplateDataStreamConfigurationCaster() @@ -84,6 +98,20 @@ func (s *_indexTemplate) Meta_(metadata types.MetadataVariant) *_indexTemplate { return s } +func (s *_indexTemplate) ModifiedDate(datetime types.DateTimeVariant) *_indexTemplate { + + s.v.ModifiedDate = *datetime.DateTimeCaster() + + return s +} + +func (s *_indexTemplate) ModifiedDateMillis(epochtimeunitmillis int64) *_indexTemplate { + + s.v.ModifiedDateMillis = &epochtimeunitmillis + + return s +} + func (s *_indexTemplate) Priority(priority int64) *_indexTemplate { s.v.Priority = &priority diff --git a/typedapi/esdsl/indextemplatedatastreamconfiguration.go b/typedapi/esdsl/indextemplatedatastreamconfiguration.go index faa39b01b6..2ec548d445 100644 --- a/typedapi/esdsl/indextemplatedatastreamconfiguration.go +++ b/typedapi/esdsl/indextemplatedatastreamconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indextemplatemapping.go b/typedapi/esdsl/indextemplatemapping.go index 31414b4a6d..83c4189adb 100644 --- a/typedapi/esdsl/indextemplatemapping.go +++ b/typedapi/esdsl/indextemplatemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indextemplatesummary.go b/typedapi/esdsl/indextemplatesummary.go index b266a3cf37..d8d623d84c 100644 --- a/typedapi/esdsl/indextemplatesummary.go +++ b/typedapi/esdsl/indextemplatesummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indexversioning.go b/typedapi/esdsl/indexversioning.go index fa966809e9..707e8fdc3b 100644 --- a/typedapi/esdsl/indexversioning.go +++ b/typedapi/esdsl/indexversioning.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indices.go b/typedapi/esdsl/indices.go index 1aa6891dfe..37f46418ef 100644 --- a/typedapi/esdsl/indices.go +++ b/typedapi/esdsl/indices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indicesaction.go b/typedapi/esdsl/indicesaction.go index 8128cbf85c..62b0fb6e02 100644 --- a/typedapi/esdsl/indicesaction.go +++ b/typedapi/esdsl/indicesaction.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _indicesAction struct { v *types.IndicesAction @@ -41,18 +37,6 @@ func (s *_indicesAction) Add(add types.AddActionVariant) *_indicesAction { return s } -// AdditionalIndicesActionProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_indicesAction) AdditionalIndicesActionProperty(key string, value json.RawMessage) *_indicesAction { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalIndicesActionProperty = tmp - return s -} - func (s *_indicesAction) Remove(remove types.RemoveActionVariant) *_indicesAction { s.v.Remove = remove.RemoveActionCaster() diff --git a/typedapi/esdsl/indicesindexingpressure.go b/typedapi/esdsl/indicesindexingpressure.go index 6160bb9cc7..557c0b67bb 100644 --- a/typedapi/esdsl/indicesindexingpressure.go +++ b/typedapi/esdsl/indicesindexingpressure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indicesindexingpressurememory.go b/typedapi/esdsl/indicesindexingpressurememory.go index a4c9d36762..8bb39b2f4d 100644 --- a/typedapi/esdsl/indicesindexingpressurememory.go +++ b/typedapi/esdsl/indicesindexingpressurememory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indicesmodifyaction.go b/typedapi/esdsl/indicesmodifyaction.go index 05afcbfe2d..2a6a2b01f3 100644 --- a/typedapi/esdsl/indicesmodifyaction.go +++ b/typedapi/esdsl/indicesmodifyaction.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _indicesModifyAction struct { v *types.IndicesModifyAction @@ -41,18 +37,6 @@ func (s *_indicesModifyAction) AddBackingIndex(addbackingindex types.IndexAndDat return s } -// AdditionalIndicesModifyActionProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_indicesModifyAction) AdditionalIndicesModifyActionProperty(key string, value json.RawMessage) *_indicesModifyAction { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalIndicesModifyActionProperty = tmp - return s -} - func (s *_indicesModifyAction) RemoveBackingIndex(removebackingindex types.IndexAndDataStreamActionVariant) *_indicesModifyAction { s.v.RemoveBackingIndex = removebackingindex.IndexAndDataStreamActionCaster() diff --git a/typedapi/esdsl/indicesoptions.go b/typedapi/esdsl/indicesoptions.go index 6cb5fbac78..3ef76c63f4 100644 --- a/typedapi/esdsl/indicesoptions.go +++ b/typedapi/esdsl/indicesoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indicesprivileges.go b/typedapi/esdsl/indicesprivileges.go index 06e8e244c0..04844ed7fb 100644 --- a/typedapi/esdsl/indicesprivileges.go +++ b/typedapi/esdsl/indicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indicesprivilegesquery.go b/typedapi/esdsl/indicesprivilegesquery.go index c5471d63b1..b17876609c 100644 --- a/typedapi/esdsl/indicesprivilegesquery.go +++ b/typedapi/esdsl/indicesprivilegesquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indicnormalizationtokenfilter.go b/typedapi/esdsl/indicnormalizationtokenfilter.go index 325565f879..e1410538ab 100644 --- a/typedapi/esdsl/indicnormalizationtokenfilter.go +++ b/typedapi/esdsl/indicnormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/indonesiananalyzer.go b/typedapi/esdsl/indonesiananalyzer.go index 9e8d6b1a1e..c85d5f9f3e 100644 --- a/typedapi/esdsl/indonesiananalyzer.go +++ b/typedapi/esdsl/indonesiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/inferenceaggregation.go b/typedapi/esdsl/inferenceaggregation.go index 14e607da6d..ae4d2b7df5 100644 --- a/typedapi/esdsl/inferenceaggregation.go +++ b/typedapi/esdsl/inferenceaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/inferencechunkingsettings.go b/typedapi/esdsl/inferencechunkingsettings.go index 4c5d76d192..73db35c811 100644 --- a/typedapi/esdsl/inferencechunkingsettings.go +++ b/typedapi/esdsl/inferencechunkingsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -53,6 +53,23 @@ func (s *_inferenceChunkingSettings) SentenceOverlap(sentenceoverlap int) *_infe return s } +func (s *_inferenceChunkingSettings) SeparatorGroup(separatorgroup string) *_inferenceChunkingSettings { + + s.v.SeparatorGroup = &separatorgroup + + return s +} + +func (s *_inferenceChunkingSettings) Separators(separators ...string) *_inferenceChunkingSettings { + + for _, v := range separators { + + s.v.Separators = append(s.v.Separators, v) + + } + return s +} + func (s *_inferenceChunkingSettings) Strategy(strategy string) *_inferenceChunkingSettings { s.v.Strategy = &strategy diff --git a/typedapi/esdsl/inferenceconfig.go b/typedapi/esdsl/inferenceconfig.go index 87fead6a5e..94f5dd7555 100644 --- a/typedapi/esdsl/inferenceconfig.go +++ b/typedapi/esdsl/inferenceconfig.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _inferenceConfig struct { v *types.InferenceConfig @@ -34,18 +30,6 @@ func NewInferenceConfig() *_inferenceConfig { return &_inferenceConfig{v: types.NewInferenceConfig()} } -// AdditionalInferenceConfigProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_inferenceConfig) AdditionalInferenceConfigProperty(key string, value json.RawMessage) *_inferenceConfig { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalInferenceConfigProperty = tmp - return s -} - func (s *_inferenceConfig) Classification(classification types.InferenceConfigClassificationVariant) *_inferenceConfig { s.v.Classification = classification.InferenceConfigClassificationCaster() diff --git a/typedapi/esdsl/inferenceconfigclassification.go b/typedapi/esdsl/inferenceconfigclassification.go index bf76ef4dfb..0d78bc2395 100644 --- a/typedapi/esdsl/inferenceconfigclassification.go +++ b/typedapi/esdsl/inferenceconfigclassification.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/inferenceconfigcontainer.go b/typedapi/esdsl/inferenceconfigcontainer.go index 6d2b614508..db3ba17719 100644 --- a/typedapi/esdsl/inferenceconfigcontainer.go +++ b/typedapi/esdsl/inferenceconfigcontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _inferenceConfigContainer struct { v *types.InferenceConfigContainer @@ -34,18 +30,6 @@ func NewInferenceConfigContainer() *_inferenceConfigContainer { return &_inferenceConfigContainer{v: types.NewInferenceConfigContainer()} } -// AdditionalInferenceConfigContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_inferenceConfigContainer) AdditionalInferenceConfigContainerProperty(key string, value json.RawMessage) *_inferenceConfigContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalInferenceConfigContainerProperty = tmp - return s -} - func (s *_inferenceConfigContainer) Classification(classification types.ClassificationInferenceOptionsVariant) *_inferenceConfigContainer { s.v.Classification = classification.ClassificationInferenceOptionsCaster() diff --git a/typedapi/esdsl/inferenceconfigcreatecontainer.go b/typedapi/esdsl/inferenceconfigcreatecontainer.go index a20833f4f2..a165799fd1 100644 --- a/typedapi/esdsl/inferenceconfigcreatecontainer.go +++ b/typedapi/esdsl/inferenceconfigcreatecontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _inferenceConfigCreateContainer struct { v *types.InferenceConfigCreateContainer @@ -34,18 +30,6 @@ func NewInferenceConfigCreateContainer() *_inferenceConfigCreateContainer { return &_inferenceConfigCreateContainer{v: types.NewInferenceConfigCreateContainer()} } -// AdditionalInferenceConfigCreateContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_inferenceConfigCreateContainer) AdditionalInferenceConfigCreateContainerProperty(key string, value json.RawMessage) *_inferenceConfigCreateContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalInferenceConfigCreateContainerProperty = tmp - return s -} - func (s *_inferenceConfigCreateContainer) Classification(classification types.ClassificationInferenceOptionsVariant) *_inferenceConfigCreateContainer { s.v.Classification = classification.ClassificationInferenceOptionsCaster() diff --git a/typedapi/esdsl/inferenceconfigregression.go b/typedapi/esdsl/inferenceconfigregression.go index fc47a2a5dd..1165a0da3b 100644 --- a/typedapi/esdsl/inferenceconfigregression.go +++ b/typedapi/esdsl/inferenceconfigregression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/inferenceconfigupdatecontainer.go b/typedapi/esdsl/inferenceconfigupdatecontainer.go index cbf24d7afe..f3a597a95b 100644 --- a/typedapi/esdsl/inferenceconfigupdatecontainer.go +++ b/typedapi/esdsl/inferenceconfigupdatecontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _inferenceConfigUpdateContainer struct { v *types.InferenceConfigUpdateContainer @@ -34,18 +30,6 @@ func NewInferenceConfigUpdateContainer() *_inferenceConfigUpdateContainer { return &_inferenceConfigUpdateContainer{v: types.NewInferenceConfigUpdateContainer()} } -// AdditionalInferenceConfigUpdateContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_inferenceConfigUpdateContainer) AdditionalInferenceConfigUpdateContainerProperty(key string, value json.RawMessage) *_inferenceConfigUpdateContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalInferenceConfigUpdateContainerProperty = tmp - return s -} - func (s *_inferenceConfigUpdateContainer) Classification(classification types.ClassificationInferenceOptionsVariant) *_inferenceConfigUpdateContainer { s.v.Classification = classification.ClassificationInferenceOptionsCaster() diff --git a/typedapi/esdsl/inferenceendpoint.go b/typedapi/esdsl/inferenceendpoint.go index 91eacf60ea..ced3ca7270 100644 --- a/typedapi/esdsl/inferenceendpoint.go +++ b/typedapi/esdsl/inferenceendpoint.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/inferenceprocessor.go b/typedapi/esdsl/inferenceprocessor.go index 66579d5226..325ca39fc9 100644 --- a/typedapi/esdsl/inferenceprocessor.go +++ b/typedapi/esdsl/inferenceprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ingestpipeline.go b/typedapi/esdsl/ingestpipeline.go index 5433c4add6..4db4b8fb5d 100644 --- a/typedapi/esdsl/ingestpipeline.go +++ b/typedapi/esdsl/ingestpipeline.go @@ -16,11 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import "github.com/elastic/go-elasticsearch/v9/typedapi/types" +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/fieldaccesspattern" +) type _ingestPipeline struct { v *types.IngestPipeline @@ -32,6 +35,20 @@ func NewIngestPipeline() *_ingestPipeline { } +func (s *_ingestPipeline) CreatedDate(datetime types.DateTimeVariant) *_ingestPipeline { + + s.v.CreatedDate = *datetime.DateTimeCaster() + + return s +} + +func (s *_ingestPipeline) CreatedDateMillis(epochtimeunitmillis int64) *_ingestPipeline { + + s.v.CreatedDateMillis = &epochtimeunitmillis + + return s +} + func (s *_ingestPipeline) Deprecated(deprecated bool) *_ingestPipeline { s.v.Deprecated = &deprecated @@ -46,6 +63,12 @@ func (s *_ingestPipeline) Description(description string) *_ingestPipeline { return s } +func (s *_ingestPipeline) FieldAccessPattern(fieldaccesspattern fieldaccesspattern.FieldAccessPattern) *_ingestPipeline { + + s.v.FieldAccessPattern = &fieldaccesspattern + return s +} + func (s *_ingestPipeline) Meta_(metadata types.MetadataVariant) *_ingestPipeline { s.v.Meta_ = *metadata.MetadataCaster() @@ -53,6 +76,20 @@ func (s *_ingestPipeline) Meta_(metadata types.MetadataVariant) *_ingestPipeline return s } +func (s *_ingestPipeline) ModifiedDate(datetime types.DateTimeVariant) *_ingestPipeline { + + s.v.ModifiedDate = *datetime.DateTimeCaster() + + return s +} + +func (s *_ingestPipeline) ModifiedDateMillis(epochtimeunitmillis int64) *_ingestPipeline { + + s.v.ModifiedDateMillis = &epochtimeunitmillis + + return s +} + func (s *_ingestPipeline) OnFailure(onfailures ...types.ProcessorContainerVariant) *_ingestPipeline { for _, v := range onfailures { diff --git a/typedapi/esdsl/ingestpipelineparams.go b/typedapi/esdsl/ingestpipelineparams.go index fb34b79c04..8904da4f62 100644 --- a/typedapi/esdsl/ingestpipelineparams.go +++ b/typedapi/esdsl/ingestpipelineparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/innerhits.go b/typedapi/esdsl/innerhits.go index 0c41327d7b..23e81a3331 100644 --- a/typedapi/esdsl/innerhits.go +++ b/typedapi/esdsl/innerhits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/innerretriever.go b/typedapi/esdsl/innerretriever.go index 51c2d31120..800fdaf3cf 100644 --- a/typedapi/esdsl/innerretriever.go +++ b/typedapi/esdsl/innerretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/input.go b/typedapi/esdsl/input.go index 36c77f72a0..0e1a64ddd6 100644 --- a/typedapi/esdsl/input.go +++ b/typedapi/esdsl/input.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/inputconfig.go b/typedapi/esdsl/inputconfig.go index 59cd295593..8eac83db3b 100644 --- a/typedapi/esdsl/inputconfig.go +++ b/typedapi/esdsl/inputconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/integernumberproperty.go b/typedapi/esdsl/integernumberproperty.go index 7598781a54..f9e83a1b48 100644 --- a/typedapi/esdsl/integernumberproperty.go +++ b/typedapi/esdsl/integernumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/integerrangeproperty.go b/typedapi/esdsl/integerrangeproperty.go index feee9768ff..9dc180e186 100644 --- a/typedapi/esdsl/integerrangeproperty.go +++ b/typedapi/esdsl/integerrangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/intervals.go b/typedapi/esdsl/intervals.go index 2619911855..6383f16cfc 100644 --- a/typedapi/esdsl/intervals.go +++ b/typedapi/esdsl/intervals.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _intervals struct { v *types.Intervals @@ -34,18 +30,6 @@ func NewIntervals() *_intervals { return &_intervals{v: types.NewIntervals()} } -// AdditionalIntervalsProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_intervals) AdditionalIntervalsProperty(key string, value json.RawMessage) *_intervals { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalIntervalsProperty = tmp - return s -} - func (s *_intervals) AllOf(allof types.IntervalsAllOfVariant) *_intervals { s.v.AllOf = allof.IntervalsAllOfCaster() diff --git a/typedapi/esdsl/intervalsallof.go b/typedapi/esdsl/intervalsallof.go index 97b099ce6f..84107920da 100644 --- a/typedapi/esdsl/intervalsallof.go +++ b/typedapi/esdsl/intervalsallof.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/intervalsanyof.go b/typedapi/esdsl/intervalsanyof.go index 7a41e8f17b..9678f4c5a1 100644 --- a/typedapi/esdsl/intervalsanyof.go +++ b/typedapi/esdsl/intervalsanyof.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/intervalsfilter.go b/typedapi/esdsl/intervalsfilter.go index 2c3cd8595e..141fa619c8 100644 --- a/typedapi/esdsl/intervalsfilter.go +++ b/typedapi/esdsl/intervalsfilter.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _intervalsFilter struct { v *types.IntervalsFilter @@ -34,18 +30,6 @@ func NewIntervalsFilter() *_intervalsFilter { return &_intervalsFilter{v: types.NewIntervalsFilter()} } -// AdditionalIntervalsFilterProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_intervalsFilter) AdditionalIntervalsFilterProperty(key string, value json.RawMessage) *_intervalsFilter { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalIntervalsFilterProperty = tmp - return s -} - func (s *_intervalsFilter) After(after types.IntervalsVariant) *_intervalsFilter { s.v.After = after.IntervalsCaster() diff --git a/typedapi/esdsl/intervalsfuzzy.go b/typedapi/esdsl/intervalsfuzzy.go index d2637af1b0..5c8ff4d26d 100644 --- a/typedapi/esdsl/intervalsfuzzy.go +++ b/typedapi/esdsl/intervalsfuzzy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/intervalsmatch.go b/typedapi/esdsl/intervalsmatch.go index 840eaf5924..6f2da463dc 100644 --- a/typedapi/esdsl/intervalsmatch.go +++ b/typedapi/esdsl/intervalsmatch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/intervalsprefix.go b/typedapi/esdsl/intervalsprefix.go index 69dc99e1d3..9ec14a9458 100644 --- a/typedapi/esdsl/intervalsprefix.go +++ b/typedapi/esdsl/intervalsprefix.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/intervalsquery.go b/typedapi/esdsl/intervalsquery.go index 1728a8736d..1b4d3440e9 100644 --- a/typedapi/esdsl/intervalsquery.go +++ b/typedapi/esdsl/intervalsquery.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _intervalsQuery struct { v *types.IntervalsQuery @@ -34,18 +30,6 @@ func NewIntervalsQuery() *_intervalsQuery { return &_intervalsQuery{v: types.NewIntervalsQuery()} } -// AdditionalIntervalsQueryProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_intervalsQuery) AdditionalIntervalsQueryProperty(key string, value json.RawMessage) *_intervalsQuery { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalIntervalsQueryProperty = tmp - return s -} - func (s *_intervalsQuery) AllOf(allof types.IntervalsAllOfVariant) *_intervalsQuery { s.v.AllOf = allof.IntervalsAllOfCaster() diff --git a/typedapi/esdsl/intervalsrange.go b/typedapi/esdsl/intervalsrange.go index 71365d64d6..7957e884d2 100644 --- a/typedapi/esdsl/intervalsrange.go +++ b/typedapi/esdsl/intervalsrange.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/intervalsregexp.go b/typedapi/esdsl/intervalsregexp.go index 74e31d5da0..6025273e19 100644 --- a/typedapi/esdsl/intervalsregexp.go +++ b/typedapi/esdsl/intervalsregexp.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/intervalswildcard.go b/typedapi/esdsl/intervalswildcard.go index 28fe062374..bc74389f76 100644 --- a/typedapi/esdsl/intervalswildcard.go +++ b/typedapi/esdsl/intervalswildcard.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ipinfo.go b/typedapi/esdsl/ipinfo.go index df6d01c579..0b30e9256c 100644 --- a/typedapi/esdsl/ipinfo.go +++ b/typedapi/esdsl/ipinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/iplocationprocessor.go b/typedapi/esdsl/iplocationprocessor.go index 7a89712337..fde5ae076a 100644 --- a/typedapi/esdsl/iplocationprocessor.go +++ b/typedapi/esdsl/iplocationprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ipprefixaggregation.go b/typedapi/esdsl/ipprefixaggregation.go index 373aac7a55..4f4678da30 100644 --- a/typedapi/esdsl/ipprefixaggregation.go +++ b/typedapi/esdsl/ipprefixaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ipproperty.go b/typedapi/esdsl/ipproperty.go index 2a0371c583..0b42f3edd4 100644 --- a/typedapi/esdsl/ipproperty.go +++ b/typedapi/esdsl/ipproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/iprangeaggregation.go b/typedapi/esdsl/iprangeaggregation.go index e663f8463c..c72f746cc7 100644 --- a/typedapi/esdsl/iprangeaggregation.go +++ b/typedapi/esdsl/iprangeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/iprangeaggregationrange.go b/typedapi/esdsl/iprangeaggregationrange.go index ab335a6ee7..d40f84b69f 100644 --- a/typedapi/esdsl/iprangeaggregationrange.go +++ b/typedapi/esdsl/iprangeaggregationrange.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/iprangeproperty.go b/typedapi/esdsl/iprangeproperty.go index efcaf861d8..9dc8a005c1 100644 --- a/typedapi/esdsl/iprangeproperty.go +++ b/typedapi/esdsl/iprangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/irishanalyzer.go b/typedapi/esdsl/irishanalyzer.go index 88d15d3346..e7b275f120 100644 --- a/typedapi/esdsl/irishanalyzer.go +++ b/typedapi/esdsl/irishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/italiananalyzer.go b/typedapi/esdsl/italiananalyzer.go index 2a3ecb7f11..afca8799f6 100644 --- a/typedapi/esdsl/italiananalyzer.go +++ b/typedapi/esdsl/italiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/jastoptokenfilter.go b/typedapi/esdsl/jastoptokenfilter.go index b092ae76fe..d0a2b7d989 100644 --- a/typedapi/esdsl/jastoptokenfilter.go +++ b/typedapi/esdsl/jastoptokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/jinaaiservicesettings.go b/typedapi/esdsl/jinaaiservicesettings.go index c94342062b..768fb61ab0 100644 --- a/typedapi/esdsl/jinaaiservicesettings.go +++ b/typedapi/esdsl/jinaaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/jinaaitasksettings.go b/typedapi/esdsl/jinaaitasksettings.go index 86723ec2ed..072fb0a9c6 100644 --- a/typedapi/esdsl/jinaaitasksettings.go +++ b/typedapi/esdsl/jinaaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/jobconfig.go b/typedapi/esdsl/jobconfig.go index 5dd563b1dd..949a5fde32 100644 --- a/typedapi/esdsl/jobconfig.go +++ b/typedapi/esdsl/jobconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/joinprocessor.go b/typedapi/esdsl/joinprocessor.go index 24e7fee7f6..2cfcf58dc4 100644 --- a/typedapi/esdsl/joinprocessor.go +++ b/typedapi/esdsl/joinprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/joinproperty.go b/typedapi/esdsl/joinproperty.go index 51fe7a67d0..c6884c7bf8 100644 --- a/typedapi/esdsl/joinproperty.go +++ b/typedapi/esdsl/joinproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/jsonprocessor.go b/typedapi/esdsl/jsonprocessor.go index 2c30fc99bd..b9c9d9732a 100644 --- a/typedapi/esdsl/jsonprocessor.go +++ b/typedapi/esdsl/jsonprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/keeptypestokenfilter.go b/typedapi/esdsl/keeptypestokenfilter.go index a04e54f825..4b390287e7 100644 --- a/typedapi/esdsl/keeptypestokenfilter.go +++ b/typedapi/esdsl/keeptypestokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/keepwordstokenfilter.go b/typedapi/esdsl/keepwordstokenfilter.go index 2ee2dd84c4..ceef0a0ead 100644 --- a/typedapi/esdsl/keepwordstokenfilter.go +++ b/typedapi/esdsl/keepwordstokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/keyvalueprocessor.go b/typedapi/esdsl/keyvalueprocessor.go index 71855eb960..516218fc99 100644 --- a/typedapi/esdsl/keyvalueprocessor.go +++ b/typedapi/esdsl/keyvalueprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/keywordanalyzer.go b/typedapi/esdsl/keywordanalyzer.go index 72eb34681f..1dac6f58c1 100644 --- a/typedapi/esdsl/keywordanalyzer.go +++ b/typedapi/esdsl/keywordanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/keywordmarkertokenfilter.go b/typedapi/esdsl/keywordmarkertokenfilter.go index ec0a0acdf4..db29c7e0ad 100644 --- a/typedapi/esdsl/keywordmarkertokenfilter.go +++ b/typedapi/esdsl/keywordmarkertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/keywordproperty.go b/typedapi/esdsl/keywordproperty.go index 27fa0829f3..61031daf7d 100644 --- a/typedapi/esdsl/keywordproperty.go +++ b/typedapi/esdsl/keywordproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/keywordrepeattokenfilter.go b/typedapi/esdsl/keywordrepeattokenfilter.go index 9fde5435a8..f7c9c9cf0a 100644 --- a/typedapi/esdsl/keywordrepeattokenfilter.go +++ b/typedapi/esdsl/keywordrepeattokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/keywordtokenizer.go b/typedapi/esdsl/keywordtokenizer.go index 2c83553bb9..0de9577d67 100644 --- a/typedapi/esdsl/keywordtokenizer.go +++ b/typedapi/esdsl/keywordtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/knnquery.go b/typedapi/esdsl/knnquery.go index 727f8f565c..97e3351c1d 100644 --- a/typedapi/esdsl/knnquery.go +++ b/typedapi/esdsl/knnquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -35,13 +35,6 @@ func NewKnnQuery() *_knnQuery { } -func (s *_knnQuery) Boost(boost float32) *_knnQuery { - - s.v.Boost = &boost - - return s -} - func (s *_knnQuery) Field(field string) *_knnQuery { s.v.Field = field @@ -73,13 +66,6 @@ func (s *_knnQuery) NumCandidates(numcandidates int) *_knnQuery { return s } -func (s *_knnQuery) QueryName_(queryname_ string) *_knnQuery { - - s.v.QueryName_ = &queryname_ - - return s -} - func (s *_knnQuery) QueryVector(queryvectors ...float32) *_knnQuery { s.v.QueryVector = queryvectors @@ -108,6 +94,27 @@ func (s *_knnQuery) Similarity(similarity float32) *_knnQuery { return s } +func (s *_knnQuery) VisitPercentage(visitpercentage float32) *_knnQuery { + + s.v.VisitPercentage = &visitpercentage + + return s +} + +func (s *_knnQuery) Boost(boost float32) *_knnQuery { + + s.v.Boost = &boost + + return s +} + +func (s *_knnQuery) QueryName_(queryname_ string) *_knnQuery { + + s.v.QueryName_ = &queryname_ + + return s +} + func (s *_knnQuery) QueryCaster() *types.Query { container := types.NewQuery() diff --git a/typedapi/esdsl/knnretriever.go b/typedapi/esdsl/knnretriever.go index 8304d7fd65..7cb7af2973 100644 --- a/typedapi/esdsl/knnretriever.go +++ b/typedapi/esdsl/knnretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -48,68 +48,75 @@ func (s *_knnRetriever) Field(field string) *_knnRetriever { return s } -func (s *_knnRetriever) Filter(filters ...types.QueryVariant) *_knnRetriever { +func (s *_knnRetriever) K(k int) *_knnRetriever { - s.v.Filter = make([]types.Query, len(filters)) - for i, v := range filters { - s.v.Filter[i] = *v.QueryCaster() - } + s.v.K = k return s } -func (s *_knnRetriever) K(k int) *_knnRetriever { +func (s *_knnRetriever) NumCandidates(numcandidates int) *_knnRetriever { - s.v.K = k + s.v.NumCandidates = numcandidates return s } -func (s *_knnRetriever) MinScore(minscore float32) *_knnRetriever { +func (s *_knnRetriever) QueryVector(queryvectors ...float32) *_knnRetriever { - s.v.MinScore = &minscore + s.v.QueryVector = queryvectors return s } -func (s *_knnRetriever) Name_(name_ string) *_knnRetriever { +func (s *_knnRetriever) QueryVectorBuilder(queryvectorbuilder types.QueryVectorBuilderVariant) *_knnRetriever { - s.v.Name_ = &name_ + s.v.QueryVectorBuilder = queryvectorbuilder.QueryVectorBuilderCaster() return s } -func (s *_knnRetriever) NumCandidates(numcandidates int) *_knnRetriever { +func (s *_knnRetriever) RescoreVector(rescorevector types.RescoreVectorVariant) *_knnRetriever { - s.v.NumCandidates = numcandidates + s.v.RescoreVector = rescorevector.RescoreVectorCaster() return s } -func (s *_knnRetriever) QueryVector(queryvectors ...float32) *_knnRetriever { +func (s *_knnRetriever) Similarity(similarity float32) *_knnRetriever { - s.v.QueryVector = queryvectors + s.v.Similarity = &similarity return s } -func (s *_knnRetriever) QueryVectorBuilder(queryvectorbuilder types.QueryVectorBuilderVariant) *_knnRetriever { +func (s *_knnRetriever) VisitPercentage(visitpercentage float32) *_knnRetriever { - s.v.QueryVectorBuilder = queryvectorbuilder.QueryVectorBuilderCaster() + s.v.VisitPercentage = &visitpercentage return s } -func (s *_knnRetriever) RescoreVector(rescorevector types.RescoreVectorVariant) *_knnRetriever { +func (s *_knnRetriever) Filter(filters ...types.QueryVariant) *_knnRetriever { - s.v.RescoreVector = rescorevector.RescoreVectorCaster() + s.v.Filter = make([]types.Query, len(filters)) + for i, v := range filters { + s.v.Filter[i] = *v.QueryCaster() + } return s } -func (s *_knnRetriever) Similarity(similarity float32) *_knnRetriever { +func (s *_knnRetriever) MinScore(minscore float32) *_knnRetriever { - s.v.Similarity = &similarity + s.v.MinScore = &minscore + + return s +} + +func (s *_knnRetriever) Name_(name_ string) *_knnRetriever { + + s.v.Name_ = &name_ return s } diff --git a/typedapi/esdsl/knnsearch.go b/typedapi/esdsl/knnsearch.go index 19f95bd574..f4ad2fb806 100644 --- a/typedapi/esdsl/knnsearch.go +++ b/typedapi/esdsl/knnsearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -105,6 +105,13 @@ func (s *_knnSearch) Similarity(similarity float32) *_knnSearch { return s } +func (s *_knnSearch) VisitPercentage(visitpercentage float32) *_knnSearch { + + s.v.VisitPercentage = &visitpercentage + + return s +} + func (s *_knnSearch) KnnSearchCaster() *types.KnnSearch { return s.v } diff --git a/typedapi/esdsl/knnsearchquery.go b/typedapi/esdsl/knnsearchquery.go new file mode 100644 index 0000000000..5b1c4241af --- /dev/null +++ b/typedapi/esdsl/knnsearchquery.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _knnSearchQuery struct { + v *types.KnnSearchQuery +} + +func NewKnnSearchQuery(k int, numcandidates int) *_knnSearchQuery { + + tmp := &_knnSearchQuery{v: types.NewKnnSearchQuery()} + + tmp.K(k) + + tmp.NumCandidates(numcandidates) + + return tmp + +} + +func (s *_knnSearchQuery) Field(field string) *_knnSearchQuery { + + s.v.Field = field + + return s +} + +func (s *_knnSearchQuery) K(k int) *_knnSearchQuery { + + s.v.K = k + + return s +} + +func (s *_knnSearchQuery) NumCandidates(numcandidates int) *_knnSearchQuery { + + s.v.NumCandidates = numcandidates + + return s +} + +func (s *_knnSearchQuery) QueryVector(queryvectors ...float32) *_knnSearchQuery { + + s.v.QueryVector = queryvectors + + return s +} + +func (s *_knnSearchQuery) KnnSearchQueryCaster() *types.KnnSearchQuery { + return s.v +} diff --git a/typedapi/esdsl/kstemtokenfilter.go b/typedapi/esdsl/kstemtokenfilter.go index ce58fad60e..8bb9359509 100644 --- a/typedapi/esdsl/kstemtokenfilter.go +++ b/typedapi/esdsl/kstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/kuromojianalyzer.go b/typedapi/esdsl/kuromojianalyzer.go index 38bc58f847..afd892297a 100644 --- a/typedapi/esdsl/kuromojianalyzer.go +++ b/typedapi/esdsl/kuromojianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -29,19 +29,15 @@ type _kuromojiAnalyzer struct { v *types.KuromojiAnalyzer } -func NewKuromojiAnalyzer(mode kuromojitokenizationmode.KuromojiTokenizationMode) *_kuromojiAnalyzer { +func NewKuromojiAnalyzer() *_kuromojiAnalyzer { - tmp := &_kuromojiAnalyzer{v: types.NewKuromojiAnalyzer()} - - tmp.Mode(mode) - - return tmp + return &_kuromojiAnalyzer{v: types.NewKuromojiAnalyzer()} } func (s *_kuromojiAnalyzer) Mode(mode kuromojitokenizationmode.KuromojiTokenizationMode) *_kuromojiAnalyzer { - s.v.Mode = mode + s.v.Mode = &mode return s } diff --git a/typedapi/esdsl/kuromojiiterationmarkcharfilter.go b/typedapi/esdsl/kuromojiiterationmarkcharfilter.go index 9be9871d50..f8305ff2c4 100644 --- a/typedapi/esdsl/kuromojiiterationmarkcharfilter.go +++ b/typedapi/esdsl/kuromojiiterationmarkcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/kuromojipartofspeechtokenfilter.go b/typedapi/esdsl/kuromojipartofspeechtokenfilter.go index 7b1fcd2906..e5964cbe73 100644 --- a/typedapi/esdsl/kuromojipartofspeechtokenfilter.go +++ b/typedapi/esdsl/kuromojipartofspeechtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/kuromojireadingformtokenfilter.go b/typedapi/esdsl/kuromojireadingformtokenfilter.go index 81b6a3b9c7..bbb268e9fb 100644 --- a/typedapi/esdsl/kuromojireadingformtokenfilter.go +++ b/typedapi/esdsl/kuromojireadingformtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/kuromojistemmertokenfilter.go b/typedapi/esdsl/kuromojistemmertokenfilter.go index 1aaaf7d76d..2e42c90f0f 100644 --- a/typedapi/esdsl/kuromojistemmertokenfilter.go +++ b/typedapi/esdsl/kuromojistemmertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/kuromojitokenizer.go b/typedapi/esdsl/kuromojitokenizer.go index 406f4efecf..5138e5a2b6 100644 --- a/typedapi/esdsl/kuromojitokenizer.go +++ b/typedapi/esdsl/kuromojitokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/laplacesmoothingmodel.go b/typedapi/esdsl/laplacesmoothingmodel.go index f6cd38e31f..97c9671127 100644 --- a/typedapi/esdsl/laplacesmoothingmodel.go +++ b/typedapi/esdsl/laplacesmoothingmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/latest.go b/typedapi/esdsl/latest.go index 6ac80db3dc..22dd2b2a05 100644 --- a/typedapi/esdsl/latest.go +++ b/typedapi/esdsl/latest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/latlongeolocation.go b/typedapi/esdsl/latlongeolocation.go index ac31c9b70f..44b7882223 100644 --- a/typedapi/esdsl/latlongeolocation.go +++ b/typedapi/esdsl/latlongeolocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/latviananalyzer.go b/typedapi/esdsl/latviananalyzer.go index 245d267291..7af1f82cd5 100644 --- a/typedapi/esdsl/latviananalyzer.go +++ b/typedapi/esdsl/latviananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/learningtorank.go b/typedapi/esdsl/learningtorank.go index a8e4a396b0..c2935334e1 100644 --- a/typedapi/esdsl/learningtorank.go +++ b/typedapi/esdsl/learningtorank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/learningtorankconfig.go b/typedapi/esdsl/learningtorankconfig.go index cfd459cbcb..04e46a6155 100644 --- a/typedapi/esdsl/learningtorankconfig.go +++ b/typedapi/esdsl/learningtorankconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/lengthtokenfilter.go b/typedapi/esdsl/lengthtokenfilter.go index 8b4891d03f..2ecc3a7ee8 100644 --- a/typedapi/esdsl/lengthtokenfilter.go +++ b/typedapi/esdsl/lengthtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/lessthanvalidation.go b/typedapi/esdsl/lessthanvalidation.go index ad817761f5..90d00a61e8 100644 --- a/typedapi/esdsl/lessthanvalidation.go +++ b/typedapi/esdsl/lessthanvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/lettertokenizer.go b/typedapi/esdsl/lettertokenizer.go index eae8c4906c..8932b53216 100644 --- a/typedapi/esdsl/lettertokenizer.go +++ b/typedapi/esdsl/lettertokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/license.go b/typedapi/esdsl/license.go index d64c5dcbc8..caaa237395 100644 --- a/typedapi/esdsl/license.go +++ b/typedapi/esdsl/license.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/like.go b/typedapi/esdsl/like.go index 8545b91f6b..3d83597a56 100644 --- a/typedapi/esdsl/like.go +++ b/typedapi/esdsl/like.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/likedocument.go b/typedapi/esdsl/likedocument.go index e2e149e8b0..0e263cd212 100644 --- a/typedapi/esdsl/likedocument.go +++ b/typedapi/esdsl/likedocument.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -89,9 +89,9 @@ func (s *_likeDocument) AddPerFieldAnalyzer(key string, value string) *_likeDocu return s } -func (s *_likeDocument) Routing(routing string) *_likeDocument { +func (s *_likeDocument) Routing(routings ...string) *_likeDocument { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/limittokencounttokenfilter.go b/typedapi/esdsl/limittokencounttokenfilter.go index 57d3245135..9b8f046a2b 100644 --- a/typedapi/esdsl/limittokencounttokenfilter.go +++ b/typedapi/esdsl/limittokencounttokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/linearinterpolationsmoothingmodel.go b/typedapi/esdsl/linearinterpolationsmoothingmodel.go index 58f2dfda8f..9bcfeb161b 100644 --- a/typedapi/esdsl/linearinterpolationsmoothingmodel.go +++ b/typedapi/esdsl/linearinterpolationsmoothingmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/linearmovingaverageaggregation.go b/typedapi/esdsl/linearmovingaverageaggregation.go index c47e3eb04c..dc50550c1d 100644 --- a/typedapi/esdsl/linearmovingaverageaggregation.go +++ b/typedapi/esdsl/linearmovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/linearretriever.go b/typedapi/esdsl/linearretriever.go index 0e16151b90..ed1fbd536c 100644 --- a/typedapi/esdsl/linearretriever.go +++ b/typedapi/esdsl/linearretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -47,57 +47,57 @@ func (s *_linearRetriever) Fields(fields ...string) *_linearRetriever { return s } -func (s *_linearRetriever) Filter(filters ...types.QueryVariant) *_linearRetriever { - - s.v.Filter = make([]types.Query, len(filters)) - for i, v := range filters { - s.v.Filter[i] = *v.QueryCaster() - } +func (s *_linearRetriever) Normalizer(normalizer scorenormalizer.ScoreNormalizer) *_linearRetriever { + s.v.Normalizer = &normalizer return s } -func (s *_linearRetriever) MinScore(minscore float32) *_linearRetriever { +func (s *_linearRetriever) Query(query string) *_linearRetriever { - s.v.MinScore = &minscore + s.v.Query = &query return s } -func (s *_linearRetriever) Name_(name_ string) *_linearRetriever { +func (s *_linearRetriever) RankWindowSize(rankwindowsize int) *_linearRetriever { - s.v.Name_ = &name_ + s.v.RankWindowSize = &rankwindowsize return s } -func (s *_linearRetriever) Normalizer(normalizer scorenormalizer.ScoreNormalizer) *_linearRetriever { +func (s *_linearRetriever) Retrievers(retrievers ...types.InnerRetrieverVariant) *_linearRetriever { - s.v.Normalizer = &normalizer + for _, v := range retrievers { + + s.v.Retrievers = append(s.v.Retrievers, *v.InnerRetrieverCaster()) + + } return s } -func (s *_linearRetriever) Query(query string) *_linearRetriever { +func (s *_linearRetriever) Filter(filters ...types.QueryVariant) *_linearRetriever { - s.v.Query = &query + s.v.Filter = make([]types.Query, len(filters)) + for i, v := range filters { + s.v.Filter[i] = *v.QueryCaster() + } return s } -func (s *_linearRetriever) RankWindowSize(rankwindowsize int) *_linearRetriever { +func (s *_linearRetriever) MinScore(minscore float32) *_linearRetriever { - s.v.RankWindowSize = &rankwindowsize + s.v.MinScore = &minscore return s } -func (s *_linearRetriever) Retrievers(retrievers ...types.InnerRetrieverVariant) *_linearRetriever { - - for _, v := range retrievers { +func (s *_linearRetriever) Name_(name_ string) *_linearRetriever { - s.v.Retrievers = append(s.v.Retrievers, *v.InnerRetrieverCaster()) + s.v.Name_ = &name_ - } return s } diff --git a/typedapi/esdsl/listtypevalidation.go b/typedapi/esdsl/listtypevalidation.go index 6b0d3e4487..7ea21ca669 100644 --- a/typedapi/esdsl/listtypevalidation.go +++ b/typedapi/esdsl/listtypevalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/lithuaniananalyzer.go b/typedapi/esdsl/lithuaniananalyzer.go index b791f09573..074c1c52dd 100644 --- a/typedapi/esdsl/lithuaniananalyzer.go +++ b/typedapi/esdsl/lithuaniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/llamaservicesettings.go b/typedapi/esdsl/llamaservicesettings.go new file mode 100644 index 0000000000..e6c5b66cd3 --- /dev/null +++ b/typedapi/esdsl/llamaservicesettings.go @@ -0,0 +1,80 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/llamasimilaritytype" +) + +type _llamaServiceSettings struct { + v *types.LlamaServiceSettings +} + +func NewLlamaServiceSettings(modelid string, url string) *_llamaServiceSettings { + + tmp := &_llamaServiceSettings{v: types.NewLlamaServiceSettings()} + + tmp.ModelId(modelid) + + tmp.Url(url) + + return tmp + +} + +func (s *_llamaServiceSettings) MaxInputTokens(maxinputtokens int) *_llamaServiceSettings { + + s.v.MaxInputTokens = &maxinputtokens + + return s +} + +func (s *_llamaServiceSettings) ModelId(modelid string) *_llamaServiceSettings { + + s.v.ModelId = modelid + + return s +} + +func (s *_llamaServiceSettings) RateLimit(ratelimit types.RateLimitSettingVariant) *_llamaServiceSettings { + + s.v.RateLimit = ratelimit.RateLimitSettingCaster() + + return s +} + +func (s *_llamaServiceSettings) Similarity(similarity llamasimilaritytype.LlamaSimilarityType) *_llamaServiceSettings { + + s.v.Similarity = &similarity + return s +} + +func (s *_llamaServiceSettings) Url(url string) *_llamaServiceSettings { + + s.v.Url = url + + return s +} + +func (s *_llamaServiceSettings) LlamaServiceSettingsCaster() *types.LlamaServiceSettings { + return s.v +} diff --git a/typedapi/esdsl/loggingaction.go b/typedapi/esdsl/loggingaction.go index 3d3b7787e5..f6fb5c2507 100644 --- a/typedapi/esdsl/loggingaction.go +++ b/typedapi/esdsl/loggingaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/logstashpipeline.go b/typedapi/esdsl/logstashpipeline.go index ca40c46562..26b690a9bd 100644 --- a/typedapi/esdsl/logstashpipeline.go +++ b/typedapi/esdsl/logstashpipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/longnumberproperty.go b/typedapi/esdsl/longnumberproperty.go index 4fa61ed49f..29387fc6a2 100644 --- a/typedapi/esdsl/longnumberproperty.go +++ b/typedapi/esdsl/longnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/longrangeproperty.go b/typedapi/esdsl/longrangeproperty.go index 944645381f..ee8001495d 100644 --- a/typedapi/esdsl/longrangeproperty.go +++ b/typedapi/esdsl/longrangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/lowercasenormalizer.go b/typedapi/esdsl/lowercasenormalizer.go index 82bbbab958..bb3e015fd3 100644 --- a/typedapi/esdsl/lowercasenormalizer.go +++ b/typedapi/esdsl/lowercasenormalizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/lowercaseprocessor.go b/typedapi/esdsl/lowercaseprocessor.go index b5345450e6..2d5d3168cf 100644 --- a/typedapi/esdsl/lowercaseprocessor.go +++ b/typedapi/esdsl/lowercaseprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/lowercasetokenfilter.go b/typedapi/esdsl/lowercasetokenfilter.go index 8789553beb..aa1117e0f4 100644 --- a/typedapi/esdsl/lowercasetokenfilter.go +++ b/typedapi/esdsl/lowercasetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/lowercasetokenizer.go b/typedapi/esdsl/lowercasetokenizer.go index 323dc32d2d..062c5dd6a9 100644 --- a/typedapi/esdsl/lowercasetokenizer.go +++ b/typedapi/esdsl/lowercasetokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/manageuserprivileges.go b/typedapi/esdsl/manageuserprivileges.go index 960bdd54aa..66dd028f07 100644 --- a/typedapi/esdsl/manageuserprivileges.go +++ b/typedapi/esdsl/manageuserprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mappingcharfilter.go b/typedapi/esdsl/mappingcharfilter.go index 0db3dd9cf7..5aeed7a8f8 100644 --- a/typedapi/esdsl/mappingcharfilter.go +++ b/typedapi/esdsl/mappingcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mappinglimitsettings.go b/typedapi/esdsl/mappinglimitsettings.go index ecc9700134..134939b507 100644 --- a/typedapi/esdsl/mappinglimitsettings.go +++ b/typedapi/esdsl/mappinglimitsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingsdepth.go b/typedapi/esdsl/mappinglimitsettingsdepth.go index c7d8eb81c5..7cb951a01f 100644 --- a/typedapi/esdsl/mappinglimitsettingsdepth.go +++ b/typedapi/esdsl/mappinglimitsettingsdepth.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingsdimensionfields.go b/typedapi/esdsl/mappinglimitsettingsdimensionfields.go index 7f77edb45f..caaa3c5b25 100644 --- a/typedapi/esdsl/mappinglimitsettingsdimensionfields.go +++ b/typedapi/esdsl/mappinglimitsettingsdimensionfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingsfieldnamelength.go b/typedapi/esdsl/mappinglimitsettingsfieldnamelength.go index a3c4d5bed5..fb0b87ee9b 100644 --- a/typedapi/esdsl/mappinglimitsettingsfieldnamelength.go +++ b/typedapi/esdsl/mappinglimitsettingsfieldnamelength.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingsnestedfields.go b/typedapi/esdsl/mappinglimitsettingsnestedfields.go index 447f222dc4..857b9349d1 100644 --- a/typedapi/esdsl/mappinglimitsettingsnestedfields.go +++ b/typedapi/esdsl/mappinglimitsettingsnestedfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingsnestedobjects.go b/typedapi/esdsl/mappinglimitsettingsnestedobjects.go index d69c7577d0..b611ad7213 100644 --- a/typedapi/esdsl/mappinglimitsettingsnestedobjects.go +++ b/typedapi/esdsl/mappinglimitsettingsnestedobjects.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingssourcefields.go b/typedapi/esdsl/mappinglimitsettingssourcefields.go index 99a9ad10ac..577a207bcc 100644 --- a/typedapi/esdsl/mappinglimitsettingssourcefields.go +++ b/typedapi/esdsl/mappinglimitsettingssourcefields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingstotalfields.go b/typedapi/esdsl/mappinglimitsettingstotalfields.go index 862a5d2749..85508b6177 100644 --- a/typedapi/esdsl/mappinglimitsettingstotalfields.go +++ b/typedapi/esdsl/mappinglimitsettingstotalfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/matchallquery.go b/typedapi/esdsl/matchallquery.go index 0f1f14b23e..0ba08377d4 100644 --- a/typedapi/esdsl/matchallquery.go +++ b/typedapi/esdsl/matchallquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -26,7 +26,7 @@ type _matchAllQuery struct { v *types.MatchAllQuery } -// Matches all roles, giving them all a `_score` of 1.0. +// Matches all documents, giving them all a `_score` of 1.0. func NewMatchAllQuery() *_matchAllQuery { return &_matchAllQuery{v: types.NewMatchAllQuery()} diff --git a/typedapi/esdsl/matchboolprefixquery.go b/typedapi/esdsl/matchboolprefixquery.go index 53b1707c3d..a0b553e35c 100644 --- a/typedapi/esdsl/matchboolprefixquery.go +++ b/typedapi/esdsl/matchboolprefixquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/matchnonequery.go b/typedapi/esdsl/matchnonequery.go index 73d3e98968..ff863b280c 100644 --- a/typedapi/esdsl/matchnonequery.go +++ b/typedapi/esdsl/matchnonequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/matchonlytextproperty.go b/typedapi/esdsl/matchonlytextproperty.go index 6d67af4e75..753d945d97 100644 --- a/typedapi/esdsl/matchonlytextproperty.go +++ b/typedapi/esdsl/matchonlytextproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/matchphraseprefixquery.go b/typedapi/esdsl/matchphraseprefixquery.go index 3d66608dad..8874242828 100644 --- a/typedapi/esdsl/matchphraseprefixquery.go +++ b/typedapi/esdsl/matchphraseprefixquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/matchphrasequery.go b/typedapi/esdsl/matchphrasequery.go index ad6510ccde..bcb4548989 100644 --- a/typedapi/esdsl/matchphrasequery.go +++ b/typedapi/esdsl/matchphrasequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/matchquery.go b/typedapi/esdsl/matchquery.go index 54d72f99a7..1814a35e6e 100644 --- a/typedapi/esdsl/matchquery.go +++ b/typedapi/esdsl/matchquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/matrixstatsaggregation.go b/typedapi/esdsl/matrixstatsaggregation.go index efdc16b77d..e0c40ec45e 100644 --- a/typedapi/esdsl/matrixstatsaggregation.go +++ b/typedapi/esdsl/matrixstatsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/maxaggregation.go b/typedapi/esdsl/maxaggregation.go index 349c968b59..9c8d3ad811 100644 --- a/typedapi/esdsl/maxaggregation.go +++ b/typedapi/esdsl/maxaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/maxbucketaggregation.go b/typedapi/esdsl/maxbucketaggregation.go index ffd7a4506d..b785189ae1 100644 --- a/typedapi/esdsl/maxbucketaggregation.go +++ b/typedapi/esdsl/maxbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/maxmind.go b/typedapi/esdsl/maxmind.go index 48e9dba556..801ef04317 100644 --- a/typedapi/esdsl/maxmind.go +++ b/typedapi/esdsl/maxmind.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/medianabsolutedeviationaggregation.go b/typedapi/esdsl/medianabsolutedeviationaggregation.go index 0e430c9f3c..6b3b1ac7af 100644 --- a/typedapi/esdsl/medianabsolutedeviationaggregation.go +++ b/typedapi/esdsl/medianabsolutedeviationaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/merge.go b/typedapi/esdsl/merge.go index 17f58d5487..613fb95230 100644 --- a/typedapi/esdsl/merge.go +++ b/typedapi/esdsl/merge.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mergescheduler.go b/typedapi/esdsl/mergescheduler.go index ff3b648ad7..cb54894084 100644 --- a/typedapi/esdsl/mergescheduler.go +++ b/typedapi/esdsl/mergescheduler.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/message.go b/typedapi/esdsl/message.go index 867c7bf4cd..0827680843 100644 --- a/typedapi/esdsl/message.go +++ b/typedapi/esdsl/message.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/messagecontent.go b/typedapi/esdsl/messagecontent.go index 2afd1fb5cf..efc57f0147 100644 --- a/typedapi/esdsl/messagecontent.go +++ b/typedapi/esdsl/messagecontent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/metadata.go b/typedapi/esdsl/metadata.go index ecea4231fd..e6284e604b 100644 --- a/typedapi/esdsl/metadata.go +++ b/typedapi/esdsl/metadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mgetoperation.go b/typedapi/esdsl/mgetoperation.go index 6e2c40ab3b..a91b55da97 100644 --- a/typedapi/esdsl/mgetoperation.go +++ b/typedapi/esdsl/mgetoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -49,9 +49,9 @@ func (s *_mgetOperation) Index_(indexname string) *_mgetOperation { return s } -func (s *_mgetOperation) Routing(routing string) *_mgetOperation { +func (s *_mgetOperation) Routing(routings ...string) *_mgetOperation { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/migrateaction.go b/typedapi/esdsl/migrateaction.go index f9ac613c8d..68ce730a22 100644 --- a/typedapi/esdsl/migrateaction.go +++ b/typedapi/esdsl/migrateaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/migratereindex.go b/typedapi/esdsl/migratereindex.go index 9add8087e8..e307212c0b 100644 --- a/typedapi/esdsl/migratereindex.go +++ b/typedapi/esdsl/migratereindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/minaggregation.go b/typedapi/esdsl/minaggregation.go index 45e6335c21..d1b6fea220 100644 --- a/typedapi/esdsl/minaggregation.go +++ b/typedapi/esdsl/minaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/minbucketaggregation.go b/typedapi/esdsl/minbucketaggregation.go index 9b3e3bd74a..b6ec4b7066 100644 --- a/typedapi/esdsl/minbucketaggregation.go +++ b/typedapi/esdsl/minbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/minhashtokenfilter.go b/typedapi/esdsl/minhashtokenfilter.go index 0244929aa0..a5ed72fa6f 100644 --- a/typedapi/esdsl/minhashtokenfilter.go +++ b/typedapi/esdsl/minhashtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/minimumshouldmatch.go b/typedapi/esdsl/minimumshouldmatch.go index b6974b6137..37f99be174 100644 --- a/typedapi/esdsl/minimumshouldmatch.go +++ b/typedapi/esdsl/minimumshouldmatch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/missing.go b/typedapi/esdsl/missing.go index 23efbae2f8..b1d40fdca0 100644 --- a/typedapi/esdsl/missing.go +++ b/typedapi/esdsl/missing.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/missingaggregation.go b/typedapi/esdsl/missingaggregation.go index 45dfb8cbe6..0d0a64a31c 100644 --- a/typedapi/esdsl/missingaggregation.go +++ b/typedapi/esdsl/missingaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mistralservicesettings.go b/typedapi/esdsl/mistralservicesettings.go index 269c02d2ac..bbfa26075a 100644 --- a/typedapi/esdsl/mistralservicesettings.go +++ b/typedapi/esdsl/mistralservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/modelplotconfig.go b/typedapi/esdsl/modelplotconfig.go index 0e1b062aa0..deed2b865b 100644 --- a/typedapi/esdsl/modelplotconfig.go +++ b/typedapi/esdsl/modelplotconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/morelikethisquery.go b/typedapi/esdsl/morelikethisquery.go index ed3be1fc5d..25b3fc2766 100644 --- a/typedapi/esdsl/morelikethisquery.go +++ b/typedapi/esdsl/morelikethisquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -147,9 +147,9 @@ func (s *_moreLikeThisQuery) QueryName_(queryname_ string) *_moreLikeThisQuery { return s } -func (s *_moreLikeThisQuery) Routing(routing string) *_moreLikeThisQuery { +func (s *_moreLikeThisQuery) Routing(routings ...string) *_moreLikeThisQuery { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/movingaverageaggregation.go b/typedapi/esdsl/movingaverageaggregation.go index 95caafbd28..e2ec24d85a 100644 --- a/typedapi/esdsl/movingaverageaggregation.go +++ b/typedapi/esdsl/movingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/movingfunctionaggregation.go b/typedapi/esdsl/movingfunctionaggregation.go index bbbdef2b58..5195156fe4 100644 --- a/typedapi/esdsl/movingfunctionaggregation.go +++ b/typedapi/esdsl/movingfunctionaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/movingpercentilesaggregation.go b/typedapi/esdsl/movingpercentilesaggregation.go index ac66c56b35..61bfc81e05 100644 --- a/typedapi/esdsl/movingpercentilesaggregation.go +++ b/typedapi/esdsl/movingpercentilesaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/msearchrequestitem.go b/typedapi/esdsl/msearchrequestitem.go index 5209fee037..8667443ebc 100644 --- a/typedapi/esdsl/msearchrequestitem.go +++ b/typedapi/esdsl/msearchrequestitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mtermvectorsoperation.go b/typedapi/esdsl/mtermvectorsoperation.go index 7893f746a2..a68bc04b6b 100644 --- a/typedapi/esdsl/mtermvectorsoperation.go +++ b/typedapi/esdsl/mtermvectorsoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -100,9 +100,9 @@ func (s *_mTermVectorsOperation) Positions(positions bool) *_mTermVectorsOperati return s } -func (s *_mTermVectorsOperation) Routing(routing string) *_mTermVectorsOperation { +func (s *_mTermVectorsOperation) Routing(routings ...string) *_mTermVectorsOperation { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/multimatchquery.go b/typedapi/esdsl/multimatchquery.go index 30f2fe0553..3989320aab 100644 --- a/typedapi/esdsl/multimatchquery.go +++ b/typedapi/esdsl/multimatchquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/multiplexertokenfilter.go b/typedapi/esdsl/multiplexertokenfilter.go index a562b3046f..f1786c6cc0 100644 --- a/typedapi/esdsl/multiplexertokenfilter.go +++ b/typedapi/esdsl/multiplexertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/multisearchheader.go b/typedapi/esdsl/multisearchheader.go index 7a6b196e32..6905c02d0a 100644 --- a/typedapi/esdsl/multisearchheader.go +++ b/typedapi/esdsl/multisearchheader.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -92,6 +92,13 @@ func (s *_multisearchHeader) Preference(preference string) *_multisearchHeader { return s } +func (s *_multisearchHeader) ProjectRouting(projectrouting string) *_multisearchHeader { + + s.v.ProjectRouting = &projectrouting + + return s +} + func (s *_multisearchHeader) RequestCache(requestcache bool) *_multisearchHeader { s.v.RequestCache = &requestcache @@ -99,9 +106,9 @@ func (s *_multisearchHeader) RequestCache(requestcache bool) *_multisearchHeader return s } -func (s *_multisearchHeader) Routing(routing string) *_multisearchHeader { +func (s *_multisearchHeader) Routing(routings ...string) *_multisearchHeader { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/multitermlookup.go b/typedapi/esdsl/multitermlookup.go index f7631fb29a..c087d07957 100644 --- a/typedapi/esdsl/multitermlookup.go +++ b/typedapi/esdsl/multitermlookup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/multitermsaggregation.go b/typedapi/esdsl/multitermsaggregation.go index 425e543c9e..e88a6626db 100644 --- a/typedapi/esdsl/multitermsaggregation.go +++ b/typedapi/esdsl/multitermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/murmur3hashproperty.go b/typedapi/esdsl/murmur3hashproperty.go index a2f6e41862..bee9492c6c 100644 --- a/typedapi/esdsl/murmur3hashproperty.go +++ b/typedapi/esdsl/murmur3hashproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/mutualinformationheuristic.go b/typedapi/esdsl/mutualinformationheuristic.go index b38692992f..5179f154e1 100644 --- a/typedapi/esdsl/mutualinformationheuristic.go +++ b/typedapi/esdsl/mutualinformationheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/names.go b/typedapi/esdsl/names.go index 7a2586f69e..ae5ade1d86 100644 --- a/typedapi/esdsl/names.go +++ b/typedapi/esdsl/names.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nerinferenceoptions.go b/typedapi/esdsl/nerinferenceoptions.go index b2fc2cc11a..573d94c9db 100644 --- a/typedapi/esdsl/nerinferenceoptions.go +++ b/typedapi/esdsl/nerinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nerinferenceupdateoptions.go b/typedapi/esdsl/nerinferenceupdateoptions.go index 38d6b1e43b..18e0b9ae88 100644 --- a/typedapi/esdsl/nerinferenceupdateoptions.go +++ b/typedapi/esdsl/nerinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nestedaggregation.go b/typedapi/esdsl/nestedaggregation.go index efe45d73f0..23894494e3 100644 --- a/typedapi/esdsl/nestedaggregation.go +++ b/typedapi/esdsl/nestedaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nestedproperty.go b/typedapi/esdsl/nestedproperty.go index ccdb492e02..585ccca731 100644 --- a/typedapi/esdsl/nestedproperty.go +++ b/typedapi/esdsl/nestedproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nestedquery.go b/typedapi/esdsl/nestedquery.go index 18c2fb2267..8572f37a7f 100644 --- a/typedapi/esdsl/nestedquery.go +++ b/typedapi/esdsl/nestedquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nestedsortvalue.go b/typedapi/esdsl/nestedsortvalue.go index dee58bc98d..d25275712d 100644 --- a/typedapi/esdsl/nestedsortvalue.go +++ b/typedapi/esdsl/nestedsortvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/networkdirectionprocessor.go b/typedapi/esdsl/networkdirectionprocessor.go index bd1067f7b3..ebfcc4afa5 100644 --- a/typedapi/esdsl/networkdirectionprocessor.go +++ b/typedapi/esdsl/networkdirectionprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nevercondition.go b/typedapi/esdsl/nevercondition.go index 5f162dfac3..9677bea23a 100644 --- a/typedapi/esdsl/nevercondition.go +++ b/typedapi/esdsl/nevercondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ngramtokenfilter.go b/typedapi/esdsl/ngramtokenfilter.go index dedc513689..4439ad735b 100644 --- a/typedapi/esdsl/ngramtokenfilter.go +++ b/typedapi/esdsl/ngramtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ngramtokenizer.go b/typedapi/esdsl/ngramtokenizer.go index eeadd2002f..422b8b5840 100644 --- a/typedapi/esdsl/ngramtokenizer.go +++ b/typedapi/esdsl/ngramtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nlpberttokenizationconfig.go b/typedapi/esdsl/nlpberttokenizationconfig.go index 807e330d8c..f17e792d6e 100644 --- a/typedapi/esdsl/nlpberttokenizationconfig.go +++ b/typedapi/esdsl/nlpberttokenizationconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nlprobertatokenizationconfig.go b/typedapi/esdsl/nlprobertatokenizationconfig.go index ebb3dfce5e..6742d20e60 100644 --- a/typedapi/esdsl/nlprobertatokenizationconfig.go +++ b/typedapi/esdsl/nlprobertatokenizationconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/nlptokenizationupdateoptions.go b/typedapi/esdsl/nlptokenizationupdateoptions.go index f512baf148..19e1bf0131 100644 --- a/typedapi/esdsl/nlptokenizationupdateoptions.go +++ b/typedapi/esdsl/nlptokenizationupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/norianalyzer.go b/typedapi/esdsl/norianalyzer.go index f31a7ef7bc..28aa2b39d5 100644 --- a/typedapi/esdsl/norianalyzer.go +++ b/typedapi/esdsl/norianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/noripartofspeechtokenfilter.go b/typedapi/esdsl/noripartofspeechtokenfilter.go index 0a65f2603a..d8865f301e 100644 --- a/typedapi/esdsl/noripartofspeechtokenfilter.go +++ b/typedapi/esdsl/noripartofspeechtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/noritokenizer.go b/typedapi/esdsl/noritokenizer.go index 75fd8d63d8..a531a70f3f 100644 --- a/typedapi/esdsl/noritokenizer.go +++ b/typedapi/esdsl/noritokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/normalizeaggregation.go b/typedapi/esdsl/normalizeaggregation.go index dd2678bf6f..b55cec745f 100644 --- a/typedapi/esdsl/normalizeaggregation.go +++ b/typedapi/esdsl/normalizeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/normalizer.go b/typedapi/esdsl/normalizer.go index 24376ae2af..c8db287bb8 100644 --- a/typedapi/esdsl/normalizer.go +++ b/typedapi/esdsl/normalizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/norwegiananalyzer.go b/typedapi/esdsl/norwegiananalyzer.go index 36d0912c9c..e490928c03 100644 --- a/typedapi/esdsl/norwegiananalyzer.go +++ b/typedapi/esdsl/norwegiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/numberrangequery.go b/typedapi/esdsl/numberrangequery.go index 44e6299802..4f73a031da 100644 --- a/typedapi/esdsl/numberrangequery.go +++ b/typedapi/esdsl/numberrangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -30,7 +30,7 @@ type _numberRangeQuery struct { v *types.NumberRangeQuery } -// Returns users that contain terms within a provided range. +// Returns roles that contain terms within a provided range. func NewNumberRangeQuery(key string) *_numberRangeQuery { return &_numberRangeQuery{ k: key, diff --git a/typedapi/esdsl/numericdecayfunction.go b/typedapi/esdsl/numericdecayfunction.go index 361484bb9a..096041cfde 100644 --- a/typedapi/esdsl/numericdecayfunction.go +++ b/typedapi/esdsl/numericdecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/numericfielddata.go b/typedapi/esdsl/numericfielddata.go index a8f024d162..3cb44cadd2 100644 --- a/typedapi/esdsl/numericfielddata.go +++ b/typedapi/esdsl/numericfielddata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/objectproperty.go b/typedapi/esdsl/objectproperty.go index 12471a3e03..d6f1b256c6 100644 --- a/typedapi/esdsl/objectproperty.go +++ b/typedapi/esdsl/objectproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/onehotencodingpreprocessor.go b/typedapi/esdsl/onehotencodingpreprocessor.go index cd449510c0..7eb560150d 100644 --- a/typedapi/esdsl/onehotencodingpreprocessor.go +++ b/typedapi/esdsl/onehotencodingpreprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/openaiservicesettings.go b/typedapi/esdsl/openaiservicesettings.go index 836f75f5ef..5a358f992e 100644 --- a/typedapi/esdsl/openaiservicesettings.go +++ b/typedapi/esdsl/openaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/openaitasksettings.go b/typedapi/esdsl/openaitasksettings.go index bd1f6d8cd3..22190dac83 100644 --- a/typedapi/esdsl/openaitasksettings.go +++ b/typedapi/esdsl/openaitasksettings.go @@ -16,11 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import "github.com/elastic/go-elasticsearch/v9/typedapi/types" +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) type _openAITaskSettings struct { v *types.OpenAITaskSettings @@ -32,6 +36,13 @@ func NewOpenAITaskSettings() *_openAITaskSettings { } +func (s *_openAITaskSettings) Headers(headers json.RawMessage) *_openAITaskSettings { + + s.v.Headers = headers + + return s +} + func (s *_openAITaskSettings) User(user string) *_openAITaskSettings { s.v.User = &user diff --git a/typedapi/esdsl/openshiftaiservicesettings.go b/typedapi/esdsl/openshiftaiservicesettings.go new file mode 100644 index 0000000000..d0478224a2 --- /dev/null +++ b/typedapi/esdsl/openshiftaiservicesettings.go @@ -0,0 +1,87 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/openshiftaisimilaritytype" +) + +type _openShiftAiServiceSettings struct { + v *types.OpenShiftAiServiceSettings +} + +func NewOpenShiftAiServiceSettings(apikey string, url string) *_openShiftAiServiceSettings { + + tmp := &_openShiftAiServiceSettings{v: types.NewOpenShiftAiServiceSettings()} + + tmp.ApiKey(apikey) + + tmp.Url(url) + + return tmp + +} + +func (s *_openShiftAiServiceSettings) ApiKey(apikey string) *_openShiftAiServiceSettings { + + s.v.ApiKey = apikey + + return s +} + +func (s *_openShiftAiServiceSettings) MaxInputTokens(maxinputtokens int) *_openShiftAiServiceSettings { + + s.v.MaxInputTokens = &maxinputtokens + + return s +} + +func (s *_openShiftAiServiceSettings) ModelId(modelid string) *_openShiftAiServiceSettings { + + s.v.ModelId = &modelid + + return s +} + +func (s *_openShiftAiServiceSettings) RateLimit(ratelimit types.RateLimitSettingVariant) *_openShiftAiServiceSettings { + + s.v.RateLimit = ratelimit.RateLimitSettingCaster() + + return s +} + +func (s *_openShiftAiServiceSettings) Similarity(similarity openshiftaisimilaritytype.OpenShiftAiSimilarityType) *_openShiftAiServiceSettings { + + s.v.Similarity = &similarity + return s +} + +func (s *_openShiftAiServiceSettings) Url(url string) *_openShiftAiServiceSettings { + + s.v.Url = url + + return s +} + +func (s *_openShiftAiServiceSettings) OpenShiftAiServiceSettingsCaster() *types.OpenShiftAiServiceSettings { + return s.v +} diff --git a/typedapi/esdsl/openshiftaitasksettings.go b/typedapi/esdsl/openshiftaitasksettings.go new file mode 100644 index 0000000000..4fedb1b6e5 --- /dev/null +++ b/typedapi/esdsl/openshiftaitasksettings.go @@ -0,0 +1,51 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _openShiftAiTaskSettings struct { + v *types.OpenShiftAiTaskSettings +} + +func NewOpenShiftAiTaskSettings() *_openShiftAiTaskSettings { + + return &_openShiftAiTaskSettings{v: types.NewOpenShiftAiTaskSettings()} + +} + +func (s *_openShiftAiTaskSettings) ReturnDocuments(returndocuments bool) *_openShiftAiTaskSettings { + + s.v.ReturnDocuments = &returndocuments + + return s +} + +func (s *_openShiftAiTaskSettings) TopN(topn int) *_openShiftAiTaskSettings { + + s.v.TopN = &topn + + return s +} + +func (s *_openShiftAiTaskSettings) OpenShiftAiTaskSettingsCaster() *types.OpenShiftAiTaskSettings { + return s.v +} diff --git a/typedapi/esdsl/operationcontainer.go b/typedapi/esdsl/operationcontainer.go index ba2c5e91e3..f52fec0dd2 100644 --- a/typedapi/esdsl/operationcontainer.go +++ b/typedapi/esdsl/operationcontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _operationContainer struct { v *types.OperationContainer @@ -34,18 +30,6 @@ func NewOperationContainer() *_operationContainer { return &_operationContainer{v: types.NewOperationContainer()} } -// AdditionalOperationContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_operationContainer) AdditionalOperationContainerProperty(key string, value json.RawMessage) *_operationContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalOperationContainerProperty = tmp - return s -} - func (s *_operationContainer) Create(create types.CreateOperationVariant) *_operationContainer { s.v.Create = create.CreateOperationCaster() diff --git a/typedapi/esdsl/page.go b/typedapi/esdsl/page.go index e19b60b7e3..b38a326d01 100644 --- a/typedapi/esdsl/page.go +++ b/typedapi/esdsl/page.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pagerdutyaction.go b/typedapi/esdsl/pagerdutyaction.go index cb3637f599..186762acb8 100644 --- a/typedapi/esdsl/pagerdutyaction.go +++ b/typedapi/esdsl/pagerdutyaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pagerdutycontext.go b/typedapi/esdsl/pagerdutycontext.go index 7a1c4c4fb3..15f3c1a10b 100644 --- a/typedapi/esdsl/pagerdutycontext.go +++ b/typedapi/esdsl/pagerdutycontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pagerdutyeventproxy.go b/typedapi/esdsl/pagerdutyeventproxy.go index 5701f791f2..02ac0e2c57 100644 --- a/typedapi/esdsl/pagerdutyeventproxy.go +++ b/typedapi/esdsl/pagerdutyeventproxy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/painlesscontextsetup.go b/typedapi/esdsl/painlesscontextsetup.go index 7a234c1e12..568bc1edb8 100644 --- a/typedapi/esdsl/painlesscontextsetup.go +++ b/typedapi/esdsl/painlesscontextsetup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/parentaggregation.go b/typedapi/esdsl/parentaggregation.go index 355305a645..3d8a9d2aa4 100644 --- a/typedapi/esdsl/parentaggregation.go +++ b/typedapi/esdsl/parentaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/parentidquery.go b/typedapi/esdsl/parentidquery.go index 07e20556de..ed2ca722ff 100644 --- a/typedapi/esdsl/parentidquery.go +++ b/typedapi/esdsl/parentidquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/passthroughinferenceoptions.go b/typedapi/esdsl/passthroughinferenceoptions.go index 27be8a1ca3..3ecfe0d21e 100644 --- a/typedapi/esdsl/passthroughinferenceoptions.go +++ b/typedapi/esdsl/passthroughinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/passthroughinferenceupdateoptions.go b/typedapi/esdsl/passthroughinferenceupdateoptions.go index 317a3d1776..11fc28bf1f 100644 --- a/typedapi/esdsl/passthroughinferenceupdateoptions.go +++ b/typedapi/esdsl/passthroughinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/passthroughobjectproperty.go b/typedapi/esdsl/passthroughobjectproperty.go index 562054ae1b..ffbf6b6827 100644 --- a/typedapi/esdsl/passthroughobjectproperty.go +++ b/typedapi/esdsl/passthroughobjectproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pathhierarchytokenizer.go b/typedapi/esdsl/pathhierarchytokenizer.go index 4998c9c64f..50e8baeb70 100644 --- a/typedapi/esdsl/pathhierarchytokenizer.go +++ b/typedapi/esdsl/pathhierarchytokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/patternanalyzer.go b/typedapi/esdsl/patternanalyzer.go index 4c72d79e34..bf2c0cf2ba 100644 --- a/typedapi/esdsl/patternanalyzer.go +++ b/typedapi/esdsl/patternanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/patterncapturetokenfilter.go b/typedapi/esdsl/patterncapturetokenfilter.go index d46e03839f..d9b9a8cbb8 100644 --- a/typedapi/esdsl/patterncapturetokenfilter.go +++ b/typedapi/esdsl/patterncapturetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/patternreplacecharfilter.go b/typedapi/esdsl/patternreplacecharfilter.go index 3c7ce8d46a..49da122ea6 100644 --- a/typedapi/esdsl/patternreplacecharfilter.go +++ b/typedapi/esdsl/patternreplacecharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/patternreplacetokenfilter.go b/typedapi/esdsl/patternreplacetokenfilter.go index 7c9cd1fbd9..aefa7d818f 100644 --- a/typedapi/esdsl/patternreplacetokenfilter.go +++ b/typedapi/esdsl/patternreplacetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/patterntokenizer.go b/typedapi/esdsl/patterntokenizer.go index 3f1c30a082..67c5b662a5 100644 --- a/typedapi/esdsl/patterntokenizer.go +++ b/typedapi/esdsl/patterntokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/percentage.go b/typedapi/esdsl/percentage.go index 0f93a06ace..d4040598cc 100644 --- a/typedapi/esdsl/percentage.go +++ b/typedapi/esdsl/percentage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/percentagescoreheuristic.go b/typedapi/esdsl/percentagescoreheuristic.go index 431cf04453..cb35c62e28 100644 --- a/typedapi/esdsl/percentagescoreheuristic.go +++ b/typedapi/esdsl/percentagescoreheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/percentileranksaggregation.go b/typedapi/esdsl/percentileranksaggregation.go index 3339fb6bc8..c183dcd02c 100644 --- a/typedapi/esdsl/percentileranksaggregation.go +++ b/typedapi/esdsl/percentileranksaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/percentilesaggregation.go b/typedapi/esdsl/percentilesaggregation.go index c6a67b99aa..abdec387eb 100644 --- a/typedapi/esdsl/percentilesaggregation.go +++ b/typedapi/esdsl/percentilesaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -71,11 +71,9 @@ func (s *_percentilesAggregation) Missing(missing types.MissingVariant) *_percen func (s *_percentilesAggregation) Percents(percents ...types.Float64) *_percentilesAggregation { - for _, v := range percents { + s.v.Percents = make([]types.Float64, len(percents)) + s.v.Percents = percents - s.v.Percents = append(s.v.Percents, v) - - } return s } diff --git a/typedapi/esdsl/percentilesbucketaggregation.go b/typedapi/esdsl/percentilesbucketaggregation.go index fc1c9f52d0..4cd619a30f 100644 --- a/typedapi/esdsl/percentilesbucketaggregation.go +++ b/typedapi/esdsl/percentilesbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/percolatequery.go b/typedapi/esdsl/percolatequery.go index 58b7bc1241..0328ecc598 100644 --- a/typedapi/esdsl/percolatequery.go +++ b/typedapi/esdsl/percolatequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -103,9 +103,9 @@ func (s *_percolateQuery) QueryName_(queryname_ string) *_percolateQuery { return s } -func (s *_percolateQuery) Routing(routing string) *_percolateQuery { +func (s *_percolateQuery) Routing(routings ...string) *_percolateQuery { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/percolatorproperty.go b/typedapi/esdsl/percolatorproperty.go index 75363c4eb1..a995236a7e 100644 --- a/typedapi/esdsl/percolatorproperty.go +++ b/typedapi/esdsl/percolatorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/perpartitioncategorization.go b/typedapi/esdsl/perpartitioncategorization.go index 2f3ac6a82e..8257c69f41 100644 --- a/typedapi/esdsl/perpartitioncategorization.go +++ b/typedapi/esdsl/perpartitioncategorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/persiananalyzer.go b/typedapi/esdsl/persiananalyzer.go index 02653b4415..47193b06cf 100644 --- a/typedapi/esdsl/persiananalyzer.go +++ b/typedapi/esdsl/persiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/persiannormalizationtokenfilter.go b/typedapi/esdsl/persiannormalizationtokenfilter.go index e6a48c504e..23efc1999c 100644 --- a/typedapi/esdsl/persiannormalizationtokenfilter.go +++ b/typedapi/esdsl/persiannormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/persianstemtokenfilter.go b/typedapi/esdsl/persianstemtokenfilter.go index fc4db84d5f..80c0a43e31 100644 --- a/typedapi/esdsl/persianstemtokenfilter.go +++ b/typedapi/esdsl/persianstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/phase.go b/typedapi/esdsl/phase.go index a3cacddccc..55a04dbb65 100644 --- a/typedapi/esdsl/phase.go +++ b/typedapi/esdsl/phase.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/phases.go b/typedapi/esdsl/phases.go index 807262cbf1..9a88825767 100644 --- a/typedapi/esdsl/phases.go +++ b/typedapi/esdsl/phases.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/phonetictokenfilter.go b/typedapi/esdsl/phonetictokenfilter.go index bb797d92e9..cebe25dbc2 100644 --- a/typedapi/esdsl/phonetictokenfilter.go +++ b/typedapi/esdsl/phonetictokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/phrasesuggestcollate.go b/typedapi/esdsl/phrasesuggestcollate.go index 7e42f58f95..cfdeecfa3c 100644 --- a/typedapi/esdsl/phrasesuggestcollate.go +++ b/typedapi/esdsl/phrasesuggestcollate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/phrasesuggestcollatequery.go b/typedapi/esdsl/phrasesuggestcollatequery.go index b2e6f3bd0a..981b1b0cad 100644 --- a/typedapi/esdsl/phrasesuggestcollatequery.go +++ b/typedapi/esdsl/phrasesuggestcollatequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/phrasesuggester.go b/typedapi/esdsl/phrasesuggester.go index d135cf4b3d..c29ee67978 100644 --- a/typedapi/esdsl/phrasesuggester.go +++ b/typedapi/esdsl/phrasesuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -34,13 +34,6 @@ func NewPhraseSuggester() *_phraseSuggester { } -func (s *_phraseSuggester) Analyzer(analyzer string) *_phraseSuggester { - - s.v.Analyzer = &analyzer - - return s -} - func (s *_phraseSuggester) Collate(collate types.PhraseSuggestCollateVariant) *_phraseSuggester { s.v.Collate = collate.PhraseSuggestCollateCaster() @@ -65,13 +58,6 @@ func (s *_phraseSuggester) DirectGenerator(directgenerators ...types.DirectGener return s } -func (s *_phraseSuggester) Field(field string) *_phraseSuggester { - - s.v.Field = field - - return s -} - func (s *_phraseSuggester) ForceUnigrams(forceunigrams bool) *_phraseSuggester { s.v.ForceUnigrams = &forceunigrams @@ -121,13 +107,6 @@ func (s *_phraseSuggester) ShardSize(shardsize int) *_phraseSuggester { return s } -func (s *_phraseSuggester) Size(size int) *_phraseSuggester { - - s.v.Size = &size - - return s -} - func (s *_phraseSuggester) Smoothing(smoothing types.SmoothingModelContainerVariant) *_phraseSuggester { s.v.Smoothing = smoothing.SmoothingModelContainerCaster() @@ -149,6 +128,27 @@ func (s *_phraseSuggester) TokenLimit(tokenlimit int) *_phraseSuggester { return s } +func (s *_phraseSuggester) Analyzer(analyzer string) *_phraseSuggester { + + s.v.Analyzer = &analyzer + + return s +} + +func (s *_phraseSuggester) Field(field string) *_phraseSuggester { + + s.v.Field = field + + return s +} + +func (s *_phraseSuggester) Size(size int) *_phraseSuggester { + + s.v.Size = &size + + return s +} + func (s *_phraseSuggester) FieldSuggesterCaster() *types.FieldSuggester { container := types.NewFieldSuggester() diff --git a/typedapi/esdsl/phrasesuggesthighlight.go b/typedapi/esdsl/phrasesuggesthighlight.go index 1474002c53..5aa1b42a4f 100644 --- a/typedapi/esdsl/phrasesuggesthighlight.go +++ b/typedapi/esdsl/phrasesuggesthighlight.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pinneddoc.go b/typedapi/esdsl/pinneddoc.go index 1ae6fd1cd9..fa87179918 100644 --- a/typedapi/esdsl/pinneddoc.go +++ b/typedapi/esdsl/pinneddoc.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pinnedquery.go b/typedapi/esdsl/pinnedquery.go index b64bdf9211..6c0fe825a2 100644 --- a/typedapi/esdsl/pinnedquery.go +++ b/typedapi/esdsl/pinnedquery.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _pinnedQuery struct { v *types.PinnedQuery @@ -34,18 +30,6 @@ func NewPinnedQuery() *_pinnedQuery { return &_pinnedQuery{v: types.NewPinnedQuery()} } -// AdditionalPinnedQueryProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_pinnedQuery) AdditionalPinnedQueryProperty(key string, value json.RawMessage) *_pinnedQuery { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalPinnedQueryProperty = tmp - return s -} - func (s *_pinnedQuery) Boost(boost float32) *_pinnedQuery { s.v.Boost = &boost diff --git a/typedapi/esdsl/pinnedretriever.go b/typedapi/esdsl/pinnedretriever.go index 91451df6ea..139845e954 100644 --- a/typedapi/esdsl/pinnedretriever.go +++ b/typedapi/esdsl/pinnedretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -48,16 +48,6 @@ func (s *_pinnedRetriever) Docs(docs ...types.SpecifiedDocumentVariant) *_pinned return s } -func (s *_pinnedRetriever) Filter(filters ...types.QueryVariant) *_pinnedRetriever { - - s.v.Filter = make([]types.Query, len(filters)) - for i, v := range filters { - s.v.Filter[i] = *v.QueryCaster() - } - - return s -} - func (s *_pinnedRetriever) Ids(ids ...string) *_pinnedRetriever { for _, v := range ids { @@ -68,30 +58,40 @@ func (s *_pinnedRetriever) Ids(ids ...string) *_pinnedRetriever { return s } -func (s *_pinnedRetriever) MinScore(minscore float32) *_pinnedRetriever { +func (s *_pinnedRetriever) RankWindowSize(rankwindowsize int) *_pinnedRetriever { - s.v.MinScore = &minscore + s.v.RankWindowSize = &rankwindowsize return s } -func (s *_pinnedRetriever) Name_(name_ string) *_pinnedRetriever { +func (s *_pinnedRetriever) Retriever(retriever types.RetrieverContainerVariant) *_pinnedRetriever { - s.v.Name_ = &name_ + s.v.Retriever = *retriever.RetrieverContainerCaster() return s } -func (s *_pinnedRetriever) RankWindowSize(rankwindowsize int) *_pinnedRetriever { +func (s *_pinnedRetriever) Filter(filters ...types.QueryVariant) *_pinnedRetriever { - s.v.RankWindowSize = &rankwindowsize + s.v.Filter = make([]types.Query, len(filters)) + for i, v := range filters { + s.v.Filter[i] = *v.QueryCaster() + } return s } -func (s *_pinnedRetriever) Retriever(retriever types.RetrieverContainerVariant) *_pinnedRetriever { +func (s *_pinnedRetriever) MinScore(minscore float32) *_pinnedRetriever { - s.v.Retriever = *retriever.RetrieverContainerCaster() + s.v.MinScore = &minscore + + return s +} + +func (s *_pinnedRetriever) Name_(name_ string) *_pinnedRetriever { + + s.v.Name_ = &name_ return s } diff --git a/typedapi/esdsl/pipelinemetadata.go b/typedapi/esdsl/pipelinemetadata.go index feab5d2dfa..8a17184579 100644 --- a/typedapi/esdsl/pipelinemetadata.go +++ b/typedapi/esdsl/pipelinemetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pipelineprocessor.go b/typedapi/esdsl/pipelineprocessor.go index d7367fa0a6..031cb767e1 100644 --- a/typedapi/esdsl/pipelineprocessor.go +++ b/typedapi/esdsl/pipelineprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pipelinesettings.go b/typedapi/esdsl/pipelinesettings.go index 334417840e..d3d3dcd18e 100644 --- a/typedapi/esdsl/pipelinesettings.go +++ b/typedapi/esdsl/pipelinesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pipeseparatedflagssimplequerystringflag.go b/typedapi/esdsl/pipeseparatedflagssimplequerystringflag.go index c91f273d92..ffde0269da 100644 --- a/typedapi/esdsl/pipeseparatedflagssimplequerystringflag.go +++ b/typedapi/esdsl/pipeseparatedflagssimplequerystringflag.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pivot.go b/typedapi/esdsl/pivot.go index 50a2b49bea..564a7e20e9 100644 --- a/typedapi/esdsl/pivot.go +++ b/typedapi/esdsl/pivot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pivotgroupbycontainer.go b/typedapi/esdsl/pivotgroupbycontainer.go index a3781b64db..ee629bf712 100644 --- a/typedapi/esdsl/pivotgroupbycontainer.go +++ b/typedapi/esdsl/pivotgroupbycontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _pivotGroupByContainer struct { v *types.PivotGroupByContainer @@ -34,18 +30,6 @@ func NewPivotGroupByContainer() *_pivotGroupByContainer { return &_pivotGroupByContainer{v: types.NewPivotGroupByContainer()} } -// AdditionalPivotGroupByContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_pivotGroupByContainer) AdditionalPivotGroupByContainerProperty(key string, value json.RawMessage) *_pivotGroupByContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalPivotGroupByContainerProperty = tmp - return s -} - func (s *_pivotGroupByContainer) DateHistogram(datehistogram types.DateHistogramAggregationVariant) *_pivotGroupByContainer { s.v.DateHistogram = datehistogram.DateHistogramAggregationCaster() diff --git a/typedapi/esdsl/pointintimereference.go b/typedapi/esdsl/pointintimereference.go index 779426f404..b6012bc05c 100644 --- a/typedapi/esdsl/pointintimereference.go +++ b/typedapi/esdsl/pointintimereference.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pointproperty.go b/typedapi/esdsl/pointproperty.go index 6309c22763..f27c40ff71 100644 --- a/typedapi/esdsl/pointproperty.go +++ b/typedapi/esdsl/pointproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/porterstemtokenfilter.go b/typedapi/esdsl/porterstemtokenfilter.go index c02554383d..7128e4ec78 100644 --- a/typedapi/esdsl/porterstemtokenfilter.go +++ b/typedapi/esdsl/porterstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/portugueseanalyzer.go b/typedapi/esdsl/portugueseanalyzer.go index d99775c97a..ed21d95a74 100644 --- a/typedapi/esdsl/portugueseanalyzer.go +++ b/typedapi/esdsl/portugueseanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/predicatetokenfilter.go b/typedapi/esdsl/predicatetokenfilter.go index fb4062d2f8..1c43c5ba25 100644 --- a/typedapi/esdsl/predicatetokenfilter.go +++ b/typedapi/esdsl/predicatetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/prefixquery.go b/typedapi/esdsl/prefixquery.go index 176d99b150..6be40d1a25 100644 --- a/typedapi/esdsl/prefixquery.go +++ b/typedapi/esdsl/prefixquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -27,7 +27,7 @@ type _prefixQuery struct { v *types.PrefixQuery } -// Returns documents that contain a specific prefix in a provided field. +// Returns roles that contain a specific prefix in a provided field. func NewPrefixQuery(field string, value string) *_prefixQuery { tmp := &_prefixQuery{ k: field, diff --git a/typedapi/esdsl/preprocessor.go b/typedapi/esdsl/preprocessor.go index f1c8131535..c562043964 100644 --- a/typedapi/esdsl/preprocessor.go +++ b/typedapi/esdsl/preprocessor.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _preprocessor struct { v *types.Preprocessor @@ -34,18 +30,6 @@ func NewPreprocessor() *_preprocessor { return &_preprocessor{v: types.NewPreprocessor()} } -// AdditionalPreprocessorProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_preprocessor) AdditionalPreprocessorProperty(key string, value json.RawMessage) *_preprocessor { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalPreprocessorProperty = tmp - return s -} - func (s *_preprocessor) FrequencyEncoding(frequencyencoding types.FrequencyEncodingPreprocessorVariant) *_preprocessor { s.v.FrequencyEncoding = frequencyencoding.FrequencyEncodingPreprocessorCaster() diff --git a/typedapi/esdsl/privilegesactions.go b/typedapi/esdsl/privilegesactions.go index 264846374a..d3b64c877c 100644 --- a/typedapi/esdsl/privilegesactions.go +++ b/typedapi/esdsl/privilegesactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/privilegescheck.go b/typedapi/esdsl/privilegescheck.go index 40aa480c35..ac256068bd 100644 --- a/typedapi/esdsl/privilegescheck.go +++ b/typedapi/esdsl/privilegescheck.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/processorcontainer.go b/typedapi/esdsl/processorcontainer.go index 09b8b26d2f..3b8ef90535 100644 --- a/typedapi/esdsl/processorcontainer.go +++ b/typedapi/esdsl/processorcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/property.go b/typedapi/esdsl/property.go index e1788a6c27..b41a4b23e9 100644 --- a/typedapi/esdsl/property.go +++ b/typedapi/esdsl/property.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/pvalueheuristic.go b/typedapi/esdsl/pvalueheuristic.go new file mode 100644 index 0000000000..21b28e713d --- /dev/null +++ b/typedapi/esdsl/pvalueheuristic.go @@ -0,0 +1,51 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _pValueHeuristic struct { + v *types.PValueHeuristic +} + +func NewPValueHeuristic() *_pValueHeuristic { + + return &_pValueHeuristic{v: types.NewPValueHeuristic()} + +} + +func (s *_pValueHeuristic) BackgroundIsSuperset(backgroundissuperset bool) *_pValueHeuristic { + + s.v.BackgroundIsSuperset = &backgroundissuperset + + return s +} + +func (s *_pValueHeuristic) NormalizeAbove(normalizeabove int64) *_pValueHeuristic { + + s.v.NormalizeAbove = &normalizeabove + + return s +} + +func (s *_pValueHeuristic) PValueHeuristicCaster() *types.PValueHeuristic { + return s.v +} diff --git a/typedapi/esdsl/queries.go b/typedapi/esdsl/queries.go index 3c6b3deead..81c5fa14b1 100644 --- a/typedapi/esdsl/queries.go +++ b/typedapi/esdsl/queries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/query.go b/typedapi/esdsl/query.go index a2e042dc0d..d08a4178d3 100644 --- a/typedapi/esdsl/query.go +++ b/typedapi/esdsl/query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/queryfeatureextractor.go b/typedapi/esdsl/queryfeatureextractor.go index 0a7c8d9dbd..94de4f4f6e 100644 --- a/typedapi/esdsl/queryfeatureextractor.go +++ b/typedapi/esdsl/queryfeatureextractor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/queryrule.go b/typedapi/esdsl/queryrule.go index a4a94a38ca..5ae8778cc7 100644 --- a/typedapi/esdsl/queryrule.go +++ b/typedapi/esdsl/queryrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/queryruleactions.go b/typedapi/esdsl/queryruleactions.go index fd5326851d..a00bce3245 100644 --- a/typedapi/esdsl/queryruleactions.go +++ b/typedapi/esdsl/queryruleactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/queryrulecriteria.go b/typedapi/esdsl/queryrulecriteria.go index 64a9a8277f..fb4b0441fc 100644 --- a/typedapi/esdsl/queryrulecriteria.go +++ b/typedapi/esdsl/queryrulecriteria.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/querystringquery.go b/typedapi/esdsl/querystringquery.go index cdca2f06c5..fe84fbf404 100644 --- a/typedapi/esdsl/querystringquery.go +++ b/typedapi/esdsl/querystringquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/queryvectorbuilder.go b/typedapi/esdsl/queryvectorbuilder.go index e785b30174..c5ca15397e 100644 --- a/typedapi/esdsl/queryvectorbuilder.go +++ b/typedapi/esdsl/queryvectorbuilder.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _queryVectorBuilder struct { v *types.QueryVectorBuilder @@ -34,18 +30,6 @@ func NewQueryVectorBuilder() *_queryVectorBuilder { return &_queryVectorBuilder{v: types.NewQueryVectorBuilder()} } -// AdditionalQueryVectorBuilderProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_queryVectorBuilder) AdditionalQueryVectorBuilderProperty(key string, value json.RawMessage) *_queryVectorBuilder { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalQueryVectorBuilderProperty = tmp - return s -} - func (s *_queryVectorBuilder) TextEmbedding(textembedding types.TextEmbeddingVariant) *_queryVectorBuilder { s.v.TextEmbedding = textembedding.TextEmbeddingCaster() diff --git a/typedapi/esdsl/questionansweringinferenceoptions.go b/typedapi/esdsl/questionansweringinferenceoptions.go index fd751bdaaa..469fa7df93 100644 --- a/typedapi/esdsl/questionansweringinferenceoptions.go +++ b/typedapi/esdsl/questionansweringinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/questionansweringinferenceupdateoptions.go b/typedapi/esdsl/questionansweringinferenceupdateoptions.go index 2dee3fe4a3..58baf4a67b 100644 --- a/typedapi/esdsl/questionansweringinferenceupdateoptions.go +++ b/typedapi/esdsl/questionansweringinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/randomsampleraggregation.go b/typedapi/esdsl/randomsampleraggregation.go index 8ffe5af40c..072bce6073 100644 --- a/typedapi/esdsl/randomsampleraggregation.go +++ b/typedapi/esdsl/randomsampleraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/randomscorefunction.go b/typedapi/esdsl/randomscorefunction.go index 72e92ed754..934614d2bb 100644 --- a/typedapi/esdsl/randomscorefunction.go +++ b/typedapi/esdsl/randomscorefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rangeaggregation.go b/typedapi/esdsl/rangeaggregation.go index eceb703bb0..282d827fba 100644 --- a/typedapi/esdsl/rangeaggregation.go +++ b/typedapi/esdsl/rangeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rangequery.go b/typedapi/esdsl/rangequery.go index ecec3165ea..8f8084bc92 100644 --- a/typedapi/esdsl/rangequery.go +++ b/typedapi/esdsl/rangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankcontainer.go b/typedapi/esdsl/rankcontainer.go index 4b873270dc..5d7834ac15 100644 --- a/typedapi/esdsl/rankcontainer.go +++ b/typedapi/esdsl/rankcontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _rankContainer struct { v *types.RankContainer @@ -34,18 +30,6 @@ func NewRankContainer() *_rankContainer { return &_rankContainer{v: types.NewRankContainer()} } -// AdditionalRankContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_rankContainer) AdditionalRankContainerProperty(key string, value json.RawMessage) *_rankContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalRankContainerProperty = tmp - return s -} - func (s *_rankContainer) Rrf(rrf types.RrfRankVariant) *_rankContainer { s.v.Rrf = rrf.RrfRankCaster() diff --git a/typedapi/esdsl/rankevalmetric.go b/typedapi/esdsl/rankevalmetric.go index ebbb238fa4..a8e36ef0c9 100644 --- a/typedapi/esdsl/rankevalmetric.go +++ b/typedapi/esdsl/rankevalmetric.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankevalmetricdiscountedcumulativegain.go b/typedapi/esdsl/rankevalmetricdiscountedcumulativegain.go index b40a1c4c71..c0faef9d90 100644 --- a/typedapi/esdsl/rankevalmetricdiscountedcumulativegain.go +++ b/typedapi/esdsl/rankevalmetricdiscountedcumulativegain.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -32,16 +32,16 @@ func NewRankEvalMetricDiscountedCumulativeGain() *_rankEvalMetricDiscountedCumul } -func (s *_rankEvalMetricDiscountedCumulativeGain) K(k int) *_rankEvalMetricDiscountedCumulativeGain { +func (s *_rankEvalMetricDiscountedCumulativeGain) Normalize(normalize bool) *_rankEvalMetricDiscountedCumulativeGain { - s.v.K = &k + s.v.Normalize = &normalize return s } -func (s *_rankEvalMetricDiscountedCumulativeGain) Normalize(normalize bool) *_rankEvalMetricDiscountedCumulativeGain { +func (s *_rankEvalMetricDiscountedCumulativeGain) K(k int) *_rankEvalMetricDiscountedCumulativeGain { - s.v.Normalize = &normalize + s.v.K = &k return s } diff --git a/typedapi/esdsl/rankevalmetricexpectedreciprocalrank.go b/typedapi/esdsl/rankevalmetricexpectedreciprocalrank.go index 0931e21f14..16855a8996 100644 --- a/typedapi/esdsl/rankevalmetricexpectedreciprocalrank.go +++ b/typedapi/esdsl/rankevalmetricexpectedreciprocalrank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -36,16 +36,16 @@ func NewRankEvalMetricExpectedReciprocalRank(maximumrelevance int) *_rankEvalMet } -func (s *_rankEvalMetricExpectedReciprocalRank) K(k int) *_rankEvalMetricExpectedReciprocalRank { +func (s *_rankEvalMetricExpectedReciprocalRank) MaximumRelevance(maximumrelevance int) *_rankEvalMetricExpectedReciprocalRank { - s.v.K = &k + s.v.MaximumRelevance = maximumrelevance return s } -func (s *_rankEvalMetricExpectedReciprocalRank) MaximumRelevance(maximumrelevance int) *_rankEvalMetricExpectedReciprocalRank { +func (s *_rankEvalMetricExpectedReciprocalRank) K(k int) *_rankEvalMetricExpectedReciprocalRank { - s.v.MaximumRelevance = maximumrelevance + s.v.K = &k return s } diff --git a/typedapi/esdsl/rankevalmetricmeanreciprocalrank.go b/typedapi/esdsl/rankevalmetricmeanreciprocalrank.go index 67bd8399a9..a294c3c45d 100644 --- a/typedapi/esdsl/rankevalmetricmeanreciprocalrank.go +++ b/typedapi/esdsl/rankevalmetricmeanreciprocalrank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -32,16 +32,16 @@ func NewRankEvalMetricMeanReciprocalRank() *_rankEvalMetricMeanReciprocalRank { } -func (s *_rankEvalMetricMeanReciprocalRank) K(k int) *_rankEvalMetricMeanReciprocalRank { +func (s *_rankEvalMetricMeanReciprocalRank) RelevantRatingThreshold(relevantratingthreshold int) *_rankEvalMetricMeanReciprocalRank { - s.v.K = &k + s.v.RelevantRatingThreshold = &relevantratingthreshold return s } -func (s *_rankEvalMetricMeanReciprocalRank) RelevantRatingThreshold(relevantratingthreshold int) *_rankEvalMetricMeanReciprocalRank { +func (s *_rankEvalMetricMeanReciprocalRank) K(k int) *_rankEvalMetricMeanReciprocalRank { - s.v.RelevantRatingThreshold = &relevantratingthreshold + s.v.K = &k return s } diff --git a/typedapi/esdsl/rankevalmetricprecision.go b/typedapi/esdsl/rankevalmetricprecision.go index a76d0b1816..95fbcfbb09 100644 --- a/typedapi/esdsl/rankevalmetricprecision.go +++ b/typedapi/esdsl/rankevalmetricprecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -39,16 +39,16 @@ func (s *_rankEvalMetricPrecision) IgnoreUnlabeled(ignoreunlabeled bool) *_rankE return s } -func (s *_rankEvalMetricPrecision) K(k int) *_rankEvalMetricPrecision { +func (s *_rankEvalMetricPrecision) RelevantRatingThreshold(relevantratingthreshold int) *_rankEvalMetricPrecision { - s.v.K = &k + s.v.RelevantRatingThreshold = &relevantratingthreshold return s } -func (s *_rankEvalMetricPrecision) RelevantRatingThreshold(relevantratingthreshold int) *_rankEvalMetricPrecision { +func (s *_rankEvalMetricPrecision) K(k int) *_rankEvalMetricPrecision { - s.v.RelevantRatingThreshold = &relevantratingthreshold + s.v.K = &k return s } diff --git a/typedapi/esdsl/rankevalmetricrecall.go b/typedapi/esdsl/rankevalmetricrecall.go index ed9847110f..a307abf4b6 100644 --- a/typedapi/esdsl/rankevalmetricrecall.go +++ b/typedapi/esdsl/rankevalmetricrecall.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankevalquery.go b/typedapi/esdsl/rankevalquery.go index c7572b57a0..4b3af7702b 100644 --- a/typedapi/esdsl/rankevalquery.go +++ b/typedapi/esdsl/rankevalquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankevalrequestitem.go b/typedapi/esdsl/rankevalrequestitem.go index 443da64d57..d3cbdd12d0 100644 --- a/typedapi/esdsl/rankevalrequestitem.go +++ b/typedapi/esdsl/rankevalrequestitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankfeaturefunctionlinear.go b/typedapi/esdsl/rankfeaturefunctionlinear.go index 70fdcfe2c1..48112278b6 100644 --- a/typedapi/esdsl/rankfeaturefunctionlinear.go +++ b/typedapi/esdsl/rankfeaturefunctionlinear.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankfeaturefunctionlogarithm.go b/typedapi/esdsl/rankfeaturefunctionlogarithm.go index 773225cc82..46c2da4491 100644 --- a/typedapi/esdsl/rankfeaturefunctionlogarithm.go +++ b/typedapi/esdsl/rankfeaturefunctionlogarithm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankfeaturefunctionsaturation.go b/typedapi/esdsl/rankfeaturefunctionsaturation.go index b0131a46f0..d7927291fe 100644 --- a/typedapi/esdsl/rankfeaturefunctionsaturation.go +++ b/typedapi/esdsl/rankfeaturefunctionsaturation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankfeaturefunctionsigmoid.go b/typedapi/esdsl/rankfeaturefunctionsigmoid.go index fb852155a4..aa7970b964 100644 --- a/typedapi/esdsl/rankfeaturefunctionsigmoid.go +++ b/typedapi/esdsl/rankfeaturefunctionsigmoid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankfeatureproperty.go b/typedapi/esdsl/rankfeatureproperty.go index eb61376fa2..58f316f812 100644 --- a/typedapi/esdsl/rankfeatureproperty.go +++ b/typedapi/esdsl/rankfeatureproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankfeaturequery.go b/typedapi/esdsl/rankfeaturequery.go index 2f13f2449b..1c2238ef41 100644 --- a/typedapi/esdsl/rankfeaturequery.go +++ b/typedapi/esdsl/rankfeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankfeaturesproperty.go b/typedapi/esdsl/rankfeaturesproperty.go index 396bb21927..d89363574d 100644 --- a/typedapi/esdsl/rankfeaturesproperty.go +++ b/typedapi/esdsl/rankfeaturesproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rankvectorproperty.go b/typedapi/esdsl/rankvectorproperty.go index 1f4fb81424..274f3ca0ae 100644 --- a/typedapi/esdsl/rankvectorproperty.go +++ b/typedapi/esdsl/rankvectorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/raretermsaggregation.go b/typedapi/esdsl/raretermsaggregation.go index d5963bc48d..d90e775755 100644 --- a/typedapi/esdsl/raretermsaggregation.go +++ b/typedapi/esdsl/raretermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rateaggregation.go b/typedapi/esdsl/rateaggregation.go index e4f21258f3..bfadde3acb 100644 --- a/typedapi/esdsl/rateaggregation.go +++ b/typedapi/esdsl/rateaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ratelimitsetting.go b/typedapi/esdsl/ratelimitsetting.go index 7cadf6495c..edf4df1bf9 100644 --- a/typedapi/esdsl/ratelimitsetting.go +++ b/typedapi/esdsl/ratelimitsetting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/readonlyurlrepository.go b/typedapi/esdsl/readonlyurlrepository.go index ade31065a3..dff4d18055 100644 --- a/typedapi/esdsl/readonlyurlrepository.go +++ b/typedapi/esdsl/readonlyurlrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/readonlyurlrepositorysettings.go b/typedapi/esdsl/readonlyurlrepositorysettings.go index bb7881e293..e8128fbcfc 100644 --- a/typedapi/esdsl/readonlyurlrepositorysettings.go +++ b/typedapi/esdsl/readonlyurlrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/redactprocessor.go b/typedapi/esdsl/redactprocessor.go index 6eda5fcb31..16f7449e42 100644 --- a/typedapi/esdsl/redactprocessor.go +++ b/typedapi/esdsl/redactprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/regexoptions.go b/typedapi/esdsl/regexoptions.go index 8d4e471c59..9864a1925d 100644 --- a/typedapi/esdsl/regexoptions.go +++ b/typedapi/esdsl/regexoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/regexpquery.go b/typedapi/esdsl/regexpquery.go index 05b8043fb7..2b3e44f512 100644 --- a/typedapi/esdsl/regexpquery.go +++ b/typedapi/esdsl/regexpquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/regexvalidation.go b/typedapi/esdsl/regexvalidation.go index d7f80a9b42..af2fe6cf75 100644 --- a/typedapi/esdsl/regexvalidation.go +++ b/typedapi/esdsl/regexvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/registereddomainprocessor.go b/typedapi/esdsl/registereddomainprocessor.go index 3d344599ee..227ab9dcbc 100644 --- a/typedapi/esdsl/registereddomainprocessor.go +++ b/typedapi/esdsl/registereddomainprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/regressioninferenceoptions.go b/typedapi/esdsl/regressioninferenceoptions.go index 6cf34b2bdd..4f90f770bc 100644 --- a/typedapi/esdsl/regressioninferenceoptions.go +++ b/typedapi/esdsl/regressioninferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/reindexdestination.go b/typedapi/esdsl/reindexdestination.go index 1755df22a6..6377d6bb37 100644 --- a/typedapi/esdsl/reindexdestination.go +++ b/typedapi/esdsl/reindexdestination.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -56,9 +56,9 @@ func (s *_reindexDestination) Pipeline(pipeline string) *_reindexDestination { return s } -func (s *_reindexDestination) Routing(routing string) *_reindexDestination { +func (s *_reindexDestination) Routing(routings ...string) *_reindexDestination { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/reindexsource.go b/typedapi/esdsl/reindexsource.go index 3957f02400..2a7d8bce0a 100644 --- a/typedapi/esdsl/reindexsource.go +++ b/typedapi/esdsl/reindexsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -83,9 +83,9 @@ func (s *_reindexSource) Sort(sorts ...types.SortCombinationsVariant) *_reindexS return s } -func (s *_reindexSource) SourceFields_(fields ...string) *_reindexSource { +func (s *_reindexSource) SourceFields_(sourceconfig types.SourceConfigVariant) *_reindexSource { - s.v.SourceFields_ = fields + s.v.SourceFields_ = *sourceconfig.SourceConfigCaster() return s } diff --git a/typedapi/esdsl/remoteclusterprivileges.go b/typedapi/esdsl/remoteclusterprivileges.go index ec5f8bfc23..38429677c9 100644 --- a/typedapi/esdsl/remoteclusterprivileges.go +++ b/typedapi/esdsl/remoteclusterprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/remoteindicesprivileges.go b/typedapi/esdsl/remoteindicesprivileges.go index ff510bbc97..e8d1349a2b 100644 --- a/typedapi/esdsl/remoteindicesprivileges.go +++ b/typedapi/esdsl/remoteindicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/remotesource.go b/typedapi/esdsl/remotesource.go index b9e660eb79..2fbb60c062 100644 --- a/typedapi/esdsl/remotesource.go +++ b/typedapi/esdsl/remotesource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -32,6 +32,13 @@ func NewRemoteSource() *_remoteSource { } +func (s *_remoteSource) ApiKey(apikey string) *_remoteSource { + + s.v.ApiKey = &apikey + + return s +} + func (s *_remoteSource) ConnectTimeout(duration types.DurationVariant) *_remoteSource { s.v.ConnectTimeout = *duration.DurationCaster() diff --git a/typedapi/esdsl/removeaction.go b/typedapi/esdsl/removeaction.go index faf48bfeaa..20b7b52ba8 100644 --- a/typedapi/esdsl/removeaction.go +++ b/typedapi/esdsl/removeaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/removeduplicatestokenfilter.go b/typedapi/esdsl/removeduplicatestokenfilter.go index f8b6cb08ce..5c6b1d8cc6 100644 --- a/typedapi/esdsl/removeduplicatestokenfilter.go +++ b/typedapi/esdsl/removeduplicatestokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/removeindexaction.go b/typedapi/esdsl/removeindexaction.go index 290711d55f..fbe442c2a3 100644 --- a/typedapi/esdsl/removeindexaction.go +++ b/typedapi/esdsl/removeindexaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/removeprocessor.go b/typedapi/esdsl/removeprocessor.go index fc9189f533..ee55a3ac02 100644 --- a/typedapi/esdsl/removeprocessor.go +++ b/typedapi/esdsl/removeprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/renameprocessor.go b/typedapi/esdsl/renameprocessor.go index 6ae13ea50e..970e4fc1f0 100644 --- a/typedapi/esdsl/renameprocessor.go +++ b/typedapi/esdsl/renameprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/replicationaccess.go b/typedapi/esdsl/replicationaccess.go index 5919930ce7..24c109f5c2 100644 --- a/typedapi/esdsl/replicationaccess.go +++ b/typedapi/esdsl/replicationaccess.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/reportingemailattachment.go b/typedapi/esdsl/reportingemailattachment.go index 202028e70c..1d5e5f6711 100644 --- a/typedapi/esdsl/reportingemailattachment.go +++ b/typedapi/esdsl/reportingemailattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/repository.go b/typedapi/esdsl/repository.go index ee9819475f..af329dc0bd 100644 --- a/typedapi/esdsl/repository.go +++ b/typedapi/esdsl/repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/requestchatcompletion.go b/typedapi/esdsl/requestchatcompletion.go index eef0f8f218..ca88cf5e00 100644 --- a/typedapi/esdsl/requestchatcompletion.go +++ b/typedapi/esdsl/requestchatcompletion.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/requestitem.go b/typedapi/esdsl/requestitem.go index d32df6a829..38600afc5d 100644 --- a/typedapi/esdsl/requestitem.go +++ b/typedapi/esdsl/requestitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rerouteprocessor.go b/typedapi/esdsl/rerouteprocessor.go index 4b5326a622..dd5648a506 100644 --- a/typedapi/esdsl/rerouteprocessor.go +++ b/typedapi/esdsl/rerouteprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rescore.go b/typedapi/esdsl/rescore.go index 58c48158cb..84d7b9d644 100644 --- a/typedapi/esdsl/rescore.go +++ b/typedapi/esdsl/rescore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -60,6 +60,13 @@ func (s *_rescore) Query(query types.RescoreQueryVariant) *_rescore { return s } +func (s *_rescore) Script(script types.ScriptRescoreVariant) *_rescore { + + s.v.Script = script.ScriptRescoreCaster() + + return s +} + func (s *_rescore) WindowSize(windowsize int) *_rescore { s.v.WindowSize = &windowsize diff --git a/typedapi/esdsl/rescorequery.go b/typedapi/esdsl/rescorequery.go index 9a2e0aa8af..a630ce00bb 100644 --- a/typedapi/esdsl/rescorequery.go +++ b/typedapi/esdsl/rescorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rescorerretriever.go b/typedapi/esdsl/rescorerretriever.go index ed0c948a87..0f154711ad 100644 --- a/typedapi/esdsl/rescorerretriever.go +++ b/typedapi/esdsl/rescorerretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -37,43 +37,43 @@ func NewRescorerRetriever(retriever types.RetrieverContainerVariant) *_rescorerR } -func (s *_rescorerRetriever) Filter(filters ...types.QueryVariant) *_rescorerRetriever { +func (s *_rescorerRetriever) Rescore(rescores ...types.RescoreVariant) *_rescorerRetriever { - s.v.Filter = make([]types.Query, len(filters)) - for i, v := range filters { - s.v.Filter[i] = *v.QueryCaster() + s.v.Rescore = make([]types.Rescore, len(rescores)) + for i, v := range rescores { + s.v.Rescore[i] = *v.RescoreCaster() } return s } -func (s *_rescorerRetriever) MinScore(minscore float32) *_rescorerRetriever { +func (s *_rescorerRetriever) Retriever(retriever types.RetrieverContainerVariant) *_rescorerRetriever { - s.v.MinScore = &minscore + s.v.Retriever = *retriever.RetrieverContainerCaster() return s } -func (s *_rescorerRetriever) Name_(name_ string) *_rescorerRetriever { +func (s *_rescorerRetriever) MinScore(minscore float32) *_rescorerRetriever { - s.v.Name_ = &name_ + s.v.MinScore = &minscore return s } -func (s *_rescorerRetriever) Rescore(rescores ...types.RescoreVariant) *_rescorerRetriever { +func (s *_rescorerRetriever) Name_(name_ string) *_rescorerRetriever { - s.v.Rescore = make([]types.Rescore, len(rescores)) - for i, v := range rescores { - s.v.Rescore[i] = *v.RescoreCaster() - } + s.v.Name_ = &name_ return s } -func (s *_rescorerRetriever) Retriever(retriever types.RetrieverContainerVariant) *_rescorerRetriever { +func (s *_rescorerRetriever) Filter(filters ...types.QueryVariant) *_rescorerRetriever { - s.v.Retriever = *retriever.RetrieverContainerCaster() + s.v.Filter = make([]types.Query, len(filters)) + for i, v := range filters { + s.v.Filter[i] = *v.QueryCaster() + } return s } diff --git a/typedapi/esdsl/rescorevector.go b/typedapi/esdsl/rescorevector.go index ac2c22a986..8460acbae6 100644 --- a/typedapi/esdsl/rescorevector.go +++ b/typedapi/esdsl/rescorevector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/restriction.go b/typedapi/esdsl/restriction.go index ae6eb90d82..44b6e9efca 100644 --- a/typedapi/esdsl/restriction.go +++ b/typedapi/esdsl/restriction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/retention.go b/typedapi/esdsl/retention.go index e606268955..7a4f83c1e7 100644 --- a/typedapi/esdsl/retention.go +++ b/typedapi/esdsl/retention.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/retentionlease.go b/typedapi/esdsl/retentionlease.go index a2fab6e9eb..284ae48526 100644 --- a/typedapi/esdsl/retentionlease.go +++ b/typedapi/esdsl/retentionlease.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/retentionpolicy.go b/typedapi/esdsl/retentionpolicy.go index 49b3d1e205..7c367fc30d 100644 --- a/typedapi/esdsl/retentionpolicy.go +++ b/typedapi/esdsl/retentionpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/retentionpolicycontainer.go b/typedapi/esdsl/retentionpolicycontainer.go index b9d6c81c17..88ebdf6929 100644 --- a/typedapi/esdsl/retentionpolicycontainer.go +++ b/typedapi/esdsl/retentionpolicycontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _retentionPolicyContainer struct { v *types.RetentionPolicyContainer @@ -34,18 +30,6 @@ func NewRetentionPolicyContainer() *_retentionPolicyContainer { return &_retentionPolicyContainer{v: types.NewRetentionPolicyContainer()} } -// AdditionalRetentionPolicyContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_retentionPolicyContainer) AdditionalRetentionPolicyContainerProperty(key string, value json.RawMessage) *_retentionPolicyContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalRetentionPolicyContainerProperty = tmp - return s -} - func (s *_retentionPolicyContainer) Time(time types.RetentionPolicyVariant) *_retentionPolicyContainer { s.v.Time = time.RetentionPolicyCaster() diff --git a/typedapi/esdsl/retrievercontainer.go b/typedapi/esdsl/retrievercontainer.go index 7fee8d3d3d..08083d6874 100644 --- a/typedapi/esdsl/retrievercontainer.go +++ b/typedapi/esdsl/retrievercontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _retrieverContainer struct { v *types.RetrieverContainer @@ -34,18 +30,6 @@ func NewRetrieverContainer() *_retrieverContainer { return &_retrieverContainer{v: types.NewRetrieverContainer()} } -// AdditionalRetrieverContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_retrieverContainer) AdditionalRetrieverContainerProperty(key string, value json.RawMessage) *_retrieverContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalRetrieverContainerProperty = tmp - return s -} - func (s *_retrieverContainer) Knn(knn types.KnnRetrieverVariant) *_retrieverContainer { s.v.Knn = knn.KnnRetrieverCaster() diff --git a/typedapi/esdsl/reversenestedaggregation.go b/typedapi/esdsl/reversenestedaggregation.go index d6ab23780d..b34b4bd914 100644 --- a/typedapi/esdsl/reversenestedaggregation.go +++ b/typedapi/esdsl/reversenestedaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/reversetokenfilter.go b/typedapi/esdsl/reversetokenfilter.go index 6e346dbfe5..8005aa7ef6 100644 --- a/typedapi/esdsl/reversetokenfilter.go +++ b/typedapi/esdsl/reversetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/roledescriptor.go b/typedapi/esdsl/roledescriptor.go index feb5f5f348..6c2d3c6939 100644 --- a/typedapi/esdsl/roledescriptor.go +++ b/typedapi/esdsl/roledescriptor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rolemappingrule.go b/typedapi/esdsl/rolemappingrule.go index 1f85e0bbd8..65398b18d5 100644 --- a/typedapi/esdsl/rolemappingrule.go +++ b/typedapi/esdsl/rolemappingrule.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _roleMappingRule struct { v *types.RoleMappingRule @@ -34,18 +30,6 @@ func NewRoleMappingRule() *_roleMappingRule { return &_roleMappingRule{v: types.NewRoleMappingRule()} } -// AdditionalRoleMappingRuleProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_roleMappingRule) AdditionalRoleMappingRuleProperty(key string, value json.RawMessage) *_roleMappingRule { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalRoleMappingRuleProperty = tmp - return s -} - func (s *_roleMappingRule) All(alls ...types.RoleMappingRuleVariant) *_roleMappingRule { for _, v := range alls { diff --git a/typedapi/esdsl/rolequerycontainer.go b/typedapi/esdsl/rolequerycontainer.go index 4c7bffe972..679b93868d 100644 --- a/typedapi/esdsl/rolequerycontainer.go +++ b/typedapi/esdsl/rolequerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/roletemplate.go b/typedapi/esdsl/roletemplate.go index 40e8617960..ff3d77596e 100644 --- a/typedapi/esdsl/roletemplate.go +++ b/typedapi/esdsl/roletemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/roletemplateinlinequery.go b/typedapi/esdsl/roletemplateinlinequery.go index 6fe0a79a40..5236b79299 100644 --- a/typedapi/esdsl/roletemplateinlinequery.go +++ b/typedapi/esdsl/roletemplateinlinequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/roletemplatequery.go b/typedapi/esdsl/roletemplatequery.go index 9c222e6ee2..74fed3e41b 100644 --- a/typedapi/esdsl/roletemplatequery.go +++ b/typedapi/esdsl/roletemplatequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/roletemplatescript.go b/typedapi/esdsl/roletemplatescript.go index f472dd8083..67f9ba0c3f 100644 --- a/typedapi/esdsl/roletemplatescript.go +++ b/typedapi/esdsl/roletemplatescript.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rolloveraction.go b/typedapi/esdsl/rolloveraction.go index b29d8096ce..81773b376e 100644 --- a/typedapi/esdsl/rolloveraction.go +++ b/typedapi/esdsl/rolloveraction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rolloverconditions.go b/typedapi/esdsl/rolloverconditions.go index 175379a34f..9a52c70560 100644 --- a/typedapi/esdsl/rolloverconditions.go +++ b/typedapi/esdsl/rolloverconditions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/romaniananalyzer.go b/typedapi/esdsl/romaniananalyzer.go index ceffd8e48d..cf5a60fbb9 100644 --- a/typedapi/esdsl/romaniananalyzer.go +++ b/typedapi/esdsl/romaniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/routing.go b/typedapi/esdsl/routing.go new file mode 100644 index 0000000000..ecc1d902bf --- /dev/null +++ b/typedapi/esdsl/routing.go @@ -0,0 +1,44 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +// This is provide all the types that are part of the union. +type _routing struct { + v types.Routing +} + +func NewRouting() *_routing { + return &_routing{v: nil} +} + +func (u *_routing) Strings(strings ...string) *_routing { + + u.v = make([]string, len(strings)) + u.v = strings + + return u +} + +func (u *_routing) RoutingCaster() *types.Routing { + return &u.v +} diff --git a/typedapi/esdsl/routingfield.go b/typedapi/esdsl/routingfield.go index d1e00df22d..3732063bba 100644 --- a/typedapi/esdsl/routingfield.go +++ b/typedapi/esdsl/routingfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rrfrank.go b/typedapi/esdsl/rrfrank.go index f74f1e89e4..cbbe14f4b1 100644 --- a/typedapi/esdsl/rrfrank.go +++ b/typedapi/esdsl/rrfrank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rrfretriever.go b/typedapi/esdsl/rrfretriever.go index bcb26950ba..2f181fa166 100644 --- a/typedapi/esdsl/rrfretriever.go +++ b/typedapi/esdsl/rrfretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -43,58 +43,58 @@ func (s *_rRFRetriever) Fields(fields ...string) *_rRFRetriever { return s } -func (s *_rRFRetriever) Filter(filters ...types.QueryVariant) *_rRFRetriever { +func (s *_rRFRetriever) Query(query string) *_rRFRetriever { - s.v.Filter = make([]types.Query, len(filters)) - for i, v := range filters { - s.v.Filter[i] = *v.QueryCaster() - } + s.v.Query = &query return s } -func (s *_rRFRetriever) MinScore(minscore float32) *_rRFRetriever { +func (s *_rRFRetriever) RankConstant(rankconstant int) *_rRFRetriever { - s.v.MinScore = &minscore + s.v.RankConstant = &rankconstant return s } -func (s *_rRFRetriever) Name_(name_ string) *_rRFRetriever { +func (s *_rRFRetriever) RankWindowSize(rankwindowsize int) *_rRFRetriever { - s.v.Name_ = &name_ + s.v.RankWindowSize = &rankwindowsize return s } -func (s *_rRFRetriever) Query(query string) *_rRFRetriever { +func (s *_rRFRetriever) Retrievers(retrievers ...types.RRFRetrieverEntryVariant) *_rRFRetriever { - s.v.Query = &query + for _, v := range retrievers { + s.v.Retrievers = append(s.v.Retrievers, *v.RRFRetrieverEntryCaster()) + + } return s } -func (s *_rRFRetriever) RankConstant(rankconstant int) *_rRFRetriever { +func (s *_rRFRetriever) Filter(filters ...types.QueryVariant) *_rRFRetriever { - s.v.RankConstant = &rankconstant + s.v.Filter = make([]types.Query, len(filters)) + for i, v := range filters { + s.v.Filter[i] = *v.QueryCaster() + } return s } -func (s *_rRFRetriever) RankWindowSize(rankwindowsize int) *_rRFRetriever { +func (s *_rRFRetriever) MinScore(minscore float32) *_rRFRetriever { - s.v.RankWindowSize = &rankwindowsize + s.v.MinScore = &minscore return s } -func (s *_rRFRetriever) Retrievers(retrievers ...types.RetrieverContainerVariant) *_rRFRetriever { - - for _, v := range retrievers { +func (s *_rRFRetriever) Name_(name_ string) *_rRFRetriever { - s.v.Retrievers = append(s.v.Retrievers, *v.RetrieverContainerCaster()) + s.v.Name_ = &name_ - } return s } diff --git a/typedapi/esdsl/rrfretrievercomponent.go b/typedapi/esdsl/rrfretrievercomponent.go new file mode 100644 index 0000000000..2d53d6a69f --- /dev/null +++ b/typedapi/esdsl/rrfretrievercomponent.go @@ -0,0 +1,55 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _rRFRetrieverComponent struct { + v *types.RRFRetrieverComponent +} + +func NewRRFRetrieverComponent(retriever types.RetrieverContainerVariant) *_rRFRetrieverComponent { + + tmp := &_rRFRetrieverComponent{v: types.NewRRFRetrieverComponent()} + + tmp.Retriever(retriever) + + return tmp + +} + +func (s *_rRFRetrieverComponent) Retriever(retriever types.RetrieverContainerVariant) *_rRFRetrieverComponent { + + s.v.Retriever = *retriever.RetrieverContainerCaster() + + return s +} + +func (s *_rRFRetrieverComponent) Weight(weight float32) *_rRFRetrieverComponent { + + s.v.Weight = &weight + + return s +} + +func (s *_rRFRetrieverComponent) RRFRetrieverComponentCaster() *types.RRFRetrieverComponent { + return s.v +} diff --git a/typedapi/esdsl/rrfretrieverentry.go b/typedapi/esdsl/rrfretrieverentry.go new file mode 100644 index 0000000000..8c01fc71f0 --- /dev/null +++ b/typedapi/esdsl/rrfretrieverentry.go @@ -0,0 +1,62 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +// This is provide all the types that are part of the union. +type _rRFRetrieverEntry struct { + v types.RRFRetrieverEntry +} + +func NewRRFRetrieverEntry() *_rRFRetrieverEntry { + return &_rRFRetrieverEntry{v: nil} +} + +func (u *_rRFRetrieverEntry) RetrieverContainer(retrievercontainer types.RetrieverContainerVariant) *_rRFRetrieverEntry { + + u.v = retrievercontainer.RetrieverContainerCaster() + + return u +} + +// Interface implementation for RetrieverContainer in RRFRetrieverEntry union +func (u *_retrieverContainer) RRFRetrieverEntryCaster() *types.RRFRetrieverEntry { + t := types.RRFRetrieverEntry(u.v) + return &t +} + +func (u *_rRFRetrieverEntry) RRFRetrieverComponent(rrfretrievercomponent types.RRFRetrieverComponentVariant) *_rRFRetrieverEntry { + + u.v = rrfretrievercomponent.RRFRetrieverComponentCaster() + + return u +} + +// Interface implementation for RRFRetrieverComponent in RRFRetrieverEntry union +func (u *_rRFRetrieverComponent) RRFRetrieverEntryCaster() *types.RRFRetrieverEntry { + t := types.RRFRetrieverEntry(u.v) + return &t +} + +func (u *_rRFRetrieverEntry) RRFRetrieverEntryCaster() *types.RRFRetrieverEntry { + return &u.v +} diff --git a/typedapi/esdsl/rulecondition.go b/typedapi/esdsl/rulecondition.go index cae818760a..d3eb4612e7 100644 --- a/typedapi/esdsl/rulecondition.go +++ b/typedapi/esdsl/rulecondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/rulequery.go b/typedapi/esdsl/rulequery.go index 48ef04c034..ba0ac5734d 100644 --- a/typedapi/esdsl/rulequery.go +++ b/typedapi/esdsl/rulequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ruleretriever.go b/typedapi/esdsl/ruleretriever.go index d78eb3d003..aedbc44c50 100644 --- a/typedapi/esdsl/ruleretriever.go +++ b/typedapi/esdsl/ruleretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/runtimefield.go b/typedapi/esdsl/runtimefield.go index ef8780fca3..6c5cd996f5 100644 --- a/typedapi/esdsl/runtimefield.go +++ b/typedapi/esdsl/runtimefield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/runtimefieldfetchfields.go b/typedapi/esdsl/runtimefieldfetchfields.go index 07a3b265a6..67d095d825 100644 --- a/typedapi/esdsl/runtimefieldfetchfields.go +++ b/typedapi/esdsl/runtimefieldfetchfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/runtimefields.go b/typedapi/esdsl/runtimefields.go index e3ac3c51be..f1aa9599a4 100644 --- a/typedapi/esdsl/runtimefields.go +++ b/typedapi/esdsl/runtimefields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/russiananalyzer.go b/typedapi/esdsl/russiananalyzer.go index 6f99f1a147..7582b61a20 100644 --- a/typedapi/esdsl/russiananalyzer.go +++ b/typedapi/esdsl/russiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/russianstemtokenfilter.go b/typedapi/esdsl/russianstemtokenfilter.go index bc2f76a2b1..0b8d66a150 100644 --- a/typedapi/esdsl/russianstemtokenfilter.go +++ b/typedapi/esdsl/russianstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/s3repository.go b/typedapi/esdsl/s3repository.go index 3a20cc8915..1400524f05 100644 --- a/typedapi/esdsl/s3repository.go +++ b/typedapi/esdsl/s3repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/s3repositorysettings.go b/typedapi/esdsl/s3repositorysettings.go index ee22a6f39f..05bc470b0d 100644 --- a/typedapi/esdsl/s3repositorysettings.go +++ b/typedapi/esdsl/s3repositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/samplediversity.go b/typedapi/esdsl/samplediversity.go index 55584f638a..414b5c89c0 100644 --- a/typedapi/esdsl/samplediversity.go +++ b/typedapi/esdsl/samplediversity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sampleraggregation.go b/typedapi/esdsl/sampleraggregation.go index e46a305b39..d03d8911fd 100644 --- a/typedapi/esdsl/sampleraggregation.go +++ b/typedapi/esdsl/sampleraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scalarvalue.go b/typedapi/esdsl/scalarvalue.go index 59de57c9af..d901c0f6aa 100644 --- a/typedapi/esdsl/scalarvalue.go +++ b/typedapi/esdsl/scalarvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scaledfloatnumberproperty.go b/typedapi/esdsl/scaledfloatnumberproperty.go index 49ec94a414..00318739d9 100644 --- a/typedapi/esdsl/scaledfloatnumberproperty.go +++ b/typedapi/esdsl/scaledfloatnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scandinavianfoldingtokenfilter.go b/typedapi/esdsl/scandinavianfoldingtokenfilter.go index 2f3082646a..582f496a84 100644 --- a/typedapi/esdsl/scandinavianfoldingtokenfilter.go +++ b/typedapi/esdsl/scandinavianfoldingtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scandinaviannormalizationtokenfilter.go b/typedapi/esdsl/scandinaviannormalizationtokenfilter.go index 07a11ceccd..e4654feb92 100644 --- a/typedapi/esdsl/scandinaviannormalizationtokenfilter.go +++ b/typedapi/esdsl/scandinaviannormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/schedulecontainer.go b/typedapi/esdsl/schedulecontainer.go index 247f302920..b5bf077f0e 100644 --- a/typedapi/esdsl/schedulecontainer.go +++ b/typedapi/esdsl/schedulecontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _scheduleContainer struct { v *types.ScheduleContainer @@ -34,18 +30,6 @@ func NewScheduleContainer() *_scheduleContainer { return &_scheduleContainer{v: types.NewScheduleContainer()} } -// AdditionalScheduleContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_scheduleContainer) AdditionalScheduleContainerProperty(key string, value json.RawMessage) *_scheduleContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalScheduleContainerProperty = tmp - return s -} - func (s *_scheduleContainer) Cron(cronexpression string) *_scheduleContainer { s.v.Cron = &cronexpression diff --git a/typedapi/esdsl/scheduletimeofday.go b/typedapi/esdsl/scheduletimeofday.go index 7d24939f17..a3f16a11ab 100644 --- a/typedapi/esdsl/scheduletimeofday.go +++ b/typedapi/esdsl/scheduletimeofday.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scheduletriggerevent.go b/typedapi/esdsl/scheduletriggerevent.go index fc1048c5e9..988a2a9b0b 100644 --- a/typedapi/esdsl/scheduletriggerevent.go +++ b/typedapi/esdsl/scheduletriggerevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/schedulingconfiguration.go b/typedapi/esdsl/schedulingconfiguration.go index 263df2e067..7a877e4033 100644 --- a/typedapi/esdsl/schedulingconfiguration.go +++ b/typedapi/esdsl/schedulingconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scoresort.go b/typedapi/esdsl/scoresort.go index c0b3a99462..bf084a5d18 100644 --- a/typedapi/esdsl/scoresort.go +++ b/typedapi/esdsl/scoresort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/script.go b/typedapi/esdsl/script.go index 48faabcc2c..527e337c45 100644 --- a/typedapi/esdsl/script.go +++ b/typedapi/esdsl/script.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptcondition.go b/typedapi/esdsl/scriptcondition.go index 518c230988..1341901101 100644 --- a/typedapi/esdsl/scriptcondition.go +++ b/typedapi/esdsl/scriptcondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptedheuristic.go b/typedapi/esdsl/scriptedheuristic.go index c7c4dc0546..67cdfe41dc 100644 --- a/typedapi/esdsl/scriptedheuristic.go +++ b/typedapi/esdsl/scriptedheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptedmetricaggregation.go b/typedapi/esdsl/scriptedmetricaggregation.go index 23908e94dd..4873bc9c9e 100644 --- a/typedapi/esdsl/scriptedmetricaggregation.go +++ b/typedapi/esdsl/scriptedmetricaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptfield.go b/typedapi/esdsl/scriptfield.go index c9be656a31..fc3c954033 100644 --- a/typedapi/esdsl/scriptfield.go +++ b/typedapi/esdsl/scriptfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptprocessor.go b/typedapi/esdsl/scriptprocessor.go index 7257b8bcc8..8cfa082d5e 100644 --- a/typedapi/esdsl/scriptprocessor.go +++ b/typedapi/esdsl/scriptprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptquery.go b/typedapi/esdsl/scriptquery.go index a75a364713..7fad2e7379 100644 --- a/typedapi/esdsl/scriptquery.go +++ b/typedapi/esdsl/scriptquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptrescore.go b/typedapi/esdsl/scriptrescore.go new file mode 100644 index 0000000000..0881cab6c2 --- /dev/null +++ b/typedapi/esdsl/scriptrescore.go @@ -0,0 +1,56 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _scriptRescore struct { + v *types.ScriptRescore +} + +func NewScriptRescore(script types.ScriptVariant) *_scriptRescore { + + tmp := &_scriptRescore{v: types.NewScriptRescore()} + + tmp.Script(script) + + return tmp + +} + +func (s *_scriptRescore) Script(script types.ScriptVariant) *_scriptRescore { + + s.v.Script = *script.ScriptCaster() + + return s +} + +func (s *_scriptRescore) RescoreCaster() *types.Rescore { + container := types.NewRescore() + + container.Script = s.v + + return container +} + +func (s *_scriptRescore) ScriptRescoreCaster() *types.ScriptRescore { + return s.v +} diff --git a/typedapi/esdsl/scriptscorefunction.go b/typedapi/esdsl/scriptscorefunction.go index 9a3696b52f..90362e8a40 100644 --- a/typedapi/esdsl/scriptscorefunction.go +++ b/typedapi/esdsl/scriptscorefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptscorequery.go b/typedapi/esdsl/scriptscorequery.go index b0f78fa73b..b56fb5d579 100644 --- a/typedapi/esdsl/scriptscorequery.go +++ b/typedapi/esdsl/scriptscorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptsort.go b/typedapi/esdsl/scriptsort.go index cf01df076d..08ec694b0b 100644 --- a/typedapi/esdsl/scriptsort.go +++ b/typedapi/esdsl/scriptsort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scriptsource.go b/typedapi/esdsl/scriptsource.go index 23ca089105..ac53236662 100644 --- a/typedapi/esdsl/scriptsource.go +++ b/typedapi/esdsl/scriptsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scripttransform.go b/typedapi/esdsl/scripttransform.go index dff411e124..4018f3ceb3 100644 --- a/typedapi/esdsl/scripttransform.go +++ b/typedapi/esdsl/scripttransform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/scrollids.go b/typedapi/esdsl/scrollids.go index 662f665131..9416cf1e1a 100644 --- a/typedapi/esdsl/scrollids.go +++ b/typedapi/esdsl/scrollids.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchablesnapshotaction.go b/typedapi/esdsl/searchablesnapshotaction.go index 87ed48f8c8..7dfead05fa 100644 --- a/typedapi/esdsl/searchablesnapshotaction.go +++ b/typedapi/esdsl/searchablesnapshotaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchaccess.go b/typedapi/esdsl/searchaccess.go index 2ff895c168..9e58d9d3f8 100644 --- a/typedapi/esdsl/searchaccess.go +++ b/typedapi/esdsl/searchaccess.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchapplicationparameters.go b/typedapi/esdsl/searchapplicationparameters.go index 14532bd003..ddf919f1a5 100644 --- a/typedapi/esdsl/searchapplicationparameters.go +++ b/typedapi/esdsl/searchapplicationparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchapplicationtemplate.go b/typedapi/esdsl/searchapplicationtemplate.go index 70a095e915..a004e2e658 100644 --- a/typedapi/esdsl/searchapplicationtemplate.go +++ b/typedapi/esdsl/searchapplicationtemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchasyoutypeproperty.go b/typedapi/esdsl/searchasyoutypeproperty.go index ec91d7b17a..7582498577 100644 --- a/typedapi/esdsl/searchasyoutypeproperty.go +++ b/typedapi/esdsl/searchasyoutypeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchidle.go b/typedapi/esdsl/searchidle.go index d23eb89c2f..d37158357d 100644 --- a/typedapi/esdsl/searchidle.go +++ b/typedapi/esdsl/searchidle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchinput.go b/typedapi/esdsl/searchinput.go index 69de813193..3274c17bdc 100644 --- a/typedapi/esdsl/searchinput.go +++ b/typedapi/esdsl/searchinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchinputrequestbody.go b/typedapi/esdsl/searchinputrequestbody.go index 3aed95e38c..698f06550e 100644 --- a/typedapi/esdsl/searchinputrequestbody.go +++ b/typedapi/esdsl/searchinputrequestbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchinputrequestdefinition.go b/typedapi/esdsl/searchinputrequestdefinition.go index cda9ce2d1f..7c0a6395e5 100644 --- a/typedapi/esdsl/searchinputrequestdefinition.go +++ b/typedapi/esdsl/searchinputrequestdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchrequestbody.go b/typedapi/esdsl/searchrequestbody.go index 02e1e0245f..09fc049c5e 100644 --- a/typedapi/esdsl/searchrequestbody.go +++ b/typedapi/esdsl/searchrequestbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchtemplaterequestbody.go b/typedapi/esdsl/searchtemplaterequestbody.go index 003b3acf1d..df96693769 100644 --- a/typedapi/esdsl/searchtemplaterequestbody.go +++ b/typedapi/esdsl/searchtemplaterequestbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/searchtransform.go b/typedapi/esdsl/searchtransform.go index 2db2f5bfee..facdcb48ec 100644 --- a/typedapi/esdsl/searchtransform.go +++ b/typedapi/esdsl/searchtransform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/securitysettings.go b/typedapi/esdsl/securitysettings.go index 3e57470467..1b4b339f87 100644 --- a/typedapi/esdsl/securitysettings.go +++ b/typedapi/esdsl/securitysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/selectoption.go b/typedapi/esdsl/selectoption.go index 2f62cfddaf..95f6c41330 100644 --- a/typedapi/esdsl/selectoption.go +++ b/typedapi/esdsl/selectoption.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/semanticquery.go b/typedapi/esdsl/semanticquery.go index e94dde3689..560a406ebb 100644 --- a/typedapi/esdsl/semanticquery.go +++ b/typedapi/esdsl/semanticquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/semantictextindexoptions.go b/typedapi/esdsl/semantictextindexoptions.go new file mode 100644 index 0000000000..2f835f7079 --- /dev/null +++ b/typedapi/esdsl/semantictextindexoptions.go @@ -0,0 +1,51 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _semanticTextIndexOptions struct { + v *types.SemanticTextIndexOptions +} + +func NewSemanticTextIndexOptions() *_semanticTextIndexOptions { + + return &_semanticTextIndexOptions{v: types.NewSemanticTextIndexOptions()} + +} + +func (s *_semanticTextIndexOptions) DenseVector(densevector types.DenseVectorIndexOptionsVariant) *_semanticTextIndexOptions { + + s.v.DenseVector = densevector.DenseVectorIndexOptionsCaster() + + return s +} + +func (s *_semanticTextIndexOptions) SparseVector(sparsevector types.SparseVectorIndexOptionsVariant) *_semanticTextIndexOptions { + + s.v.SparseVector = sparsevector.SparseVectorIndexOptionsCaster() + + return s +} + +func (s *_semanticTextIndexOptions) SemanticTextIndexOptionsCaster() *types.SemanticTextIndexOptions { + return s.v +} diff --git a/typedapi/esdsl/semantictextproperty.go b/typedapi/esdsl/semantictextproperty.go index b0f063ca1a..7a09dc3995 100644 --- a/typedapi/esdsl/semantictextproperty.go +++ b/typedapi/esdsl/semantictextproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -39,6 +39,34 @@ func (s *_semanticTextProperty) ChunkingSettings(chunkingsettings types.Chunking return s } +func (s *_semanticTextProperty) Fields(fields map[string]types.Property) *_semanticTextProperty { + + s.v.Fields = fields + return s +} + +func (s *_semanticTextProperty) AddField(key string, value types.PropertyVariant) *_semanticTextProperty { + + var tmp map[string]types.Property + if s.v.Fields == nil { + s.v.Fields = make(map[string]types.Property) + } else { + tmp = s.v.Fields + } + + tmp[key] = *value.PropertyCaster() + + s.v.Fields = tmp + return s +} + +func (s *_semanticTextProperty) IndexOptions(indexoptions types.SemanticTextIndexOptionsVariant) *_semanticTextProperty { + + s.v.IndexOptions = indexoptions.SemanticTextIndexOptionsCaster() + + return s +} + func (s *_semanticTextProperty) InferenceId(id string) *_semanticTextProperty { s.v.InferenceId = &id diff --git a/typedapi/esdsl/serbiananalyzer.go b/typedapi/esdsl/serbiananalyzer.go index c1fa20e8fd..346beec34b 100644 --- a/typedapi/esdsl/serbiananalyzer.go +++ b/typedapi/esdsl/serbiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/serbiannormalizationtokenfilter.go b/typedapi/esdsl/serbiannormalizationtokenfilter.go index 826a250938..9c1286e342 100644 --- a/typedapi/esdsl/serbiannormalizationtokenfilter.go +++ b/typedapi/esdsl/serbiannormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/serialdifferencingaggregation.go b/typedapi/esdsl/serialdifferencingaggregation.go index 86b36b0c70..73dc9ba4a9 100644 --- a/typedapi/esdsl/serialdifferencingaggregation.go +++ b/typedapi/esdsl/serialdifferencingaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/setpriorityaction.go b/typedapi/esdsl/setpriorityaction.go index 29c3bac438..3e7739f5ed 100644 --- a/typedapi/esdsl/setpriorityaction.go +++ b/typedapi/esdsl/setpriorityaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/setprocessor.go b/typedapi/esdsl/setprocessor.go index 15281727e3..24f88775d9 100644 --- a/typedapi/esdsl/setprocessor.go +++ b/typedapi/esdsl/setprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/setsecurityuserprocessor.go b/typedapi/esdsl/setsecurityuserprocessor.go index 18ebf2c71a..e988b461bd 100644 --- a/typedapi/esdsl/setsecurityuserprocessor.go +++ b/typedapi/esdsl/setsecurityuserprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settings.go b/typedapi/esdsl/settings.go index 093dfefa87..4c7b6ddf61 100644 --- a/typedapi/esdsl/settings.go +++ b/typedapi/esdsl/settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -74,6 +74,13 @@ func (s *_settings) Unattended(unattended bool) *_settings { return s } +func (s *_settings) UsePointInTime(usepointintime bool) *_settings { + + s.v.UsePointInTime = &usepointintime + + return s +} + func (s *_settings) SettingsCaster() *types.Settings { return s.v } diff --git a/typedapi/esdsl/settingsanalyze.go b/typedapi/esdsl/settingsanalyze.go index d19d68b0e2..8a47e9cb4d 100644 --- a/typedapi/esdsl/settingsanalyze.go +++ b/typedapi/esdsl/settingsanalyze.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingshighlight.go b/typedapi/esdsl/settingshighlight.go index fd1053095d..bd4b261b26 100644 --- a/typedapi/esdsl/settingshighlight.go +++ b/typedapi/esdsl/settingshighlight.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingsquerystring.go b/typedapi/esdsl/settingsquerystring.go index c8df69e856..683722ad36 100644 --- a/typedapi/esdsl/settingsquerystring.go +++ b/typedapi/esdsl/settingsquerystring.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssearch.go b/typedapi/esdsl/settingssearch.go index dc5eb59dac..e332aec4bb 100644 --- a/typedapi/esdsl/settingssearch.go +++ b/typedapi/esdsl/settingssearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssimilarity.go b/typedapi/esdsl/settingssimilarity.go index d21f3bc582..f5600e346f 100644 --- a/typedapi/esdsl/settingssimilarity.go +++ b/typedapi/esdsl/settingssimilarity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssimilaritybm25.go b/typedapi/esdsl/settingssimilaritybm25.go index f49d2d472d..d5cd77e0a5 100644 --- a/typedapi/esdsl/settingssimilaritybm25.go +++ b/typedapi/esdsl/settingssimilaritybm25.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssimilarityboolean.go b/typedapi/esdsl/settingssimilarityboolean.go index e92dc879e0..29b7bd34b6 100644 --- a/typedapi/esdsl/settingssimilarityboolean.go +++ b/typedapi/esdsl/settingssimilarityboolean.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssimilaritydfi.go b/typedapi/esdsl/settingssimilaritydfi.go index 7c82623402..a844f004ec 100644 --- a/typedapi/esdsl/settingssimilaritydfi.go +++ b/typedapi/esdsl/settingssimilaritydfi.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssimilaritydfr.go b/typedapi/esdsl/settingssimilaritydfr.go index a21b08a2ff..ec18793fb2 100644 --- a/typedapi/esdsl/settingssimilaritydfr.go +++ b/typedapi/esdsl/settingssimilaritydfr.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssimilarityib.go b/typedapi/esdsl/settingssimilarityib.go index c20f6396b9..7d166268e2 100644 --- a/typedapi/esdsl/settingssimilarityib.go +++ b/typedapi/esdsl/settingssimilarityib.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssimilaritylmd.go b/typedapi/esdsl/settingssimilaritylmd.go index dbb1a05d8e..5af026c8cd 100644 --- a/typedapi/esdsl/settingssimilaritylmd.go +++ b/typedapi/esdsl/settingssimilaritylmd.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssimilaritylmj.go b/typedapi/esdsl/settingssimilaritylmj.go index a4dc211e4d..6ed4e367aa 100644 --- a/typedapi/esdsl/settingssimilaritylmj.go +++ b/typedapi/esdsl/settingssimilaritylmj.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/settingssimilarityscripted.go b/typedapi/esdsl/settingssimilarityscripted.go index bccec5ac2e..f84aeb729d 100644 --- a/typedapi/esdsl/settingssimilarityscripted.go +++ b/typedapi/esdsl/settingssimilarityscripted.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/shapefieldquery.go b/typedapi/esdsl/shapefieldquery.go index 2815b0affb..6e8318b3b4 100644 --- a/typedapi/esdsl/shapefieldquery.go +++ b/typedapi/esdsl/shapefieldquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/shapeproperty.go b/typedapi/esdsl/shapeproperty.go index 41fe28af2c..390717042f 100644 --- a/typedapi/esdsl/shapeproperty.go +++ b/typedapi/esdsl/shapeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/shapequery.go b/typedapi/esdsl/shapequery.go index 29f03c0fd2..1b613cf503 100644 --- a/typedapi/esdsl/shapequery.go +++ b/typedapi/esdsl/shapequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sharedfilesystemrepository.go b/typedapi/esdsl/sharedfilesystemrepository.go index 3041a6b8f6..205eb7b59c 100644 --- a/typedapi/esdsl/sharedfilesystemrepository.go +++ b/typedapi/esdsl/sharedfilesystemrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sharedfilesystemrepositorysettings.go b/typedapi/esdsl/sharedfilesystemrepositorysettings.go index 88204772d0..c644929701 100644 --- a/typedapi/esdsl/sharedfilesystemrepositorysettings.go +++ b/typedapi/esdsl/sharedfilesystemrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/shingletokenfilter.go b/typedapi/esdsl/shingletokenfilter.go index 285fee4fe5..ab96e8b1bd 100644 --- a/typedapi/esdsl/shingletokenfilter.go +++ b/typedapi/esdsl/shingletokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/shortnumberproperty.go b/typedapi/esdsl/shortnumberproperty.go index b0114b74e9..ea294248d7 100644 --- a/typedapi/esdsl/shortnumberproperty.go +++ b/typedapi/esdsl/shortnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/shrinkaction.go b/typedapi/esdsl/shrinkaction.go index 4ab653ea08..0eb0876b59 100644 --- a/typedapi/esdsl/shrinkaction.go +++ b/typedapi/esdsl/shrinkaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/significanttermsaggregation.go b/typedapi/esdsl/significanttermsaggregation.go index 5593e214d7..54f1690941 100644 --- a/typedapi/esdsl/significanttermsaggregation.go +++ b/typedapi/esdsl/significanttermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -105,6 +105,13 @@ func (s *_significantTermsAggregation) MutualInformation(mutualinformation types return s } +func (s *_significantTermsAggregation) PValue(pvalue types.PValueHeuristicVariant) *_significantTermsAggregation { + + s.v.PValue = pvalue.PValueHeuristicCaster() + + return s +} + func (s *_significantTermsAggregation) Percentage(percentage types.PercentageScoreHeuristicVariant) *_significantTermsAggregation { s.v.Percentage = percentage.PercentageScoreHeuristicCaster() diff --git a/typedapi/esdsl/significanttextaggregation.go b/typedapi/esdsl/significanttextaggregation.go index 131c2cb421..6661fd2299 100644 --- a/typedapi/esdsl/significanttextaggregation.go +++ b/typedapi/esdsl/significanttextaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/simpleanalyzer.go b/typedapi/esdsl/simpleanalyzer.go index ade08ae7e2..683d4c2d0b 100644 --- a/typedapi/esdsl/simpleanalyzer.go +++ b/typedapi/esdsl/simpleanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/simplemovingaverageaggregation.go b/typedapi/esdsl/simplemovingaverageaggregation.go index 20005b784b..8e31c2189f 100644 --- a/typedapi/esdsl/simplemovingaverageaggregation.go +++ b/typedapi/esdsl/simplemovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/simplepatternsplittokenizer.go b/typedapi/esdsl/simplepatternsplittokenizer.go index 57d2a91675..f9d93ec2d0 100644 --- a/typedapi/esdsl/simplepatternsplittokenizer.go +++ b/typedapi/esdsl/simplepatternsplittokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/simplepatterntokenizer.go b/typedapi/esdsl/simplepatterntokenizer.go index 00ac0a79d2..b2b3115168 100644 --- a/typedapi/esdsl/simplepatterntokenizer.go +++ b/typedapi/esdsl/simplepatterntokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/simplequerystringflags.go b/typedapi/esdsl/simplequerystringflags.go index 317d2af6df..2272ad9966 100644 --- a/typedapi/esdsl/simplequerystringflags.go +++ b/typedapi/esdsl/simplequerystringflags.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/simplequerystringquery.go b/typedapi/esdsl/simplequerystringquery.go index 8e7e7c81be..6018fa44bc 100644 --- a/typedapi/esdsl/simplequerystringquery.go +++ b/typedapi/esdsl/simplequerystringquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/simulatedactions.go b/typedapi/esdsl/simulatedactions.go index 6f9a9c6d50..9ff423a6a4 100644 --- a/typedapi/esdsl/simulatedactions.go +++ b/typedapi/esdsl/simulatedactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sizefield.go b/typedapi/esdsl/sizefield.go index e70c085724..9005d6e5bb 100644 --- a/typedapi/esdsl/sizefield.go +++ b/typedapi/esdsl/sizefield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/slackaction.go b/typedapi/esdsl/slackaction.go index 05a4bebe99..b6653d0aab 100644 --- a/typedapi/esdsl/slackaction.go +++ b/typedapi/esdsl/slackaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/slackattachment.go b/typedapi/esdsl/slackattachment.go index adf3aa5bbc..a3bc90ce08 100644 --- a/typedapi/esdsl/slackattachment.go +++ b/typedapi/esdsl/slackattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/slackattachmentfield.go b/typedapi/esdsl/slackattachmentfield.go index 3e5cf10fd3..773765ec67 100644 --- a/typedapi/esdsl/slackattachmentfield.go +++ b/typedapi/esdsl/slackattachmentfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/slackdynamicattachment.go b/typedapi/esdsl/slackdynamicattachment.go index 66a720691b..1168f82334 100644 --- a/typedapi/esdsl/slackdynamicattachment.go +++ b/typedapi/esdsl/slackdynamicattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/slackmessage.go b/typedapi/esdsl/slackmessage.go index c0d9193fb2..6fc7c1fa2f 100644 --- a/typedapi/esdsl/slackmessage.go +++ b/typedapi/esdsl/slackmessage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/slicedscroll.go b/typedapi/esdsl/slicedscroll.go index 66321d7e4a..647cd470b4 100644 --- a/typedapi/esdsl/slicedscroll.go +++ b/typedapi/esdsl/slicedscroll.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/slowlogsettings.go b/typedapi/esdsl/slowlogsettings.go index b6958dbd91..82258b8387 100644 --- a/typedapi/esdsl/slowlogsettings.go +++ b/typedapi/esdsl/slowlogsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/slowlogtresholdlevels.go b/typedapi/esdsl/slowlogtresholdlevels.go index 7a9c57766f..ee9de6f112 100644 --- a/typedapi/esdsl/slowlogtresholdlevels.go +++ b/typedapi/esdsl/slowlogtresholdlevels.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/slowlogtresholds.go b/typedapi/esdsl/slowlogtresholds.go index 3e99d714c0..1a92401b18 100644 --- a/typedapi/esdsl/slowlogtresholds.go +++ b/typedapi/esdsl/slowlogtresholds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/smoothingmodelcontainer.go b/typedapi/esdsl/smoothingmodelcontainer.go index b650f4cbcd..67b6d2249c 100644 --- a/typedapi/esdsl/smoothingmodelcontainer.go +++ b/typedapi/esdsl/smoothingmodelcontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _smoothingModelContainer struct { v *types.SmoothingModelContainer @@ -34,18 +30,6 @@ func NewSmoothingModelContainer() *_smoothingModelContainer { return &_smoothingModelContainer{v: types.NewSmoothingModelContainer()} } -// AdditionalSmoothingModelContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_smoothingModelContainer) AdditionalSmoothingModelContainerProperty(key string, value json.RawMessage) *_smoothingModelContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalSmoothingModelContainerProperty = tmp - return s -} - func (s *_smoothingModelContainer) Laplace(laplace types.LaplaceSmoothingModelVariant) *_smoothingModelContainer { s.v.Laplace = laplace.LaplaceSmoothingModelCaster() diff --git a/typedapi/esdsl/snowballanalyzer.go b/typedapi/esdsl/snowballanalyzer.go index 18ffbb79a4..3a77c3bb02 100644 --- a/typedapi/esdsl/snowballanalyzer.go +++ b/typedapi/esdsl/snowballanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/snowballtokenfilter.go b/typedapi/esdsl/snowballtokenfilter.go index bffdb19e30..dfc6dced6e 100644 --- a/typedapi/esdsl/snowballtokenfilter.go +++ b/typedapi/esdsl/snowballtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/softdeletes.go b/typedapi/esdsl/softdeletes.go index 3a926c335c..1453412c2d 100644 --- a/typedapi/esdsl/softdeletes.go +++ b/typedapi/esdsl/softdeletes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/soranianalyzer.go b/typedapi/esdsl/soranianalyzer.go index 05657727d9..fe5004f2a2 100644 --- a/typedapi/esdsl/soranianalyzer.go +++ b/typedapi/esdsl/soranianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/soraninormalizationtokenfilter.go b/typedapi/esdsl/soraninormalizationtokenfilter.go index a30c77f00f..a5c65f2b18 100644 --- a/typedapi/esdsl/soraninormalizationtokenfilter.go +++ b/typedapi/esdsl/soraninormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sort.go b/typedapi/esdsl/sort.go index 40f19f137a..0e13c7a2d9 100644 --- a/typedapi/esdsl/sort.go +++ b/typedapi/esdsl/sort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sortcombinations.go b/typedapi/esdsl/sortcombinations.go index 3edab19a3d..97cf30d03d 100644 --- a/typedapi/esdsl/sortcombinations.go +++ b/typedapi/esdsl/sortcombinations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sortoptions.go b/typedapi/esdsl/sortoptions.go index beacfcdffe..c386eb3e8c 100644 --- a/typedapi/esdsl/sortoptions.go +++ b/typedapi/esdsl/sortoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sortprocessor.go b/typedapi/esdsl/sortprocessor.go index 8183f60dbe..d9159f9495 100644 --- a/typedapi/esdsl/sortprocessor.go +++ b/typedapi/esdsl/sortprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sourceconfig.go b/typedapi/esdsl/sourceconfig.go index e2a4f06d74..d91322a9df 100644 --- a/typedapi/esdsl/sourceconfig.go +++ b/typedapi/esdsl/sourceconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sourcefield.go b/typedapi/esdsl/sourcefield.go index 962ee02f0f..93dad70c48 100644 --- a/typedapi/esdsl/sourcefield.go +++ b/typedapi/esdsl/sourcefield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sourcefilter.go b/typedapi/esdsl/sourcefilter.go index 2baf3ee68c..c67127c507 100644 --- a/typedapi/esdsl/sourcefilter.go +++ b/typedapi/esdsl/sourcefilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sourceindex.go b/typedapi/esdsl/sourceindex.go index cc7fc3778a..521e7e061b 100644 --- a/typedapi/esdsl/sourceindex.go +++ b/typedapi/esdsl/sourceindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sourceonlyrepository.go b/typedapi/esdsl/sourceonlyrepository.go index df512afc0f..62c70c4682 100644 --- a/typedapi/esdsl/sourceonlyrepository.go +++ b/typedapi/esdsl/sourceonlyrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sourceonlyrepositorysettings.go b/typedapi/esdsl/sourceonlyrepositorysettings.go index 10ab00593f..c0371413d7 100644 --- a/typedapi/esdsl/sourceonlyrepositorysettings.go +++ b/typedapi/esdsl/sourceonlyrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spancontainingquery.go b/typedapi/esdsl/spancontainingquery.go index acd63d063c..ed1fe2f136 100644 --- a/typedapi/esdsl/spancontainingquery.go +++ b/typedapi/esdsl/spancontainingquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spanfieldmaskingquery.go b/typedapi/esdsl/spanfieldmaskingquery.go index ad0bc32961..96bfa0620a 100644 --- a/typedapi/esdsl/spanfieldmaskingquery.go +++ b/typedapi/esdsl/spanfieldmaskingquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spanfirstquery.go b/typedapi/esdsl/spanfirstquery.go index b4fe796b15..1eb68666ed 100644 --- a/typedapi/esdsl/spanfirstquery.go +++ b/typedapi/esdsl/spanfirstquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spangapquery.go b/typedapi/esdsl/spangapquery.go index e79c814071..20d7c4f3b5 100644 --- a/typedapi/esdsl/spangapquery.go +++ b/typedapi/esdsl/spangapquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spanishanalyzer.go b/typedapi/esdsl/spanishanalyzer.go index 3300bb3d6e..9fc5fa2dfc 100644 --- a/typedapi/esdsl/spanishanalyzer.go +++ b/typedapi/esdsl/spanishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spanmultitermquery.go b/typedapi/esdsl/spanmultitermquery.go index b63fa09f8f..d271032ebc 100644 --- a/typedapi/esdsl/spanmultitermquery.go +++ b/typedapi/esdsl/spanmultitermquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spannearquery.go b/typedapi/esdsl/spannearquery.go index e61f4a9542..39ef10b45a 100644 --- a/typedapi/esdsl/spannearquery.go +++ b/typedapi/esdsl/spannearquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spannotquery.go b/typedapi/esdsl/spannotquery.go index 9d18c2aaad..870690c0ac 100644 --- a/typedapi/esdsl/spannotquery.go +++ b/typedapi/esdsl/spannotquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spanorquery.go b/typedapi/esdsl/spanorquery.go index 7fb7fb703a..f13c4a51a6 100644 --- a/typedapi/esdsl/spanorquery.go +++ b/typedapi/esdsl/spanorquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spanquery.go b/typedapi/esdsl/spanquery.go index 095a51c8f6..dce1e65477 100644 --- a/typedapi/esdsl/spanquery.go +++ b/typedapi/esdsl/spanquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spantermquery.go b/typedapi/esdsl/spantermquery.go index 83c6c7f857..7b6e58c1be 100644 --- a/typedapi/esdsl/spantermquery.go +++ b/typedapi/esdsl/spantermquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/spanwithinquery.go b/typedapi/esdsl/spanwithinquery.go index 40ff77523d..c5bc5a734e 100644 --- a/typedapi/esdsl/spanwithinquery.go +++ b/typedapi/esdsl/spanwithinquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sparsevectorindexoptions.go b/typedapi/esdsl/sparsevectorindexoptions.go index f10df8a207..d4e7a93e8f 100644 --- a/typedapi/esdsl/sparsevectorindexoptions.go +++ b/typedapi/esdsl/sparsevectorindexoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sparsevectorproperty.go b/typedapi/esdsl/sparsevectorproperty.go index 9d879c731c..d0a7aefd81 100644 --- a/typedapi/esdsl/sparsevectorproperty.go +++ b/typedapi/esdsl/sparsevectorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sparsevectorquery.go b/typedapi/esdsl/sparsevectorquery.go index 8a97abf360..30e343313a 100644 --- a/typedapi/esdsl/sparsevectorquery.go +++ b/typedapi/esdsl/sparsevectorquery.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _sparseVectorQuery struct { v *types.SparseVectorQuery @@ -34,18 +30,6 @@ func NewSparseVectorQuery() *_sparseVectorQuery { return &_sparseVectorQuery{v: types.NewSparseVectorQuery()} } -// AdditionalSparseVectorQueryProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_sparseVectorQuery) AdditionalSparseVectorQueryProperty(key string, value json.RawMessage) *_sparseVectorQuery { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalSparseVectorQueryProperty = tmp - return s -} - func (s *_sparseVectorQuery) Boost(boost float32) *_sparseVectorQuery { s.v.Boost = &boost diff --git a/typedapi/esdsl/specifieddocument.go b/typedapi/esdsl/specifieddocument.go index 315d281e9c..5388615ec6 100644 --- a/typedapi/esdsl/specifieddocument.go +++ b/typedapi/esdsl/specifieddocument.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/splitprocessor.go b/typedapi/esdsl/splitprocessor.go index 923aac2fc1..3fb575a5d7 100644 --- a/typedapi/esdsl/splitprocessor.go +++ b/typedapi/esdsl/splitprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/standardanalyzer.go b/typedapi/esdsl/standardanalyzer.go index f2fe2aae0d..4ff8baa8bd 100644 --- a/typedapi/esdsl/standardanalyzer.go +++ b/typedapi/esdsl/standardanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/standardretriever.go b/typedapi/esdsl/standardretriever.go index 038e2f06f2..60b7108795 100644 --- a/typedapi/esdsl/standardretriever.go +++ b/typedapi/esdsl/standardretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/standardtokenizer.go b/typedapi/esdsl/standardtokenizer.go index 30de99da4b..4641ee536f 100644 --- a/typedapi/esdsl/standardtokenizer.go +++ b/typedapi/esdsl/standardtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/statsaggregation.go b/typedapi/esdsl/statsaggregation.go index 092d557b22..a535f40f2a 100644 --- a/typedapi/esdsl/statsaggregation.go +++ b/typedapi/esdsl/statsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/statsbucketaggregation.go b/typedapi/esdsl/statsbucketaggregation.go index 201402e748..e1ad091ba2 100644 --- a/typedapi/esdsl/statsbucketaggregation.go +++ b/typedapi/esdsl/statsbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stemmeroverridetokenfilter.go b/typedapi/esdsl/stemmeroverridetokenfilter.go index dcad00262d..8fd07784aa 100644 --- a/typedapi/esdsl/stemmeroverridetokenfilter.go +++ b/typedapi/esdsl/stemmeroverridetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stemmertokenfilter.go b/typedapi/esdsl/stemmertokenfilter.go index 7e4f2f1d96..93c681ac62 100644 --- a/typedapi/esdsl/stemmertokenfilter.go +++ b/typedapi/esdsl/stemmertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stepkey.go b/typedapi/esdsl/stepkey.go index d501acbdac..cd029789bf 100644 --- a/typedapi/esdsl/stepkey.go +++ b/typedapi/esdsl/stepkey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stopanalyzer.go b/typedapi/esdsl/stopanalyzer.go index 9ee27cb61b..c5df634c44 100644 --- a/typedapi/esdsl/stopanalyzer.go +++ b/typedapi/esdsl/stopanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stoptokenfilter.go b/typedapi/esdsl/stoptokenfilter.go index d798e00a0c..8c1b843895 100644 --- a/typedapi/esdsl/stoptokenfilter.go +++ b/typedapi/esdsl/stoptokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stopwords.go b/typedapi/esdsl/stopwords.go index 7f7430e4f8..6e3422b1d1 100644 --- a/typedapi/esdsl/stopwords.go +++ b/typedapi/esdsl/stopwords.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/storage.go b/typedapi/esdsl/storage.go index bdebcd36ab..c376ca5cc0 100644 --- a/typedapi/esdsl/storage.go +++ b/typedapi/esdsl/storage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/storedscript.go b/typedapi/esdsl/storedscript.go index e6b7e3908d..901467a9ca 100644 --- a/typedapi/esdsl/storedscript.go +++ b/typedapi/esdsl/storedscript.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stringifiedboolean.go b/typedapi/esdsl/stringifiedboolean.go index 49b33a4ccf..306c8f6c1f 100644 --- a/typedapi/esdsl/stringifiedboolean.go +++ b/typedapi/esdsl/stringifiedboolean.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stringifieddouble.go b/typedapi/esdsl/stringifieddouble.go new file mode 100644 index 0000000000..3c027448cb --- /dev/null +++ b/typedapi/esdsl/stringifieddouble.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +// This is provide all the types that are part of the union. +type _stringifieddouble struct { + v types.Stringifieddouble +} + +func NewStringifieddouble() *_stringifieddouble { + return &_stringifieddouble{v: nil} +} + +func (u *_stringifieddouble) Float64(float64 types.Float64) *_stringifieddouble { + + u.v = &float64 + + return u +} + +func (u *_stringifieddouble) String(string string) *_stringifieddouble { + + u.v = &string + + return u +} + +func (u *_stringifieddouble) StringifieddoubleCaster() *types.Stringifieddouble { + return &u.v +} diff --git a/typedapi/esdsl/stringifiedepochtimeunitmillis.go b/typedapi/esdsl/stringifiedepochtimeunitmillis.go index dc5250dc7b..e1ae3cf3a7 100644 --- a/typedapi/esdsl/stringifiedepochtimeunitmillis.go +++ b/typedapi/esdsl/stringifiedepochtimeunitmillis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stringifiedinteger.go b/typedapi/esdsl/stringifiedinteger.go index 0e27583757..b2ea8c58a6 100644 --- a/typedapi/esdsl/stringifiedinteger.go +++ b/typedapi/esdsl/stringifiedinteger.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stringstatsaggregation.go b/typedapi/esdsl/stringstatsaggregation.go index f686580662..7ba30cfdc1 100644 --- a/typedapi/esdsl/stringstatsaggregation.go +++ b/typedapi/esdsl/stringstatsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/stupidbackoffsmoothingmodel.go b/typedapi/esdsl/stupidbackoffsmoothingmodel.go index ada6450a69..9c33223284 100644 --- a/typedapi/esdsl/stupidbackoffsmoothingmodel.go +++ b/typedapi/esdsl/stupidbackoffsmoothingmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/suggestcontext.go b/typedapi/esdsl/suggestcontext.go index 75e26bbea1..6344826d5b 100644 --- a/typedapi/esdsl/suggestcontext.go +++ b/typedapi/esdsl/suggestcontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/suggester.go b/typedapi/esdsl/suggester.go index 58cfae740b..ccddee787c 100644 --- a/typedapi/esdsl/suggester.go +++ b/typedapi/esdsl/suggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/suggestfuzziness.go b/typedapi/esdsl/suggestfuzziness.go index 5c5e4fbe5f..ce9fccb16b 100644 --- a/typedapi/esdsl/suggestfuzziness.go +++ b/typedapi/esdsl/suggestfuzziness.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sumaggregation.go b/typedapi/esdsl/sumaggregation.go index bdd1456e19..1ad95ade9c 100644 --- a/typedapi/esdsl/sumaggregation.go +++ b/typedapi/esdsl/sumaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/sumbucketaggregation.go b/typedapi/esdsl/sumbucketaggregation.go index 8b3e9ffe04..cc1ebcdffe 100644 --- a/typedapi/esdsl/sumbucketaggregation.go +++ b/typedapi/esdsl/sumbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/swedishanalyzer.go b/typedapi/esdsl/swedishanalyzer.go index ab9987379a..7c445a6657 100644 --- a/typedapi/esdsl/swedishanalyzer.go +++ b/typedapi/esdsl/swedishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/synccontainer.go b/typedapi/esdsl/synccontainer.go index e17ff3245b..26bd6c5165 100644 --- a/typedapi/esdsl/synccontainer.go +++ b/typedapi/esdsl/synccontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _syncContainer struct { v *types.SyncContainer @@ -34,18 +30,6 @@ func NewSyncContainer() *_syncContainer { return &_syncContainer{v: types.NewSyncContainer()} } -// AdditionalSyncContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_syncContainer) AdditionalSyncContainerProperty(key string, value json.RawMessage) *_syncContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalSyncContainerProperty = tmp - return s -} - func (s *_syncContainer) Time(time types.TimeSyncVariant) *_syncContainer { s.v.Time = time.TimeSyncCaster() diff --git a/typedapi/esdsl/syncrulesfeature.go b/typedapi/esdsl/syncrulesfeature.go index 01a9ec384a..73cdaebbba 100644 --- a/typedapi/esdsl/syncrulesfeature.go +++ b/typedapi/esdsl/syncrulesfeature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/synonymgraphtokenfilter.go b/typedapi/esdsl/synonymgraphtokenfilter.go index fbc710c364..1308037918 100644 --- a/typedapi/esdsl/synonymgraphtokenfilter.go +++ b/typedapi/esdsl/synonymgraphtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/synonymrule.go b/typedapi/esdsl/synonymrule.go index 213c1a16fc..5d2f6d3514 100644 --- a/typedapi/esdsl/synonymrule.go +++ b/typedapi/esdsl/synonymrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/synonymtokenfilter.go b/typedapi/esdsl/synonymtokenfilter.go index f94332296e..ebaf832935 100644 --- a/typedapi/esdsl/synonymtokenfilter.go +++ b/typedapi/esdsl/synonymtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tablevaluescontainer.go b/typedapi/esdsl/tablevaluescontainer.go index fb80cafcfe..3719f7de03 100644 --- a/typedapi/esdsl/tablevaluescontainer.go +++ b/typedapi/esdsl/tablevaluescontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _tableValuesContainer struct { v *types.TableValuesContainer @@ -34,18 +30,6 @@ func NewTableValuesContainer() *_tableValuesContainer { return &_tableValuesContainer{v: types.NewTableValuesContainer()} } -// AdditionalTableValuesContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_tableValuesContainer) AdditionalTableValuesContainerProperty(key string, value json.RawMessage) *_tableValuesContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalTableValuesContainerProperty = tmp - return s -} - func (s *_tableValuesContainer) Float64(float64s ...[]types.Float64) *_tableValuesContainer { for _, v := range float64s { diff --git a/typedapi/esdsl/tablevaluesintegervalue.go b/typedapi/esdsl/tablevaluesintegervalue.go index da26ea175b..4c7a8415fc 100644 --- a/typedapi/esdsl/tablevaluesintegervalue.go +++ b/typedapi/esdsl/tablevaluesintegervalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tablevalueskeywordvalue.go b/typedapi/esdsl/tablevalueskeywordvalue.go index 5e76502e6f..e5be87a84e 100644 --- a/typedapi/esdsl/tablevalueskeywordvalue.go +++ b/typedapi/esdsl/tablevalueskeywordvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tablevalueslongdouble.go b/typedapi/esdsl/tablevalueslongdouble.go index 8d4d50caed..f36d4774c6 100644 --- a/typedapi/esdsl/tablevalueslongdouble.go +++ b/typedapi/esdsl/tablevalueslongdouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tablevalueslongvalue.go b/typedapi/esdsl/tablevalueslongvalue.go index ff338d7303..9e7c2ce41f 100644 --- a/typedapi/esdsl/tablevalueslongvalue.go +++ b/typedapi/esdsl/tablevalueslongvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/targetmeanencodingpreprocessor.go b/typedapi/esdsl/targetmeanencodingpreprocessor.go index 0828875622..074ed3cf0c 100644 --- a/typedapi/esdsl/targetmeanencodingpreprocessor.go +++ b/typedapi/esdsl/targetmeanencodingpreprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tdigest.go b/typedapi/esdsl/tdigest.go index a0ccaba0d0..f6fe5c715d 100644 --- a/typedapi/esdsl/tdigest.go +++ b/typedapi/esdsl/tdigest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/templateconfig.go b/typedapi/esdsl/templateconfig.go index 799cfe52fa..94e4b82c98 100644 --- a/typedapi/esdsl/templateconfig.go +++ b/typedapi/esdsl/templateconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/terminateprocessor.go b/typedapi/esdsl/terminateprocessor.go index e59ebdf53f..faddb5f076 100644 --- a/typedapi/esdsl/terminateprocessor.go +++ b/typedapi/esdsl/terminateprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termquery.go b/typedapi/esdsl/termquery.go index f107107871..89123d3470 100644 --- a/typedapi/esdsl/termquery.go +++ b/typedapi/esdsl/termquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -27,7 +27,7 @@ type _termQuery struct { v *types.TermQuery } -// Returns users that contain an exact term in a provided field. +// Returns roles that contain an exact term in a provided field. // To return a document, the query term must exactly match the queried field's // value, including whitespace and capitalization. func NewTermQuery(field string, value types.FieldValueVariant) *_termQuery { diff --git a/typedapi/esdsl/termrangequery.go b/typedapi/esdsl/termrangequery.go index 4177c898b0..fcbaa31431 100644 --- a/typedapi/esdsl/termrangequery.go +++ b/typedapi/esdsl/termrangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termsaggregation.go b/typedapi/esdsl/termsaggregation.go index 15175e2e65..515a052f2f 100644 --- a/typedapi/esdsl/termsaggregation.go +++ b/typedapi/esdsl/termsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termsexclude.go b/typedapi/esdsl/termsexclude.go index 702d9e205f..c8e2f05ec0 100644 --- a/typedapi/esdsl/termsexclude.go +++ b/typedapi/esdsl/termsexclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termsgrouping.go b/typedapi/esdsl/termsgrouping.go index 102573a79c..786936d9b2 100644 --- a/typedapi/esdsl/termsgrouping.go +++ b/typedapi/esdsl/termsgrouping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termsinclude.go b/typedapi/esdsl/termsinclude.go index f10e6fcc94..79c2be58fd 100644 --- a/typedapi/esdsl/termsinclude.go +++ b/typedapi/esdsl/termsinclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termslookup.go b/typedapi/esdsl/termslookup.go index ea5b6c244b..39158adf36 100644 --- a/typedapi/esdsl/termslookup.go +++ b/typedapi/esdsl/termslookup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -53,9 +53,9 @@ func (s *_termsLookup) Path(field string) *_termsLookup { return s } -func (s *_termsLookup) Routing(routing string) *_termsLookup { +func (s *_termsLookup) Routing(routings ...string) *_termsLookup { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/termspartition.go b/typedapi/esdsl/termspartition.go index 4028787a45..2bb2dfa885 100644 --- a/typedapi/esdsl/termspartition.go +++ b/typedapi/esdsl/termspartition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termsquery.go b/typedapi/esdsl/termsquery.go index 76ff5e3841..1477bb0ce6 100644 --- a/typedapi/esdsl/termsquery.go +++ b/typedapi/esdsl/termsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termsqueryfield.go b/typedapi/esdsl/termsqueryfield.go index bd02d2bfdd..9bd50a5770 100644 --- a/typedapi/esdsl/termsqueryfield.go +++ b/typedapi/esdsl/termsqueryfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termssetquery.go b/typedapi/esdsl/termssetquery.go index ee047dcf2d..35789f05e8 100644 --- a/typedapi/esdsl/termssetquery.go +++ b/typedapi/esdsl/termssetquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termsuggester.go b/typedapi/esdsl/termsuggester.go index b39918f928..d38a456957 100644 --- a/typedapi/esdsl/termsuggester.go +++ b/typedapi/esdsl/termsuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/termvectorsfilter.go b/typedapi/esdsl/termvectorsfilter.go index bc302262db..6929d78246 100644 --- a/typedapi/esdsl/termvectorsfilter.go +++ b/typedapi/esdsl/termvectorsfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/testpopulation.go b/typedapi/esdsl/testpopulation.go index 064a0a2af6..5785038563 100644 --- a/typedapi/esdsl/testpopulation.go +++ b/typedapi/esdsl/testpopulation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/textclassificationinferenceoptions.go b/typedapi/esdsl/textclassificationinferenceoptions.go index 9586499fcf..0858a08290 100644 --- a/typedapi/esdsl/textclassificationinferenceoptions.go +++ b/typedapi/esdsl/textclassificationinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/textclassificationinferenceupdateoptions.go b/typedapi/esdsl/textclassificationinferenceupdateoptions.go index 71aa3e559f..64f647505a 100644 --- a/typedapi/esdsl/textclassificationinferenceupdateoptions.go +++ b/typedapi/esdsl/textclassificationinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/textembedding.go b/typedapi/esdsl/textembedding.go index 421118ff83..ac045d93e9 100644 --- a/typedapi/esdsl/textembedding.go +++ b/typedapi/esdsl/textembedding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -26,12 +26,10 @@ type _textEmbedding struct { v *types.TextEmbedding } -func NewTextEmbedding(modelid string, modeltext string) *_textEmbedding { +func NewTextEmbedding(modeltext string) *_textEmbedding { tmp := &_textEmbedding{v: types.NewTextEmbedding()} - tmp.ModelId(modelid) - tmp.ModelText(modeltext) return tmp @@ -40,7 +38,7 @@ func NewTextEmbedding(modelid string, modeltext string) *_textEmbedding { func (s *_textEmbedding) ModelId(modelid string) *_textEmbedding { - s.v.ModelId = modelid + s.v.ModelId = &modelid return s } diff --git a/typedapi/esdsl/textembeddinginferenceoptions.go b/typedapi/esdsl/textembeddinginferenceoptions.go index d8fa482818..5e777afc3b 100644 --- a/typedapi/esdsl/textembeddinginferenceoptions.go +++ b/typedapi/esdsl/textembeddinginferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -27,13 +27,9 @@ type _textEmbeddingInferenceOptions struct { } // Text embedding configuration for inference. -func NewTextEmbeddingInferenceOptions(vocabulary types.VocabularyVariant) *_textEmbeddingInferenceOptions { +func NewTextEmbeddingInferenceOptions() *_textEmbeddingInferenceOptions { - tmp := &_textEmbeddingInferenceOptions{v: types.NewTextEmbeddingInferenceOptions()} - - tmp.Vocabulary(vocabulary) - - return tmp + return &_textEmbeddingInferenceOptions{v: types.NewTextEmbeddingInferenceOptions()} } @@ -60,7 +56,7 @@ func (s *_textEmbeddingInferenceOptions) Tokenization(tokenization types.Tokeniz func (s *_textEmbeddingInferenceOptions) Vocabulary(vocabulary types.VocabularyVariant) *_textEmbeddingInferenceOptions { - s.v.Vocabulary = *vocabulary.VocabularyCaster() + s.v.Vocabulary = vocabulary.VocabularyCaster() return s } diff --git a/typedapi/esdsl/textembeddinginferenceupdateoptions.go b/typedapi/esdsl/textembeddinginferenceupdateoptions.go index 765fcd4fd8..27fac8f40f 100644 --- a/typedapi/esdsl/textembeddinginferenceupdateoptions.go +++ b/typedapi/esdsl/textembeddinginferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/textexpansioninferenceoptions.go b/typedapi/esdsl/textexpansioninferenceoptions.go index 72c0449253..ad77128022 100644 --- a/typedapi/esdsl/textexpansioninferenceoptions.go +++ b/typedapi/esdsl/textexpansioninferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -27,13 +27,9 @@ type _textExpansionInferenceOptions struct { } // Text expansion configuration for inference. -func NewTextExpansionInferenceOptions(vocabulary types.VocabularyVariant) *_textExpansionInferenceOptions { +func NewTextExpansionInferenceOptions() *_textExpansionInferenceOptions { - tmp := &_textExpansionInferenceOptions{v: types.NewTextExpansionInferenceOptions()} - - tmp.Vocabulary(vocabulary) - - return tmp + return &_textExpansionInferenceOptions{v: types.NewTextExpansionInferenceOptions()} } @@ -53,7 +49,7 @@ func (s *_textExpansionInferenceOptions) Tokenization(tokenization types.Tokeniz func (s *_textExpansionInferenceOptions) Vocabulary(vocabulary types.VocabularyVariant) *_textExpansionInferenceOptions { - s.v.Vocabulary = *vocabulary.VocabularyCaster() + s.v.Vocabulary = vocabulary.VocabularyCaster() return s } diff --git a/typedapi/esdsl/textexpansioninferenceupdateoptions.go b/typedapi/esdsl/textexpansioninferenceupdateoptions.go index 37db285651..4bc4e96279 100644 --- a/typedapi/esdsl/textexpansioninferenceupdateoptions.go +++ b/typedapi/esdsl/textexpansioninferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/textexpansionquery.go b/typedapi/esdsl/textexpansionquery.go index 4e850af970..37268e6dae 100644 --- a/typedapi/esdsl/textexpansionquery.go +++ b/typedapi/esdsl/textexpansionquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/textindexprefixes.go b/typedapi/esdsl/textindexprefixes.go index 4e777ea445..c17c3c9dda 100644 --- a/typedapi/esdsl/textindexprefixes.go +++ b/typedapi/esdsl/textindexprefixes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/textproperty.go b/typedapi/esdsl/textproperty.go index 0ca9069ab6..7ef8543bc1 100644 --- a/typedapi/esdsl/textproperty.go +++ b/typedapi/esdsl/textproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/textsimilarityreranker.go b/typedapi/esdsl/textsimilarityreranker.go index 6beb56290b..ed6fa41754 100644 --- a/typedapi/esdsl/textsimilarityreranker.go +++ b/typedapi/esdsl/textsimilarityreranker.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -42,6 +42,13 @@ func NewTextSimilarityReranker(field string, inferencetext string, retriever typ } +func (s *_textSimilarityReranker) ChunkRescorer(chunkrescorer types.ChunkRescorerVariant) *_textSimilarityReranker { + + s.v.ChunkRescorer = chunkrescorer.ChunkRescorerCaster() + + return s +} + func (s *_textSimilarityReranker) Field(field string) *_textSimilarityReranker { s.v.Field = field diff --git a/typedapi/esdsl/texttoanalyze.go b/typedapi/esdsl/texttoanalyze.go index 6c4cf184ab..da442a6428 100644 --- a/typedapi/esdsl/texttoanalyze.go +++ b/typedapi/esdsl/texttoanalyze.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/thaianalyzer.go b/typedapi/esdsl/thaianalyzer.go index e7b4ac481c..329871aeb6 100644 --- a/typedapi/esdsl/thaianalyzer.go +++ b/typedapi/esdsl/thaianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/thaitokenizer.go b/typedapi/esdsl/thaitokenizer.go index 31680bdcb5..71deaf7391 100644 --- a/typedapi/esdsl/thaitokenizer.go +++ b/typedapi/esdsl/thaitokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/thinkingconfig.go b/typedapi/esdsl/thinkingconfig.go new file mode 100644 index 0000000000..a09863387d --- /dev/null +++ b/typedapi/esdsl/thinkingconfig.go @@ -0,0 +1,44 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _thinkingConfig struct { + v *types.ThinkingConfig +} + +func NewThinkingConfig() *_thinkingConfig { + + return &_thinkingConfig{v: types.NewThinkingConfig()} + +} + +func (s *_thinkingConfig) ThinkingBudget(thinkingbudget int) *_thinkingConfig { + + s.v.ThinkingBudget = &thinkingbudget + + return s +} + +func (s *_thinkingConfig) ThinkingConfigCaster() *types.ThinkingConfig { + return s.v +} diff --git a/typedapi/esdsl/throttlestate.go b/typedapi/esdsl/throttlestate.go index c0a0dc1a0a..8a051a5855 100644 --- a/typedapi/esdsl/throttlestate.go +++ b/typedapi/esdsl/throttlestate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/timeofmonth.go b/typedapi/esdsl/timeofmonth.go index 984db498f6..9e7dbd7c45 100644 --- a/typedapi/esdsl/timeofmonth.go +++ b/typedapi/esdsl/timeofmonth.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/timeofweek.go b/typedapi/esdsl/timeofweek.go index 8732711e54..7bf58fbd3e 100644 --- a/typedapi/esdsl/timeofweek.go +++ b/typedapi/esdsl/timeofweek.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/timeofyear.go b/typedapi/esdsl/timeofyear.go index bbd387b774..cb7728c5e0 100644 --- a/typedapi/esdsl/timeofyear.go +++ b/typedapi/esdsl/timeofyear.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/timeseriesaggregation.go b/typedapi/esdsl/timeseriesaggregation.go index f872ad2bb9..459d194794 100644 --- a/typedapi/esdsl/timeseriesaggregation.go +++ b/typedapi/esdsl/timeseriesaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/timesync.go b/typedapi/esdsl/timesync.go index 9300e28585..96e404d94c 100644 --- a/typedapi/esdsl/timesync.go +++ b/typedapi/esdsl/timesync.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tokencountproperty.go b/typedapi/esdsl/tokencountproperty.go index 2052d3ef54..6197ff2baa 100644 --- a/typedapi/esdsl/tokencountproperty.go +++ b/typedapi/esdsl/tokencountproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tokenfilter.go b/typedapi/esdsl/tokenfilter.go index 9d9fe6da88..983d4d59f7 100644 --- a/typedapi/esdsl/tokenfilter.go +++ b/typedapi/esdsl/tokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tokenfilterdefinition.go b/typedapi/esdsl/tokenfilterdefinition.go index 3219017be6..c9ff3910a2 100644 --- a/typedapi/esdsl/tokenfilterdefinition.go +++ b/typedapi/esdsl/tokenfilterdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tokenizationconfigcontainer.go b/typedapi/esdsl/tokenizationconfigcontainer.go index 1b183e8bea..83bd67589d 100644 --- a/typedapi/esdsl/tokenizationconfigcontainer.go +++ b/typedapi/esdsl/tokenizationconfigcontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _tokenizationConfigContainer struct { v *types.TokenizationConfigContainer @@ -34,18 +30,6 @@ func NewTokenizationConfigContainer() *_tokenizationConfigContainer { return &_tokenizationConfigContainer{v: types.NewTokenizationConfigContainer()} } -// AdditionalTokenizationConfigContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_tokenizationConfigContainer) AdditionalTokenizationConfigContainerProperty(key string, value json.RawMessage) *_tokenizationConfigContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalTokenizationConfigContainerProperty = tmp - return s -} - func (s *_tokenizationConfigContainer) Bert(bert types.NlpBertTokenizationConfigVariant) *_tokenizationConfigContainer { s.v.Bert = bert.NlpBertTokenizationConfigCaster() diff --git a/typedapi/esdsl/tokenizer.go b/typedapi/esdsl/tokenizer.go index 3cd391ba04..88182de2df 100644 --- a/typedapi/esdsl/tokenizer.go +++ b/typedapi/esdsl/tokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tokenizerdefinition.go b/typedapi/esdsl/tokenizerdefinition.go index d2520521b6..860549143e 100644 --- a/typedapi/esdsl/tokenizerdefinition.go +++ b/typedapi/esdsl/tokenizerdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tokenpruningconfig.go b/typedapi/esdsl/tokenpruningconfig.go index bf59526c0b..f6beda70ef 100644 --- a/typedapi/esdsl/tokenpruningconfig.go +++ b/typedapi/esdsl/tokenpruningconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/toolcall.go b/typedapi/esdsl/toolcall.go index 1e641ef7fc..7d5ca4f791 100644 --- a/typedapi/esdsl/toolcall.go +++ b/typedapi/esdsl/toolcall.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/toolcallfunction.go b/typedapi/esdsl/toolcallfunction.go index 65c1468286..70125fe44a 100644 --- a/typedapi/esdsl/toolcallfunction.go +++ b/typedapi/esdsl/toolcallfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/tophitsaggregation.go b/typedapi/esdsl/tophitsaggregation.go index 92a6fb09dc..061ee21bca 100644 --- a/typedapi/esdsl/tophitsaggregation.go +++ b/typedapi/esdsl/tophitsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/topleftbottomrightgeobounds.go b/typedapi/esdsl/topleftbottomrightgeobounds.go index 3761ad59e8..4cd6b6a899 100644 --- a/typedapi/esdsl/topleftbottomrightgeobounds.go +++ b/typedapi/esdsl/topleftbottomrightgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/topmetricsaggregation.go b/typedapi/esdsl/topmetricsaggregation.go index d3386382a6..67e3846a7b 100644 --- a/typedapi/esdsl/topmetricsaggregation.go +++ b/typedapi/esdsl/topmetricsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/topmetricsvalue.go b/typedapi/esdsl/topmetricsvalue.go index 48d47a2f36..8aeca6cd17 100644 --- a/typedapi/esdsl/topmetricsvalue.go +++ b/typedapi/esdsl/topmetricsvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/toprightbottomleftgeobounds.go b/typedapi/esdsl/toprightbottomleftgeobounds.go index 085a5cac1c..4b269a50fe 100644 --- a/typedapi/esdsl/toprightbottomleftgeobounds.go +++ b/typedapi/esdsl/toprightbottomleftgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/trackhits.go b/typedapi/esdsl/trackhits.go index 797fc6c7ba..cb25065ff8 100644 --- a/typedapi/esdsl/trackhits.go +++ b/typedapi/esdsl/trackhits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/trainedmodel.go b/typedapi/esdsl/trainedmodel.go index 60641cd60d..d1ff0a9f35 100644 --- a/typedapi/esdsl/trainedmodel.go +++ b/typedapi/esdsl/trainedmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/trainedmodelprefixstrings.go b/typedapi/esdsl/trainedmodelprefixstrings.go index aa0b5e1b3a..d2bab225d6 100644 --- a/typedapi/esdsl/trainedmodelprefixstrings.go +++ b/typedapi/esdsl/trainedmodelprefixstrings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/trainedmodeltree.go b/typedapi/esdsl/trainedmodeltree.go index c03e8fc0c8..8bd12a22f9 100644 --- a/typedapi/esdsl/trainedmodeltree.go +++ b/typedapi/esdsl/trainedmodeltree.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/trainedmodeltreenode.go b/typedapi/esdsl/trainedmodeltreenode.go index fc660c1d76..2cbdbc084b 100644 --- a/typedapi/esdsl/trainedmodeltreenode.go +++ b/typedapi/esdsl/trainedmodeltreenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/transformcontainer.go b/typedapi/esdsl/transformcontainer.go index 6851417bab..6e065ae3e5 100644 --- a/typedapi/esdsl/transformcontainer.go +++ b/typedapi/esdsl/transformcontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _transformContainer struct { v *types.TransformContainer @@ -34,18 +30,6 @@ func NewTransformContainer() *_transformContainer { return &_transformContainer{v: types.NewTransformContainer()} } -// AdditionalTransformContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_transformContainer) AdditionalTransformContainerProperty(key string, value json.RawMessage) *_transformContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalTransformContainerProperty = tmp - return s -} - func (s *_transformContainer) Chain(chains ...types.TransformContainerVariant) *_transformContainer { for _, v := range chains { diff --git a/typedapi/esdsl/transformdestination.go b/typedapi/esdsl/transformdestination.go index b31a076a2b..d30c0c204d 100644 --- a/typedapi/esdsl/transformdestination.go +++ b/typedapi/esdsl/transformdestination.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/transformsource.go b/typedapi/esdsl/transformsource.go index fbc3ad8712..3b669c9df1 100644 --- a/typedapi/esdsl/transformsource.go +++ b/typedapi/esdsl/transformsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/translog.go b/typedapi/esdsl/translog.go index 7a4dac627a..b456f5dd66 100644 --- a/typedapi/esdsl/translog.go +++ b/typedapi/esdsl/translog.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/translogretention.go b/typedapi/esdsl/translogretention.go index 4fd56d8b3f..df6f07ab27 100644 --- a/typedapi/esdsl/translogretention.go +++ b/typedapi/esdsl/translogretention.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/triggercontainer.go b/typedapi/esdsl/triggercontainer.go index e79acf921a..716f77ed22 100644 --- a/typedapi/esdsl/triggercontainer.go +++ b/typedapi/esdsl/triggercontainer.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _triggerContainer struct { v *types.TriggerContainer @@ -34,18 +30,6 @@ func NewTriggerContainer() *_triggerContainer { return &_triggerContainer{v: types.NewTriggerContainer()} } -// AdditionalTriggerContainerProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_triggerContainer) AdditionalTriggerContainerProperty(key string, value json.RawMessage) *_triggerContainer { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalTriggerContainerProperty = tmp - return s -} - func (s *_triggerContainer) Schedule(schedule types.ScheduleContainerVariant) *_triggerContainer { s.v.Schedule = schedule.ScheduleContainerCaster() diff --git a/typedapi/esdsl/trimprocessor.go b/typedapi/esdsl/trimprocessor.go index e6dda3ff00..c114360d7e 100644 --- a/typedapi/esdsl/trimprocessor.go +++ b/typedapi/esdsl/trimprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/trimtokenfilter.go b/typedapi/esdsl/trimtokenfilter.go index 4ed7b499c5..b993329547 100644 --- a/typedapi/esdsl/trimtokenfilter.go +++ b/typedapi/esdsl/trimtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/truncatetokenfilter.go b/typedapi/esdsl/truncatetokenfilter.go index 4e7f3bd061..efa6520ee6 100644 --- a/typedapi/esdsl/truncatetokenfilter.go +++ b/typedapi/esdsl/truncatetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/ttestaggregation.go b/typedapi/esdsl/ttestaggregation.go index bb6e6d71cc..39381b6ceb 100644 --- a/typedapi/esdsl/ttestaggregation.go +++ b/typedapi/esdsl/ttestaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/turkishanalyzer.go b/typedapi/esdsl/turkishanalyzer.go index 8cab63e846..6ed18e2777 100644 --- a/typedapi/esdsl/turkishanalyzer.go +++ b/typedapi/esdsl/turkishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/typemapping.go b/typedapi/esdsl/typemapping.go index 9828f660fd..a2a2f6cd06 100644 --- a/typedapi/esdsl/typemapping.go +++ b/typedapi/esdsl/typemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/typequery.go b/typedapi/esdsl/typequery.go index f58b48431f..83ec508334 100644 --- a/typedapi/esdsl/typequery.go +++ b/typedapi/esdsl/typequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/uaxemailurltokenizer.go b/typedapi/esdsl/uaxemailurltokenizer.go index c328255248..73ce253e07 100644 --- a/typedapi/esdsl/uaxemailurltokenizer.go +++ b/typedapi/esdsl/uaxemailurltokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/uniquetokenfilter.go b/typedapi/esdsl/uniquetokenfilter.go index 8fefca822c..498c3b409d 100644 --- a/typedapi/esdsl/uniquetokenfilter.go +++ b/typedapi/esdsl/uniquetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/unsignedlongnumberproperty.go b/typedapi/esdsl/unsignedlongnumberproperty.go index 316df22781..edaa8fa463 100644 --- a/typedapi/esdsl/unsignedlongnumberproperty.go +++ b/typedapi/esdsl/unsignedlongnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/untypeddecayfunction.go b/typedapi/esdsl/untypeddecayfunction.go index 655d4059a7..0c82b29ba7 100644 --- a/typedapi/esdsl/untypeddecayfunction.go +++ b/typedapi/esdsl/untypeddecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/untypeddistancefeaturequery.go b/typedapi/esdsl/untypeddistancefeaturequery.go index 01978efafa..c6c377ad1b 100644 --- a/typedapi/esdsl/untypeddistancefeaturequery.go +++ b/typedapi/esdsl/untypeddistancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/untypedrangequery.go b/typedapi/esdsl/untypedrangequery.go index c19d3ceffa..a066fa46cc 100644 --- a/typedapi/esdsl/untypedrangequery.go +++ b/typedapi/esdsl/untypedrangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -32,7 +32,7 @@ type _untypedRangeQuery struct { v *types.UntypedRangeQuery } -// Returns documents that contain terms within a provided range. +// Returns roles that contain terms within a provided range. func NewUntypedRangeQuery(key string) *_untypedRangeQuery { return &_untypedRangeQuery{ k: key, diff --git a/typedapi/esdsl/updateaction.go b/typedapi/esdsl/updateaction.go index fcd599032b..64ed0ef2b6 100644 --- a/typedapi/esdsl/updateaction.go +++ b/typedapi/esdsl/updateaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/updateoperation.go b/typedapi/esdsl/updateoperation.go index 706966945e..359689550d 100644 --- a/typedapi/esdsl/updateoperation.go +++ b/typedapi/esdsl/updateoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -79,9 +79,9 @@ func (s *_updateOperation) RetryOnConflict(retryonconflict int) *_updateOperatio return s } -func (s *_updateOperation) Routing(routing string) *_updateOperation { +func (s *_updateOperation) Routing(routings ...string) *_updateOperation { - s.v.Routing = &routing + s.v.Routing = routings return s } diff --git a/typedapi/esdsl/uppercaseprocessor.go b/typedapi/esdsl/uppercaseprocessor.go index f29e9e4798..e59b828284 100644 --- a/typedapi/esdsl/uppercaseprocessor.go +++ b/typedapi/esdsl/uppercaseprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/uppercasetokenfilter.go b/typedapi/esdsl/uppercasetokenfilter.go index 92a4e1edf2..aef2d557ea 100644 --- a/typedapi/esdsl/uppercasetokenfilter.go +++ b/typedapi/esdsl/uppercasetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/uripartsprocessor.go b/typedapi/esdsl/uripartsprocessor.go index feb9d5c1ac..9a5ff18e8d 100644 --- a/typedapi/esdsl/uripartsprocessor.go +++ b/typedapi/esdsl/uripartsprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/urldecodeprocessor.go b/typedapi/esdsl/urldecodeprocessor.go index 6f16182f65..0b0c4c6476 100644 --- a/typedapi/esdsl/urldecodeprocessor.go +++ b/typedapi/esdsl/urldecodeprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/useragentprocessor.go b/typedapi/esdsl/useragentprocessor.go index 261641ec66..158fe067f7 100644 --- a/typedapi/esdsl/useragentprocessor.go +++ b/typedapi/esdsl/useragentprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/userquerycontainer.go b/typedapi/esdsl/userquerycontainer.go index 6225e7b5f3..07c8a7227b 100644 --- a/typedapi/esdsl/userquerycontainer.go +++ b/typedapi/esdsl/userquerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/validation.go b/typedapi/esdsl/validation.go index 410cf2b96e..91f9a6c356 100644 --- a/typedapi/esdsl/validation.go +++ b/typedapi/esdsl/validation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/valuecountaggregation.go b/typedapi/esdsl/valuecountaggregation.go index e8d6f2860d..4c60dd504e 100644 --- a/typedapi/esdsl/valuecountaggregation.go +++ b/typedapi/esdsl/valuecountaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/variablewidthhistogramaggregation.go b/typedapi/esdsl/variablewidthhistogramaggregation.go index a413f8b505..290a1f9a75 100644 --- a/typedapi/esdsl/variablewidthhistogramaggregation.go +++ b/typedapi/esdsl/variablewidthhistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/versionproperty.go b/typedapi/esdsl/versionproperty.go index 71d9743ef2..c131886a44 100644 --- a/typedapi/esdsl/versionproperty.go +++ b/typedapi/esdsl/versionproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/vertexdefinition.go b/typedapi/esdsl/vertexdefinition.go index dfbe34b1f7..3ffbc00056 100644 --- a/typedapi/esdsl/vertexdefinition.go +++ b/typedapi/esdsl/vertexdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/vertexinclude.go b/typedapi/esdsl/vertexinclude.go index c4ab5b10bb..45a5b29c69 100644 --- a/typedapi/esdsl/vertexinclude.go +++ b/typedapi/esdsl/vertexinclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/vocabulary.go b/typedapi/esdsl/vocabulary.go index 111782ea96..b3ee241727 100644 --- a/typedapi/esdsl/vocabulary.go +++ b/typedapi/esdsl/vocabulary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/voyageaiservicesettings.go b/typedapi/esdsl/voyageaiservicesettings.go index 8213f6a4b5..c1be37a39b 100644 --- a/typedapi/esdsl/voyageaiservicesettings.go +++ b/typedapi/esdsl/voyageaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/voyageaitasksettings.go b/typedapi/esdsl/voyageaitasksettings.go index 37ed643228..55b98198cb 100644 --- a/typedapi/esdsl/voyageaitasksettings.go +++ b/typedapi/esdsl/voyageaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/waitforsnapshotaction.go b/typedapi/esdsl/waitforsnapshotaction.go index 1463742344..78c46b898f 100644 --- a/typedapi/esdsl/waitforsnapshotaction.go +++ b/typedapi/esdsl/waitforsnapshotaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/watch.go b/typedapi/esdsl/watch.go index 2cbbc9274d..37538965b7 100644 --- a/typedapi/esdsl/watch.go +++ b/typedapi/esdsl/watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/watcheraction.go b/typedapi/esdsl/watcheraction.go index e82de7e67a..3627ac5096 100644 --- a/typedapi/esdsl/watcheraction.go +++ b/typedapi/esdsl/watcheraction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/watchercondition.go b/typedapi/esdsl/watchercondition.go index 24cced7b18..0ce1eb484c 100644 --- a/typedapi/esdsl/watchercondition.go +++ b/typedapi/esdsl/watchercondition.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl -import ( - "encoding/json" - - "github.com/elastic/go-elasticsearch/v9/typedapi/types" -) +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" type _watcherCondition struct { v *types.WatcherCondition @@ -34,18 +30,6 @@ func NewWatcherCondition() *_watcherCondition { return &_watcherCondition{v: types.NewWatcherCondition()} } -// AdditionalWatcherConditionProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_watcherCondition) AdditionalWatcherConditionProperty(key string, value json.RawMessage) *_watcherCondition { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalWatcherConditionProperty = tmp - return s -} - func (s *_watcherCondition) Always(always types.AlwaysConditionVariant) *_watcherCondition { s.v.Always = always.AlwaysConditionCaster() diff --git a/typedapi/esdsl/watcherinput.go b/typedapi/esdsl/watcherinput.go index d52504e374..c1841159e0 100644 --- a/typedapi/esdsl/watcherinput.go +++ b/typedapi/esdsl/watcherinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl @@ -34,18 +34,6 @@ func NewWatcherInput() *_watcherInput { return &_watcherInput{v: types.NewWatcherInput()} } -// AdditionalWatcherInputProperty is a single key dictionnary. -// It will replace the current value on each call. -func (s *_watcherInput) AdditionalWatcherInputProperty(key string, value json.RawMessage) *_watcherInput { - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - s.v.AdditionalWatcherInputProperty = tmp - return s -} - func (s *_watcherInput) Chain(chain types.ChainInputVariant) *_watcherInput { s.v.Chain = chain.ChainInputCaster() diff --git a/typedapi/esdsl/watcherstatusactions.go b/typedapi/esdsl/watcherstatusactions.go index 6ee304f028..b50fcac1fb 100644 --- a/typedapi/esdsl/watcherstatusactions.go +++ b/typedapi/esdsl/watcherstatusactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/watchstatus.go b/typedapi/esdsl/watchstatus.go index ec0813e310..27c8bac51c 100644 --- a/typedapi/esdsl/watchstatus.go +++ b/typedapi/esdsl/watchstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/watsonxservicesettings.go b/typedapi/esdsl/watsonxservicesettings.go index 28048c3640..c20dfa36f5 100644 --- a/typedapi/esdsl/watsonxservicesettings.go +++ b/typedapi/esdsl/watsonxservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/webhookaction.go b/typedapi/esdsl/webhookaction.go index bd1302a398..761388dc62 100644 --- a/typedapi/esdsl/webhookaction.go +++ b/typedapi/esdsl/webhookaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/weightedaverageaggregation.go b/typedapi/esdsl/weightedaverageaggregation.go index 5a42d1b213..b066df0013 100644 --- a/typedapi/esdsl/weightedaverageaggregation.go +++ b/typedapi/esdsl/weightedaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/weightedaveragevalue.go b/typedapi/esdsl/weightedaveragevalue.go index 9c63674ffa..cede206810 100644 --- a/typedapi/esdsl/weightedaveragevalue.go +++ b/typedapi/esdsl/weightedaveragevalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/weightedtokensquery.go b/typedapi/esdsl/weightedtokensquery.go index 916c6948bf..5ee42fee59 100644 --- a/typedapi/esdsl/weightedtokensquery.go +++ b/typedapi/esdsl/weightedtokensquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/weights.go b/typedapi/esdsl/weights.go index d31b99e854..459308687f 100644 --- a/typedapi/esdsl/weights.go +++ b/typedapi/esdsl/weights.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/whitespaceanalyzer.go b/typedapi/esdsl/whitespaceanalyzer.go index c6bd2c47c9..f88197a06c 100644 --- a/typedapi/esdsl/whitespaceanalyzer.go +++ b/typedapi/esdsl/whitespaceanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/whitespacetokenizer.go b/typedapi/esdsl/whitespacetokenizer.go index b391187922..35b415ed40 100644 --- a/typedapi/esdsl/whitespacetokenizer.go +++ b/typedapi/esdsl/whitespacetokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/wildcardproperty.go b/typedapi/esdsl/wildcardproperty.go index 2d3a381b08..3297b48657 100644 --- a/typedapi/esdsl/wildcardproperty.go +++ b/typedapi/esdsl/wildcardproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/wildcardquery.go b/typedapi/esdsl/wildcardquery.go index 022f5b8838..19497f9952 100644 --- a/typedapi/esdsl/wildcardquery.go +++ b/typedapi/esdsl/wildcardquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/wktgeobounds.go b/typedapi/esdsl/wktgeobounds.go index 377622c68e..60fd771369 100644 --- a/typedapi/esdsl/wktgeobounds.go +++ b/typedapi/esdsl/wktgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/worddelimitergraphtokenfilter.go b/typedapi/esdsl/worddelimitergraphtokenfilter.go index 4136179978..878407e5cd 100644 --- a/typedapi/esdsl/worddelimitergraphtokenfilter.go +++ b/typedapi/esdsl/worddelimitergraphtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/worddelimitertokenfilter.go b/typedapi/esdsl/worddelimitertokenfilter.go index 34eb28e54a..7f898b1939 100644 --- a/typedapi/esdsl/worddelimitertokenfilter.go +++ b/typedapi/esdsl/worddelimitertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/wrapperquery.go b/typedapi/esdsl/wrapperquery.go index 9f536d93ce..09fe9e9b50 100644 --- a/typedapi/esdsl/wrapperquery.go +++ b/typedapi/esdsl/wrapperquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/xlmrobertatokenizationconfig.go b/typedapi/esdsl/xlmrobertatokenizationconfig.go index 5567f7e2ba..17531c1ce0 100644 --- a/typedapi/esdsl/xlmrobertatokenizationconfig.go +++ b/typedapi/esdsl/xlmrobertatokenizationconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/zeroshotclassificationinferenceoptions.go b/typedapi/esdsl/zeroshotclassificationinferenceoptions.go index b4cace4cd2..8d3a8b3d81 100644 --- a/typedapi/esdsl/zeroshotclassificationinferenceoptions.go +++ b/typedapi/esdsl/zeroshotclassificationinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esdsl/zeroshotclassificationinferenceupdateoptions.go b/typedapi/esdsl/zeroshotclassificationinferenceupdateoptions.go index cd5ed4eef5..6cb37bae95 100644 --- a/typedapi/esdsl/zeroshotclassificationinferenceupdateoptions.go +++ b/typedapi/esdsl/zeroshotclassificationinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package esdsl diff --git a/typedapi/esql/asyncquery/async_query.go b/typedapi/esql/asyncquery/async_query.go index 967e992c12..1a5357d0ea 100644 --- a/typedapi/esql/asyncquery/async_query.go +++ b/typedapi/esql/asyncquery/async_query.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run an async ES|QL query. +// // Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its // progress, and retrieve results when they become available. // @@ -80,6 +81,7 @@ func NewAsyncQueryFunc(tp elastictransport.Interface) NewAsyncQuery { } // Run an async ES|QL query. +// // Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its // progress, and retrieve results when they become available. // @@ -425,8 +427,8 @@ func (r *AsyncQuery) Filter(filter types.QueryVariant) *AsyncQuery { return r } -// When set to `true` and performing a cross-cluster query, the response will -// include an extra `_clusters` +// When set to `true` and performing a cross-cluster/cross-project query, the +// response will include an extra `_clusters` // object with information about the clusters that participated in the search // along with info such as shards // count. @@ -442,6 +444,24 @@ func (r *AsyncQuery) IncludeCcsMetadata(includeccsmetadata bool) *AsyncQuery { return r } +// When set to `true`, the response will include an extra `_clusters` +// object with information about the clusters that participated in the search +// along with info such as shards +// count. +// This is similar to `include_ccs_metadata`, but it also returns metadata when +// the query is not CCS/CPS +// API name: include_execution_metadata +func (r *AsyncQuery) IncludeExecutionMetadata(includeexecutionmetadata bool) *AsyncQuery { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.IncludeExecutionMetadata = &includeexecutionmetadata + + return r +} + // The period for which the query and its results are stored in the cluster. // The default period is five days. // When this period expires, the query and its results are deleted, even if the diff --git a/typedapi/esql/asyncquery/request.go b/typedapi/esql/asyncquery/request.go index d66242da65..3ed6f65456 100644 --- a/typedapi/esql/asyncquery/request.go +++ b/typedapi/esql/asyncquery/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package asyncquery @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package asyncquery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/async_query/AsyncQueryRequest.ts#L28-L138 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/async_query/AsyncQueryRequest.ts#L28-L154 type Request struct { - // Columnar By default, ES|QL returns results as rows. For example, FROM returns each // individual document as one row. For the JSON, YAML, CBOR and smile formats, // ES|QL can return the results in a columnar fashion where one row represents @@ -44,12 +43,19 @@ type Request struct { // Filter Specify a Query DSL query in the filter parameter to filter the set of // documents that an ES|QL query runs on. Filter *types.Query `json:"filter,omitempty"` - // IncludeCcsMetadata When set to `true` and performing a cross-cluster query, the response will - // include an extra `_clusters` + // IncludeCcsMetadata When set to `true` and performing a cross-cluster/cross-project query, the + // response will include an extra `_clusters` // object with information about the clusters that participated in the search // along with info such as shards // count. IncludeCcsMetadata *bool `json:"include_ccs_metadata,omitempty"` + // IncludeExecutionMetadata When set to `true`, the response will include an extra `_clusters` + // object with information about the clusters that participated in the search + // along with info such as shards + // count. + // This is similar to `include_ccs_metadata`, but it also returns metadata when + // the query is not CCS/CPS + IncludeExecutionMetadata *bool `json:"include_execution_metadata,omitempty"` // KeepAlive The period for which the query and its results are stored in the cluster. // The default period is five days. // When this period expires, the query and its results are deleted, even if the @@ -157,6 +163,20 @@ func (s *Request) UnmarshalJSON(data []byte) error { s.IncludeCcsMetadata = &v } + case "include_execution_metadata": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "IncludeExecutionMetadata", err) + } + s.IncludeExecutionMetadata = &value + case bool: + s.IncludeExecutionMetadata = &v + } + case "keep_alive": if err := dec.Decode(&s.KeepAlive); err != nil { return fmt.Errorf("%s | %w", "KeepAlive", err) diff --git a/typedapi/esql/asyncquerydelete/async_query_delete.go b/typedapi/esql/asyncquerydelete/async_query_delete.go index 1abac8d2a3..784c018302 100644 --- a/typedapi/esql/asyncquerydelete/async_query_delete.go +++ b/typedapi/esql/asyncquerydelete/async_query_delete.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an async ES|QL query. +// // If the query is still running, it is cancelled. // Otherwise, the stored results are deleted. // @@ -85,6 +86,7 @@ func NewAsyncQueryDeleteFunc(tp elastictransport.Interface) NewAsyncQueryDelete } // Delete an async ES|QL query. +// // If the query is still running, it is cancelled. // Otherwise, the stored results are deleted. // diff --git a/typedapi/esql/asyncquerydelete/response.go b/typedapi/esql/asyncquerydelete/response.go index 033475eba3..bf1a8458f6 100644 --- a/typedapi/esql/asyncquerydelete/response.go +++ b/typedapi/esql/asyncquerydelete/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package asyncquerydelete // Response holds the response body struct for the package asyncquerydelete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/async_query_delete/AsyncQueryDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/async_query_delete/AsyncQueryDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/esql/asyncqueryget/async_query_get.go b/typedapi/esql/asyncqueryget/async_query_get.go index b4a4c8f1a2..efd0919e3f 100644 --- a/typedapi/esql/asyncqueryget/async_query_get.go +++ b/typedapi/esql/asyncqueryget/async_query_get.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get async ES|QL query results. +// // Get the current status and available results or stored results for an ES|QL // asynchronous query. // If the Elasticsearch security features are enabled, only the user who first @@ -82,6 +83,7 @@ func NewAsyncQueryGetFunc(tp elastictransport.Interface) NewAsyncQueryGet { } // Get async ES|QL query results. +// // Get the current status and available results or stored results for an ES|QL // asynchronous query. // If the Elasticsearch security features are enabled, only the user who first diff --git a/typedapi/esql/asyncquerystop/async_query_stop.go b/typedapi/esql/asyncquerystop/async_query_stop.go index 608087b9de..1a1161218c 100644 --- a/typedapi/esql/asyncquerystop/async_query_stop.go +++ b/typedapi/esql/asyncquerystop/async_query_stop.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Stop async ES|QL query. // diff --git a/typedapi/esql/getquery/get_query.go b/typedapi/esql/getquery/get_query.go index 3f351b9470..067a0ef605 100644 --- a/typedapi/esql/getquery/get_query.go +++ b/typedapi/esql/getquery/get_query.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a specific running ES|QL query information. +// // Returns an object extended information about a running ES|QL query. package getquery @@ -78,7 +79,10 @@ func NewGetQueryFunc(tp elastictransport.Interface) NewGetQuery { } // Get a specific running ES|QL query information. +// // Returns an object extended information about a running ES|QL query. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-query func New(tp elastictransport.Interface) *GetQuery { r := &GetQuery{ transport: tp, diff --git a/typedapi/esql/getquery/response.go b/typedapi/esql/getquery/response.go index c7a7c788c0..6440989c3f 100644 --- a/typedapi/esql/getquery/response.go +++ b/typedapi/esql/getquery/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getquery // Response holds the response body struct for the package getquery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/get_query/GetQueryResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/get_query/GetQueryResponse.ts#L23-L33 type Response struct { CoordinatingNode string `json:"coordinating_node"` DataNodes []string `json:"data_nodes"` diff --git a/typedapi/esql/listqueries/list_queries.go b/typedapi/esql/listqueries/list_queries.go index 523ab2224d..2df6167ee9 100644 --- a/typedapi/esql/listqueries/list_queries.go +++ b/typedapi/esql/listqueries/list_queries.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get running ES|QL queries information. +// // Returns an object containing IDs and other information about the running // ES|QL queries. package listqueries @@ -71,8 +72,11 @@ func NewListQueriesFunc(tp elastictransport.Interface) NewListQueries { } // Get running ES|QL queries information. +// // Returns an object containing IDs and other information about the running // ES|QL queries. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-list-queries func New(tp elastictransport.Interface) *ListQueries { r := &ListQueries{ transport: tp, diff --git a/typedapi/esql/listqueries/response.go b/typedapi/esql/listqueries/response.go index 6d80098822..a9e3888e9d 100644 --- a/typedapi/esql/listqueries/response.go +++ b/typedapi/esql/listqueries/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package listqueries @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listqueries // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/list_queries/ListQueriesResponse.ts#L32-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/list_queries/ListQueriesResponse.ts#L32-L36 type Response struct { Queries map[string]types.Body `json:"queries"` } diff --git a/typedapi/esql/query/query.go b/typedapi/esql/query/query.go index 3b1d8ca55e..12d0640b35 100644 --- a/typedapi/esql/query/query.go +++ b/typedapi/esql/query/query.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run an ES|QL query. +// // Get search results for an ES|QL (Elasticsearch query language) query. package query @@ -76,6 +77,7 @@ func NewQueryFunc(tp elastictransport.Interface) NewQuery { } // Run an ES|QL query. +// // Get search results for an ES|QL (Elasticsearch query language) query. // // https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest @@ -409,8 +411,8 @@ func (r *Query) Filter(filter types.QueryVariant) *Query { return r } -// When set to `true` and performing a cross-cluster query, the response will -// include an extra `_clusters` +// When set to `true` and performing a cross-cluster/cross-project query, the +// response will include an extra `_clusters` // object with information about the clusters that participated in the search // along with info such as shards // count. @@ -426,6 +428,24 @@ func (r *Query) IncludeCcsMetadata(includeccsmetadata bool) *Query { return r } +// When set to `true`, the response will include an extra `_clusters` +// object with information about the clusters that participated in the search +// along with info such as shards +// count. +// This is similar to `include_ccs_metadata`, but it also returns metadata when +// the query is not CCS/CPS +// API name: include_execution_metadata +func (r *Query) IncludeExecutionMetadata(includeexecutionmetadata bool) *Query { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.IncludeExecutionMetadata = &includeexecutionmetadata + + return r +} + // API name: locale func (r *Query) Locale(locale string) *Query { // Initialize the request if it is not already initialized diff --git a/typedapi/esql/query/request.go b/typedapi/esql/query/request.go index 95603bfc44..66837980bf 100644 --- a/typedapi/esql/query/request.go +++ b/typedapi/esql/query/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package query @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/query/QueryRequest.ts#L27-L115 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/query/QueryRequest.ts#L27-L125 type Request struct { - // Columnar By default, ES|QL returns results as rows. For example, FROM returns each // individual document as one row. For the JSON, YAML, CBOR and smile formats, // ES|QL can return the results in a columnar fashion where one row represents @@ -40,13 +39,20 @@ type Request struct { // Filter Specify a Query DSL query in the filter parameter to filter the set of // documents that an ES|QL query runs on. Filter *types.Query `json:"filter,omitempty"` - // IncludeCcsMetadata When set to `true` and performing a cross-cluster query, the response will - // include an extra `_clusters` + // IncludeCcsMetadata When set to `true` and performing a cross-cluster/cross-project query, the + // response will include an extra `_clusters` + // object with information about the clusters that participated in the search + // along with info such as shards + // count. + IncludeCcsMetadata *bool `json:"include_ccs_metadata,omitempty"` + // IncludeExecutionMetadata When set to `true`, the response will include an extra `_clusters` // object with information about the clusters that participated in the search // along with info such as shards // count. - IncludeCcsMetadata *bool `json:"include_ccs_metadata,omitempty"` - Locale *string `json:"locale,omitempty"` + // This is similar to `include_ccs_metadata`, but it also returns metadata when + // the query is not CCS/CPS + IncludeExecutionMetadata *bool `json:"include_execution_metadata,omitempty"` + Locale *string `json:"locale,omitempty"` // Params To avoid any attempts of hacking or code injection, extract the values in a // separate list of parameters. Use question mark placeholders (?) in the query // string for each of the parameters. diff --git a/typedapi/features/getfeatures/get_features.go b/typedapi/features/getfeatures/get_features.go index 9db7299332..c3b6b59750 100644 --- a/typedapi/features/getfeatures/get_features.go +++ b/typedapi/features/getfeatures/get_features.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the features. +// // Get a list of features that can be included in snapshots using the // `feature_states` field when creating a snapshot. // You can use this API to determine which feature states to include when taking @@ -86,6 +87,7 @@ func NewGetFeaturesFunc(tp elastictransport.Interface) NewGetFeatures { } // Get the features. +// // Get a list of features that can be included in snapshots using the // `feature_states` field when creating a snapshot. // You can use this API to determine which feature states to include when taking diff --git a/typedapi/features/getfeatures/response.go b/typedapi/features/getfeatures/response.go index be9d70fb42..1de4fc413b 100644 --- a/typedapi/features/getfeatures/response.go +++ b/typedapi/features/getfeatures/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getfeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfeatures // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/features/get_features/GetFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/features/get_features/GetFeaturesResponse.ts#L22-L26 type Response struct { Features []types.Feature `json:"features"` } diff --git a/typedapi/features/resetfeatures/reset_features.go b/typedapi/features/resetfeatures/reset_features.go index ade72e67b2..5b6b02eaf4 100644 --- a/typedapi/features/resetfeatures/reset_features.go +++ b/typedapi/features/resetfeatures/reset_features.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Reset the features. +// // Clear all of the state information stored in system indices by Elasticsearch // features, including the security and machine learning indices. // @@ -93,6 +94,7 @@ func NewResetFeaturesFunc(tp elastictransport.Interface) NewResetFeatures { } // Reset the features. +// // Clear all of the state information stored in system indices by Elasticsearch // features, including the security and machine learning indices. // diff --git a/typedapi/features/resetfeatures/response.go b/typedapi/features/resetfeatures/response.go index 28b0accfb1..cb56de7428 100644 --- a/typedapi/features/resetfeatures/response.go +++ b/typedapi/features/resetfeatures/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package resetfeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resetfeatures // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/features/reset_features/ResetFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/features/reset_features/ResetFeaturesResponse.ts#L22-L26 type Response struct { Features []types.Feature `json:"features"` } diff --git a/typedapi/fleet/deletesecret/delete_secret.go b/typedapi/fleet/deletesecret/delete_secret.go new file mode 100644 index 0000000000..98e19dd8a6 --- /dev/null +++ b/typedapi/fleet/deletesecret/delete_secret.go @@ -0,0 +1,342 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Deletes a secret stored by Fleet. +package deletesecret + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + idMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type DeleteSecret struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + id string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewDeleteSecret type alias for index. +type NewDeleteSecret func(id string) *DeleteSecret + +// NewDeleteSecretFunc returns a new instance of DeleteSecret with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewDeleteSecretFunc(tp elastictransport.Interface) NewDeleteSecret { + return func(id string) *DeleteSecret { + n := New(tp) + + n._id(id) + + return n + } +} + +// Deletes a secret stored by Fleet. +func New(tp elastictransport.Interface) *DeleteSecret { + r := &DeleteSecret{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *DeleteSecret) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == idMask: + path.WriteString("/") + path.WriteString("_fleet") + path.WriteString("/") + path.WriteString("secret") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.id) + } + path.WriteString(r.id) + + method = http.MethodDelete + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r DeleteSecret) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "fleet.delete_secret") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "fleet.delete_secret") + if reader := instrument.RecordRequestBody(ctx, "fleet.delete_secret", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "fleet.delete_secret") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the DeleteSecret query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a deletesecret.Response +func (r DeleteSecret) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "fleet.delete_secret") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r DeleteSecret) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "fleet.delete_secret") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the DeleteSecret query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the DeleteSecret headers map. +func (r *DeleteSecret) Header(key, value string) *DeleteSecret { + r.headers.Set(key, value) + + return r +} + +// Id The ID of the secret +// API Name: id +func (r *DeleteSecret) _id(id string) *DeleteSecret { + r.paramSet |= idMask + r.id = id + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *DeleteSecret) ErrorTrace(errortrace bool) *DeleteSecret { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *DeleteSecret) FilterPath(filterpaths ...string) *DeleteSecret { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *DeleteSecret) Human(human bool) *DeleteSecret { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *DeleteSecret) Pretty(pretty bool) *DeleteSecret { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/fleet/deletesecret/response.go b/typedapi/fleet/deletesecret/response.go new file mode 100644 index 0000000000..90ea72ab42 --- /dev/null +++ b/typedapi/fleet/deletesecret/response.go @@ -0,0 +1,34 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package deletesecret + +// Response holds the response body struct for the package deletesecret +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/fleet/delete_secret/FleetDeleteSecretResponse.ts#L20-L24 +type Response struct { + Deleted bool `json:"deleted"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/fleet/getsecret/get_secret.go b/typedapi/fleet/getsecret/get_secret.go new file mode 100644 index 0000000000..afc10338c3 --- /dev/null +++ b/typedapi/fleet/getsecret/get_secret.go @@ -0,0 +1,342 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Retrieves a secret stored by Fleet. +package getsecret + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + idMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type GetSecret struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + id string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetSecret type alias for index. +type NewGetSecret func(id string) *GetSecret + +// NewGetSecretFunc returns a new instance of GetSecret with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetSecretFunc(tp elastictransport.Interface) NewGetSecret { + return func(id string) *GetSecret { + n := New(tp) + + n._id(id) + + return n + } +} + +// Retrieves a secret stored by Fleet. +func New(tp elastictransport.Interface) *GetSecret { + r := &GetSecret{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *GetSecret) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == idMask: + path.WriteString("/") + path.WriteString("_fleet") + path.WriteString("/") + path.WriteString("secret") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "id", r.id) + } + path.WriteString(r.id) + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r GetSecret) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "fleet.get_secret") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "fleet.get_secret") + if reader := instrument.RecordRequestBody(ctx, "fleet.get_secret", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "fleet.get_secret") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetSecret query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a getsecret.Response +func (r GetSecret) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "fleet.get_secret") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r GetSecret) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "fleet.get_secret") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the GetSecret query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the GetSecret headers map. +func (r *GetSecret) Header(key, value string) *GetSecret { + r.headers.Set(key, value) + + return r +} + +// Id The ID of the secret +// API Name: id +func (r *GetSecret) _id(id string) *GetSecret { + r.paramSet |= idMask + r.id = id + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *GetSecret) ErrorTrace(errortrace bool) *GetSecret { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *GetSecret) FilterPath(filterpaths ...string) *GetSecret { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *GetSecret) Human(human bool) *GetSecret { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *GetSecret) Pretty(pretty bool) *GetSecret { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/fleet/getsecret/response.go b/typedapi/fleet/getsecret/response.go new file mode 100644 index 0000000000..615697eaa3 --- /dev/null +++ b/typedapi/fleet/getsecret/response.go @@ -0,0 +1,35 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package getsecret + +// Response holds the response body struct for the package getsecret +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/fleet/get_secret/FleetGetSecretResponse.ts#L20-L25 +type Response struct { + Id string `json:"id"` + Value string `json:"value"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/fleet/globalcheckpoints/global_checkpoints.go b/typedapi/fleet/globalcheckpoints/global_checkpoints.go index 7fe855d4ac..ae4781686f 100644 --- a/typedapi/fleet/globalcheckpoints/global_checkpoints.go +++ b/typedapi/fleet/globalcheckpoints/global_checkpoints.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get global checkpoints. // diff --git a/typedapi/fleet/globalcheckpoints/response.go b/typedapi/fleet/globalcheckpoints/response.go index 6645945957..2bbefa6c90 100644 --- a/typedapi/fleet/globalcheckpoints/response.go +++ b/typedapi/fleet/globalcheckpoints/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package globalcheckpoints // Response holds the response body struct for the package globalcheckpoints // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/fleet/global_checkpoints/GlobalCheckpointsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/fleet/global_checkpoints/GlobalCheckpointsResponse.ts#L22-L27 type Response struct { GlobalCheckpoints []int64 `json:"global_checkpoints"` TimedOut bool `json:"timed_out"` diff --git a/typedapi/fleet/msearch/msearch.go b/typedapi/fleet/msearch/msearch.go index 5963b9c24c..332952a868 100644 --- a/typedapi/fleet/msearch/msearch.go +++ b/typedapi/fleet/msearch/msearch.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run multiple Fleet searches. +// // Run several Fleet searches with a single API request. // The API follows the same structure as the multi search API. // However, similar to the Fleet search API, it supports the @@ -86,6 +87,7 @@ func NewMsearchFunc(tp elastictransport.Interface) NewMsearch { } // Run multiple Fleet searches. +// // Run several Fleet searches with a single API request. // The API follows the same structure as the multi search API. // However, similar to the Fleet search API, it supports the diff --git a/typedapi/fleet/msearch/request.go b/typedapi/fleet/msearch/request.go index a300f2552f..87c82820c6 100644 --- a/typedapi/fleet/msearch/request.go +++ b/typedapi/fleet/msearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package msearch @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/fleet/msearch/MultiSearchRequest.ts#L31-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/fleet/msearch/MultiSearchRequest.ts#L31-L128 type Request = []types.MsearchRequestItem diff --git a/typedapi/fleet/msearch/response.go b/typedapi/fleet/msearch/response.go index 7db987d2ec..8567690271 100644 --- a/typedapi/fleet/msearch/response.go +++ b/typedapi/fleet/msearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package msearch @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/fleet/msearch/MultiSearchResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/fleet/msearch/MultiSearchResponse.ts#L25-L29 type Response struct { Docs []types.MsearchResponseItem `json:"docs"` } diff --git a/typedapi/fleet/postsecret/post_secret.go b/typedapi/fleet/postsecret/post_secret.go index d935d4db93..a88ce09b97 100644 --- a/typedapi/fleet/postsecret/post_secret.go +++ b/typedapi/fleet/postsecret/post_secret.go @@ -16,21 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Creates a secret stored by Fleet. package postsecret import ( + gobytes "bytes" "context" + "encoding/json" "errors" "fmt" "io" "net/http" "net/url" + "strconv" "strings" "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -45,6 +49,10 @@ type PostSecret struct { raw io.Reader + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + paramSet int spanStarted bool @@ -71,6 +79,8 @@ func New(tp elastictransport.Interface) *PostSecret { transport: tp, values: make(url.Values), headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), } if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { @@ -82,6 +92,21 @@ func New(tp elastictransport.Interface) *PostSecret { return r } +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PostSecret) Raw(raw io.Reader) *PostSecret { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PostSecret) Request(req *Request) *PostSecret { + r.req = req + + return r +} + // HttpRequest returns the http.Request object built from the // given parameters. func (r *PostSecret) HttpRequest(ctx context.Context) (*http.Request, error) { @@ -91,6 +116,31 @@ func (r *PostSecret) HttpRequest(ctx context.Context) (*http.Request, error) { var err error + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PostSecret: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + r.path.Scheme = "http" switch { @@ -172,13 +222,7 @@ func (r PostSecret) Perform(providedCtx context.Context) (*http.Response, error) } // Do runs the request through the transport, handle the response and returns a postsecret.Response -func (r PostSecret) Do(ctx context.Context) (bool, error) { - return r.IsSuccess(ctx) -} - -// IsSuccess allows to run a query with a context and retrieve the result as a boolean. -// This only exists for endpoints without a request payload and allows for quick control flow. -func (r PostSecret) IsSuccess(providedCtx context.Context) (bool, error) { +func (r PostSecret) Do(providedCtx context.Context) (*Response, error) { var ctx context.Context r.spanStarted = true if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -189,30 +233,46 @@ func (r PostSecret) IsSuccess(providedCtx context.Context) (bool, error) { ctx = providedCtx } - res, err := r.Perform(ctx) + response := NewResponse() + res, err := r.Perform(ctx) if err != nil { - return false, err - } - io.Copy(io.Discard, res.Body) - err = res.Body.Close() - if err != nil { - return false, err + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } - if res.StatusCode >= 200 && res.StatusCode < 300 { - return true, nil + return response, nil } - if res.StatusCode != 404 { - err := fmt.Errorf("an error happened during the PostSecret query execution, status code: %d", res.StatusCode) + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { instrument.RecordError(ctx, err) } - return false, err + return nil, err } - return false, nil + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse } // Header set a key, value pair in the PostSecret headers map. @@ -221,3 +281,59 @@ func (r *PostSecret) Header(key, value string) *PostSecret { return r } + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PostSecret) ErrorTrace(errortrace bool) *PostSecret { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PostSecret) FilterPath(filterpaths ...string) *PostSecret { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PostSecret) Human(human bool) *PostSecret { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PostSecret) Pretty(pretty bool) *PostSecret { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// API name: value +func (r *PostSecret) Value(value string) *PostSecret { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Value = value + + return r +} diff --git a/typedapi/fleet/postsecret/request.go b/typedapi/fleet/postsecret/request.go new file mode 100644 index 0000000000..5a96733b79 --- /dev/null +++ b/typedapi/fleet/postsecret/request.go @@ -0,0 +1,52 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package postsecret + +import ( + "encoding/json" + "fmt" +) + +// Request holds the request body struct for the package postsecret +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/fleet/post_secret/FleetPostSecretRequest.ts#L22-L38 +type Request struct { + Value string `json:"value"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Postsecret request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/fleet/postsecret/response.go b/typedapi/fleet/postsecret/response.go new file mode 100644 index 0000000000..87e6e9e169 --- /dev/null +++ b/typedapi/fleet/postsecret/response.go @@ -0,0 +1,34 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package postsecret + +// Response holds the response body struct for the package postsecret +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/fleet/post_secret/FleetPostSecretResponse.ts#L20-L24 +type Response struct { + Id string `json:"id"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/fleet/search/request.go b/typedapi/fleet/search/request.go index 2ea620305f..be55f1c1fd 100644 --- a/typedapi/fleet/search/request.go +++ b/typedapi/fleet/search/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package search @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/fleet/search/SearchRequest.ts#L54-L266 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/fleet/search/SearchRequest.ts#L54-L268 type Request struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Collapse *types.FieldCollapse `json:"collapse,omitempty"` diff --git a/typedapi/fleet/search/response.go b/typedapi/fleet/search/response.go index c356b76359..7f002cb382 100644 --- a/typedapi/fleet/search/response.go +++ b/typedapi/fleet/search/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/fleet/search/SearchResponse.ts#L33-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/fleet/search/SearchResponse.ts#L33-L50 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -210,6 +210,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := types.NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := types.NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -238,6 +245,20 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := types.NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := types.NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := types.NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/fleet/search/search.go b/typedapi/fleet/search/search.go index 3909386e45..522b7d1c80 100644 --- a/typedapi/fleet/search/search.go +++ b/typedapi/fleet/search/search.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a Fleet search. +// // The purpose of the Fleet search API is to provide an API where the search // will be run only // after the provided checkpoint has been processed and is visible for searches @@ -90,6 +91,7 @@ func NewSearchFunc(tp elastictransport.Interface) NewSearch { } // Run a Fleet search. +// // The purpose of the Fleet search API is to provide an API where the search // will be run only // after the provided checkpoint has been processed and is visible for searches @@ -438,8 +440,8 @@ func (r *Search) RequestCache(requestcache bool) *Search { } // API name: routing -func (r *Search) Routing(routing string) *Search { - r.values.Set("routing", routing) +func (r *Search) Routing(routings ...string) *Search { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/graph/explore/explore.go b/typedapi/graph/explore/explore.go index bfe5d2d062..09bd1907bc 100644 --- a/typedapi/graph/explore/explore.go +++ b/typedapi/graph/explore/explore.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Explore graph analytics. +// // Extract and summarize information about the documents and terms in an // Elasticsearch data stream or index. // The easiest way to understand the behavior of this API is to use the Graph UI @@ -92,6 +93,7 @@ func NewExploreFunc(tp elastictransport.Interface) NewExplore { } // Explore graph analytics. +// // Extract and summarize information about the documents and terms in an // Elasticsearch data stream or index. // The easiest way to understand the behavior of this API is to use the Graph UI @@ -335,8 +337,8 @@ func (r *Explore) _index(index string) *Explore { // Routing Custom value used to route operations to a specific shard. // API name: routing -func (r *Explore) Routing(routing string) *Explore { - r.values.Set("routing", routing) +func (r *Explore) Routing(routings ...string) *Explore { + r.values.Set("routing", strings.Join(routings, ",")) return r } diff --git a/typedapi/graph/explore/request.go b/typedapi/graph/explore/request.go index 7956e58c36..d116ab4b34 100644 --- a/typedapi/graph/explore/request.go +++ b/typedapi/graph/explore/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package explore @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package explore // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/explore/GraphExploreRequest.ts#L28-L84 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/graph/explore/GraphExploreRequest.ts#L28-L85 type Request struct { - // Connections Specifies or more fields from which you want to extract terms that are // associated with the specified vertices. Connections *types.Hop `json:"connections,omitempty"` diff --git a/typedapi/graph/explore/response.go b/typedapi/graph/explore/response.go index 74312c452e..2351ec9bd5 100644 --- a/typedapi/graph/explore/response.go +++ b/typedapi/graph/explore/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package explore @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explore // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/explore/GraphExploreResponse.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/graph/explore/GraphExploreResponse.ts#L25-L33 type Response struct { Connections []types.Connection `json:"connections"` Failures []types.ShardFailure `json:"failures"` diff --git a/typedapi/ilm/deletelifecycle/delete_lifecycle.go b/typedapi/ilm/deletelifecycle/delete_lifecycle.go index 18c6059512..62642bbbb4 100644 --- a/typedapi/ilm/deletelifecycle/delete_lifecycle.go +++ b/typedapi/ilm/deletelifecycle/delete_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a lifecycle policy. +// // You cannot delete policies that are currently in use. If the policy is being // used to manage any indices, the request fails and returns an error. package deletelifecycle @@ -79,6 +80,7 @@ func NewDeleteLifecycleFunc(tp elastictransport.Interface) NewDeleteLifecycle { } // Delete a lifecycle policy. +// // You cannot delete policies that are currently in use. If the policy is being // used to manage any indices, the request fails and returns an error. // diff --git a/typedapi/ilm/deletelifecycle/response.go b/typedapi/ilm/deletelifecycle/response.go index fa214f79a2..deed9fefd5 100644 --- a/typedapi/ilm/deletelifecycle/response.go +++ b/typedapi/ilm/deletelifecycle/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletelifecycle // Response holds the response body struct for the package deletelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/delete_lifecycle/DeleteLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/delete_lifecycle/DeleteLifecycleResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ilm/explainlifecycle/explain_lifecycle.go b/typedapi/ilm/explainlifecycle/explain_lifecycle.go index e5bd9ff716..fc307222b0 100644 --- a/typedapi/ilm/explainlifecycle/explain_lifecycle.go +++ b/typedapi/ilm/explainlifecycle/explain_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Explain the lifecycle state. +// // Get the current lifecycle status for one or more indices. // For data streams, the API retrieves the current lifecycle status for the // stream's backing indices. @@ -83,6 +84,7 @@ func NewExplainLifecycleFunc(tp elastictransport.Interface) NewExplainLifecycle } // Explain the lifecycle state. +// // Get the current lifecycle status for one or more indices. // For data streams, the API retrieves the current lifecycle status for the // stream's backing indices. diff --git a/typedapi/ilm/explainlifecycle/response.go b/typedapi/ilm/explainlifecycle/response.go index 29634eeb82..9888c89c63 100644 --- a/typedapi/ilm/explainlifecycle/response.go +++ b/typedapi/ilm/explainlifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package explainlifecycle @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package explainlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/explain_lifecycle/ExplainLifecycleResponse.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/explain_lifecycle/ExplainLifecycleResponse.ts#L24-L28 type Response struct { Indices map[string]types.LifecycleExplain `json:"indices"` } diff --git a/typedapi/ilm/getlifecycle/get_lifecycle.go b/typedapi/ilm/getlifecycle/get_lifecycle.go index dfb9bcbcc2..f9cd207a06 100644 --- a/typedapi/ilm/getlifecycle/get_lifecycle.go +++ b/typedapi/ilm/getlifecycle/get_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get lifecycle policies. package getlifecycle diff --git a/typedapi/ilm/getlifecycle/response.go b/typedapi/ilm/getlifecycle/response.go index 688269210b..a9298b375c 100644 --- a/typedapi/ilm/getlifecycle/response.go +++ b/typedapi/ilm/getlifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getlifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/get_lifecycle/GetLifecycleResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/get_lifecycle/GetLifecycleResponse.ts#L23-L26 type Response map[string]types.Lifecycle diff --git a/typedapi/ilm/getstatus/get_status.go b/typedapi/ilm/getstatus/get_status.go index 164328a547..958cea1e9a 100644 --- a/typedapi/ilm/getstatus/get_status.go +++ b/typedapi/ilm/getstatus/get_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the ILM status. // diff --git a/typedapi/ilm/getstatus/response.go b/typedapi/ilm/getstatus/response.go index d106db5ed2..02959f1872 100644 --- a/typedapi/ilm/getstatus/response.go +++ b/typedapi/ilm/getstatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getstatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/get_status/GetIlmStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/get_status/GetIlmStatusResponse.ts#L22-L24 type Response struct { OperationMode lifecycleoperationmode.LifecycleOperationMode `json:"operation_mode"` } diff --git a/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go b/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go index 4e08a1d549..cfd67a55bb 100644 --- a/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go +++ b/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Migrate to data tiers routing. +// // Switch the indices, ILM policies, and legacy, composable, and component // templates from using custom node attributes and attribute-based allocation // filters to using data tiers. @@ -93,6 +94,7 @@ func NewMigrateToDataTiersFunc(tp elastictransport.Interface) NewMigrateToDataTi } // Migrate to data tiers routing. +// // Switch the indices, ILM policies, and legacy, composable, and component // templates from using custom node attributes and attribute-based allocation // filters to using data tiers. diff --git a/typedapi/ilm/migratetodatatiers/request.go b/typedapi/ilm/migratetodatatiers/request.go index 22a3311f63..8b86ac2c15 100644 --- a/typedapi/ilm/migratetodatatiers/request.go +++ b/typedapi/ilm/migratetodatatiers/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package migratetodatatiers @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package migratetodatatiers // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/migrate_to_data_tiers/Request.ts#L23-L69 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/migrate_to_data_tiers/Request.ts#L23-L70 type Request struct { LegacyTemplateToDelete *string `json:"legacy_template_to_delete,omitempty"` NodeAttribute *string `json:"node_attribute,omitempty"` diff --git a/typedapi/ilm/migratetodatatiers/response.go b/typedapi/ilm/migratetodatatiers/response.go index b474d3b3e0..81e2a1d7b9 100644 --- a/typedapi/ilm/migratetodatatiers/response.go +++ b/typedapi/ilm/migratetodatatiers/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package migratetodatatiers @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package migratetodatatiers // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/migrate_to_data_tiers/Response.ts#L22-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/migrate_to_data_tiers/Response.ts#L22-L51 type Response struct { DryRun bool `json:"dry_run"` // MigratedComponentTemplates The component templates that were updated to not contain custom routing diff --git a/typedapi/ilm/movetostep/move_to_step.go b/typedapi/ilm/movetostep/move_to_step.go index 20b5f5d604..8a5d585fb8 100644 --- a/typedapi/ilm/movetostep/move_to_step.go +++ b/typedapi/ilm/movetostep/move_to_step.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Move to a lifecycle step. +// // Manually move an index into a specific step in the lifecycle policy and run // that step. // @@ -105,6 +106,7 @@ func NewMoveToStepFunc(tp elastictransport.Interface) NewMoveToStep { } // Move to a lifecycle step. +// // Manually move an index into a specific step in the lifecycle policy and run // that step. // diff --git a/typedapi/ilm/movetostep/request.go b/typedapi/ilm/movetostep/request.go index 21211d5c4a..8eb048f2ee 100644 --- a/typedapi/ilm/movetostep/request.go +++ b/typedapi/ilm/movetostep/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package movetostep @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package movetostep // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/move_to_step/MoveToStepRequest.ts#L24-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/move_to_step/MoveToStepRequest.ts#L24-L65 type Request struct { - // CurrentStep The step that the index is expected to be in. CurrentStep types.StepKey `json:"current_step"` // NextStep The step that you want to run. diff --git a/typedapi/ilm/movetostep/response.go b/typedapi/ilm/movetostep/response.go index 0ddaba9757..500c30f2d2 100644 --- a/typedapi/ilm/movetostep/response.go +++ b/typedapi/ilm/movetostep/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package movetostep // Response holds the response body struct for the package movetostep // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/move_to_step/MoveToStepResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/move_to_step/MoveToStepResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ilm/putlifecycle/put_lifecycle.go b/typedapi/ilm/putlifecycle/put_lifecycle.go index 5d65e3d33c..ec940180b3 100644 --- a/typedapi/ilm/putlifecycle/put_lifecycle.go +++ b/typedapi/ilm/putlifecycle/put_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a lifecycle policy. +// // If the specified policy exists, it is replaced and the policy version is // incremented. // @@ -87,6 +88,7 @@ func NewPutLifecycleFunc(tp elastictransport.Interface) NewPutLifecycle { } // Create or update a lifecycle policy. +// // If the specified policy exists, it is replaced and the policy version is // incremented. // diff --git a/typedapi/ilm/putlifecycle/request.go b/typedapi/ilm/putlifecycle/request.go index 8872f0260f..9fb4381fab 100644 --- a/typedapi/ilm/putlifecycle/request.go +++ b/typedapi/ilm/putlifecycle/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putlifecycle @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/put_lifecycle/PutLifecycleRequest.ts#L25-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/put_lifecycle/PutLifecycleRequest.ts#L25-L67 type Request struct { Policy *types.IlmPolicy `json:"policy,omitempty"` } diff --git a/typedapi/ilm/putlifecycle/response.go b/typedapi/ilm/putlifecycle/response.go index 28376dbfeb..c528857663 100644 --- a/typedapi/ilm/putlifecycle/response.go +++ b/typedapi/ilm/putlifecycle/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putlifecycle // Response holds the response body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/put_lifecycle/PutLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/put_lifecycle/PutLifecycleResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ilm/removepolicy/remove_policy.go b/typedapi/ilm/removepolicy/remove_policy.go index d2754b06d1..daa77080dd 100644 --- a/typedapi/ilm/removepolicy/remove_policy.go +++ b/typedapi/ilm/removepolicy/remove_policy.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Remove policies from an index. +// // Remove the assigned lifecycle policies from an index or a data stream's // backing indices. // It also stops managing the indices. @@ -80,6 +81,7 @@ func NewRemovePolicyFunc(tp elastictransport.Interface) NewRemovePolicy { } // Remove policies from an index. +// // Remove the assigned lifecycle policies from an index or a data stream's // backing indices. // It also stops managing the indices. diff --git a/typedapi/ilm/removepolicy/response.go b/typedapi/ilm/removepolicy/response.go index 743327df67..5cd6c4a079 100644 --- a/typedapi/ilm/removepolicy/response.go +++ b/typedapi/ilm/removepolicy/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package removepolicy // Response holds the response body struct for the package removepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/remove_policy/RemovePolicyResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/remove_policy/RemovePolicyResponse.ts#L22-L27 type Response struct { FailedIndexes []string `json:"failed_indexes"` HasFailures bool `json:"has_failures"` diff --git a/typedapi/ilm/retry/response.go b/typedapi/ilm/retry/response.go index 80c56e0aee..e7bf252e5d 100644 --- a/typedapi/ilm/retry/response.go +++ b/typedapi/ilm/retry/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package retry // Response holds the response body struct for the package retry // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/retry/RetryIlmResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/retry/RetryIlmResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ilm/retry/retry.go b/typedapi/ilm/retry/retry.go index 59adf4e1c1..4f446b266e 100644 --- a/typedapi/ilm/retry/retry.go +++ b/typedapi/ilm/retry/retry.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Retry a policy. +// // Retry running the lifecycle policy for an index that is in the ERROR step. // The API sets the policy back to the step where the error occurred and runs // the step. @@ -82,6 +83,7 @@ func NewRetryFunc(tp elastictransport.Interface) NewRetry { } // Retry a policy. +// // Retry running the lifecycle policy for an index that is in the ERROR step. // The API sets the policy back to the step where the error occurred and runs // the step. diff --git a/typedapi/ilm/start/response.go b/typedapi/ilm/start/response.go index cd625de232..a4edc997cb 100644 --- a/typedapi/ilm/start/response.go +++ b/typedapi/ilm/start/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/start/StartIlmResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/start/StartIlmResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ilm/start/start.go b/typedapi/ilm/start/start.go index ada1c0ae2a..251a086097 100644 --- a/typedapi/ilm/start/start.go +++ b/typedapi/ilm/start/start.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start the ILM plugin. +// // Start the index lifecycle management plugin if it is currently stopped. // ILM is started automatically when the cluster is formed. // Restarting ILM is necessary only when it has been stopped using the stop ILM @@ -73,6 +74,7 @@ func NewStartFunc(tp elastictransport.Interface) NewStart { } // Start the ILM plugin. +// // Start the index lifecycle management plugin if it is currently stopped. // ILM is started automatically when the cluster is formed. // Restarting ILM is necessary only when it has been stopped using the stop ILM diff --git a/typedapi/ilm/stop/response.go b/typedapi/ilm/stop/response.go index 696249f8e0..5523d38988 100644 --- a/typedapi/ilm/stop/response.go +++ b/typedapi/ilm/stop/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/stop/StopIlmResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/stop/StopIlmResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ilm/stop/stop.go b/typedapi/ilm/stop/stop.go index a9e773cd50..7da7a4b7c0 100644 --- a/typedapi/ilm/stop/stop.go +++ b/typedapi/ilm/stop/stop.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Stop the ILM plugin. +// // Halt all lifecycle management operations and stop the index lifecycle // management plugin. // This is useful when you are performing maintenance on the cluster and need to @@ -78,6 +79,7 @@ func NewStopFunc(tp elastictransport.Interface) NewStop { } // Stop the ILM plugin. +// // Halt all lifecycle management operations and stop the index lifecycle // management plugin. // This is useful when you are performing maintenance on the cluster and need to diff --git a/typedapi/indices/addblock/add_block.go b/typedapi/indices/addblock/add_block.go index c35a40399e..9d631de172 100644 --- a/typedapi/indices/addblock/add_block.go +++ b/typedapi/indices/addblock/add_block.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Add an index block. // diff --git a/typedapi/indices/addblock/response.go b/typedapi/indices/addblock/response.go index 26b9c8236e..c3ecc156ca 100644 --- a/typedapi/indices/addblock/response.go +++ b/typedapi/indices/addblock/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package addblock @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package addblock // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/add_block/IndicesAddBlockResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/add_block/IndicesAddBlockResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Indices []types.AddIndicesBlockStatus `json:"indices"` diff --git a/typedapi/indices/analyze/analyze.go b/typedapi/indices/analyze/analyze.go index c2ca2a1a5d..e59efc107a 100644 --- a/typedapi/indices/analyze/analyze.go +++ b/typedapi/indices/analyze/analyze.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get tokens from text analysis. +// // The analyze API performs analysis on a text string and returns the resulting // tokens. // @@ -89,6 +90,7 @@ func NewAnalyzeFunc(tp elastictransport.Interface) NewAnalyze { } // Get tokens from text analysis. +// // The analyze API performs analysis on a text string and returns the resulting // tokens. // diff --git a/typedapi/indices/analyze/request.go b/typedapi/indices/analyze/request.go index 7f3adb63ea..bbdf92df44 100644 --- a/typedapi/indices/analyze/request.go +++ b/typedapi/indices/analyze/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package analyze @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package analyze // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/IndicesAnalyzeRequest.ts#L27-L119 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/analyze/IndicesAnalyzeRequest.ts#L27-L120 type Request struct { - // Analyzer The name of the analyzer that should be applied to the provided `text`. // This could be a built-in analyzer, or an analyzer that’s been configured in // the index. diff --git a/typedapi/indices/analyze/response.go b/typedapi/indices/analyze/response.go index 41def59f90..40e2e083e2 100644 --- a/typedapi/indices/analyze/response.go +++ b/typedapi/indices/analyze/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package analyze @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package analyze // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/IndicesAnalyzeResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/analyze/IndicesAnalyzeResponse.ts#L22-L27 type Response struct { Detail *types.AnalyzeDetail `json:"detail,omitempty"` Tokens []types.AnalyzeToken `json:"tokens,omitempty"` diff --git a/typedapi/indices/cancelmigratereindex/cancel_migrate_reindex.go b/typedapi/indices/cancelmigratereindex/cancel_migrate_reindex.go index 8ec061fb51..428899f5b7 100644 --- a/typedapi/indices/cancelmigratereindex/cancel_migrate_reindex.go +++ b/typedapi/indices/cancelmigratereindex/cancel_migrate_reindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Cancel a migration reindex operation. // diff --git a/typedapi/indices/cancelmigratereindex/response.go b/typedapi/indices/cancelmigratereindex/response.go index 7e2afcc58a..86463da995 100644 --- a/typedapi/indices/cancelmigratereindex/response.go +++ b/typedapi/indices/cancelmigratereindex/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package cancelmigratereindex // Response holds the response body struct for the package cancelmigratereindex // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/cancel_migrate_reindex/MigrateCancelReindexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/cancel_migrate_reindex/MigrateCancelReindexResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/clearcache/clear_cache.go b/typedapi/indices/clearcache/clear_cache.go index d79cfb2a08..b0792efaae 100644 --- a/typedapi/indices/clearcache/clear_cache.go +++ b/typedapi/indices/clearcache/clear_cache.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear the cache. +// // Clear the cache of one or more indices. // For data streams, the API clears the caches of the stream's backing indices. // @@ -83,6 +84,7 @@ func NewClearCacheFunc(tp elastictransport.Interface) NewClearCache { } // Clear the cache. +// // Clear the cache of one or more indices. // For data streams, the API clears the caches of the stream's backing indices. // diff --git a/typedapi/indices/clearcache/response.go b/typedapi/indices/clearcache/response.go index 497e62d6d7..b027776ad1 100644 --- a/typedapi/indices/clearcache/response.go +++ b/typedapi/indices/clearcache/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearcache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcache // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/clear_cache/IndicesClearCacheResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/clear_cache/IndicesClearCacheResponse.ts#L22-L25 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } diff --git a/typedapi/indices/clone/clone.go b/typedapi/indices/clone/clone.go index ec2c25a25f..97ce5204b6 100644 --- a/typedapi/indices/clone/clone.go +++ b/typedapi/indices/clone/clone.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clone an index. +// // Clone an existing index into a new index. // Each original primary shard is cloned into a new primary shard in the new // index. @@ -157,6 +158,7 @@ func NewCloneFunc(tp elastictransport.Interface) NewClone { } // Clone an index. +// // Clone an existing index into a new index. // Each original primary shard is cloned into a new primary shard in the new // index. diff --git a/typedapi/indices/clone/request.go b/typedapi/indices/clone/request.go index 901e0774c4..5d0b51a3c1 100644 --- a/typedapi/indices/clone/request.go +++ b/typedapi/indices/clone/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clone @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/clone/IndicesCloneRequest.ts#L27-L127 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/clone/IndicesCloneRequest.ts#L27-L128 type Request struct { - // Aliases Aliases for the resulting index. Aliases map[string]types.Alias `json:"aliases,omitempty"` // Settings Configuration options for the target index. diff --git a/typedapi/indices/clone/response.go b/typedapi/indices/clone/response.go index 257f3a5b63..cc7a22eb18 100644 --- a/typedapi/indices/clone/response.go +++ b/typedapi/indices/clone/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clone // Response holds the response body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/clone/IndicesCloneResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/clone/IndicesCloneResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/close/close.go b/typedapi/indices/close/close.go index d053fb22c9..8596940fc0 100644 --- a/typedapi/indices/close/close.go +++ b/typedapi/indices/close/close.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Close an index. +// // A closed index is blocked for read or write operations and does not allow all // operations that opened indices allow. // It is not possible to index documents or to search for documents in a closed @@ -106,6 +107,7 @@ func NewCloseFunc(tp elastictransport.Interface) NewClose { } // Close an index. +// // A closed index is blocked for read or write operations and does not allow all // operations that opened indices allow. // It is not possible to index documents or to search for documents in a closed diff --git a/typedapi/indices/close/response.go b/typedapi/indices/close/response.go index f544787fc0..28e3f35e86 100644 --- a/typedapi/indices/close/response.go +++ b/typedapi/indices/close/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package close @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package close // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/close/CloseIndexResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/close/CloseIndexResponse.ts#L24-L30 type Response struct { Acknowledged bool `json:"acknowledged"` Indices map[string]types.CloseIndexResult `json:"indices"` diff --git a/typedapi/indices/create/create.go b/typedapi/indices/create/create.go index 42b6f046b0..92b7298592 100644 --- a/typedapi/indices/create/create.go +++ b/typedapi/indices/create/create.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an index. +// // You can use the create index API to add a new index to an Elasticsearch // cluster. // When creating an index, you can specify the following: @@ -116,6 +117,7 @@ func NewCreateFunc(tp elastictransport.Interface) NewCreate { } // Create an index. +// // You can use the create index API to add a new index to an Elasticsearch // cluster. // When creating an index, you can specify the following: diff --git a/typedapi/indices/create/request.go b/typedapi/indices/create/request.go index 411349084e..299560bb2d 100644 --- a/typedapi/indices/create/request.go +++ b/typedapi/indices/create/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package create @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/create/IndicesCreateRequest.ts#L28-L115 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/create/IndicesCreateRequest.ts#L28-L116 type Request struct { - // Aliases Aliases for the index. Aliases map[string]types.Alias `json:"aliases,omitempty"` // Mappings Mapping for fields in the index. If specified, this mapping can include: diff --git a/typedapi/indices/create/response.go b/typedapi/indices/create/response.go index 48d706a459..ad2a008a7e 100644 --- a/typedapi/indices/create/response.go +++ b/typedapi/indices/create/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package create // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/create/IndicesCreateResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/create/IndicesCreateResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/createdatastream/create_data_stream.go b/typedapi/indices/createdatastream/create_data_stream.go index 4e62206c26..90e41377a2 100644 --- a/typedapi/indices/createdatastream/create_data_stream.go +++ b/typedapi/indices/createdatastream/create_data_stream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a data stream. // diff --git a/typedapi/indices/createdatastream/response.go b/typedapi/indices/createdatastream/response.go index 0e748b935c..644537659a 100644 --- a/typedapi/indices/createdatastream/response.go +++ b/typedapi/indices/createdatastream/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createdatastream // Response holds the response body struct for the package createdatastream // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/createfrom/create_from.go b/typedapi/indices/createfrom/create_from.go index 0989b21626..664e9e49d6 100644 --- a/typedapi/indices/createfrom/create_from.go +++ b/typedapi/indices/createfrom/create_from.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an index from a source index. // diff --git a/typedapi/indices/createfrom/request.go b/typedapi/indices/createfrom/request.go index 736ee7eb07..d92b6b0a2d 100644 --- a/typedapi/indices/createfrom/request.go +++ b/typedapi/indices/createfrom/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createfrom @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package createfrom // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/create_from/MigrateCreateFromRequest.ts#L25-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/create_from/MigrateCreateFromRequest.ts#L25-L50 type Request = types.CreateFrom // NewRequest returns a Request diff --git a/typedapi/indices/createfrom/response.go b/typedapi/indices/createfrom/response.go index 35f084332d..baad79b44c 100644 --- a/typedapi/indices/createfrom/response.go +++ b/typedapi/indices/createfrom/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createfrom // Response holds the response body struct for the package createfrom // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/create_from/MigrateCreateFromResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/create_from/MigrateCreateFromResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/datastreamsstats/data_streams_stats.go b/typedapi/indices/datastreamsstats/data_streams_stats.go index 322edbb1cb..43dec3b75c 100644 --- a/typedapi/indices/datastreamsstats/data_streams_stats.go +++ b/typedapi/indices/datastreamsstats/data_streams_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get data stream stats. // diff --git a/typedapi/indices/datastreamsstats/response.go b/typedapi/indices/datastreamsstats/response.go index 2471193fe9..09d203f3fa 100644 --- a/typedapi/indices/datastreamsstats/response.go +++ b/typedapi/indices/datastreamsstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package datastreamsstats @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package datastreamsstats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L25-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L25-L43 type Response struct { - // BackingIndices Total number of backing indices for the selected data streams. BackingIndices int `json:"backing_indices"` // DataStreamCount Total number of selected data streams. diff --git a/typedapi/indices/delete/delete.go b/typedapi/indices/delete/delete.go index 2fdfcc4095..94576c7857 100644 --- a/typedapi/indices/delete/delete.go +++ b/typedapi/indices/delete/delete.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete indices. +// // Deleting an index deletes its documents, shards, and metadata. // It does not delete related Kibana components, such as data views, // visualizations, or dashboards. @@ -86,6 +87,7 @@ func NewDeleteFunc(tp elastictransport.Interface) NewDelete { } // Delete indices. +// // Deleting an index deletes its documents, shards, and metadata. // It does not delete related Kibana components, such as data views, // visualizations, or dashboards. diff --git a/typedapi/indices/delete/response.go b/typedapi/indices/delete/response.go index e6d95ed194..bd4e913f6d 100644 --- a/typedapi/indices/delete/response.go +++ b/typedapi/indices/delete/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delete @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete/IndicesDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/delete/IndicesDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/deletealias/delete_alias.go b/typedapi/indices/deletealias/delete_alias.go index d09974d02d..9e2810c755 100644 --- a/typedapi/indices/deletealias/delete_alias.go +++ b/typedapi/indices/deletealias/delete_alias.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an alias. +// // Removes a data stream or index from an alias. package deletealias @@ -83,6 +84,7 @@ func NewDeleteAliasFunc(tp elastictransport.Interface) NewDeleteAlias { } // Delete an alias. +// // Removes a data stream or index from an alias. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias diff --git a/typedapi/indices/deletealias/response.go b/typedapi/indices/deletealias/response.go index ce78339b1b..2582f4a511 100644 --- a/typedapi/indices/deletealias/response.go +++ b/typedapi/indices/deletealias/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletealias // Response holds the response body struct for the package deletealias // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go b/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go index 6d11e5c414..464604edc4 100644 --- a/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go +++ b/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete data stream lifecycles. +// // Removes the data stream lifecycle from a data stream, rendering it not // managed by the data stream lifecycle. package deletedatalifecycle @@ -80,6 +81,7 @@ func NewDeleteDataLifecycleFunc(tp elastictransport.Interface) NewDeleteDataLife } // Delete data stream lifecycles. +// // Removes the data stream lifecycle from a data stream, rendering it not // managed by the data stream lifecycle. // diff --git a/typedapi/indices/deletedatalifecycle/response.go b/typedapi/indices/deletedatalifecycle/response.go index 1e88fe3e7a..4dbf254437 100644 --- a/typedapi/indices/deletedatalifecycle/response.go +++ b/typedapi/indices/deletedatalifecycle/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletedatalifecycle // Response holds the response body struct for the package deletedatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/deletedatastream/delete_data_stream.go b/typedapi/indices/deletedatastream/delete_data_stream.go index 4734d03df2..8fe052f95d 100644 --- a/typedapi/indices/deletedatastream/delete_data_stream.go +++ b/typedapi/indices/deletedatastream/delete_data_stream.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete data streams. +// // Deletes one or more data streams and their backing indices. package deletedatastream @@ -79,6 +80,7 @@ func NewDeleteDataStreamFunc(tp elastictransport.Interface) NewDeleteDataStream } // Delete data streams. +// // Deletes one or more data streams and their backing indices. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream diff --git a/typedapi/indices/deletedatastream/response.go b/typedapi/indices/deletedatastream/response.go index ae38a1b577..36a4c98a60 100644 --- a/typedapi/indices/deletedatastream/response.go +++ b/typedapi/indices/deletedatastream/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletedatastream // Response holds the response body struct for the package deletedatastream // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/deletedatastreamoptions/delete_data_stream_options.go b/typedapi/indices/deletedatastreamoptions/delete_data_stream_options.go index edb2b5755d..1545e1186d 100644 --- a/typedapi/indices/deletedatastreamoptions/delete_data_stream_options.go +++ b/typedapi/indices/deletedatastreamoptions/delete_data_stream_options.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete data stream options. +// // Removes the data stream options from a data stream. package deletedatastreamoptions @@ -79,9 +80,10 @@ func NewDeleteDataStreamOptionsFunc(tp elastictransport.Interface) NewDeleteData } // Delete data stream options. +// // Removes the data stream options from a data stream. // -// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options func New(tp elastictransport.Interface) *DeleteDataStreamOptions { r := &DeleteDataStreamOptions{ transport: tp, diff --git a/typedapi/indices/deletedatastreamoptions/response.go b/typedapi/indices/deletedatastreamoptions/response.go index 5e60d8a9e8..7a9c0a1e3f 100644 --- a/typedapi/indices/deletedatastreamoptions/response.go +++ b/typedapi/indices/deletedatastreamoptions/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletedatastreamoptions // Response holds the response body struct for the package deletedatastreamoptions // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/deleteindextemplate/delete_index_template.go b/typedapi/indices/deleteindextemplate/delete_index_template.go index eb351ba392..eacbc15c3e 100644 --- a/typedapi/indices/deleteindextemplate/delete_index_template.go +++ b/typedapi/indices/deleteindextemplate/delete_index_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an index template. +// // The provided may contain multiple template names separated // by a comma. If multiple template // names are specified then there is no wildcard support and the provided names @@ -82,6 +83,7 @@ func NewDeleteIndexTemplateFunc(tp elastictransport.Interface) NewDeleteIndexTem } // Delete an index template. +// // The provided may contain multiple template names separated // by a comma. If multiple template // names are specified then there is no wildcard support and the provided names diff --git a/typedapi/indices/deleteindextemplate/response.go b/typedapi/indices/deleteindextemplate/response.go index de743cb3c3..520102415d 100644 --- a/typedapi/indices/deleteindextemplate/response.go +++ b/typedapi/indices/deleteindextemplate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteindextemplate // Response holds the response body struct for the package deleteindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/deletesampleconfiguration/delete_sample_configuration.go b/typedapi/indices/deletesampleconfiguration/delete_sample_configuration.go new file mode 100644 index 0000000000..b8135a3a34 --- /dev/null +++ b/typedapi/indices/deletesampleconfiguration/delete_sample_configuration.go @@ -0,0 +1,374 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Delete sampling configuration. +// +// Delete the sampling configuration for the specified index. +package deletesampleconfiguration + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + indexMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type DeleteSampleConfiguration struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + index string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewDeleteSampleConfiguration type alias for index. +type NewDeleteSampleConfiguration func(index string) *DeleteSampleConfiguration + +// NewDeleteSampleConfigurationFunc returns a new instance of DeleteSampleConfiguration with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewDeleteSampleConfigurationFunc(tp elastictransport.Interface) NewDeleteSampleConfiguration { + return func(index string) *DeleteSampleConfiguration { + n := New(tp) + + n._index(index) + + return n + } +} + +// Delete sampling configuration. +// +// Delete the sampling configuration for the specified index. +// +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func New(tp elastictransport.Interface) *DeleteSampleConfiguration { + r := &DeleteSampleConfiguration{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *DeleteSampleConfiguration) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == indexMask: + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.index) + } + path.WriteString(r.index) + path.WriteString("/") + path.WriteString("_sample") + path.WriteString("/") + path.WriteString("config") + + method = http.MethodDelete + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r DeleteSampleConfiguration) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "indices.delete_sample_configuration") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "indices.delete_sample_configuration") + if reader := instrument.RecordRequestBody(ctx, "indices.delete_sample_configuration", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.delete_sample_configuration") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the DeleteSampleConfiguration query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a deletesampleconfiguration.Response +func (r DeleteSampleConfiguration) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.delete_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r DeleteSampleConfiguration) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.delete_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the DeleteSampleConfiguration query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the DeleteSampleConfiguration headers map. +func (r *DeleteSampleConfiguration) Header(key, value string) *DeleteSampleConfiguration { + r.headers.Set(key, value) + + return r +} + +// Index The name of the index. +// API Name: index +func (r *DeleteSampleConfiguration) _index(index string) *DeleteSampleConfiguration { + r.paramSet |= indexMask + r.index = index + + return r +} + +// MasterTimeout 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: master_timeout +func (r *DeleteSampleConfiguration) MasterTimeout(duration string) *DeleteSampleConfiguration { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout Period to wait for a response. +// If no response is received before the timeout expires, the request fails and +// returns an error. +// API name: timeout +func (r *DeleteSampleConfiguration) Timeout(duration string) *DeleteSampleConfiguration { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *DeleteSampleConfiguration) ErrorTrace(errortrace bool) *DeleteSampleConfiguration { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *DeleteSampleConfiguration) FilterPath(filterpaths ...string) *DeleteSampleConfiguration { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *DeleteSampleConfiguration) Human(human bool) *DeleteSampleConfiguration { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *DeleteSampleConfiguration) Pretty(pretty bool) *DeleteSampleConfiguration { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/deletesampleconfiguration/response.go b/typedapi/indices/deletesampleconfiguration/response.go new file mode 100644 index 0000000000..9d19e23456 --- /dev/null +++ b/typedapi/indices/deletesampleconfiguration/response.go @@ -0,0 +1,36 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package deletesampleconfiguration + +// Response holds the response body struct for the package deletesampleconfiguration +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/delete_sample_configuration/IndicesDeleteSampleConfigurationResponse.ts#L22-L25 +type Response struct { + // Acknowledged For a successful response, this value is always true. On failure, an + // exception is returned instead. + Acknowledged bool `json:"acknowledged"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/deletetemplate/delete_template.go b/typedapi/indices/deletetemplate/delete_template.go index b39b8af813..dce06d7c05 100644 --- a/typedapi/indices/deletetemplate/delete_template.go +++ b/typedapi/indices/deletetemplate/delete_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a legacy index template. +// // IMPORTANT: This documentation is about legacy index templates, which are // deprecated and will be replaced by the composable templates introduced in // Elasticsearch 7.8. @@ -80,6 +81,7 @@ func NewDeleteTemplateFunc(tp elastictransport.Interface) NewDeleteTemplate { } // Delete a legacy index template. +// // IMPORTANT: This documentation is about legacy index templates, which are // deprecated and will be replaced by the composable templates introduced in // Elasticsearch 7.8. diff --git a/typedapi/indices/deletetemplate/response.go b/typedapi/indices/deletetemplate/response.go index 522dffc81d..f9b5cf282b 100644 --- a/typedapi/indices/deletetemplate/response.go +++ b/typedapi/indices/deletetemplate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletetemplate // Response holds the response body struct for the package deletetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/diskusage/disk_usage.go b/typedapi/indices/diskusage/disk_usage.go index d3b4a197de..d82cc4113e 100644 --- a/typedapi/indices/diskusage/disk_usage.go +++ b/typedapi/indices/diskusage/disk_usage.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Analyze the index disk usage. +// // Analyze the disk usage of each field of an index or data stream. // This API might not support indices created in previous Elasticsearch // versions. @@ -33,6 +34,11 @@ // stored fields are also estimates and can be inaccurate. // The stored size of the `_id` field is likely underestimated while the // `_source` field is overestimated. +// +// For usage examples see the External documentation or refer to [Analyze the +// index disk usage +// example](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/index-disk-usage) +// for an example. package diskusage import ( @@ -92,6 +98,7 @@ func NewDiskUsageFunc(tp elastictransport.Interface) NewDiskUsage { } // Analyze the index disk usage. +// // Analyze the disk usage of each field of an index or data stream. // This API might not support indices created in previous Elasticsearch // versions. @@ -107,6 +114,11 @@ func NewDiskUsageFunc(tp elastictransport.Interface) NewDiskUsage { // The stored size of the `_id` field is likely underestimated while the // `_source` field is overestimated. // +// For usage examples see the External documentation or refer to [Analyze the +// index disk usage +// example](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/index-disk-usage) +// for an example. +// // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage func New(tp elastictransport.Interface) *DiskUsage { r := &DiskUsage{ diff --git a/typedapi/indices/diskusage/response.go b/typedapi/indices/diskusage/response.go index 57fc46d242..bda10b12c3 100644 --- a/typedapi/indices/diskusage/response.go +++ b/typedapi/indices/diskusage/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package diskusage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package diskusage // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/disk_usage/IndicesDiskUsageResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/disk_usage/IndicesDiskUsageResponse.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/indices/downsample/downsample.go b/typedapi/indices/downsample/downsample.go index 6f79b18876..09a93e2c43 100644 --- a/typedapi/indices/downsample/downsample.go +++ b/typedapi/indices/downsample/downsample.go @@ -16,12 +16,20 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Downsample an index. -// Aggregate a time series (TSDS) index and store pre-computed statistical -// summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric -// field grouped by a configured time interval. +// +// Downsamples a time series (TSDS) index and reduces its size by keeping the +// last value or by pre-aggregating metrics: +// +// - When running in `aggregate` mode, it pre-calculates and stores statistical +// summaries (`min`, `max`, `sum`, `value_count` and `avg`) +// for each metric field grouped by a configured time interval and their +// dimensions. +// - When running in `last_value` mode, it keeps the last value for each metric +// in the configured interval and their dimensions. +// // For example, a TSDS index that contains metrics sampled every 10 seconds can // be downsampled to an hourly index. // All documents within an hour interval are summarized and stored as a single @@ -29,7 +37,7 @@ // // NOTE: Only indices in a time series data stream are supported. // Neither field nor document level security can be defined on the source index. -// The source index must be read only (`index.blocks.write: true`). +// The source index must be read-only (`index.blocks.write: true`). package downsample import ( @@ -46,6 +54,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/samplingmethod" ) const ( @@ -98,9 +107,17 @@ func NewDownsampleFunc(tp elastictransport.Interface) NewDownsample { } // Downsample an index. -// Aggregate a time series (TSDS) index and store pre-computed statistical -// summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric -// field grouped by a configured time interval. +// +// Downsamples a time series (TSDS) index and reduces its size by keeping the +// last value or by pre-aggregating metrics: +// +// - When running in `aggregate` mode, it pre-calculates and stores statistical +// summaries (`min`, `max`, `sum`, `value_count` and `avg`) +// for each metric field grouped by a configured time interval and their +// dimensions. +// - When running in `last_value` mode, it keeps the last value for each metric +// in the configured interval and their dimensions. +// // For example, a TSDS index that contains metrics sampled every 10 seconds can // be downsampled to an hourly index. // All documents within an hour interval are summarized and stored as a single @@ -108,7 +125,7 @@ func NewDownsampleFunc(tp elastictransport.Interface) NewDownsample { // // NOTE: Only indices in a time series data stream are supported. // Neither field nor document level security can be defined on the source index. -// The source index must be read only (`index.blocks.write: true`). +// The source index must be read-only (`index.blocks.write: true`). // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample func New(tp elastictransport.Interface) *Downsample { @@ -409,3 +426,15 @@ func (r *Downsample) FixedInterval(durationlarge string) *Downsample { return r } + +// The sampling method used to reduce the documents; it can be either +// `aggregate` or `last_value`. Defaults to `aggregate`. +// API name: sampling_method +func (r *Downsample) SamplingMethod(samplingmethod samplingmethod.SamplingMethod) *Downsample { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.SamplingMethod = &samplingmethod + return r +} diff --git a/typedapi/indices/downsample/request.go b/typedapi/indices/downsample/request.go index edc46d716a..eabd5e5ea1 100644 --- a/typedapi/indices/downsample/request.go +++ b/typedapi/indices/downsample/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package downsample @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package downsample // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/downsample/Request.ts#L24-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/downsample/Request.ts#L24-L64 type Request = types.DownsampleConfig // NewRequest returns a Request diff --git a/typedapi/indices/downsample/response.go b/typedapi/indices/downsample/response.go index bc2425e6ba..b6b77d12f4 100644 --- a/typedapi/indices/downsample/response.go +++ b/typedapi/indices/downsample/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package downsample @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package downsample // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/downsample/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/downsample/Response.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/indices/exists/exists.go b/typedapi/indices/exists/exists.go index c3537bae53..8805b35b1a 100644 --- a/typedapi/indices/exists/exists.go +++ b/typedapi/indices/exists/exists.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check indices. +// // Check if one or more indices, index aliases, or data streams exist. package exists @@ -77,6 +78,7 @@ func NewExistsFunc(tp elastictransport.Interface) NewExists { } // Check indices. +// // Check if one or more indices, index aliases, or data streams exist. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists diff --git a/typedapi/indices/existsalias/exists_alias.go b/typedapi/indices/existsalias/exists_alias.go index 6f69e0d6f9..91514e62cb 100644 --- a/typedapi/indices/existsalias/exists_alias.go +++ b/typedapi/indices/existsalias/exists_alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check aliases. // diff --git a/typedapi/indices/existsindextemplate/exists_index_template.go b/typedapi/indices/existsindextemplate/exists_index_template.go index c5e1eb85fb..1e6f249ab9 100644 --- a/typedapi/indices/existsindextemplate/exists_index_template.go +++ b/typedapi/indices/existsindextemplate/exists_index_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check index templates. // diff --git a/typedapi/indices/existstemplate/exists_template.go b/typedapi/indices/existstemplate/exists_template.go index a2058a7828..bcbf59e643 100644 --- a/typedapi/indices/existstemplate/exists_template.go +++ b/typedapi/indices/existstemplate/exists_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check existence of index templates. +// // Get information about whether index templates exist. // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. @@ -82,6 +83,7 @@ func NewExistsTemplateFunc(tp elastictransport.Interface) NewExistsTemplate { } // Check existence of index templates. +// // Get information about whether index templates exist. // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. diff --git a/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go b/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go index dd92ff8b9e..952dd4daec 100644 --- a/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go +++ b/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the status for a data stream lifecycle. +// // Get information about an index or data stream's current data stream lifecycle // status, such as time since index creation, time since rollover, the lifecycle // configuration managing the index, or any errors encountered during lifecycle @@ -81,6 +82,7 @@ func NewExplainDataLifecycleFunc(tp elastictransport.Interface) NewExplainDataLi } // Get the status for a data stream lifecycle. +// // Get information about an index or data stream's current data stream lifecycle // status, such as time since index creation, time since rollover, the lifecycle // configuration managing the index, or any errors encountered during lifecycle @@ -298,7 +300,7 @@ func (r *ExplainDataLifecycle) Header(key, value string) *ExplainDataLifecycle { return r } -// Index The name of the index to explain +// Index Comma-separated list of index names to explain // API Name: index func (r *ExplainDataLifecycle) _index(index string) *ExplainDataLifecycle { r.paramSet |= indexMask diff --git a/typedapi/indices/explaindatalifecycle/response.go b/typedapi/indices/explaindatalifecycle/response.go index 7a81b933f7..27e83effc1 100644 --- a/typedapi/indices/explaindatalifecycle/response.go +++ b/typedapi/indices/explaindatalifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package explaindatalifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explaindatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L25-L29 type Response struct { Indices map[string]types.DataStreamLifecycleExplain `json:"indices"` } diff --git a/typedapi/indices/fieldusagestats/field_usage_stats.go b/typedapi/indices/fieldusagestats/field_usage_stats.go index a32dd29f03..638605ec9a 100644 --- a/typedapi/indices/fieldusagestats/field_usage_stats.go +++ b/typedapi/indices/fieldusagestats/field_usage_stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get field usage stats. +// // Get field usage information for each shard and field of an index. // Field usage statistics are automatically captured when queries are running on // a cluster. @@ -88,6 +89,7 @@ func NewFieldUsageStatsFunc(tp elastictransport.Interface) NewFieldUsageStats { } // Get field usage stats. +// // Get field usage information for each shard and field of an index. // Field usage statistics are automatically captured when queries are running on // a cluster. diff --git a/typedapi/indices/fieldusagestats/response.go b/typedapi/indices/fieldusagestats/response.go index a64f8ca2c3..1ed344ded7 100644 --- a/typedapi/indices/fieldusagestats/response.go +++ b/typedapi/indices/fieldusagestats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package fieldusagestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package fieldusagestats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L31 type Response struct { FieldsUsageBody map[string]types.UsageStatsIndex `json:"-"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/indices/flush/flush.go b/typedapi/indices/flush/flush.go index 8132c1b598..643b0ee842 100644 --- a/typedapi/indices/flush/flush.go +++ b/typedapi/indices/flush/flush.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Flush data streams or indices. +// // Flushing a data stream or index is the process of making sure that any data // that is currently only stored in the transaction log is also permanently // stored in the Lucene index. @@ -99,6 +100,7 @@ func NewFlushFunc(tp elastictransport.Interface) NewFlush { } // Flush data streams or indices. +// // Flushing a data stream or index is the process of making sure that any data // that is currently only stored in the transaction log is also permanently // stored in the Lucene index. diff --git a/typedapi/indices/flush/response.go b/typedapi/indices/flush/response.go index 62e66ae38f..a7b88cf08a 100644 --- a/typedapi/indices/flush/response.go +++ b/typedapi/indices/flush/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package flush @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package flush // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/flush/IndicesFlushResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/flush/IndicesFlushResponse.ts#L22-L25 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } diff --git a/typedapi/indices/forcemerge/forcemerge.go b/typedapi/indices/forcemerge/forcemerge.go index 4aa61d27e3..03a30a0909 100644 --- a/typedapi/indices/forcemerge/forcemerge.go +++ b/typedapi/indices/forcemerge/forcemerge.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Force a merge. +// // Perform the force merge operation on the shards of one or more indices. // For data streams, the API forces a merge on the shards of the stream's // backing indices. @@ -156,6 +157,7 @@ func NewForcemergeFunc(tp elastictransport.Interface) NewForcemerge { } // Force a merge. +// // Perform the force merge operation on the shards of one or more indices. // For data streams, the API forces a merge on the shards of the stream's // backing indices. diff --git a/typedapi/indices/forcemerge/response.go b/typedapi/indices/forcemerge/response.go index 0633e0c595..f33f945fee 100644 --- a/typedapi/indices/forcemerge/response.go +++ b/typedapi/indices/forcemerge/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package forcemerge @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package forcemerge // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/forcemerge/IndicesForceMergeResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/forcemerge/IndicesForceMergeResponse.ts#L22-L25 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` // Task task contains a task id returned when wait_for_completion=false, diff --git a/typedapi/indices/get/get.go b/typedapi/indices/get/get.go index 9ddc3782bb..5c6cdcf8ae 100644 --- a/typedapi/indices/get/get.go +++ b/typedapi/indices/get/get.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get index information. +// // Get information about one or more indices. For data streams, the API returns // information about the // stream’s backing indices. @@ -82,6 +83,7 @@ func NewGetFunc(tp elastictransport.Interface) NewGet { } // Get index information. +// // Get information about one or more indices. For data streams, the API returns // information about the // stream’s backing indices. diff --git a/typedapi/indices/get/response.go b/typedapi/indices/get/response.go index 45b9170d06..b8e1041335 100644 --- a/typedapi/indices/get/response.go +++ b/typedapi/indices/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get/IndicesGetResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get/IndicesGetResponse.ts#L24-L27 type Response map[string]types.IndexState diff --git a/typedapi/indices/getalias/get_alias.go b/typedapi/indices/getalias/get_alias.go index 62fc7b91e1..6adb24c700 100644 --- a/typedapi/indices/getalias/get_alias.go +++ b/typedapi/indices/getalias/get_alias.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get aliases. +// // Retrieves information for one or more data stream or index aliases. package getalias @@ -80,6 +81,7 @@ func NewGetAliasFunc(tp elastictransport.Interface) NewGetAlias { } // Get aliases. +// // Retrieves information for one or more data stream or index aliases. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias diff --git a/typedapi/indices/getalias/response.go b/typedapi/indices/getalias/response.go index 67e8cd1b36..06028c826f 100644 --- a/typedapi/indices/getalias/response.go +++ b/typedapi/indices/getalias/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getalias @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getalias // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_alias/IndicesGetAliasResponse.ts#L28-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_alias/IndicesGetAliasResponse.ts#L28-L38 type Response map[string]types.IndexAliases diff --git a/typedapi/indices/getallsampleconfiguration/get_all_sample_configuration.go b/typedapi/indices/getallsampleconfiguration/get_all_sample_configuration.go new file mode 100644 index 0000000000..9c9056907d --- /dev/null +++ b/typedapi/indices/getallsampleconfiguration/get_all_sample_configuration.go @@ -0,0 +1,335 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Get all sampling configurations. +// +// Get the sampling configurations for all indices. +package getallsampleconfiguration + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type GetAllSampleConfiguration struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetAllSampleConfiguration type alias for index. +type NewGetAllSampleConfiguration func() *GetAllSampleConfiguration + +// NewGetAllSampleConfigurationFunc returns a new instance of GetAllSampleConfiguration with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetAllSampleConfigurationFunc(tp elastictransport.Interface) NewGetAllSampleConfiguration { + return func() *GetAllSampleConfiguration { + n := New(tp) + + return n + } +} + +// Get all sampling configurations. +// +// Get the sampling configurations for all indices. +// +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func New(tp elastictransport.Interface) *GetAllSampleConfiguration { + r := &GetAllSampleConfiguration{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *GetAllSampleConfiguration) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == 0: + path.WriteString("/") + path.WriteString("_sample") + path.WriteString("/") + path.WriteString("config") + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r GetAllSampleConfiguration) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "indices.get_all_sample_configuration") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_all_sample_configuration") + if reader := instrument.RecordRequestBody(ctx, "indices.get_all_sample_configuration", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_all_sample_configuration") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetAllSampleConfiguration query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a getallsampleconfiguration.Response +func (r GetAllSampleConfiguration) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_all_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r GetAllSampleConfiguration) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_all_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the GetAllSampleConfiguration query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the GetAllSampleConfiguration headers map. +func (r *GetAllSampleConfiguration) Header(key, value string) *GetAllSampleConfiguration { + r.headers.Set(key, value) + + return r +} + +// MasterTimeout 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: master_timeout +func (r *GetAllSampleConfiguration) MasterTimeout(duration string) *GetAllSampleConfiguration { + r.values.Set("master_timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *GetAllSampleConfiguration) ErrorTrace(errortrace bool) *GetAllSampleConfiguration { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *GetAllSampleConfiguration) FilterPath(filterpaths ...string) *GetAllSampleConfiguration { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *GetAllSampleConfiguration) Human(human bool) *GetAllSampleConfiguration { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *GetAllSampleConfiguration) Pretty(pretty bool) *GetAllSampleConfiguration { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/getallsampleconfiguration/response.go b/typedapi/indices/getallsampleconfiguration/response.go new file mode 100644 index 0000000000..d3512eef8a --- /dev/null +++ b/typedapi/indices/getallsampleconfiguration/response.go @@ -0,0 +1,38 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package getallsampleconfiguration + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package getallsampleconfiguration +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_all_sample_configuration/IndicesGetAllSampleConfigurationResponse.ts#L22-L26 +type Response struct { + Configurations []types.IndexSamplingConfiguration `json:"configurations"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/getdatalifecycle/get_data_lifecycle.go b/typedapi/indices/getdatalifecycle/get_data_lifecycle.go index 543ad7141f..45c3ffff04 100644 --- a/typedapi/indices/getdatalifecycle/get_data_lifecycle.go +++ b/typedapi/indices/getdatalifecycle/get_data_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get data stream lifecycles. // diff --git a/typedapi/indices/getdatalifecycle/response.go b/typedapi/indices/getdatalifecycle/response.go index d3895a2d6d..5dc9d9d609 100644 --- a/typedapi/indices/getdatalifecycle/response.go +++ b/typedapi/indices/getdatalifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getdatalifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25 type Response struct { DataStreams []types.DataStreamWithLifecycle `json:"data_streams"` } diff --git a/typedapi/indices/getdatalifecyclestats/get_data_lifecycle_stats.go b/typedapi/indices/getdatalifecyclestats/get_data_lifecycle_stats.go index defb984b17..466b5d5bf9 100644 --- a/typedapi/indices/getdatalifecyclestats/get_data_lifecycle_stats.go +++ b/typedapi/indices/getdatalifecyclestats/get_data_lifecycle_stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get data stream lifecycle stats. +// // Get statistics about the data streams that are managed by a data stream // lifecycle. package getdatalifecyclestats @@ -71,6 +72,7 @@ func NewGetDataLifecycleStatsFunc(tp elastictransport.Interface) NewGetDataLifec } // Get data stream lifecycle stats. +// // Get statistics about the data streams that are managed by a data stream // lifecycle. // diff --git a/typedapi/indices/getdatalifecyclestats/response.go b/typedapi/indices/getdatalifecyclestats/response.go index 44bf69c6e1..f3b82ebc11 100644 --- a/typedapi/indices/getdatalifecyclestats/response.go +++ b/typedapi/indices/getdatalifecyclestats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getdatalifecyclestats @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package getdatalifecyclestats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L24-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L24-L44 type Response struct { - // DataStreamCount The count of data streams currently being managed by the data stream // lifecycle. DataStreamCount int `json:"data_stream_count"` diff --git a/typedapi/indices/getdatastream/get_data_stream.go b/typedapi/indices/getdatastream/get_data_stream.go index f4bbc9d70a..c9afdd3ea9 100644 --- a/typedapi/indices/getdatastream/get_data_stream.go +++ b/typedapi/indices/getdatastream/get_data_stream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get data streams. // diff --git a/typedapi/indices/getdatastream/response.go b/typedapi/indices/getdatastream/response.go index 3ea8c900f1..4ef9f210cf 100644 --- a/typedapi/indices/getdatastream/response.go +++ b/typedapi/indices/getdatastream/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getdatastream @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatastream // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24 type Response struct { DataStreams []types.DataStream `json:"data_streams"` } diff --git a/typedapi/indices/getdatastreammappings/get_data_stream_mappings.go b/typedapi/indices/getdatastreammappings/get_data_stream_mappings.go new file mode 100644 index 0000000000..254da15364 --- /dev/null +++ b/typedapi/indices/getdatastreammappings/get_data_stream_mappings.go @@ -0,0 +1,359 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Get data stream mappings. +// +// Get mapping information for one or more data streams. +package getdatastreammappings + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + nameMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type GetDataStreamMappings struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + name string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetDataStreamMappings type alias for index. +type NewGetDataStreamMappings func(name string) *GetDataStreamMappings + +// NewGetDataStreamMappingsFunc returns a new instance of GetDataStreamMappings with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetDataStreamMappingsFunc(tp elastictransport.Interface) NewGetDataStreamMappings { + return func(name string) *GetDataStreamMappings { + n := New(tp) + + n._name(name) + + return n + } +} + +// Get data stream mappings. +// +// Get mapping information for one or more data streams. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-mappings +func New(tp elastictransport.Interface) *GetDataStreamMappings { + r := &GetDataStreamMappings{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *GetDataStreamMappings) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == nameMask: + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", r.name) + } + path.WriteString(r.name) + path.WriteString("/") + path.WriteString("_mappings") + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r GetDataStreamMappings) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "indices.get_data_stream_mappings") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_data_stream_mappings") + if reader := instrument.RecordRequestBody(ctx, "indices.get_data_stream_mappings", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_data_stream_mappings") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetDataStreamMappings query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a getdatastreammappings.Response +func (r GetDataStreamMappings) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_data_stream_mappings") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r GetDataStreamMappings) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_data_stream_mappings") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the GetDataStreamMappings query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the GetDataStreamMappings headers map. +func (r *GetDataStreamMappings) Header(key, value string) *GetDataStreamMappings { + r.headers.Set(key, value) + + return r +} + +// Name A comma-separated list of data streams or data stream patterns. Supports +// wildcards (`*`). +// API Name: name +func (r *GetDataStreamMappings) _name(name string) *GetDataStreamMappings { + r.paramSet |= nameMask + r.name = name + + return r +} + +// MasterTimeout The period to wait for a connection to the master node. If no response is +// received before the timeout expires, the request fails and returns an +// error. +// API name: master_timeout +func (r *GetDataStreamMappings) MasterTimeout(duration string) *GetDataStreamMappings { + r.values.Set("master_timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *GetDataStreamMappings) ErrorTrace(errortrace bool) *GetDataStreamMappings { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *GetDataStreamMappings) FilterPath(filterpaths ...string) *GetDataStreamMappings { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *GetDataStreamMappings) Human(human bool) *GetDataStreamMappings { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *GetDataStreamMappings) Pretty(pretty bool) *GetDataStreamMappings { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/getdatastreammappings/response.go b/typedapi/indices/getdatastreammappings/response.go new file mode 100644 index 0000000000..99eca2084d --- /dev/null +++ b/typedapi/indices/getdatastreammappings/response.go @@ -0,0 +1,38 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package getdatastreammappings + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package getdatastreammappings +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_stream_mappings/IndicesGetDataStreamMappingsResponse.ts#L22-L27 +type Response struct { + DataStreams []types.DataStreamMappings `json:"data_streams"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/getdatastreamoptions/get_data_stream_options.go b/typedapi/indices/getdatastreamoptions/get_data_stream_options.go index a9a9403ef7..ccd1acd4a1 100644 --- a/typedapi/indices/getdatastreamoptions/get_data_stream_options.go +++ b/typedapi/indices/getdatastreamoptions/get_data_stream_options.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get data stream options. // @@ -83,7 +83,7 @@ func NewGetDataStreamOptionsFunc(tp elastictransport.Interface) NewGetDataStream // // Get the data stream options configuration of one or more data streams. // -// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-options func New(tp elastictransport.Interface) *GetDataStreamOptions { r := &GetDataStreamOptions{ transport: tp, diff --git a/typedapi/indices/getdatastreamoptions/response.go b/typedapi/indices/getdatastreamoptions/response.go index e6deb49654..3409316a36 100644 --- a/typedapi/indices/getdatastreamoptions/response.go +++ b/typedapi/indices/getdatastreamoptions/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getdatastreamoptions @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatastreamoptions // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L23-L25 type Response struct { DataStreams []types.DataStreamWithOptions `json:"data_streams"` } diff --git a/typedapi/indices/getdatastreamsettings/get_data_stream_settings.go b/typedapi/indices/getdatastreamsettings/get_data_stream_settings.go index 7b1201cc35..712acbbb84 100644 --- a/typedapi/indices/getdatastreamsettings/get_data_stream_settings.go +++ b/typedapi/indices/getdatastreamsettings/get_data_stream_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get data stream settings. // diff --git a/typedapi/indices/getdatastreamsettings/response.go b/typedapi/indices/getdatastreamsettings/response.go index 13b7aafd7c..4dae93a29f 100644 --- a/typedapi/indices/getdatastreamsettings/response.go +++ b/typedapi/indices/getdatastreamsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getdatastreamsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatastreamsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L22-L27 type Response struct { DataStreams []types.DataStreamSettings `json:"data_streams"` } diff --git a/typedapi/indices/getfieldmapping/get_field_mapping.go b/typedapi/indices/getfieldmapping/get_field_mapping.go index 7d65b3332f..fa2f7217fc 100644 --- a/typedapi/indices/getfieldmapping/get_field_mapping.go +++ b/typedapi/indices/getfieldmapping/get_field_mapping.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get mapping definitions. +// // Retrieves mapping definitions for one or more fields. // For data streams, the API retrieves field mappings for the stream’s backing // indices. @@ -87,6 +88,7 @@ func NewGetFieldMappingFunc(tp elastictransport.Interface) NewGetFieldMapping { } // Get mapping definitions. +// // Retrieves mapping definitions for one or more fields. // For data streams, the API retrieves field mappings for the stream’s backing // indices. diff --git a/typedapi/indices/getfieldmapping/response.go b/typedapi/indices/getfieldmapping/response.go index 01625e14b8..9195ebcfe1 100644 --- a/typedapi/indices/getfieldmapping/response.go +++ b/typedapi/indices/getfieldmapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getfieldmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfieldmapping // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_field_mapping/IndicesGetFieldMappingResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_field_mapping/IndicesGetFieldMappingResponse.ts#L24-L27 type Response map[string]types.TypeFieldMappings diff --git a/typedapi/indices/getindextemplate/get_index_template.go b/typedapi/indices/getindextemplate/get_index_template.go index 6df2b30d97..65731296ad 100644 --- a/typedapi/indices/getindextemplate/get_index_template.go +++ b/typedapi/indices/getindextemplate/get_index_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get index templates. +// // Get information about one or more index templates. package getindextemplate @@ -76,6 +77,7 @@ func NewGetIndexTemplateFunc(tp elastictransport.Interface) NewGetIndexTemplate } // Get index templates. +// // Get information about one or more index templates. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template @@ -293,8 +295,7 @@ func (r *GetIndexTemplate) Header(key, value string) *GetIndexTemplate { return r } -// Name Comma-separated list of index template names used to limit the request. -// Wildcard (*) expressions are supported. +// Name Name of index template to retrieve. Wildcard (*) expressions are supported. // API Name: name func (r *GetIndexTemplate) Name(name string) *GetIndexTemplate { r.paramSet |= nameMask diff --git a/typedapi/indices/getindextemplate/response.go b/typedapi/indices/getindextemplate/response.go index 4f8f633d4d..d07fe81e2b 100644 --- a/typedapi/indices/getindextemplate/response.go +++ b/typedapi/indices/getindextemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getindextemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L23-L27 type Response struct { IndexTemplates []types.IndexTemplateItem `json:"index_templates"` } diff --git a/typedapi/indices/getmapping/get_mapping.go b/typedapi/indices/getmapping/get_mapping.go index cf013cfdcc..5469a5c5bd 100644 --- a/typedapi/indices/getmapping/get_mapping.go +++ b/typedapi/indices/getmapping/get_mapping.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get mapping definitions. +// // For data streams, the API retrieves mappings for the stream’s backing // indices. package getmapping @@ -78,6 +79,7 @@ func NewGetMappingFunc(tp elastictransport.Interface) NewGetMapping { } // Get mapping definitions. +// // For data streams, the API retrieves mappings for the stream’s backing // indices. // diff --git a/typedapi/indices/getmapping/response.go b/typedapi/indices/getmapping/response.go index 5d915e679e..7b95c81b38 100644 --- a/typedapi/indices/getmapping/response.go +++ b/typedapi/indices/getmapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmapping // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27 type Response map[string]types.IndexMappingRecord diff --git a/typedapi/indices/getmigratereindexstatus/get_migrate_reindex_status.go b/typedapi/indices/getmigratereindexstatus/get_migrate_reindex_status.go index ae4f90f6e7..74846cc81d 100644 --- a/typedapi/indices/getmigratereindexstatus/get_migrate_reindex_status.go +++ b/typedapi/indices/getmigratereindexstatus/get_migrate_reindex_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the migration reindexing status. // diff --git a/typedapi/indices/getmigratereindexstatus/response.go b/typedapi/indices/getmigratereindexstatus/response.go index eeb35b539f..a514916ffd 100644 --- a/typedapi/indices/getmigratereindexstatus/response.go +++ b/typedapi/indices/getmigratereindexstatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getmigratereindexstatus @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package getmigratereindexstatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L23-L36 type Response struct { Complete bool `json:"complete"` Errors []types.StatusError `json:"errors"` diff --git a/typedapi/indices/getsample/get_sample.go b/typedapi/indices/getsample/get_sample.go new file mode 100644 index 0000000000..79bb94f7ca --- /dev/null +++ b/typedapi/indices/getsample/get_sample.go @@ -0,0 +1,344 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Request for a random sample of raw documents ingested into the given index or +// data stream. +package getsample + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + indexMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type GetSample struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + index string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetSample type alias for index. +type NewGetSample func(index string) *GetSample + +// NewGetSampleFunc returns a new instance of GetSample with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetSampleFunc(tp elastictransport.Interface) NewGetSample { + return func(index string) *GetSample { + n := New(tp) + + n._index(index) + + return n + } +} + +// Request for a random sample of raw documents ingested into the given index or +// data stream. +// +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func New(tp elastictransport.Interface) *GetSample { + r := &GetSample{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *GetSample) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == indexMask: + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.index) + } + path.WriteString(r.index) + path.WriteString("/") + path.WriteString("_sample") + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r GetSample) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "indices.get_sample") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_sample") + if reader := instrument.RecordRequestBody(ctx, "indices.get_sample", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_sample") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetSample query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a getsample.Response +func (r GetSample) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_sample") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r GetSample) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_sample") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the GetSample query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the GetSample headers map. +func (r *GetSample) Header(key, value string) *GetSample { + r.headers.Set(key, value) + + return r +} + +// Index Single index or data stream name. Wildcards are not supported. +// API Name: index +func (r *GetSample) _index(index string) *GetSample { + r.paramSet |= indexMask + r.index = index + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *GetSample) ErrorTrace(errortrace bool) *GetSample { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *GetSample) FilterPath(filterpaths ...string) *GetSample { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *GetSample) Human(human bool) *GetSample { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *GetSample) Pretty(pretty bool) *GetSample { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/getsample/response.go b/typedapi/indices/getsample/response.go new file mode 100644 index 0000000000..a4c420969f --- /dev/null +++ b/typedapi/indices/getsample/response.go @@ -0,0 +1,38 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package getsample + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package getsample +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_sample/GetRandomSampleResponse.ts#L22-L28 +type Response struct { + Sample []types.RawDocument `json:"sample"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/getsampleconfiguration/get_sample_configuration.go b/typedapi/indices/getsampleconfiguration/get_sample_configuration.go new file mode 100644 index 0000000000..c915bec532 --- /dev/null +++ b/typedapi/indices/getsampleconfiguration/get_sample_configuration.go @@ -0,0 +1,358 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Get sampling configuration. +// +// Get the sampling configuration for the specified index. +package getsampleconfiguration + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + indexMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type GetSampleConfiguration struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + index string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetSampleConfiguration type alias for index. +type NewGetSampleConfiguration func(index string) *GetSampleConfiguration + +// NewGetSampleConfigurationFunc returns a new instance of GetSampleConfiguration with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetSampleConfigurationFunc(tp elastictransport.Interface) NewGetSampleConfiguration { + return func(index string) *GetSampleConfiguration { + n := New(tp) + + n._index(index) + + return n + } +} + +// Get sampling configuration. +// +// Get the sampling configuration for the specified index. +// +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func New(tp elastictransport.Interface) *GetSampleConfiguration { + r := &GetSampleConfiguration{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *GetSampleConfiguration) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == indexMask: + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.index) + } + path.WriteString(r.index) + path.WriteString("/") + path.WriteString("_sample") + path.WriteString("/") + path.WriteString("config") + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r GetSampleConfiguration) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "indices.get_sample_configuration") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_sample_configuration") + if reader := instrument.RecordRequestBody(ctx, "indices.get_sample_configuration", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_sample_configuration") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetSampleConfiguration query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a getsampleconfiguration.Response +func (r GetSampleConfiguration) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r GetSampleConfiguration) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the GetSampleConfiguration query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the GetSampleConfiguration headers map. +func (r *GetSampleConfiguration) Header(key, value string) *GetSampleConfiguration { + r.headers.Set(key, value) + + return r +} + +// Index The name of the index. +// API Name: index +func (r *GetSampleConfiguration) _index(index string) *GetSampleConfiguration { + r.paramSet |= indexMask + r.index = index + + return r +} + +// MasterTimeout 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: master_timeout +func (r *GetSampleConfiguration) MasterTimeout(duration string) *GetSampleConfiguration { + r.values.Set("master_timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *GetSampleConfiguration) ErrorTrace(errortrace bool) *GetSampleConfiguration { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *GetSampleConfiguration) FilterPath(filterpaths ...string) *GetSampleConfiguration { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *GetSampleConfiguration) Human(human bool) *GetSampleConfiguration { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *GetSampleConfiguration) Pretty(pretty bool) *GetSampleConfiguration { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/getsampleconfiguration/response.go b/typedapi/indices/getsampleconfiguration/response.go new file mode 100644 index 0000000000..57f2da8397 --- /dev/null +++ b/typedapi/indices/getsampleconfiguration/response.go @@ -0,0 +1,39 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package getsampleconfiguration + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package getsampleconfiguration +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_sample_configuration/IndicesGetSampleConfigurationResponse.ts#L23-L28 +type Response struct { + Configuration *types.SamplingConfiguration `json:"configuration,omitempty"` + Index string `json:"index"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/getsamplestats/get_sample_stats.go b/typedapi/indices/getsamplestats/get_sample_stats.go new file mode 100644 index 0000000000..fb51441e1f --- /dev/null +++ b/typedapi/indices/getsamplestats/get_sample_stats.go @@ -0,0 +1,346 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Request stats for a random sample of raw documents ingested into the given +// index or data stream. +package getsamplestats + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + indexMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type GetSampleStats struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + index string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetSampleStats type alias for index. +type NewGetSampleStats func(index string) *GetSampleStats + +// NewGetSampleStatsFunc returns a new instance of GetSampleStats with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetSampleStatsFunc(tp elastictransport.Interface) NewGetSampleStats { + return func(index string) *GetSampleStats { + n := New(tp) + + n._index(index) + + return n + } +} + +// Request stats for a random sample of raw documents ingested into the given +// index or data stream. +// +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func New(tp elastictransport.Interface) *GetSampleStats { + r := &GetSampleStats{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *GetSampleStats) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == indexMask: + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.index) + } + path.WriteString(r.index) + path.WriteString("/") + path.WriteString("_sample") + path.WriteString("/") + path.WriteString("stats") + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r GetSampleStats) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "indices.get_sample_stats") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_sample_stats") + if reader := instrument.RecordRequestBody(ctx, "indices.get_sample_stats", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_sample_stats") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetSampleStats query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a getsamplestats.Response +func (r GetSampleStats) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_sample_stats") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r GetSampleStats) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_sample_stats") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the GetSampleStats query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the GetSampleStats headers map. +func (r *GetSampleStats) Header(key, value string) *GetSampleStats { + r.headers.Set(key, value) + + return r +} + +// Index Single index or data stream name. Wildcards are not supported. +// API Name: index +func (r *GetSampleStats) _index(index string) *GetSampleStats { + r.paramSet |= indexMask + r.index = index + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *GetSampleStats) ErrorTrace(errortrace bool) *GetSampleStats { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *GetSampleStats) FilterPath(filterpaths ...string) *GetSampleStats { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *GetSampleStats) Human(human bool) *GetSampleStats { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *GetSampleStats) Pretty(pretty bool) *GetSampleStats { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/getsamplestats/response.go b/typedapi/indices/getsamplestats/response.go new file mode 100644 index 0000000000..866111f151 --- /dev/null +++ b/typedapi/indices/getsamplestats/response.go @@ -0,0 +1,51 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package getsamplestats + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package getsamplestats +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_sample_stats/GetRandomSampleStatsResponse.ts#L23-L44 +type Response struct { + LastException *string `json:"last_exception,omitempty"` + PotentialSamples int64 `json:"potential_samples"` + SamplesAccepted int64 `json:"samples_accepted"` + SamplesRejectedForCondition int64 `json:"samples_rejected_for_condition"` + SamplesRejectedForException int64 `json:"samples_rejected_for_exception"` + SamplesRejectedForMaxSamplesExceeded int64 `json:"samples_rejected_for_max_samples_exceeded"` + SamplesRejectedForRate int64 `json:"samples_rejected_for_rate"` + SamplesRejectedForSize int64 `json:"samples_rejected_for_size"` + TimeCompilingCondition types.Duration `json:"time_compiling_condition,omitempty"` + TimeCompilingConditionMillis int64 `json:"time_compiling_condition_millis"` + TimeEvaluatingCondition types.Duration `json:"time_evaluating_condition,omitempty"` + TimeEvaluatingConditionMillis int64 `json:"time_evaluating_condition_millis"` + TimeSampling types.Duration `json:"time_sampling,omitempty"` + TimeSamplingMillis int64 `json:"time_sampling_millis"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/getsettings/get_settings.go b/typedapi/indices/getsettings/get_settings.go index 6f36056692..35b6801260 100644 --- a/typedapi/indices/getsettings/get_settings.go +++ b/typedapi/indices/getsettings/get_settings.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get index settings. +// // Get setting information for one or more indices. // For data streams, it returns setting information for the stream's backing // indices. @@ -82,6 +83,7 @@ func NewGetSettingsFunc(tp elastictransport.Interface) NewGetSettings { } // Get index settings. +// // Get setting information for one or more indices. // For data streams, it returns setting information for the stream's backing // indices. diff --git a/typedapi/indices/getsettings/response.go b/typedapi/indices/getsettings/response.go index a17159e15a..1afe2a36c3 100644 --- a/typedapi/indices/getsettings/response.go +++ b/typedapi/indices/getsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27 type Response map[string]types.IndexState diff --git a/typedapi/indices/gettemplate/get_template.go b/typedapi/indices/gettemplate/get_template.go index d9841bc58a..f1186b54c7 100644 --- a/typedapi/indices/gettemplate/get_template.go +++ b/typedapi/indices/gettemplate/get_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get legacy index templates. +// // Get information about one or more index templates. // // IMPORTANT: This documentation is about legacy index templates, which are @@ -80,6 +81,7 @@ func NewGetTemplateFunc(tp elastictransport.Interface) NewGetTemplate { } // Get legacy index templates. +// // Get information about one or more index templates. // // IMPORTANT: This documentation is about legacy index templates, which are diff --git a/typedapi/indices/gettemplate/response.go b/typedapi/indices/gettemplate/response.go index b36dfd212f..c2537c787a 100644 --- a/typedapi/indices/gettemplate/response.go +++ b/typedapi/indices/gettemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package gettemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_template/IndicesGetTemplateResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_template/IndicesGetTemplateResponse.ts#L23-L26 type Response map[string]types.TemplateMapping diff --git a/typedapi/indices/migratereindex/migrate_reindex.go b/typedapi/indices/migratereindex/migrate_reindex.go index 708fdf5d96..8d2577cc20 100644 --- a/typedapi/indices/migratereindex/migrate_reindex.go +++ b/typedapi/indices/migratereindex/migrate_reindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Reindex legacy backing indices. // diff --git a/typedapi/indices/migratereindex/request.go b/typedapi/indices/migratereindex/request.go index 5246cec848..f89be74c50 100644 --- a/typedapi/indices/migratereindex/request.go +++ b/typedapi/indices/migratereindex/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package migratereindex @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package migratereindex // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L23-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L23-L43 type Request = types.MigrateReindex // NewRequest returns a Request diff --git a/typedapi/indices/migratereindex/response.go b/typedapi/indices/migratereindex/response.go index 14ca145e6b..1769f7e06c 100644 --- a/typedapi/indices/migratereindex/response.go +++ b/typedapi/indices/migratereindex/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package migratereindex // Response holds the response body struct for the package migratereindex // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_reindex/MigrateReindexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/migrate_reindex/MigrateReindexResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/migratetodatastream/migrate_to_data_stream.go b/typedapi/indices/migratetodatastream/migrate_to_data_stream.go index 0b1e2c5dd2..254633e2ee 100644 --- a/typedapi/indices/migratetodatastream/migrate_to_data_stream.go +++ b/typedapi/indices/migratetodatastream/migrate_to_data_stream.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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: @@ -89,6 +90,7 @@ func NewMigrateToDataStreamFunc(tp elastictransport.Interface) NewMigrateToDataS } // 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: diff --git a/typedapi/indices/migratetodatastream/response.go b/typedapi/indices/migratetodatastream/response.go index 90b91fa9e4..e9435486b2 100644 --- a/typedapi/indices/migratetodatastream/response.go +++ b/typedapi/indices/migratetodatastream/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package migratetodatastream // Response holds the response body struct for the package migratetodatastream // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/modifydatastream/modify_data_stream.go b/typedapi/indices/modifydatastream/modify_data_stream.go index 700e566e6a..f0fd012c04 100644 --- a/typedapi/indices/modifydatastream/modify_data_stream.go +++ b/typedapi/indices/modifydatastream/modify_data_stream.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update data streams. +// // Performs one or more data stream modification actions in a single atomic // operation. package modifydatastream @@ -76,6 +77,7 @@ func NewModifyDataStreamFunc(tp elastictransport.Interface) NewModifyDataStream } // Update data streams. +// // Performs one or more data stream modification actions in a single atomic // operation. // diff --git a/typedapi/indices/modifydatastream/request.go b/typedapi/indices/modifydatastream/request.go index 6381ba01f9..85ad44e6cb 100644 --- a/typedapi/indices/modifydatastream/request.go +++ b/typedapi/indices/modifydatastream/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package modifydatastream @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package modifydatastream // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L46 type Request struct { - // Actions Actions to perform. Actions []types.IndicesModifyAction `json:"actions"` } diff --git a/typedapi/indices/modifydatastream/response.go b/typedapi/indices/modifydatastream/response.go index 56024f92a4..11070f6807 100644 --- a/typedapi/indices/modifydatastream/response.go +++ b/typedapi/indices/modifydatastream/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package modifydatastream // Response holds the response body struct for the package modifydatastream // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/open/open.go b/typedapi/indices/open/open.go index da91f089c3..453c252fe3 100644 --- a/typedapi/indices/open/open.go +++ b/typedapi/indices/open/open.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Open a closed index. +// // For data streams, the API opens any closed backing indices. // // A closed index is blocked for read/write operations and does not allow all @@ -113,6 +114,7 @@ func NewOpenFunc(tp elastictransport.Interface) NewOpen { } // Open a closed index. +// // For data streams, the API opens any closed backing indices. // // A closed index is blocked for read/write operations and does not allow all diff --git a/typedapi/indices/open/response.go b/typedapi/indices/open/response.go index 516ccd9f2c..61e90b92cb 100644 --- a/typedapi/indices/open/response.go +++ b/typedapi/indices/open/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package open // Response holds the response body struct for the package open // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/open/IndicesOpenResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/open/IndicesOpenResponse.ts#L20-L25 type Response struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` diff --git a/typedapi/indices/promotedatastream/promote_data_stream.go b/typedapi/indices/promotedatastream/promote_data_stream.go index e5872aa31a..249e1a59ad 100644 --- a/typedapi/indices/promotedatastream/promote_data_stream.go +++ b/typedapi/indices/promotedatastream/promote_data_stream.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Promote a data stream. +// // Promote a data stream from a replicated data stream managed by cross-cluster // replication (CCR) to a regular data stream. // @@ -95,6 +96,7 @@ func NewPromoteDataStreamFunc(tp elastictransport.Interface) NewPromoteDataStrea } // Promote a data stream. +// // Promote a data stream from a replicated data stream managed by cross-cluster // replication (CCR) to a regular data stream. // diff --git a/typedapi/indices/promotedatastream/response.go b/typedapi/indices/promotedatastream/response.go index 834e5a1023..43e8d770a7 100644 --- a/typedapi/indices/promotedatastream/response.go +++ b/typedapi/indices/promotedatastream/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package promotedatastream @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package promotedatastream // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/promote_data_stream/IndicesPromoteDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/promote_data_stream/IndicesPromoteDataStreamResponse.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/indices/putalias/put_alias.go b/typedapi/indices/putalias/put_alias.go index b1e36ea28a..2656f8ef29 100644 --- a/typedapi/indices/putalias/put_alias.go +++ b/typedapi/indices/putalias/put_alias.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update an alias. +// // Adds a data stream or index to an alias. package putalias @@ -88,6 +89,7 @@ func NewPutAliasFunc(tp elastictransport.Interface) NewPutAlias { } // Create or update an alias. +// // Adds a data stream or index to an alias. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias @@ -435,13 +437,13 @@ func (r *PutAlias) Filter(filter types.QueryVariant) *PutAlias { // If specified, this overwrites the `routing` value for indexing operations. // Data stream aliases don’t support this parameter. // API name: index_routing -func (r *PutAlias) IndexRouting(routing string) *PutAlias { +func (r *PutAlias) IndexRouting(routings ...string) *PutAlias { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexRouting = &routing + r.req.IndexRouting = routings return r } @@ -468,13 +470,13 @@ func (r *PutAlias) IsWriteIndex(iswriteindex bool) *PutAlias { // Value used to route indexing and search operations to a specific shard. // Data stream aliases don’t support this parameter. // API name: routing -func (r *PutAlias) Routing(routing string) *PutAlias { +func (r *PutAlias) Routing(routings ...string) *PutAlias { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Routing = &routing + r.req.Routing = routings return r } @@ -483,13 +485,13 @@ func (r *PutAlias) Routing(routing string) *PutAlias { // If specified, this overwrites the `routing` value for search operations. // Data stream aliases don’t support this parameter. // API name: search_routing -func (r *PutAlias) SearchRouting(routing string) *PutAlias { +func (r *PutAlias) SearchRouting(routings ...string) *PutAlias { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.SearchRouting = &routing + r.req.SearchRouting = routings return r } diff --git a/typedapi/indices/putalias/request.go b/typedapi/indices/putalias/request.go index a9c4ff4303..72814beaac 100644 --- a/typedapi/indices/putalias/request.go +++ b/typedapi/indices/putalias/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putalias @@ -33,15 +33,14 @@ import ( // Request holds the request body struct for the package putalias // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_alias/IndicesPutAliasRequest.ts#L25-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_alias/IndicesPutAliasRequest.ts#L25-L105 type Request struct { - // Filter Query used to limit documents the alias can access. Filter *types.Query `json:"filter,omitempty"` // IndexRouting Value used to route indexing operations to a specific shard. // If specified, this overwrites the `routing` value for indexing operations. // Data stream aliases don’t support this parameter. - IndexRouting *string `json:"index_routing,omitempty"` + IndexRouting []string `json:"index_routing,omitempty"` // IsWriteIndex If `true`, sets the write index or data stream for the alias. // If an alias points to multiple indices or data streams and `is_write_index` // isn’t set, the alias rejects write requests. @@ -52,11 +51,11 @@ type Request struct { IsWriteIndex *bool `json:"is_write_index,omitempty"` // Routing Value used to route indexing and search operations to a specific shard. // Data stream aliases don’t support this parameter. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` // SearchRouting Value used to route search operations to a specific shard. // If specified, this overwrites the `routing` value for search operations. // Data stream aliases don’t support this parameter. - SearchRouting *string `json:"search_routing,omitempty"` + SearchRouting []string `json:"search_routing,omitempty"` } // NewRequest returns a Request @@ -98,8 +97,19 @@ func (s *Request) UnmarshalJSON(data []byte) error { } case "index_routing": - if err := dec.Decode(&s.IndexRouting); err != nil { - return fmt.Errorf("%s | %w", "IndexRouting", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "IndexRouting", err) + } + + s.IndexRouting = append(s.IndexRouting, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.IndexRouting); err != nil { + return fmt.Errorf("%s | %w", "IndexRouting", err) + } } case "is_write_index": @@ -117,13 +127,35 @@ func (s *Request) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "search_routing": - if err := dec.Decode(&s.SearchRouting); err != nil { - return fmt.Errorf("%s | %w", "SearchRouting", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "SearchRouting", err) + } + + s.SearchRouting = append(s.SearchRouting, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.SearchRouting); err != nil { + return fmt.Errorf("%s | %w", "SearchRouting", err) + } } } diff --git a/typedapi/indices/putalias/response.go b/typedapi/indices/putalias/response.go index 4ca706408c..63090ab9d9 100644 --- a/typedapi/indices/putalias/response.go +++ b/typedapi/indices/putalias/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putalias // Response holds the response body struct for the package putalias // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_alias/IndicesPutAliasResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_alias/IndicesPutAliasResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/putdatalifecycle/put_data_lifecycle.go b/typedapi/indices/putdatalifecycle/put_data_lifecycle.go index 1923e58d7d..f6a8253078 100644 --- a/typedapi/indices/putdatalifecycle/put_data_lifecycle.go +++ b/typedapi/indices/putdatalifecycle/put_data_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update data stream lifecycles. +// // Update the data stream lifecycle of the specified data streams. package putdatalifecycle @@ -84,6 +85,7 @@ func NewPutDataLifecycleFunc(tp elastictransport.Interface) NewPutDataLifecycle } // Update data stream lifecycles. +// // Update the data stream lifecycle of the specified data streams. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle @@ -414,14 +416,16 @@ func (r *PutDataLifecycle) DataRetention(duration types.DurationVariant) *PutDat // The downsampling configuration to execute for the managed backing index after // rollover. // API name: downsampling -func (r *PutDataLifecycle) Downsampling(downsampling types.DataStreamLifecycleDownsamplingVariant) *PutDataLifecycle { +func (r *PutDataLifecycle) Downsampling(downsamplings ...types.DownsamplingRoundVariant) *PutDataLifecycle { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } + for _, v := range downsamplings { - r.req.Downsampling = downsampling.DataStreamLifecycleDownsamplingCaster() + r.req.Downsampling = append(r.req.Downsampling, *v.DownsamplingRoundCaster()) + } return r } diff --git a/typedapi/indices/putdatalifecycle/request.go b/typedapi/indices/putdatalifecycle/request.go index 5c97ac5fde..9525bc8c6f 100644 --- a/typedapi/indices/putdatalifecycle/request.go +++ b/typedapi/indices/putdatalifecycle/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdatalifecycle @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L94 type Request struct { - // DataRetention If defined, every document added to this data stream will be stored at least // for this time frame. // Any time after this duration the document could be deleted. @@ -43,7 +42,7 @@ type Request struct { DataRetention types.Duration `json:"data_retention,omitempty"` // Downsampling The downsampling configuration to execute for the managed backing index after // rollover. - Downsampling *types.DataStreamLifecycleDownsampling `json:"downsampling,omitempty"` + Downsampling []types.DownsamplingRound `json:"downsampling,omitempty"` // Enabled If defined, it turns data stream lifecycle on/off (`true`/`false`) for this // data stream. A data stream lifecycle // that's disabled (enabled: `false`) will have no effect on the data stream. diff --git a/typedapi/indices/putdatalifecycle/response.go b/typedapi/indices/putdatalifecycle/response.go index 655e866ca9..dfd9ea8a58 100644 --- a/typedapi/indices/putdatalifecycle/response.go +++ b/typedapi/indices/putdatalifecycle/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdatalifecycle // Response holds the response body struct for the package putdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/putdatastreammappings/put_data_stream_mappings.go b/typedapi/indices/putdatastreammappings/put_data_stream_mappings.go new file mode 100644 index 0000000000..835ec0081d --- /dev/null +++ b/typedapi/indices/putdatastreammappings/put_data_stream_mappings.go @@ -0,0 +1,637 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Update data stream mappings. +// +// This API can be used to override mappings on specific data streams. These +// overrides will take precedence over what +// is specified in the template that the data stream matches. The mapping change +// is only applied to new write indices +// that are created during rollover after this API is called. No indices are +// changed by this API. +package putdatastreammappings + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/dynamicmapping" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/subobjects" +) + +const ( + nameMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type PutDataStreamMappings struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + name string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutDataStreamMappings type alias for index. +type NewPutDataStreamMappings func(name string) *PutDataStreamMappings + +// NewPutDataStreamMappingsFunc returns a new instance of PutDataStreamMappings with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutDataStreamMappingsFunc(tp elastictransport.Interface) NewPutDataStreamMappings { + return func(name string) *PutDataStreamMappings { + n := New(tp) + + n._name(name) + + return n + } +} + +// Update data stream mappings. +// +// This API can be used to override mappings on specific data streams. These +// overrides will take precedence over what +// is specified in the template that the data stream matches. The mapping change +// is only applied to new write indices +// that are created during rollover after this API is called. No indices are +// changed by this API. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-mappings +func New(tp elastictransport.Interface) *PutDataStreamMappings { + r := &PutDataStreamMappings{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PutDataStreamMappings) Raw(raw io.Reader) *PutDataStreamMappings { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutDataStreamMappings) Request(req *Request) *PutDataStreamMappings { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutDataStreamMappings) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PutDataStreamMappings: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == nameMask: + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", r.name) + } + path.WriteString(r.name) + path.WriteString("/") + path.WriteString("_mappings") + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutDataStreamMappings) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "indices.put_data_stream_mappings") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "indices.put_data_stream_mappings") + if reader := instrument.RecordRequestBody(ctx, "indices.put_data_stream_mappings", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.put_data_stream_mappings") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutDataStreamMappings query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a putdatastreammappings.Response +func (r PutDataStreamMappings) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.put_data_stream_mappings") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the PutDataStreamMappings headers map. +func (r *PutDataStreamMappings) Header(key, value string) *PutDataStreamMappings { + r.headers.Set(key, value) + + return r +} + +// Name A comma-separated list of data streams or data stream patterns. +// API Name: name +func (r *PutDataStreamMappings) _name(name string) *PutDataStreamMappings { + r.paramSet |= nameMask + r.name = name + + return r +} + +// DryRun If `true`, the request does not actually change the mappings on any data +// streams. Instead, it +// simulates changing the settings and reports back to the user what would have +// happened had these settings +// actually been applied. +// API name: dry_run +func (r *PutDataStreamMappings) DryRun(dryrun bool) *PutDataStreamMappings { + r.values.Set("dry_run", strconv.FormatBool(dryrun)) + + return r +} + +// MasterTimeout The period to wait for a connection to the master node. If no response is +// received before the timeout expires, the request fails and returns an +// error. +// API name: master_timeout +func (r *PutDataStreamMappings) MasterTimeout(duration string) *PutDataStreamMappings { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout The period to wait for a response. If no response is received before the +// +// timeout expires, the request fails and returns an error. +// +// API name: timeout +func (r *PutDataStreamMappings) Timeout(duration string) *PutDataStreamMappings { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PutDataStreamMappings) ErrorTrace(errortrace bool) *PutDataStreamMappings { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PutDataStreamMappings) FilterPath(filterpaths ...string) *PutDataStreamMappings { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutDataStreamMappings) Human(human bool) *PutDataStreamMappings { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PutDataStreamMappings) Pretty(pretty bool) *PutDataStreamMappings { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// API name: all_field +func (r *PutDataStreamMappings) AllField(allfield types.AllFieldVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.AllField = allfield.AllFieldCaster() + + return r +} + +// API name: _data_stream_timestamp +func (r *PutDataStreamMappings) DataStreamTimestamp_(datastreamtimestamp_ types.DataStreamTimestampVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.DataStreamTimestamp_ = datastreamtimestamp_.DataStreamTimestampCaster() + + return r +} + +// API name: date_detection +func (r *PutDataStreamMappings) DateDetection(datedetection bool) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.DateDetection = &datedetection + + return r +} + +// API name: dynamic +func (r *PutDataStreamMappings) Dynamic(dynamic dynamicmapping.DynamicMapping) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Dynamic = &dynamic + return r +} + +// API name: dynamic_date_formats +func (r *PutDataStreamMappings) DynamicDateFormats(dynamicdateformats ...string) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + for _, v := range dynamicdateformats { + + r.req.DynamicDateFormats = append(r.req.DynamicDateFormats, v) + + } + return r +} + +// API name: dynamic_templates +func (r *PutDataStreamMappings) DynamicTemplates(dynamictemplates []map[string]types.DynamicTemplate) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.DynamicTemplates = dynamictemplates + + return r +} + +// API name: enabled +func (r *PutDataStreamMappings) Enabled(enabled bool) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Enabled = &enabled + + return r +} + +// API name: _field_names +func (r *PutDataStreamMappings) FieldNames_(fieldnames_ types.FieldNamesFieldVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.FieldNames_ = fieldnames_.FieldNamesFieldCaster() + + return r +} + +// API name: index_field +func (r *PutDataStreamMappings) IndexField(indexfield types.IndexFieldVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.IndexField = indexfield.IndexFieldCaster() + + return r +} + +// API name: _meta +func (r *PutDataStreamMappings) Meta_(metadata types.MetadataVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Meta_ = *metadata.MetadataCaster() + + return r +} + +// API name: numeric_detection +func (r *PutDataStreamMappings) NumericDetection(numericdetection bool) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.NumericDetection = &numericdetection + + return r +} + +// API name: properties +func (r *PutDataStreamMappings) Properties(properties map[string]types.Property) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Properties = properties + return r +} + +func (r *PutDataStreamMappings) AddProperty(key string, value types.PropertyVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + var tmp map[string]types.Property + if r.req.Properties == nil { + r.req.Properties = make(map[string]types.Property) + } else { + tmp = r.req.Properties + } + + tmp[key] = *value.PropertyCaster() + + r.req.Properties = tmp + return r +} + +// API name: _routing +func (r *PutDataStreamMappings) Routing_(routing_ types.RoutingFieldVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Routing_ = routing_.RoutingFieldCaster() + + return r +} + +// API name: runtime +func (r *PutDataStreamMappings) Runtime(runtime map[string]types.RuntimeField) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Runtime = runtime + return r +} + +func (r *PutDataStreamMappings) AddRuntime(key string, value types.RuntimeFieldVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + var tmp map[string]types.RuntimeField + if r.req.Runtime == nil { + r.req.Runtime = make(map[string]types.RuntimeField) + } else { + tmp = r.req.Runtime + } + + tmp[key] = *value.RuntimeFieldCaster() + + r.req.Runtime = tmp + return r +} + +// API name: _size +func (r *PutDataStreamMappings) Size_(size_ types.SizeFieldVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Size_ = size_.SizeFieldCaster() + + return r +} + +// API name: _source +func (r *PutDataStreamMappings) Source_(source_ types.SourceFieldVariant) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Source_ = source_.SourceFieldCaster() + + return r +} + +// API name: subobjects +func (r *PutDataStreamMappings) Subobjects(subobjects subobjects.Subobjects) *PutDataStreamMappings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Subobjects = &subobjects + return r +} diff --git a/typedapi/indices/putdatastreammappings/request.go b/typedapi/indices/putdatastreammappings/request.go new file mode 100644 index 0000000000..cbc7fcfac5 --- /dev/null +++ b/typedapi/indices/putdatastreammappings/request.go @@ -0,0 +1,37 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putdatastreammappings + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Request holds the request body struct for the package putdatastreammappings +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_mappings/IndicesPutDataStreamMappingsRequest.ts#L25-L77 +type Request = types.TypeMapping + +// NewRequest returns a Request +func NewRequest() *Request { + r := types.NewTypeMapping() + + return r +} diff --git a/typedapi/indices/putdatastreammappings/response.go b/typedapi/indices/putdatastreammappings/response.go new file mode 100644 index 0000000000..a24dfe6951 --- /dev/null +++ b/typedapi/indices/putdatastreammappings/response.go @@ -0,0 +1,38 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putdatastreammappings + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package putdatastreammappings +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_mappings/IndicesPutDataStreamMappingsResponse.ts#L23-L28 +type Response struct { + DataStreams []types.UpdatedDataStreamMappings `json:"data_streams"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/putdatastreamoptions/put_data_stream_options.go b/typedapi/indices/putdatastreamoptions/put_data_stream_options.go index 5221ac417a..9ecd3579ee 100644 --- a/typedapi/indices/putdatastreamoptions/put_data_stream_options.go +++ b/typedapi/indices/putdatastreamoptions/put_data_stream_options.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update data stream options. +// // Update the data stream options of the specified data streams. package putdatastreamoptions @@ -84,9 +85,10 @@ func NewPutDataStreamOptionsFunc(tp elastictransport.Interface) NewPutDataStream } // Update data stream options. +// // Update the data stream options of the specified data streams. // -// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-options func New(tp elastictransport.Interface) *PutDataStreamOptions { r := &PutDataStreamOptions{ transport: tp, diff --git a/typedapi/indices/putdatastreamoptions/request.go b/typedapi/indices/putdatastreamoptions/request.go index 24bb0663f7..d2dc02d9ac 100644 --- a/typedapi/indices/putdatastreamoptions/request.go +++ b/typedapi/indices/putdatastreamoptions/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdatastreamoptions @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package putdatastreamoptions // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsRequest.ts#L25-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsRequest.ts#L25-L81 type Request struct { - // FailureStore If defined, it will update the failure store configuration of every data // stream resolved by the name expression. FailureStore *types.DataStreamFailureStore `json:"failure_store,omitempty"` diff --git a/typedapi/indices/putdatastreamoptions/response.go b/typedapi/indices/putdatastreamoptions/response.go index 033a4e99b7..c46bcaaf2b 100644 --- a/typedapi/indices/putdatastreamoptions/response.go +++ b/typedapi/indices/putdatastreamoptions/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdatastreamoptions // Response holds the response body struct for the package putdatastreamoptions // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/putdatastreamsettings/put_data_stream_settings.go b/typedapi/indices/putdatastreamsettings/put_data_stream_settings.go index a6ccfaa1eb..89d5c13e4f 100644 --- a/typedapi/indices/putdatastreamsettings/put_data_stream_settings.go +++ b/typedapi/indices/putdatastreamsettings/put_data_stream_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update data stream settings. // diff --git a/typedapi/indices/putdatastreamsettings/request.go b/typedapi/indices/putdatastreamsettings/request.go index 34c7d039a9..fa63a8c793 100644 --- a/typedapi/indices/putdatastreamsettings/request.go +++ b/typedapi/indices/putdatastreamsettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdatastreamsettings @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putdatastreamsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts#L25-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts#L25-L78 type Request = types.IndexSettings // NewRequest returns a Request diff --git a/typedapi/indices/putdatastreamsettings/response.go b/typedapi/indices/putdatastreamsettings/response.go index 4ad58bcd6a..665d9165ee 100644 --- a/typedapi/indices/putdatastreamsettings/response.go +++ b/typedapi/indices/putdatastreamsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdatastreamsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putdatastreamsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L23-L28 type Response struct { DataStreams []types.UpdatedDataStreamSettings `json:"data_streams"` } diff --git a/typedapi/indices/putindextemplate/put_index_template.go b/typedapi/indices/putindextemplate/put_index_template.go index 857b4f4ee2..86a4a2f646 100644 --- a/typedapi/indices/putindextemplate/put_index_template.go +++ b/typedapi/indices/putindextemplate/put_index_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update an index template. +// // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. // @@ -127,6 +128,7 @@ func NewPutIndexTemplateFunc(tp elastictransport.Interface) NewPutIndexTemplate } // Create or update an index template. +// // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. // diff --git a/typedapi/indices/putindextemplate/request.go b/typedapi/indices/putindextemplate/request.go index 3970482cb0..ccf613a8fc 100644 --- a/typedapi/indices/putindextemplate/request.go +++ b/typedapi/indices/putindextemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putindextemplate @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L157 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L160 type Request struct { - // AllowAutoCreate This setting overrides the value of the `action.auto_create_index` cluster // setting. // If set to `true` in a template, then indices can be automatically created diff --git a/typedapi/indices/putindextemplate/response.go b/typedapi/indices/putindextemplate/response.go index a5d290ec3b..89540edb5c 100644 --- a/typedapi/indices/putindextemplate/response.go +++ b/typedapi/indices/putindextemplate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putindextemplate // Response holds the response body struct for the package putindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/putmapping/put_mapping.go b/typedapi/indices/putmapping/put_mapping.go index b50128ff92..593630f4e9 100644 --- a/typedapi/indices/putmapping/put_mapping.go +++ b/typedapi/indices/putmapping/put_mapping.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update field mappings. +// // Add new fields to an existing data stream or index. // You can use the update mapping API to: // @@ -32,7 +33,7 @@ // // Learn how to use the update mapping API with practical examples in the // [Update mapping API -// examples](https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples) +// examples](https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples) // guide. package putmapping @@ -99,6 +100,7 @@ func NewPutMappingFunc(tp elastictransport.Interface) NewPutMapping { } // Update field mappings. +// // Add new fields to an existing data stream or index. // You can use the update mapping API to: // @@ -112,7 +114,7 @@ func NewPutMappingFunc(tp elastictransport.Interface) NewPutMapping { // // Learn how to use the update mapping API with practical examples in the // [Update mapping API -// examples](https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples) +// examples](https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples) // guide. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping diff --git a/typedapi/indices/putmapping/request.go b/typedapi/indices/putmapping/request.go index bd8d329fd8..72072ffcb1 100644 --- a/typedapi/indices/putmapping/request.go +++ b/typedapi/indices/putmapping/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putmapping @@ -34,9 +34,8 @@ import ( // Request holds the request body struct for the package putmapping // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_mapping/IndicesPutMappingRequest.ts#L41-L164 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_mapping/IndicesPutMappingRequest.ts#L41-L165 type Request struct { - // DateDetection Controls whether dynamic date detection is enabled. DateDetection *bool `json:"date_detection,omitempty"` // Dynamic Controls whether new fields are added dynamically. diff --git a/typedapi/indices/putmapping/response.go b/typedapi/indices/putmapping/response.go index 3db956b619..4b2cb82694 100644 --- a/typedapi/indices/putmapping/response.go +++ b/typedapi/indices/putmapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putmapping @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package putmapping // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_mapping/IndicesPutMappingResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_mapping/IndicesPutMappingResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/putsampleconfiguration/put_sample_configuration.go b/typedapi/indices/putsampleconfiguration/put_sample_configuration.go new file mode 100644 index 0000000000..779a3458e9 --- /dev/null +++ b/typedapi/indices/putsampleconfiguration/put_sample_configuration.go @@ -0,0 +1,452 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Create or update sampling configuration. +// +// Create or update the sampling configuration for the specified index. +package putsampleconfiguration + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +const ( + indexMask = iota + 1 +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type PutSampleConfiguration struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + index string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutSampleConfiguration type alias for index. +type NewPutSampleConfiguration func(index string) *PutSampleConfiguration + +// NewPutSampleConfigurationFunc returns a new instance of PutSampleConfiguration with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutSampleConfigurationFunc(tp elastictransport.Interface) NewPutSampleConfiguration { + return func(index string) *PutSampleConfiguration { + n := New(tp) + + n._index(index) + + return n + } +} + +// Create or update sampling configuration. +// +// Create or update the sampling configuration for the specified index. +// +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO +func New(tp elastictransport.Interface) *PutSampleConfiguration { + r := &PutSampleConfiguration{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PutSampleConfiguration) Raw(raw io.Reader) *PutSampleConfiguration { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutSampleConfiguration) Request(req *Request) *PutSampleConfiguration { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutSampleConfiguration) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PutSampleConfiguration: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == indexMask: + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.index) + } + path.WriteString(r.index) + path.WriteString("/") + path.WriteString("_sample") + path.WriteString("/") + path.WriteString("config") + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutSampleConfiguration) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "indices.put_sample_configuration") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "indices.put_sample_configuration") + if reader := instrument.RecordRequestBody(ctx, "indices.put_sample_configuration", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.put_sample_configuration") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutSampleConfiguration query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a putsampleconfiguration.Response +func (r PutSampleConfiguration) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.put_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the PutSampleConfiguration headers map. +func (r *PutSampleConfiguration) Header(key, value string) *PutSampleConfiguration { + r.headers.Set(key, value) + + return r +} + +// Index The name of the index or data stream. +// API Name: index +func (r *PutSampleConfiguration) _index(index string) *PutSampleConfiguration { + r.paramSet |= indexMask + r.index = index + + return r +} + +// MasterTimeout 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: master_timeout +func (r *PutSampleConfiguration) MasterTimeout(duration string) *PutSampleConfiguration { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout Period to wait for a response. +// If no response is received before the timeout expires, the request fails and +// returns an error. +// API name: timeout +func (r *PutSampleConfiguration) Timeout(duration string) *PutSampleConfiguration { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PutSampleConfiguration) ErrorTrace(errortrace bool) *PutSampleConfiguration { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PutSampleConfiguration) FilterPath(filterpaths ...string) *PutSampleConfiguration { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutSampleConfiguration) Human(human bool) *PutSampleConfiguration { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PutSampleConfiguration) Pretty(pretty bool) *PutSampleConfiguration { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// An optional condition script that sampled documents must satisfy. +// API name: if +func (r *PutSampleConfiguration) If(if_ string) *PutSampleConfiguration { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.If = &if_ + + return r +} + +// The maximum number of documents to sample. Must be greater than 0 and less +// than or equal to 10,000. +// API name: max_samples +func (r *PutSampleConfiguration) MaxSamples(maxsamples int) *PutSampleConfiguration { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxSamples = &maxsamples + + return r +} + +// The maximum total size of sampled documents. Must be greater than 0 and less +// than or equal to 5GB. +// API name: max_size +func (r *PutSampleConfiguration) MaxSize(bytesize types.ByteSizeVariant) *PutSampleConfiguration { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxSize = *bytesize.ByteSizeCaster() + + return r +} + +// The fraction of documents to sample. Must be greater than 0 and less than or +// equal to 1. +// Can be specified as a number or a string. +// API name: rate +func (r *PutSampleConfiguration) Rate(stringifieddouble types.StringifieddoubleVariant) *PutSampleConfiguration { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Rate = *stringifieddouble.StringifieddoubleCaster() + + return r +} + +// The duration for which the sampled documents should be retained. +// Must be greater than 0 and less than or equal to 30 days. +// API name: time_to_live +func (r *PutSampleConfiguration) TimeToLive(duration types.DurationVariant) *PutSampleConfiguration { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.TimeToLive = *duration.DurationCaster() + + return r +} diff --git a/typedapi/indices/putsampleconfiguration/request.go b/typedapi/indices/putsampleconfiguration/request.go new file mode 100644 index 0000000000..f0f28f0149 --- /dev/null +++ b/typedapi/indices/putsampleconfiguration/request.go @@ -0,0 +1,134 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putsampleconfiguration + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Request holds the request body struct for the package putsampleconfiguration +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_sample_configuration/IndicesPutSampleConfigurationRequest.ts#L26-L90 +type Request struct { + // If An optional condition script that sampled documents must satisfy. + If *string `json:"if,omitempty"` + // MaxSamples The maximum number of documents to sample. Must be greater than 0 and less + // than or equal to 10,000. + MaxSamples *int `json:"max_samples,omitempty"` + // MaxSize The maximum total size of sampled documents. Must be greater than 0 and less + // than or equal to 5GB. + MaxSize types.ByteSize `json:"max_size,omitempty"` + // Rate The fraction of documents to sample. Must be greater than 0 and less than or + // equal to 1. + // Can be specified as a number or a string. + Rate types.Stringifieddouble `json:"rate"` + // TimeToLive The duration for which the sampled documents should be retained. + // Must be greater than 0 and less than or equal to 30 days. + TimeToLive types.Duration `json:"time_to_live,omitempty"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Putsampleconfiguration request: %w", err) + } + + return &req, nil +} + +func (s *Request) UnmarshalJSON(data []byte) error { + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "max_samples": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "MaxSamples", err) + } + s.MaxSamples = &value + case float64: + f := int(v) + s.MaxSamples = &f + } + + case "max_size": + if err := dec.Decode(&s.MaxSize); err != nil { + return fmt.Errorf("%s | %w", "MaxSize", err) + } + + case "rate": + if err := dec.Decode(&s.Rate); err != nil { + return fmt.Errorf("%s | %w", "Rate", err) + } + + case "time_to_live": + if err := dec.Decode(&s.TimeToLive); err != nil { + return fmt.Errorf("%s | %w", "TimeToLive", err) + } + + } + } + return nil +} diff --git a/typedapi/indices/putsampleconfiguration/response.go b/typedapi/indices/putsampleconfiguration/response.go new file mode 100644 index 0000000000..50cd3cd349 --- /dev/null +++ b/typedapi/indices/putsampleconfiguration/response.go @@ -0,0 +1,36 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putsampleconfiguration + +// Response holds the response body struct for the package putsampleconfiguration +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_sample_configuration/IndicesPutSampleConfigurationResponse.ts#L22-L25 +type Response struct { + // Acknowledged For a successful response, this value is always true. On failure, an + // exception is returned instead. + Acknowledged bool `json:"acknowledged"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/putsettings/put_settings.go b/typedapi/indices/putsettings/put_settings.go index f891a68a7a..f990ad2f54 100644 --- a/typedapi/indices/putsettings/put_settings.go +++ b/typedapi/indices/putsettings/put_settings.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update index settings. +// // Changes dynamic index settings in real time. // For data streams, index setting changes are applied to all backing indices by // default. @@ -160,6 +161,7 @@ func NewPutSettingsFunc(tp elastictransport.Interface) NewPutSettings { } // Update index settings. +// // Changes dynamic index settings in real time. // For data streams, index setting changes are applied to all backing indices by // default. diff --git a/typedapi/indices/putsettings/request.go b/typedapi/indices/putsettings/request.go index 7a04a6eacf..2317a90f8a 100644 --- a/typedapi/indices/putsettings/request.go +++ b/typedapi/indices/putsettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putsettings @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_settings/IndicesPutSettingsRequest.ts#L25-L165 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_settings/IndicesPutSettingsRequest.ts#L25-L167 type Request = types.IndexSettings // NewRequest returns a Request diff --git a/typedapi/indices/putsettings/response.go b/typedapi/indices/putsettings/response.go index 05c1dc4787..65872618a5 100644 --- a/typedapi/indices/putsettings/response.go +++ b/typedapi/indices/putsettings/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putsettings // Response holds the response body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_settings/IndicesPutSettingsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_settings/IndicesPutSettingsResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/puttemplate/put_template.go b/typedapi/indices/puttemplate/put_template.go index 36de0cf09c..e379824980 100644 --- a/typedapi/indices/puttemplate/put_template.go +++ b/typedapi/indices/puttemplate/put_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a legacy index template. +// // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. // Elasticsearch applies templates to new indices based on an index pattern that @@ -113,6 +114,7 @@ func NewPutTemplateFunc(tp elastictransport.Interface) NewPutTemplate { } // Create or update a legacy index template. +// // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. // Elasticsearch applies templates to new indices based on an index pattern that diff --git a/typedapi/indices/puttemplate/request.go b/typedapi/indices/puttemplate/request.go index d476017f5a..dc873b5699 100644 --- a/typedapi/indices/puttemplate/request.go +++ b/typedapi/indices/puttemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttemplate @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package puttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_template/IndicesPutTemplateRequest.ts#L29-L124 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_template/IndicesPutTemplateRequest.ts#L29-L127 type Request struct { - // Aliases Aliases for the index. Aliases map[string]types.Alias `json:"aliases,omitempty"` // IndexPatterns Array of wildcard expressions used to match the names diff --git a/typedapi/indices/puttemplate/response.go b/typedapi/indices/puttemplate/response.go index a57613007d..3f2800ebef 100644 --- a/typedapi/indices/puttemplate/response.go +++ b/typedapi/indices/puttemplate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttemplate // Response holds the response body struct for the package puttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_template/IndicesPutTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_template/IndicesPutTemplateResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/recovery/recovery.go b/typedapi/indices/recovery/recovery.go index b27b112524..74b748cf1a 100644 --- a/typedapi/indices/recovery/recovery.go +++ b/typedapi/indices/recovery/recovery.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get index recovery information. +// // Get information about ongoing and completed shard recoveries for one or more // indices. // For data streams, the API returns information for the stream's backing @@ -111,6 +112,7 @@ func NewRecoveryFunc(tp elastictransport.Interface) NewRecovery { } // Get index recovery information. +// // Get information about ongoing and completed shard recoveries for one or more // indices. // For data streams, the API returns information for the stream's backing diff --git a/typedapi/indices/recovery/response.go b/typedapi/indices/recovery/response.go index d49f433f5a..32d04af961 100644 --- a/typedapi/indices/recovery/response.go +++ b/typedapi/indices/recovery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package recovery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package recovery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/IndicesRecoveryResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/IndicesRecoveryResponse.ts#L24-L27 type Response map[string]types.RecoveryStatus diff --git a/typedapi/indices/refresh/refresh.go b/typedapi/indices/refresh/refresh.go index fed0f96f5f..d10b809d6d 100644 --- a/typedapi/indices/refresh/refresh.go +++ b/typedapi/indices/refresh/refresh.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -30,6 +31,9 @@ // You can change this default interval with the `index.refresh_interval` // setting. // +// In Elastic Cloud Serverless, the default refresh interval is 5 seconds across +// all indices. +// // Refresh requests are synchronous and do not return a response until the // refresh operation completes. // @@ -100,6 +104,7 @@ func NewRefreshFunc(tp elastictransport.Interface) NewRefresh { } // 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 @@ -111,6 +116,9 @@ func NewRefreshFunc(tp elastictransport.Interface) NewRefresh { // You can change this default interval with the `index.refresh_interval` // setting. // +// In Elastic Cloud Serverless, the default refresh interval is 5 seconds across +// all indices. +// // Refresh requests are synchronous and do not return a response until the // refresh operation completes. // diff --git a/typedapi/indices/refresh/response.go b/typedapi/indices/refresh/response.go index a02fbcc968..07b063f132 100644 --- a/typedapi/indices/refresh/response.go +++ b/typedapi/indices/refresh/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package refresh @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package refresh // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/refresh/IndicesRefreshResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/refresh/IndicesRefreshResponse.ts#L22-L25 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } diff --git a/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go b/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go index 312bb29c19..a57d15f6d8 100644 --- a/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go +++ b/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Reload search analyzers. +// // Reload an index's search analyzers and their resources. // For data streams, the API reloads search analyzers and resources for the // stream's backing indices. @@ -101,6 +102,7 @@ func NewReloadSearchAnalyzersFunc(tp elastictransport.Interface) NewReloadSearch } // Reload search analyzers. +// // Reload an index's search analyzers and their resources. // For data streams, the API reloads search analyzers and resources for the // stream's backing indices. diff --git a/typedapi/indices/reloadsearchanalyzers/response.go b/typedapi/indices/reloadsearchanalyzers/response.go index 2ad5cc1818..df2adb350d 100644 --- a/typedapi/indices/reloadsearchanalyzers/response.go +++ b/typedapi/indices/reloadsearchanalyzers/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package reloadsearchanalyzers @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reloadsearchanalyzers // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L25 type Response struct { ReloadDetails []types.ReloadDetails `json:"reload_details"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/indices/removeblock/remove_block.go b/typedapi/indices/removeblock/remove_block.go index 6a73449fd6..e58e5a063b 100644 --- a/typedapi/indices/removeblock/remove_block.go +++ b/typedapi/indices/removeblock/remove_block.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Remove an index block. // diff --git a/typedapi/indices/removeblock/response.go b/typedapi/indices/removeblock/response.go index abcebf9cce..a2443be8e7 100644 --- a/typedapi/indices/removeblock/response.go +++ b/typedapi/indices/removeblock/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package removeblock @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package removeblock // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/remove_block/IndicesRemoveBlockResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/remove_block/IndicesRemoveBlockResponse.ts#L23-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Indices []types.RemoveIndicesBlockStatus `json:"indices"` diff --git a/typedapi/indices/resolvecluster/resolve_cluster.go b/typedapi/indices/resolvecluster/resolve_cluster.go index b53b35932e..1d77e7ba1a 100644 --- a/typedapi/indices/resolvecluster/resolve_cluster.go +++ b/typedapi/indices/resolvecluster/resolve_cluster.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Resolve the cluster. // diff --git a/typedapi/indices/resolvecluster/response.go b/typedapi/indices/resolvecluster/response.go index 6001c48f64..87c2e624e2 100644 --- a/typedapi/indices/resolvecluster/response.go +++ b/typedapi/indices/resolvecluster/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package resolvecluster @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resolvecluster // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L24-L27 type Response map[string]types.ResolveClusterInfo diff --git a/typedapi/indices/resolveindex/resolve_index.go b/typedapi/indices/resolveindex/resolve_index.go index 821f7e3f13..ab1154f9cd 100644 --- a/typedapi/indices/resolveindex/resolve_index.go +++ b/typedapi/indices/resolveindex/resolve_index.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Resolve indices. +// // Resolve the names and/or index patterns for indices, aliases, and data // streams. // Multiple patterns and remote clusters are supported. @@ -38,6 +39,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/expandwildcard" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/indexmode" ) const ( @@ -81,6 +83,7 @@ func NewResolveIndexFunc(tp elastictransport.Interface) NewResolveIndex { } // Resolve indices. +// // Resolve the names and/or index patterns for indices, aliases, and data // streams. // Multiple patterns and remote clusters are supported. @@ -345,6 +348,37 @@ func (r *ResolveIndex) AllowNoIndices(allownoindices bool) *ResolveIndex { return r } +// Mode Filter indices by index mode - standard, lookup, time_series, etc. +// Comma-separated list of IndexMode. Empty means no filter. +// API name: mode +func (r *ResolveIndex) Mode(modes ...indexmode.IndexMode) *ResolveIndex { + tmp := []string{} + for _, item := range modes { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("mode", strings.Join(tmp, ",")) + + return r +} + +// ProjectRouting Specifies a subset of projects to target using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *ResolveIndex) ProjectRouting(projectrouting string) *ResolveIndex { + r.values.Set("project_routing", projectrouting) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/indices/resolveindex/response.go b/typedapi/indices/resolveindex/response.go index 04c8a02e59..b2935eee47 100644 --- a/typedapi/indices/resolveindex/response.go +++ b/typedapi/indices/resolveindex/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package resolveindex @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resolveindex // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/resolve_index/ResolveIndexResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/resolve_index/ResolveIndexResponse.ts#L23-L29 type Response struct { Aliases []types.ResolveIndexAliasItem `json:"aliases"` DataStreams []types.ResolveIndexDataStreamsItem `json:"data_streams"` diff --git a/typedapi/indices/rollover/request.go b/typedapi/indices/rollover/request.go index 341da3ab25..3fc8d17e8f 100644 --- a/typedapi/indices/rollover/request.go +++ b/typedapi/indices/rollover/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rollover @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package rollover // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/rollover/IndicesRolloverRequest.ts#L29-L153 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/rollover/IndicesRolloverRequest.ts#L29-L154 type Request struct { - // Aliases Aliases for the target index. // Data streams do not support this parameter. Aliases map[string]types.Alias `json:"aliases,omitempty"` diff --git a/typedapi/indices/rollover/response.go b/typedapi/indices/rollover/response.go index c148704729..bd32b287ed 100644 --- a/typedapi/indices/rollover/response.go +++ b/typedapi/indices/rollover/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rollover // Response holds the response body struct for the package rollover // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/rollover/IndicesRolloverResponse.ts#L22-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/rollover/IndicesRolloverResponse.ts#L22-L32 type Response struct { Acknowledged bool `json:"acknowledged"` Conditions map[string]bool `json:"conditions"` diff --git a/typedapi/indices/rollover/rollover.go b/typedapi/indices/rollover/rollover.go index 4d29fac83c..915593cc79 100644 --- a/typedapi/indices/rollover/rollover.go +++ b/typedapi/indices/rollover/rollover.go @@ -16,11 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Roll over to a new index. -// TIP: It is recommended to use the index lifecycle rollover action to automate -// rollovers. +// +// TIP: We recommend using the index lifecycle rollover action to automate +// rollovers. However, Serverless does not support Index Lifecycle Management +// (ILM), so don't use this approach in the Serverless context. // // The rollover API creates a new index for a data stream or index alias. // The API behavior depends on the rollover target. @@ -139,8 +141,10 @@ func NewRolloverFunc(tp elastictransport.Interface) NewRollover { } // Roll over to a new index. -// TIP: It is recommended to use the index lifecycle rollover action to automate -// rollovers. +// +// TIP: We recommend using the index lifecycle rollover action to automate +// rollovers. However, Serverless does not support Index Lifecycle Management +// (ILM), so don't use this approach in the Serverless context. // // The rollover API creates a new index for a data stream or index alias. // The API behavior depends on the rollover target. diff --git a/typedapi/indices/segments/response.go b/typedapi/indices/segments/response.go index 19427b4783..8d9ee677f7 100644 --- a/typedapi/indices/segments/response.go +++ b/typedapi/indices/segments/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package segments @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package segments // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/segments/IndicesSegmentsResponse.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/segments/IndicesSegmentsResponse.ts#L24-L29 type Response struct { Indices map[string]types.IndexSegment `json:"indices"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/indices/segments/segments.go b/typedapi/indices/segments/segments.go index 82d17637c9..8407202d3b 100644 --- a/typedapi/indices/segments/segments.go +++ b/typedapi/indices/segments/segments.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get index segments. +// // Get low-level information about the Lucene segments in index shards. // For data streams, the API returns information about the stream's backing // indices. @@ -79,6 +80,7 @@ func NewSegmentsFunc(tp elastictransport.Interface) NewSegments { } // Get index segments. +// // Get low-level information about the Lucene segments in index shards. // For data streams, the API returns information about the stream's backing // indices. diff --git a/typedapi/indices/shardstores/response.go b/typedapi/indices/shardstores/response.go index 251a94cfca..498fd65d6c 100644 --- a/typedapi/indices/shardstores/response.go +++ b/typedapi/indices/shardstores/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package shardstores @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package shardstores // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shard_stores/IndicesShardStoresResponse.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shard_stores/IndicesShardStoresResponse.ts#L24-L26 type Response struct { Indices map[string]types.IndicesShardStores `json:"indices"` } diff --git a/typedapi/indices/shardstores/shard_stores.go b/typedapi/indices/shardstores/shard_stores.go index 10429bc865..3f791f041c 100644 --- a/typedapi/indices/shardstores/shard_stores.go +++ b/typedapi/indices/shardstores/shard_stores.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get index shard stores. +// // Get store information about replica shards in one or more indices. // For data streams, the API retrieves store information for the stream's // backing indices. @@ -91,6 +92,7 @@ func NewShardStoresFunc(tp elastictransport.Interface) NewShardStores { } // Get index shard stores. +// // Get store information about replica shards in one or more indices. // For data streams, the API retrieves store information for the stream's // backing indices. diff --git a/typedapi/indices/shrink/request.go b/typedapi/indices/shrink/request.go index 9d33f126ff..67beb718d1 100644 --- a/typedapi/indices/shrink/request.go +++ b/typedapi/indices/shrink/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package shrink @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package shrink // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shrink/IndicesShrinkRequest.ts#L27-L113 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shrink/IndicesShrinkRequest.ts#L27-L114 type Request struct { - // Aliases The key is the alias name. // Index alias names support date math. Aliases map[string]types.Alias `json:"aliases,omitempty"` diff --git a/typedapi/indices/shrink/response.go b/typedapi/indices/shrink/response.go index 6212420c7b..2f8f3d67b1 100644 --- a/typedapi/indices/shrink/response.go +++ b/typedapi/indices/shrink/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package shrink // Response holds the response body struct for the package shrink // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shrink/IndicesShrinkResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shrink/IndicesShrinkResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/shrink/shrink.go b/typedapi/indices/shrink/shrink.go index f42e4ae5b6..876181657c 100644 --- a/typedapi/indices/shrink/shrink.go +++ b/typedapi/indices/shrink/shrink.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Shrink an index. +// // Shrink an index into a new index with fewer primary shards. // // Before you can shrink an index: @@ -142,6 +143,7 @@ func NewShrinkFunc(tp elastictransport.Interface) NewShrink { } // Shrink an index. +// // Shrink an index into a new index with fewer primary shards. // // Before you can shrink an index: diff --git a/typedapi/indices/simulateindextemplate/request.go b/typedapi/indices/simulateindextemplate/request.go new file mode 100644 index 0000000000..85c23db78e --- /dev/null +++ b/typedapi/indices/simulateindextemplate/request.go @@ -0,0 +1,37 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package simulateindextemplate + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Request holds the request body struct for the package simulateindextemplate +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/simulate_index_template/IndicesSimulateIndexTemplateRequest.ts#L25-L72 +type Request = types.IndexTemplate + +// NewRequest returns a Request +func NewRequest() *Request { + r := types.NewIndexTemplate() + + return r +} diff --git a/typedapi/indices/simulateindextemplate/response.go b/typedapi/indices/simulateindextemplate/response.go index 4387ecf878..e4b0acc148 100644 --- a/typedapi/indices/simulateindextemplate/response.go +++ b/typedapi/indices/simulateindextemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package simulateindextemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulateindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/simulate_index_template/IndicesSimulateIndexTemplateResponse.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/simulate_index_template/IndicesSimulateIndexTemplateResponse.ts#L25-L30 type Response struct { Overlapping []types.Overlapping `json:"overlapping,omitempty"` Template types.Template `json:"template"` diff --git a/typedapi/indices/simulateindextemplate/simulate_index_template.go b/typedapi/indices/simulateindextemplate/simulate_index_template.go index 2d549345ce..1086cb635f 100644 --- a/typedapi/indices/simulateindextemplate/simulate_index_template.go +++ b/typedapi/indices/simulateindextemplate/simulate_index_template.go @@ -16,14 +16,16 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Simulate an index. +// // Get the index configuration that would be applied to the specified index from // an existing index template. package simulateindextemplate import ( + gobytes "bytes" "context" "encoding/json" "errors" @@ -54,6 +56,10 @@ type SimulateIndexTemplate struct { raw io.Reader + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + paramSet int name string @@ -79,6 +85,7 @@ func NewSimulateIndexTemplateFunc(tp elastictransport.Interface) NewSimulateInde } // Simulate an index. +// // Get the index configuration that would be applied to the specified index from // an existing index template. // @@ -88,6 +95,8 @@ func New(tp elastictransport.Interface) *SimulateIndexTemplate { transport: tp, values: make(url.Values), headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), } if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { @@ -99,6 +108,21 @@ func New(tp elastictransport.Interface) *SimulateIndexTemplate { return r } +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *SimulateIndexTemplate) Raw(raw io.Reader) *SimulateIndexTemplate { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *SimulateIndexTemplate) Request(req *Request) *SimulateIndexTemplate { + r.req = req + + return r +} + // HttpRequest returns the http.Request object built from the // given parameters. func (r *SimulateIndexTemplate) HttpRequest(ctx context.Context) (*http.Request, error) { @@ -108,6 +132,31 @@ func (r *SimulateIndexTemplate) HttpRequest(ctx context.Context) (*http.Request, var err error + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for SimulateIndexTemplate: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + r.path.Scheme = "http" switch { @@ -254,45 +303,6 @@ func (r SimulateIndexTemplate) Do(providedCtx context.Context) (*Response, error return nil, errorResponse } -// IsSuccess allows to run a query with a context and retrieve the result as a boolean. -// This only exists for endpoints without a request payload and allows for quick control flow. -func (r SimulateIndexTemplate) IsSuccess(providedCtx context.Context) (bool, error) { - var ctx context.Context - r.spanStarted = true - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - ctx = instrument.Start(providedCtx, "indices.simulate_index_template") - defer instrument.Close(ctx) - } - if ctx == nil { - ctx = providedCtx - } - - res, err := r.Perform(ctx) - - if err != nil { - return false, err - } - io.Copy(io.Discard, res.Body) - err = res.Body.Close() - if err != nil { - return false, err - } - - if res.StatusCode >= 200 && res.StatusCode < 300 { - return true, nil - } - - if res.StatusCode != 404 { - err := fmt.Errorf("an error happened during the SimulateIndexTemplate query execution, status code: %d", res.StatusCode) - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return false, err - } - - return false, nil -} - // Header set a key, value pair in the SimulateIndexTemplate headers map. func (r *SimulateIndexTemplate) Header(key, value string) *SimulateIndexTemplate { r.headers.Set(key, value) @@ -387,3 +397,207 @@ func (r *SimulateIndexTemplate) Pretty(pretty bool) *SimulateIndexTemplate { return r } + +// API name: allow_auto_create +func (r *SimulateIndexTemplate) AllowAutoCreate(allowautocreate bool) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.AllowAutoCreate = &allowautocreate + + return r +} + +// An ordered list of component template names. +// Component templates are merged in the order specified, meaning that the last +// component template specified has the highest precedence. +// API name: composed_of +func (r *SimulateIndexTemplate) ComposedOf(composedofs ...string) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + for _, v := range composedofs { + + r.req.ComposedOf = append(r.req.ComposedOf, v) + + } + return r +} + +// Date and time when the index template was created. Only returned if the +// `human` query parameter is `true`. +// API name: created_date +func (r *SimulateIndexTemplate) CreatedDate(datetime types.DateTimeVariant) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.CreatedDate = *datetime.DateTimeCaster() + + return r +} + +// Date and time when the index template was created, in milliseconds since the +// epoch. +// API name: created_date_millis +func (r *SimulateIndexTemplate) CreatedDateMillis(epochtimeunitmillis int64) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.CreatedDateMillis = &epochtimeunitmillis + + return r +} + +// If this object is included, the template is used to create data streams and +// their backing indices. +// Supports an empty object. +// Data streams require a matching index template with a `data_stream` object. +// API name: data_stream +func (r *SimulateIndexTemplate) DataStream(datastream types.IndexTemplateDataStreamConfigurationVariant) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.DataStream = datastream.IndexTemplateDataStreamConfigurationCaster() + + return r +} + +// Marks this index template as deprecated. +// When creating or updating a non-deprecated index template that uses +// deprecated components, +// Elasticsearch will emit a deprecation warning. +// API name: deprecated +func (r *SimulateIndexTemplate) Deprecated(deprecated bool) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Deprecated = &deprecated + + return r +} + +// A list of component template names that are allowed to be absent. +// API name: ignore_missing_component_templates +func (r *SimulateIndexTemplate) IgnoreMissingComponentTemplates(names ...string) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.IgnoreMissingComponentTemplates = names + + return r +} + +// Name of the index template. +// API name: index_patterns +func (r *SimulateIndexTemplate) IndexPatterns(names ...string) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.IndexPatterns = names + + return r +} + +// Optional user metadata about the index template. May have any contents. +// This map is not automatically generated by Elasticsearch. +// API name: _meta +func (r *SimulateIndexTemplate) Meta_(metadata types.MetadataVariant) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Meta_ = *metadata.MetadataCaster() + + return r +} + +// Date and time when the index template was last modified. Only returned if the +// `human` query parameter is `true`. +// API name: modified_date +func (r *SimulateIndexTemplate) ModifiedDate(datetime types.DateTimeVariant) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ModifiedDate = *datetime.DateTimeCaster() + + return r +} + +// Date and time when the index template was last modified, in milliseconds +// since the epoch. +// API name: modified_date_millis +func (r *SimulateIndexTemplate) ModifiedDateMillis(epochtimeunitmillis int64) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ModifiedDateMillis = &epochtimeunitmillis + + return r +} + +// Priority to determine index template precedence when a new data stream or +// index is created. +// The index template with the highest priority is chosen. +// If no priority is specified the template is treated as though it is of +// priority 0 (lowest priority). +// This number is not automatically generated by Elasticsearch. +// API name: priority +func (r *SimulateIndexTemplate) Priority(priority int64) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Priority = &priority + + return r +} + +// Template to be applied. +// It may optionally include an `aliases`, `mappings`, or `settings` +// configuration. +// API name: template +func (r *SimulateIndexTemplate) Template(template types.IndexTemplateSummaryVariant) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Template = template.IndexTemplateSummaryCaster() + + return r +} + +// Version number used to manage index templates externally. +// This number is not automatically generated by Elasticsearch. +// API name: version +func (r *SimulateIndexTemplate) Version(versionnumber int64) *SimulateIndexTemplate { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Version = &versionnumber + + return r +} diff --git a/typedapi/indices/simulatetemplate/request.go b/typedapi/indices/simulatetemplate/request.go index 1ca1f71520..4ff91b2ef4 100644 --- a/typedapi/indices/simulatetemplate/request.go +++ b/typedapi/indices/simulatetemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package simulatetemplate @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package simulatetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L135 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L137 type Request struct { - // AllowAutoCreate This setting overrides the value of the `action.auto_create_index` cluster // setting. // If set to `true` in a template, then indices can be automatically created diff --git a/typedapi/indices/simulatetemplate/response.go b/typedapi/indices/simulatetemplate/response.go index 01f00855d8..e450bc7126 100644 --- a/typedapi/indices/simulatetemplate/response.go +++ b/typedapi/indices/simulatetemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package simulatetemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulatetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L26-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L26-L31 type Response struct { Overlapping []types.Overlapping `json:"overlapping,omitempty"` Template types.Template `json:"template"` diff --git a/typedapi/indices/simulatetemplate/simulate_template.go b/typedapi/indices/simulatetemplate/simulate_template.go index 62f1b15ffd..3c97d19f14 100644 --- a/typedapi/indices/simulatetemplate/simulate_template.go +++ b/typedapi/indices/simulatetemplate/simulate_template.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Simulate an index template. +// // Get the index configuration that would be applied by a particular index // template. package simulatetemplate @@ -82,6 +83,7 @@ func NewSimulateTemplateFunc(tp elastictransport.Interface) NewSimulateTemplate } // Simulate an index template. +// // Get the index configuration that would be applied by a particular index // template. // diff --git a/typedapi/indices/split/request.go b/typedapi/indices/split/request.go index 8a8d5da6e7..fc8b06e04a 100644 --- a/typedapi/indices/split/request.go +++ b/typedapi/indices/split/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package split @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package split // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/split/IndicesSplitRequest.ts#L27-L113 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/split/IndicesSplitRequest.ts#L27-L114 type Request struct { - // Aliases Aliases for the resulting index. Aliases map[string]types.Alias `json:"aliases,omitempty"` // Settings Configuration options for the target index. diff --git a/typedapi/indices/split/response.go b/typedapi/indices/split/response.go index 2ff6d7afd9..e9b6e34748 100644 --- a/typedapi/indices/split/response.go +++ b/typedapi/indices/split/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package split // Response holds the response body struct for the package split // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/split/IndicesSplitResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/split/IndicesSplitResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/split/split.go b/typedapi/indices/split/split.go index 48f25c746b..70ebe329cb 100644 --- a/typedapi/indices/split/split.go +++ b/typedapi/indices/split/split.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Split an index. +// // Split an index into a new index with more primary shards. // * Before you can split an index: // @@ -134,6 +135,7 @@ func NewSplitFunc(tp elastictransport.Interface) NewSplit { } // Split an index. +// // Split an index into a new index with more primary shards. // * Before you can split an index: // diff --git a/typedapi/indices/stats/response.go b/typedapi/indices/stats/response.go index 23f39d2eb6..456df241f0 100644 --- a/typedapi/indices/stats/response.go +++ b/typedapi/indices/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/IndicesStatsResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/IndicesStatsResponse.ts#L24-L30 type Response struct { All_ types.IndicesStats `json:"_all"` Indices map[string]types.IndicesStats `json:"indices,omitempty"` diff --git a/typedapi/indices/stats/stats.go b/typedapi/indices/stats/stats.go index 1b4888cdd2..c81a4f2470 100644 --- a/typedapi/indices/stats/stats.go +++ b/typedapi/indices/stats/stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get index statistics. +// // For data streams, the API retrieves statistics for the stream's backing // indices. // @@ -94,6 +95,7 @@ func NewStatsFunc(tp elastictransport.Interface) NewStats { } // Get index statistics. +// // For data streams, the API retrieves statistics for the stream's backing // indices. // @@ -452,8 +454,8 @@ func (r *Stats) IncludeUnloadedSegments(includeunloadedsegments bool) *Stats { return r } -// Level Indicates whether statistics are aggregated at the cluster, index, or shard -// level. +// Level Indicates whether statistics are aggregated at the cluster, indices, or +// shards level. // API name: level func (r *Stats) Level(level level.Level) *Stats { r.values.Set("level", level.String()) diff --git a/typedapi/indices/updatealiases/request.go b/typedapi/indices/updatealiases/request.go index 1e38c601bc..0a59806fc5 100644 --- a/typedapi/indices/updatealiases/request.go +++ b/typedapi/indices/updatealiases/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatealiases @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package updatealiases // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L60 type Request struct { - // Actions Actions to perform. Actions []types.IndicesAction `json:"actions,omitempty"` } diff --git a/typedapi/indices/updatealiases/response.go b/typedapi/indices/updatealiases/response.go index 9445b95f4c..992b25815e 100644 --- a/typedapi/indices/updatealiases/response.go +++ b/typedapi/indices/updatealiases/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatealiases // Response holds the response body struct for the package updatealiases // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/indices/updatealiases/update_aliases.go b/typedapi/indices/updatealiases/update_aliases.go index 21f8a820e8..9e9699b9a6 100644 --- a/typedapi/indices/updatealiases/update_aliases.go +++ b/typedapi/indices/updatealiases/update_aliases.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update an alias. +// // Adds a data stream or index to an alias. package updatealiases @@ -75,6 +76,7 @@ func NewUpdateAliasesFunc(tp elastictransport.Interface) NewUpdateAliases { } // Create or update an alias. +// // Adds a data stream or index to an alias. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases diff --git a/typedapi/indices/validatequery/request.go b/typedapi/indices/validatequery/request.go index 4bd5012e9c..edb1d6589a 100644 --- a/typedapi/indices/validatequery/request.go +++ b/typedapi/indices/validatequery/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package validatequery @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package validatequery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/validate_query/IndicesValidateQueryRequest.ts#L25-L122 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/validate_query/IndicesValidateQueryRequest.ts#L25-L123 type Request struct { - // Query Query in the Lucene query string syntax. Query *types.Query `json:"query,omitempty"` } diff --git a/typedapi/indices/validatequery/response.go b/typedapi/indices/validatequery/response.go index e8348c42c3..8c0f1960f4 100644 --- a/typedapi/indices/validatequery/response.go +++ b/typedapi/indices/validatequery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package validatequery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package validatequery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L23-L30 type Response struct { Error *string `json:"error,omitempty"` Explanations []types.IndicesValidationExplanation `json:"explanations,omitempty"` diff --git a/typedapi/indices/validatequery/validate_query.go b/typedapi/indices/validatequery/validate_query.go index eec10eede1..1b3baa2243 100644 --- a/typedapi/indices/validatequery/validate_query.go +++ b/typedapi/indices/validatequery/validate_query.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Validate a query. +// // Validates a query without running it. package validatequery @@ -83,6 +84,7 @@ func NewValidateQueryFunc(tp elastictransport.Interface) NewValidateQuery { } // Validate a query. +// // Validates a query without running it. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query @@ -362,7 +364,7 @@ func (r *ValidateQuery) AnalyzeWildcard(analyzewildcard bool) *ValidateQuery { return r } -// DefaultOperator The default operator for query string query: `AND` or `OR`. +// DefaultOperator The default operator for query string query: `and` or `or`. // API name: default_operator func (r *ValidateQuery) DefaultOperator(defaultoperator operator.Operator) *ValidateQuery { r.values.Set("default_operator", defaultoperator.String()) diff --git a/typedapi/inference/chatcompletionunified/chat_completion_unified.go b/typedapi/inference/chatcompletionunified/chat_completion_unified.go index 5b78fa2c5a..dad832085c 100644 --- a/typedapi/inference/chatcompletionunified/chat_completion_unified.go +++ b/typedapi/inference/chatcompletionunified/chat_completion_unified.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Perform chat completion inference +// Perform chat completion inference on the service. // // The chat completion inference API enables real-time responses for chat // completion tasks by delivering answers incrementally, reducing response times @@ -96,7 +96,7 @@ func NewChatCompletionUnifiedFunc(tp elastictransport.Interface) NewChatCompleti } } -// Perform chat completion inference +// Perform chat completion inference on the service. // // The chat completion inference API enables real-time responses for chat // completion tasks by delivering answers incrementally, reducing response times @@ -430,7 +430,8 @@ func (r *ChatCompletionUnified) Messages(messages ...types.MessageVariant) *Chat return r } -// The ID of the model to use. +// The ID of the model to use. By default, the model ID is set to the value +// included when creating the inference endpoint. // API name: model func (r *ChatCompletionUnified) Model(model string) *ChatCompletionUnified { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/chatcompletionunified/request.go b/typedapi/inference/chatcompletionunified/request.go index 2516a4cb9f..09487155a8 100644 --- a/typedapi/inference/chatcompletionunified/request.go +++ b/typedapi/inference/chatcompletionunified/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package chatcompletionunified @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package chatcompletionunified // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/chat_completion_unified/UnifiedRequest.ts#L24-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/chat_completion_unified/UnifiedRequest.ts#L24-L61 type Request = types.RequestChatCompletion // NewRequest returns a Request diff --git a/typedapi/inference/chatcompletionunified/response.go b/typedapi/inference/chatcompletionunified/response.go index d1a04b7918..5661490c0a 100644 --- a/typedapi/inference/chatcompletionunified/response.go +++ b/typedapi/inference/chatcompletionunified/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package chatcompletionunified // Response holds the response body struct for the package chatcompletionunified // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/chat_completion_unified/UnifiedResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/chat_completion_unified/UnifiedResponse.ts#L22-L25 type Response = []byte diff --git a/typedapi/inference/completion/completion.go b/typedapi/inference/completion/completion.go index 86dec8342f..ec8ed0a84d 100644 --- a/typedapi/inference/completion/completion.go +++ b/typedapi/inference/completion/completion.go @@ -16,9 +16,24 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Perform completion inference on the service +// Perform completion inference on the service. +// +// Get responses for completion tasks. +// This API works only with the completion task type. +// +// IMPORTANT: The inference APIs enable you to use certain services, such as +// built-in machine learning models (ELSER, E5), models uploaded through Eland, +// Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, +// Watsonx.ai, or Hugging Face. For built-in models and models uploaded through +// Eland, the inference APIs offer an alternative way to use and manage trained +// models. However, if you do not plan to use the inference APIs to use these +// models or if you want to use non-NLP models, use the machine learning trained +// model APIs. +// +// This API requires the `monitor_inference` cluster privilege (the built-in +// `inference_admin` and `inference_user` roles grant this privilege). package completion import ( @@ -81,7 +96,22 @@ func NewCompletionFunc(tp elastictransport.Interface) NewCompletion { } } -// Perform completion inference on the service +// Perform completion inference on the service. +// +// Get responses for completion tasks. +// This API works only with the completion task type. +// +// IMPORTANT: The inference APIs enable you to use certain services, such as +// built-in machine learning models (ELSER, E5), models uploaded through Eland, +// Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, +// Watsonx.ai, or Hugging Face. For built-in models and models uploaded through +// Eland, the inference APIs offer an alternative way to use and manage trained +// models. However, if you do not plan to use the inference APIs to use these +// models or if you want to use non-NLP models, use the machine learning trained +// model APIs. +// +// This API requires the `monitor_inference` cluster privilege (the built-in +// `inference_admin` and `inference_user` roles grant this privilege). // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference func New(tp elastictransport.Interface) *Completion { @@ -379,7 +409,9 @@ func (r *Completion) Input(inputs ...string) *Completion { return r } -// Optional task settings +// Task settings for the individual inference request. These settings are +// specific to the you specified and override the task settings +// specified when initializing the service. // API name: task_settings func (r *Completion) TaskSettings(tasksettings json.RawMessage) *Completion { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/completion/request.go b/typedapi/inference/completion/request.go index 316a39efbd..e6ddb86730 100644 --- a/typedapi/inference/completion/request.go +++ b/typedapi/inference/completion/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package completion @@ -30,13 +30,14 @@ import ( // Request holds the request body struct for the package completion // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/completion/CompletionRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/completion/CompletionRequest.ts#L25-L70 type Request struct { - // Input Inference input. // Either a string or an array of strings. Input []string `json:"input"` - // TaskSettings Optional task settings + // TaskSettings Task settings for the individual inference request. These settings are + // specific to the you specified and override the task settings + // specified when initializing the service. TaskSettings json.RawMessage `json:"task_settings,omitempty"` } diff --git a/typedapi/inference/completion/response.go b/typedapi/inference/completion/response.go index 9a5e35ec37..985e91987e 100644 --- a/typedapi/inference/completion/response.go +++ b/typedapi/inference/completion/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package completion @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package completion // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/completion/CompletionResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/completion/CompletionResponse.ts#L22-L25 type Response []types.CompletionResult diff --git a/typedapi/inference/delete/delete.go b/typedapi/inference/delete/delete.go index 952813ed9a..f10d75f347 100644 --- a/typedapi/inference/delete/delete.go +++ b/typedapi/inference/delete/delete.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Delete an inference endpoint +// Delete an inference endpoint. +// +// This API requires the manage_inference cluster privilege (the built-in +// `inference_admin` role grants this privilege). package delete import ( @@ -79,7 +82,10 @@ func NewDeleteFunc(tp elastictransport.Interface) NewDelete { } } -// Delete an inference endpoint +// Delete an inference endpoint. +// +// This API requires the manage_inference cluster privilege (the built-in +// `inference_admin` role grants this privilege). // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete func New(tp elastictransport.Interface) *Delete { @@ -326,8 +332,9 @@ func (r *Delete) _inferenceid(inferenceid string) *Delete { return r } -// DryRun When true, the endpoint is not deleted and a list of ingest processors which -// reference this endpoint is returned. +// DryRun When true, checks the semantic_text fields and inference processors that +// reference the endpoint and returns them in a list, but does not delete the +// endpoint. // API name: dry_run func (r *Delete) DryRun(dryrun bool) *Delete { r.values.Set("dry_run", strconv.FormatBool(dryrun)) diff --git a/typedapi/inference/delete/response.go b/typedapi/inference/delete/response.go index c9a3d8d349..be43986866 100644 --- a/typedapi/inference/delete/response.go +++ b/typedapi/inference/delete/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/delete/DeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/delete/DeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/inference/get/get.go b/typedapi/inference/get/get.go index 1aa1f30aef..67f8c5004e 100644 --- a/typedapi/inference/get/get.go +++ b/typedapi/inference/get/get.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Get an inference endpoint +// Get an inference endpoint. +// +// This API requires the `monitor_inference` cluster privilege (the built-in +// `inference_admin` and `inference_user` roles grant this privilege). package get import ( @@ -77,7 +80,10 @@ func NewGetFunc(tp elastictransport.Interface) NewGet { } } -// Get an inference endpoint +// Get an inference endpoint. +// +// This API requires the `monitor_inference` cluster privilege (the built-in +// `inference_admin` and `inference_user` roles grant this privilege). // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get func New(tp elastictransport.Interface) *Get { diff --git a/typedapi/inference/get/response.go b/typedapi/inference/get/response.go index 8bb06126d9..69dfdddfce 100644 --- a/typedapi/inference/get/response.go +++ b/typedapi/inference/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/get/GetResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/get/GetResponse.ts#L22-L26 type Response struct { Endpoints []types.InferenceEndpointInfo `json:"endpoints"` } diff --git a/typedapi/inference/inference/inference.go b/typedapi/inference/inference/inference.go index 3ecdcaa664..0bf93e23d5 100644 --- a/typedapi/inference/inference/inference.go +++ b/typedapi/inference/inference/inference.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Perform inference on the service. // diff --git a/typedapi/inference/inference/request.go b/typedapi/inference/inference/request.go index 927c8e5c01..8e6314579d 100644 --- a/typedapi/inference/inference/request.go +++ b/typedapi/inference/inference/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package inference @@ -31,9 +31,8 @@ import ( // Request holds the request body struct for the package inference // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/inference/InferenceRequest.ts#L26-L104 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/inference/InferenceRequest.ts#L26-L104 type Request struct { - // Input The text on which you want to perform the inference task. // It can be a single string or an array. // diff --git a/typedapi/inference/inference/response.go b/typedapi/inference/inference/response.go index 1cd85f8c68..1de7c51b40 100644 --- a/typedapi/inference/inference/response.go +++ b/typedapi/inference/inference/response.go @@ -16,33 +16,28 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package inference import ( - "encoding/json" - "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // Response holds the response body struct for the package inference // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/inference/InferenceResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/inference/InferenceResponse.ts#L22-L25 type Response struct { - AdditionalInferenceResultProperty map[string]json.RawMessage `json:"-"` - Completion []types.CompletionResult `json:"completion,omitempty"` - Rerank []types.RankedDocument `json:"rerank,omitempty"` - SparseEmbedding []types.SparseEmbeddingResult `json:"sparse_embedding,omitempty"` - TextEmbedding []types.TextEmbeddingResult `json:"text_embedding,omitempty"` - TextEmbeddingBits []types.TextEmbeddingByteResult `json:"text_embedding_bits,omitempty"` - TextEmbeddingBytes []types.TextEmbeddingByteResult `json:"text_embedding_bytes,omitempty"` + Completion []types.CompletionResult `json:"completion,omitempty"` + Rerank []types.RankedDocument `json:"rerank,omitempty"` + SparseEmbedding []types.SparseEmbeddingResult `json:"sparse_embedding,omitempty"` + TextEmbedding []types.TextEmbeddingResult `json:"text_embedding,omitempty"` + TextEmbeddingBits []types.TextEmbeddingByteResult `json:"text_embedding_bits,omitempty"` + TextEmbeddingBytes []types.TextEmbeddingByteResult `json:"text_embedding_bytes,omitempty"` } // NewResponse returns a Response func NewResponse() *Response { - r := &Response{ - AdditionalInferenceResultProperty: make(map[string]json.RawMessage, 0), - } + r := &Response{} return r } diff --git a/typedapi/inference/put/put.go b/typedapi/inference/put/put.go index 2d81f4e084..b0e9e38e27 100644 --- a/typedapi/inference/put/put.go +++ b/typedapi/inference/put/put.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an inference endpoint. // @@ -32,27 +32,31 @@ // // The following integrations are available through the inference API. You can // find the available task types next to the integration name: +// * AI21 (`chat_completion`, `completion`) // * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, // `text_embedding`) // * Amazon Bedrock (`completion`, `text_embedding`) // * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, // `sparse_embedding`, `text_embedding`) // * Anthropic (`completion`) -// * Azure AI Studio (`completion`, `text_embedding`) +// * Azure AI Studio (`completion`, 'rerank', `text_embedding`) // * Azure OpenAI (`completion`, `text_embedding`) // * Cohere (`completion`, `rerank`, `text_embedding`) -// * DeepSeek (`completion`, `chat_completion`) +// * DeepSeek (`chat_completion`, `completion`) // * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this // service is for built-in models and models uploaded through Eland) // * ELSER (`sparse_embedding`) // * Google AI Studio (`completion`, `text_embedding`) -// * Google Vertex AI (`rerank`, `text_embedding`) +// * Google Vertex AI (`chat_completion`, `completion`, `rerank`, +// `text_embedding`) // * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`) +// * JinaAI (`rerank`, `text_embedding`) +// * Llama (`chat_completion`, `completion`, `text_embedding`) // * Mistral (`chat_completion`, `completion`, `text_embedding`) // * OpenAI (`chat_completion`, `completion`, `text_embedding`) -// * VoyageAI (`text_embedding`, `rerank`) +// * OpenShift AI (`chat_completion`, `completion`, `rerank`, `text_embedding`) +// * VoyageAI (`rerank`, `text_embedding`) // * Watsonx inference integration (`text_embedding`) -// * JinaAI (`text_embedding`, `rerank`) package put import ( @@ -132,27 +136,31 @@ func NewPutFunc(tp elastictransport.Interface) NewPut { // // The following integrations are available through the inference API. You can // find the available task types next to the integration name: +// * AI21 (`chat_completion`, `completion`) // * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, // `text_embedding`) // * Amazon Bedrock (`completion`, `text_embedding`) // * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, // `sparse_embedding`, `text_embedding`) // * Anthropic (`completion`) -// * Azure AI Studio (`completion`, `text_embedding`) +// * Azure AI Studio (`completion`, 'rerank', `text_embedding`) // * Azure OpenAI (`completion`, `text_embedding`) // * Cohere (`completion`, `rerank`, `text_embedding`) -// * DeepSeek (`completion`, `chat_completion`) +// * DeepSeek (`chat_completion`, `completion`) // * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this // service is for built-in models and models uploaded through Eland) // * ELSER (`sparse_embedding`) // * Google AI Studio (`completion`, `text_embedding`) -// * Google Vertex AI (`rerank`, `text_embedding`) +// * Google Vertex AI (`chat_completion`, `completion`, `rerank`, +// `text_embedding`) // * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`) +// * JinaAI (`rerank`, `text_embedding`) +// * Llama (`chat_completion`, `completion`, `text_embedding`) // * Mistral (`chat_completion`, `completion`, `text_embedding`) // * OpenAI (`chat_completion`, `completion`, `text_embedding`) -// * VoyageAI (`text_embedding`, `rerank`) +// * OpenShift AI (`chat_completion`, `completion`, `rerank`, `text_embedding`) +// * VoyageAI (`rerank`, `text_embedding`) // * Watsonx inference integration (`text_embedding`) -// * JinaAI (`text_embedding`, `rerank`) // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put func New(tp elastictransport.Interface) *Put { @@ -462,7 +470,10 @@ func (r *Put) Pretty(pretty bool) *Put { return r } -// Chunking configuration object +// The chunking configuration object. +// Applies only to the `sparse_embedding` and `text_embedding` task types. +// Not applicable to the `rerank`, `completion`, or `chat_completion` task +// types. // API name: chunking_settings func (r *Put) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *Put { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/put/request.go b/typedapi/inference/put/request.go index 6515b5b4c4..88f9ec01e4 100644 --- a/typedapi/inference/put/request.go +++ b/typedapi/inference/put/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package put @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put/PutRequest.ts#L26-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put/PutRequest.ts#L26-L91 type Request = types.InferenceEndpoint // NewRequest returns a Request diff --git a/typedapi/inference/put/response.go b/typedapi/inference/put/response.go index d32644bf9e..d73c8afd1b 100644 --- a/typedapi/inference/put/response.go +++ b/typedapi/inference/put/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package put @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put/PutResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put/PutResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putai21/put_ai21.go b/typedapi/inference/putai21/put_ai21.go new file mode 100644 index 0000000000..17e6ae7363 --- /dev/null +++ b/typedapi/inference/putai21/put_ai21.go @@ -0,0 +1,418 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Create a AI21 inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `ai21` +// service. +package putai21 + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/ai21servicetype" +) + +const ( + tasktypeMask = iota + 1 + + ai21inferenceidMask +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type PutAi21 struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + tasktype string + ai21inferenceid string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutAi21 type alias for index. +type NewPutAi21 func(tasktype, ai21inferenceid string) *PutAi21 + +// NewPutAi21Func returns a new instance of PutAi21 with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutAi21Func(tp elastictransport.Interface) NewPutAi21 { + return func(tasktype, ai21inferenceid string) *PutAi21 { + n := New(tp) + + n._tasktype(tasktype) + + n._ai21inferenceid(ai21inferenceid) + + return n + } +} + +// Create a AI21 inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `ai21` +// service. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-ai21 +func New(tp elastictransport.Interface) *PutAi21 { + r := &PutAi21{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PutAi21) Raw(raw io.Reader) *PutAi21 { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutAi21) Request(req *Request) *PutAi21 { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutAi21) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PutAi21: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == tasktypeMask|ai21inferenceidMask: + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "tasktype", r.tasktype) + } + path.WriteString(r.tasktype) + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "ai21inferenceid", r.ai21inferenceid) + } + path.WriteString(r.ai21inferenceid) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutAi21) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "inference.put_ai21") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_ai21") + if reader := instrument.RecordRequestBody(ctx, "inference.put_ai21", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_ai21") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutAi21 query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a putai21.Response +func (r PutAi21) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_ai21") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the PutAi21 headers map. +func (r *PutAi21) Header(key, value string) *PutAi21 { + r.headers.Set(key, value) + + return r +} + +// TaskType The type of the inference task that the model will perform. +// API Name: tasktype +func (r *PutAi21) _tasktype(tasktype string) *PutAi21 { + r.paramSet |= tasktypeMask + r.tasktype = tasktype + + return r +} + +// Ai21InferenceId The unique identifier of the inference endpoint. +// API Name: ai21inferenceid +func (r *PutAi21) _ai21inferenceid(ai21inferenceid string) *PutAi21 { + r.paramSet |= ai21inferenceidMask + r.ai21inferenceid = ai21inferenceid + + return r +} + +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutAi21) Timeout(duration string) *PutAi21 { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PutAi21) ErrorTrace(errortrace bool) *PutAi21 { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PutAi21) FilterPath(filterpaths ...string) *PutAi21 { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutAi21) Human(human bool) *PutAi21 { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PutAi21) Pretty(pretty bool) *PutAi21 { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// The type of service supported for the specified task type. In this case, +// `ai21`. +// API name: service +func (r *PutAi21) Service(service ai21servicetype.Ai21ServiceType) *PutAi21 { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Service = service + return r +} + +// Settings used to install the inference model. These settings are specific to +// the `ai21` service. +// API name: service_settings +func (r *PutAi21) ServiceSettings(servicesettings types.Ai21ServiceSettingsVariant) *PutAi21 { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings.Ai21ServiceSettingsCaster() + + return r +} diff --git a/typedapi/inference/putai21/request.go b/typedapi/inference/putai21/request.go new file mode 100644 index 0000000000..5099974486 --- /dev/null +++ b/typedapi/inference/putai21/request.go @@ -0,0 +1,60 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putai21 + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/ai21servicetype" +) + +// Request holds the request body struct for the package putai21 +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_ai21/PutAi21Request.ts#L29-L73 +type Request struct { + // Service The type of service supported for the specified task type. In this case, + // `ai21`. + Service ai21servicetype.Ai21ServiceType `json:"service"` + // ServiceSettings Settings used to install the inference model. These settings are specific to + // the `ai21` service. + ServiceSettings types.Ai21ServiceSettings `json:"service_settings"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Putai21 request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/inference/putai21/response.go b/typedapi/inference/putai21/response.go new file mode 100644 index 0000000000..81cc4d9a0f --- /dev/null +++ b/typedapi/inference/putai21/response.go @@ -0,0 +1,55 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putai21 + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeai21" +) + +// Response holds the response body struct for the package putai21 +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_ai21/PutAi21Response.ts#L22-L25 +type Response struct { + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // InferenceId The inference Id + InferenceId string `json:"inference_id"` + // Service The service type + Service string `json:"service"` + // ServiceSettings Settings specific to the service + ServiceSettings json.RawMessage `json:"service_settings"` + // TaskSettings Task settings specific to the service and task type + TaskSettings json.RawMessage `json:"task_settings,omitempty"` + // TaskType The task type + TaskType tasktypeai21.TaskTypeAi21 `json:"task_type"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/inference/putalibabacloud/put_alibabacloud.go b/typedapi/inference/putalibabacloud/put_alibabacloud.go index 25e5383777..75eb341885 100644 --- a/typedapi/inference/putalibabacloud/put_alibabacloud.go +++ b/typedapi/inference/putalibabacloud/put_alibabacloud.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an AlibabaCloud AI Search inference endpoint. // @@ -392,6 +392,8 @@ func (r *PutAlibabacloud) Pretty(pretty bool) *PutAlibabacloud { } // The chunking configuration object. +// Applies only to the `sparse_embedding` or `text_embedding` task types. +// Not applicable to the `rerank` or `completion` task types. // API name: chunking_settings func (r *PutAlibabacloud) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAlibabacloud { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putalibabacloud/request.go b/typedapi/inference/putalibabacloud/request.go index 3e6d1b3cbe..40720ca717 100644 --- a/typedapi/inference/putalibabacloud/request.go +++ b/typedapi/inference/putalibabacloud/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putalibabacloud @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putalibabacloud // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_alibabacloud/PutAlibabaCloudRequest.ts#L31-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_alibabacloud/PutAlibabaCloudRequest.ts#L31-L87 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` or `text_embedding` task types. + // Not applicable to the `rerank` or `completion` task types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `alibabacloud-ai-search`. diff --git a/typedapi/inference/putalibabacloud/response.go b/typedapi/inference/putalibabacloud/response.go index 22687dfdac..52588c97e3 100644 --- a/typedapi/inference/putalibabacloud/response.go +++ b/typedapi/inference/putalibabacloud/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putalibabacloud @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putalibabacloud // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_alibabacloud/PutAlibabaCloudResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_alibabacloud/PutAlibabaCloudResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putamazonbedrock/put_amazonbedrock.go b/typedapi/inference/putamazonbedrock/put_amazonbedrock.go index 71703ac2ec..8d4572a8a0 100644 --- a/typedapi/inference/putamazonbedrock/put_amazonbedrock.go +++ b/typedapi/inference/putamazonbedrock/put_amazonbedrock.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an Amazon Bedrock inference endpoint. // @@ -408,6 +408,8 @@ func (r *PutAmazonbedrock) Pretty(pretty bool) *PutAmazonbedrock { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `completion` task type. // API name: chunking_settings func (r *PutAmazonbedrock) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAmazonbedrock { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putamazonbedrock/request.go b/typedapi/inference/putamazonbedrock/request.go index ca09707a40..e2c0361212 100644 --- a/typedapi/inference/putamazonbedrock/request.go +++ b/typedapi/inference/putamazonbedrock/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putamazonbedrock @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putamazonbedrock // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts#L31-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts#L31-L90 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `completion` task type. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `amazonbedrock`. diff --git a/typedapi/inference/putamazonbedrock/response.go b/typedapi/inference/putamazonbedrock/response.go index 5b35cd0a5a..e47d2c862c 100644 --- a/typedapi/inference/putamazonbedrock/response.go +++ b/typedapi/inference/putamazonbedrock/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putamazonbedrock @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putamazonbedrock // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_amazonbedrock/PutAmazonBedrockResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_amazonbedrock/PutAmazonBedrockResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putamazonsagemaker/put_amazonsagemaker.go b/typedapi/inference/putamazonsagemaker/put_amazonsagemaker.go index 262094745b..a54b19bc54 100644 --- a/typedapi/inference/putamazonsagemaker/put_amazonsagemaker.go +++ b/typedapi/inference/putamazonsagemaker/put_amazonsagemaker.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an Amazon SageMaker inference endpoint. // @@ -392,6 +392,9 @@ func (r *PutAmazonsagemaker) Pretty(pretty bool) *PutAmazonsagemaker { } // The chunking configuration object. +// Applies only to the `sparse_embedding` or `text_embedding` task types. +// Not applicable to the `rerank`, `completion`, or `chat_completion` task +// types. // API name: chunking_settings func (r *PutAmazonsagemaker) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAmazonsagemaker { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putamazonsagemaker/request.go b/typedapi/inference/putamazonsagemaker/request.go index 6711f0ac8c..17074d127e 100644 --- a/typedapi/inference/putamazonsagemaker/request.go +++ b/typedapi/inference/putamazonsagemaker/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putamazonsagemaker @@ -30,10 +30,12 @@ import ( // Request holds the request body struct for the package putamazonsagemaker // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_amazonsagemaker/PutAmazonSageMakerRequest.ts#L31-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_amazonsagemaker/PutAmazonSageMakerRequest.ts#L31-L88 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` or `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `amazon_sagemaker`. diff --git a/typedapi/inference/putamazonsagemaker/response.go b/typedapi/inference/putamazonsagemaker/response.go index 99b3d414f4..06563a5fe8 100644 --- a/typedapi/inference/putamazonsagemaker/response.go +++ b/typedapi/inference/putamazonsagemaker/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putamazonsagemaker @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putamazonsagemaker // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_amazonsagemaker/PutAmazonSageMakerResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_amazonsagemaker/PutAmazonSageMakerResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putanthropic/put_anthropic.go b/typedapi/inference/putanthropic/put_anthropic.go index 714d658dfc..9e665ea82a 100644 --- a/typedapi/inference/putanthropic/put_anthropic.go +++ b/typedapi/inference/putanthropic/put_anthropic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an Anthropic inference endpoint. // @@ -392,19 +392,6 @@ func (r *PutAnthropic) Pretty(pretty bool) *PutAnthropic { return r } -// The chunking configuration object. -// API name: chunking_settings -func (r *PutAnthropic) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAnthropic { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() - - return r -} - // The type of service supported for the specified task type. In this case, // `anthropic`. // API name: service @@ -418,7 +405,7 @@ func (r *PutAnthropic) Service(service anthropicservicetype.AnthropicServiceType } // Settings used to install the inference model. These settings are specific to -// the `watsonxai` service. +// the `anthropic` service. // API name: service_settings func (r *PutAnthropic) ServiceSettings(servicesettings types.AnthropicServiceSettingsVariant) *PutAnthropic { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putanthropic/request.go b/typedapi/inference/putanthropic/request.go index a2f9b0dac8..bf9da8e00d 100644 --- a/typedapi/inference/putanthropic/request.go +++ b/typedapi/inference/putanthropic/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putanthropic @@ -30,16 +30,13 @@ import ( // Request holds the request body struct for the package putanthropic // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_anthropic/PutAnthropicRequest.ts#L31-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_anthropic/PutAnthropicRequest.ts#L30-L80 type Request struct { - - // ChunkingSettings The chunking configuration object. - ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `anthropic`. Service anthropicservicetype.AnthropicServiceType `json:"service"` // ServiceSettings Settings used to install the inference model. These settings are specific to - // the `watsonxai` service. + // the `anthropic` service. ServiceSettings types.AnthropicServiceSettings `json:"service_settings"` // TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. diff --git a/typedapi/inference/putanthropic/response.go b/typedapi/inference/putanthropic/response.go index 58169eb05c..9e320efaec 100644 --- a/typedapi/inference/putanthropic/response.go +++ b/typedapi/inference/putanthropic/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putanthropic @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putanthropic // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_anthropic/PutAnthropicResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_anthropic/PutAnthropicResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putazureaistudio/put_azureaistudio.go b/typedapi/inference/putazureaistudio/put_azureaistudio.go index 45e36cecc6..2093fbe710 100644 --- a/typedapi/inference/putazureaistudio/put_azureaistudio.go +++ b/typedapi/inference/putazureaistudio/put_azureaistudio.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an Azure AI studio inference endpoint. // @@ -392,6 +392,8 @@ func (r *PutAzureaistudio) Pretty(pretty bool) *PutAzureaistudio { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `rerank` or `completion` task types. // API name: chunking_settings func (r *PutAzureaistudio) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAzureaistudio { // Initialize the request if it is not already initialized @@ -417,7 +419,7 @@ func (r *PutAzureaistudio) Service(service azureaistudioservicetype.AzureAiStudi } // Settings used to install the inference model. These settings are specific to -// the `openai` service. +// the `azureaistudio` service. // API name: service_settings func (r *PutAzureaistudio) ServiceSettings(servicesettings types.AzureAiStudioServiceSettingsVariant) *PutAzureaistudio { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putazureaistudio/request.go b/typedapi/inference/putazureaistudio/request.go index ce483c04b3..2973747cff 100644 --- a/typedapi/inference/putazureaistudio/request.go +++ b/typedapi/inference/putazureaistudio/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putazureaistudio @@ -30,16 +30,17 @@ import ( // Request holds the request body struct for the package putazureaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_azureaistudio/PutAzureAiStudioRequest.ts#L31-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_azureaistudio/PutAzureAiStudioRequest.ts#L31-L87 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `rerank` or `completion` task types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `azureaistudio`. Service azureaistudioservicetype.AzureAiStudioServiceType `json:"service"` // ServiceSettings Settings used to install the inference model. These settings are specific to - // the `openai` service. + // the `azureaistudio` service. ServiceSettings types.AzureAiStudioServiceSettings `json:"service_settings"` // TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. diff --git a/typedapi/inference/putazureaistudio/response.go b/typedapi/inference/putazureaistudio/response.go index f23f1a2eec..f4d54cd98a 100644 --- a/typedapi/inference/putazureaistudio/response.go +++ b/typedapi/inference/putazureaistudio/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putazureaistudio @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putazureaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_azureaistudio/PutAzureAiStudioResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_azureaistudio/PutAzureAiStudioResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putazureopenai/put_azureopenai.go b/typedapi/inference/putazureopenai/put_azureopenai.go index ee6fdbe479..967ed03354 100644 --- a/typedapi/inference/putazureopenai/put_azureopenai.go +++ b/typedapi/inference/putazureopenai/put_azureopenai.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an Azure OpenAI inference endpoint. // @@ -418,6 +418,8 @@ func (r *PutAzureopenai) Pretty(pretty bool) *PutAzureopenai { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `completion` task type. // API name: chunking_settings func (r *PutAzureopenai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAzureopenai { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putazureopenai/request.go b/typedapi/inference/putazureopenai/request.go index 6881ad0881..880c60054a 100644 --- a/typedapi/inference/putazureopenai/request.go +++ b/typedapi/inference/putazureopenai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putazureopenai @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putazureopenai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts#L31-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts#L31-L95 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `completion` task type. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `azureopenai`. diff --git a/typedapi/inference/putazureopenai/response.go b/typedapi/inference/putazureopenai/response.go index c2ba42c35c..26644298fb 100644 --- a/typedapi/inference/putazureopenai/response.go +++ b/typedapi/inference/putazureopenai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putazureopenai @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putazureopenai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_azureopenai/PutAzureOpenAiResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_azureopenai/PutAzureOpenAiResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putcohere/put_cohere.go b/typedapi/inference/putcohere/put_cohere.go index b8e23b21db..b12e68a504 100644 --- a/typedapi/inference/putcohere/put_cohere.go +++ b/typedapi/inference/putcohere/put_cohere.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a Cohere inference endpoint. // @@ -392,6 +392,8 @@ func (r *PutCohere) Pretty(pretty bool) *PutCohere { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `rerank` or `completion` task type. // API name: chunking_settings func (r *PutCohere) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutCohere { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putcohere/request.go b/typedapi/inference/putcohere/request.go index e3ce0d1349..d27ed2f3d0 100644 --- a/typedapi/inference/putcohere/request.go +++ b/typedapi/inference/putcohere/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putcohere @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putcohere // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_cohere/PutCohereRequest.ts#L31-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_cohere/PutCohereRequest.ts#L31-L88 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `rerank` or `completion` task type. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `cohere`. diff --git a/typedapi/inference/putcohere/response.go b/typedapi/inference/putcohere/response.go index da9e40bda6..39427d455c 100644 --- a/typedapi/inference/putcohere/response.go +++ b/typedapi/inference/putcohere/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putcohere @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putcohere // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_cohere/PutCohereResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_cohere/PutCohereResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putcontextualai/put_contextualai.go b/typedapi/inference/putcontextualai/put_contextualai.go new file mode 100644 index 0000000000..c1c21ada58 --- /dev/null +++ b/typedapi/inference/putcontextualai/put_contextualai.go @@ -0,0 +1,438 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Create an Contextual AI inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `contexualai` service. +// +// To review the available `rerank` models, refer to +// . +package putcontextualai + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/contextualaiservicetype" +) + +const ( + tasktypeMask = iota + 1 + + contextualaiinferenceidMask +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type PutContextualai struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + tasktype string + contextualaiinferenceid string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutContextualai type alias for index. +type NewPutContextualai func(tasktype, contextualaiinferenceid string) *PutContextualai + +// NewPutContextualaiFunc returns a new instance of PutContextualai with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutContextualaiFunc(tp elastictransport.Interface) NewPutContextualai { + return func(tasktype, contextualaiinferenceid string) *PutContextualai { + n := New(tp) + + n._tasktype(tasktype) + + n._contextualaiinferenceid(contextualaiinferenceid) + + return n + } +} + +// Create an Contextual AI inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `contexualai` service. +// +// To review the available `rerank` models, refer to +// . +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-contextualai +func New(tp elastictransport.Interface) *PutContextualai { + r := &PutContextualai{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PutContextualai) Raw(raw io.Reader) *PutContextualai { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutContextualai) Request(req *Request) *PutContextualai { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutContextualai) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PutContextualai: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == tasktypeMask|contextualaiinferenceidMask: + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "tasktype", r.tasktype) + } + path.WriteString(r.tasktype) + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "contextualaiinferenceid", r.contextualaiinferenceid) + } + path.WriteString(r.contextualaiinferenceid) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutContextualai) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "inference.put_contextualai") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_contextualai") + if reader := instrument.RecordRequestBody(ctx, "inference.put_contextualai", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_contextualai") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutContextualai query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a putcontextualai.Response +func (r PutContextualai) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_contextualai") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the PutContextualai headers map. +func (r *PutContextualai) Header(key, value string) *PutContextualai { + r.headers.Set(key, value) + + return r +} + +// TaskType The type of the inference task that the model will perform. +// API Name: tasktype +func (r *PutContextualai) _tasktype(tasktype string) *PutContextualai { + r.paramSet |= tasktypeMask + r.tasktype = tasktype + + return r +} + +// ContextualaiInferenceId The unique identifier of the inference endpoint. +// API Name: contextualaiinferenceid +func (r *PutContextualai) _contextualaiinferenceid(contextualaiinferenceid string) *PutContextualai { + r.paramSet |= contextualaiinferenceidMask + r.contextualaiinferenceid = contextualaiinferenceid + + return r +} + +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutContextualai) Timeout(duration string) *PutContextualai { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PutContextualai) ErrorTrace(errortrace bool) *PutContextualai { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PutContextualai) FilterPath(filterpaths ...string) *PutContextualai { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutContextualai) Human(human bool) *PutContextualai { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PutContextualai) Pretty(pretty bool) *PutContextualai { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// The type of service supported for the specified task type. In this case, +// `contextualai`. +// API name: service +func (r *PutContextualai) Service(service contextualaiservicetype.ContextualAIServiceType) *PutContextualai { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Service = service + return r +} + +// Settings used to install the inference model. These settings are specific to +// the `contextualai` service. +// API name: service_settings +func (r *PutContextualai) ServiceSettings(servicesettings types.ContextualAIServiceSettingsVariant) *PutContextualai { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings.ContextualAIServiceSettingsCaster() + + return r +} + +// Settings to configure the inference task. +// These settings are specific to the task type you specified. +// API name: task_settings +func (r *PutContextualai) TaskSettings(tasksettings types.ContextualAITaskSettingsVariant) *PutContextualai { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.TaskSettings = tasksettings.ContextualAITaskSettingsCaster() + + return r +} diff --git a/typedapi/inference/putcontextualai/request.go b/typedapi/inference/putcontextualai/request.go new file mode 100644 index 0000000000..d3e50e66c7 --- /dev/null +++ b/typedapi/inference/putcontextualai/request.go @@ -0,0 +1,63 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putcontextualai + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/contextualaiservicetype" +) + +// Request holds the request body struct for the package putcontextualai +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_contextualai/PutContextualAiRequest.ts#L30-L81 +type Request struct { + // Service The type of service supported for the specified task type. In this case, + // `contextualai`. + Service contextualaiservicetype.ContextualAIServiceType `json:"service"` + // ServiceSettings Settings used to install the inference model. These settings are specific to + // the `contextualai` service. + ServiceSettings types.ContextualAIServiceSettings `json:"service_settings"` + // TaskSettings Settings to configure the inference task. + // These settings are specific to the task type you specified. + TaskSettings *types.ContextualAITaskSettings `json:"task_settings,omitempty"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Putcontextualai request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/inference/putcontextualai/response.go b/typedapi/inference/putcontextualai/response.go new file mode 100644 index 0000000000..d548218d9f --- /dev/null +++ b/typedapi/inference/putcontextualai/response.go @@ -0,0 +1,55 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putcontextualai + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypecontextualai" +) + +// Response holds the response body struct for the package putcontextualai +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_contextualai/PutContextualAiResponse.ts#L22-L25 +type Response struct { + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // InferenceId The inference Id + InferenceId string `json:"inference_id"` + // Service The service type + Service string `json:"service"` + // ServiceSettings Settings specific to the service + ServiceSettings json.RawMessage `json:"service_settings"` + // TaskSettings Task settings specific to the service and task type + TaskSettings json.RawMessage `json:"task_settings,omitempty"` + // TaskType The task type + TaskType tasktypecontextualai.TaskTypeContextualAI `json:"task_type"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/inference/putcustom/put_custom.go b/typedapi/inference/putcustom/put_custom.go index dc5bf71c3f..527d6a2831 100644 --- a/typedapi/inference/putcustom/put_custom.go +++ b/typedapi/inference/putcustom/put_custom.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a custom inference endpoint. // @@ -487,6 +487,8 @@ func (r *PutCustom) Pretty(pretty bool) *PutCustom { } // The chunking configuration object. +// Applies only to the `sparse_embedding` or `text_embedding` task types. +// Not applicable to the `rerank` or `completion` task types. // API name: chunking_settings func (r *PutCustom) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutCustom { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putcustom/request.go b/typedapi/inference/putcustom/request.go index 68c388769a..a808cc6123 100644 --- a/typedapi/inference/putcustom/request.go +++ b/typedapi/inference/putcustom/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putcustom @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putcustom // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_custom/PutCustomRequest.ts#L30-L117 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_custom/PutCustomRequest.ts#L30-L119 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` or `text_embedding` task types. + // Not applicable to the `rerank` or `completion` task types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `custom`. diff --git a/typedapi/inference/putcustom/response.go b/typedapi/inference/putcustom/response.go index f8145ec083..cb58c03c6d 100644 --- a/typedapi/inference/putcustom/response.go +++ b/typedapi/inference/putcustom/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putcustom @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putcustom // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_custom/PutCustomResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_custom/PutCustomResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putdeepseek/put_deepseek.go b/typedapi/inference/putdeepseek/put_deepseek.go index 21e19534bd..4f35a0efc3 100644 --- a/typedapi/inference/putdeepseek/put_deepseek.go +++ b/typedapi/inference/putdeepseek/put_deepseek.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a DeepSeek inference endpoint. // @@ -391,19 +391,6 @@ func (r *PutDeepseek) Pretty(pretty bool) *PutDeepseek { return r } -// The chunking configuration object. -// API name: chunking_settings -func (r *PutDeepseek) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutDeepseek { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() - - return r -} - // The type of service supported for the specified task type. In this case, // `deepseek`. // API name: service diff --git a/typedapi/inference/putdeepseek/request.go b/typedapi/inference/putdeepseek/request.go index e3ee4448d5..26454420ae 100644 --- a/typedapi/inference/putdeepseek/request.go +++ b/typedapi/inference/putdeepseek/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdeepseek @@ -30,11 +30,8 @@ import ( // Request holds the request body struct for the package putdeepseek // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_deepseek/PutDeepSeekRequest.ts#L30-L80 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_deepseek/PutDeepSeekRequest.ts#L29-L74 type Request struct { - - // ChunkingSettings The chunking configuration object. - ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `deepseek`. Service deepseekservicetype.DeepSeekServiceType `json:"service"` diff --git a/typedapi/inference/putdeepseek/response.go b/typedapi/inference/putdeepseek/response.go index 7eb0c8a8cb..ad61c673f7 100644 --- a/typedapi/inference/putdeepseek/response.go +++ b/typedapi/inference/putdeepseek/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdeepseek @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putdeepseek // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_deepseek/PutDeepSeekResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_deepseek/PutDeepSeekResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putelasticsearch/put_elasticsearch.go b/typedapi/inference/putelasticsearch/put_elasticsearch.go index 03f4706ae2..054c7f8b7a 100644 --- a/typedapi/inference/putelasticsearch/put_elasticsearch.go +++ b/typedapi/inference/putelasticsearch/put_elasticsearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an Elasticsearch inference endpoint. // @@ -441,6 +441,8 @@ func (r *PutElasticsearch) Pretty(pretty bool) *PutElasticsearch { } // The chunking configuration object. +// Applies only to the `sparse_embedding` and `text_embedding` task types. +// Not applicable to the `rerank` task type. // API name: chunking_settings func (r *PutElasticsearch) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutElasticsearch { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putelasticsearch/request.go b/typedapi/inference/putelasticsearch/request.go index 78c5e400b8..3b9015a44a 100644 --- a/typedapi/inference/putelasticsearch/request.go +++ b/typedapi/inference/putelasticsearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putelasticsearch @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putelasticsearch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_elasticsearch/PutElasticsearchRequest.ts#L31-L99 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_elasticsearch/PutElasticsearchRequest.ts#L31-L101 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank` task type. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `elasticsearch`. diff --git a/typedapi/inference/putelasticsearch/response.go b/typedapi/inference/putelasticsearch/response.go index d06c255b21..3089a5ffb9 100644 --- a/typedapi/inference/putelasticsearch/response.go +++ b/typedapi/inference/putelasticsearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putelasticsearch @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putelasticsearch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_elasticsearch/PutElasticsearchResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_elasticsearch/PutElasticsearchResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putelser/put_elser.go b/typedapi/inference/putelser/put_elser.go index 8c9c0ffeff..9c22b9fdd2 100644 --- a/typedapi/inference/putelser/put_elser.go +++ b/typedapi/inference/putelser/put_elser.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an ELSER inference endpoint. // @@ -440,6 +440,7 @@ func (r *PutElser) Pretty(pretty bool) *PutElser { } // The chunking configuration object. +// Note that for ELSER endpoints, the max_chunk_size may not exceed `300`. // API name: chunking_settings func (r *PutElser) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutElser { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putelser/request.go b/typedapi/inference/putelser/request.go index 846ded6a30..95e08e5d40 100644 --- a/typedapi/inference/putelser/request.go +++ b/typedapi/inference/putelser/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putelser @@ -30,10 +30,10 @@ import ( // Request holds the request body struct for the package putelser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_elser/PutElserRequest.ts#L30-L94 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_elser/PutElserRequest.ts#L30-L95 type Request struct { - // ChunkingSettings The chunking configuration object. + // Note that for ELSER endpoints, the max_chunk_size may not exceed `300`. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `elser`. diff --git a/typedapi/inference/putelser/response.go b/typedapi/inference/putelser/response.go index 7c790901f1..f966319de0 100644 --- a/typedapi/inference/putelser/response.go +++ b/typedapi/inference/putelser/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putelser @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putelser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_elser/PutElserResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_elser/PutElserResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putgoogleaistudio/put_googleaistudio.go b/typedapi/inference/putgoogleaistudio/put_googleaistudio.go index 0ff8554575..bb483bdf5b 100644 --- a/typedapi/inference/putgoogleaistudio/put_googleaistudio.go +++ b/typedapi/inference/putgoogleaistudio/put_googleaistudio.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an Google AI Studio inference endpoint. // @@ -392,6 +392,8 @@ func (r *PutGoogleaistudio) Pretty(pretty bool) *PutGoogleaistudio { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `completion` task type. // API name: chunking_settings func (r *PutGoogleaistudio) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutGoogleaistudio { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putgoogleaistudio/request.go b/typedapi/inference/putgoogleaistudio/request.go index 4fde8ff451..7f1dc3a672 100644 --- a/typedapi/inference/putgoogleaistudio/request.go +++ b/typedapi/inference/putgoogleaistudio/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putgoogleaistudio @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putgoogleaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_googleaistudio/PutGoogleAiStudioRequest.ts#L30-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_googleaistudio/PutGoogleAiStudioRequest.ts#L30-L81 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `completion` task type. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `googleaistudio`. diff --git a/typedapi/inference/putgoogleaistudio/response.go b/typedapi/inference/putgoogleaistudio/response.go index f5b5af7735..81d1008421 100644 --- a/typedapi/inference/putgoogleaistudio/response.go +++ b/typedapi/inference/putgoogleaistudio/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putgoogleaistudio @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putgoogleaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_googleaistudio/PutGoogleAiStudioResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_googleaistudio/PutGoogleAiStudioResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putgooglevertexai/put_googlevertexai.go b/typedapi/inference/putgooglevertexai/put_googlevertexai.go index 7ee85bb46a..9e77249f4d 100644 --- a/typedapi/inference/putgooglevertexai/put_googlevertexai.go +++ b/typedapi/inference/putgooglevertexai/put_googlevertexai.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a Google Vertex AI inference endpoint. // @@ -392,6 +392,9 @@ func (r *PutGooglevertexai) Pretty(pretty bool) *PutGooglevertexai { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `rerank`, `completion`, or `chat_completion` task +// types. // API name: chunking_settings func (r *PutGooglevertexai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutGooglevertexai { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putgooglevertexai/request.go b/typedapi/inference/putgooglevertexai/request.go index b3193fd14e..51c245bf51 100644 --- a/typedapi/inference/putgooglevertexai/request.go +++ b/typedapi/inference/putgooglevertexai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putgooglevertexai @@ -30,10 +30,12 @@ import ( // Request holds the request body struct for the package putgooglevertexai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_googlevertexai/PutGoogleVertexAiRequest.ts#L31-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_googlevertexai/PutGoogleVertexAiRequest.ts#L31-L87 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `googlevertexai`. diff --git a/typedapi/inference/putgooglevertexai/response.go b/typedapi/inference/putgooglevertexai/response.go index ea6556c5a9..79f91e3a35 100644 --- a/typedapi/inference/putgooglevertexai/response.go +++ b/typedapi/inference/putgooglevertexai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putgooglevertexai @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putgooglevertexai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_googlevertexai/PutGoogleVertexAiResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_googlevertexai/PutGoogleVertexAiResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/puthuggingface/put_hugging_face.go b/typedapi/inference/puthuggingface/put_hugging_face.go index 1597850670..4e23c236a0 100644 --- a/typedapi/inference/puthuggingface/put_hugging_face.go +++ b/typedapi/inference/puthuggingface/put_hugging_face.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a Hugging Face inference endpoint. // @@ -484,6 +484,9 @@ func (r *PutHuggingFace) Pretty(pretty bool) *PutHuggingFace { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `rerank`, `completion`, or `chat_completion` task +// types. // API name: chunking_settings func (r *PutHuggingFace) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutHuggingFace { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/puthuggingface/request.go b/typedapi/inference/puthuggingface/request.go index b5113fdb8d..69236022a7 100644 --- a/typedapi/inference/puthuggingface/request.go +++ b/typedapi/inference/puthuggingface/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puthuggingface @@ -30,10 +30,12 @@ import ( // Request holds the request body struct for the package puthuggingface // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_hugging_face/PutHuggingFaceRequest.ts#L31-L121 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_hugging_face/PutHuggingFaceRequest.ts#L31-L123 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `hugging_face`. diff --git a/typedapi/inference/puthuggingface/response.go b/typedapi/inference/puthuggingface/response.go index 55fd638f1c..c9a4825e78 100644 --- a/typedapi/inference/puthuggingface/response.go +++ b/typedapi/inference/puthuggingface/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puthuggingface @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package puthuggingface // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_hugging_face/PutHuggingFaceResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_hugging_face/PutHuggingFaceResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putjinaai/put_jinaai.go b/typedapi/inference/putjinaai/put_jinaai.go index 1fb16a1609..69aecb7d98 100644 --- a/typedapi/inference/putjinaai/put_jinaai.go +++ b/typedapi/inference/putjinaai/put_jinaai.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an JinaAI inference endpoint. // @@ -400,6 +400,8 @@ func (r *PutJinaai) Pretty(pretty bool) *PutJinaai { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `rerank` task type. // API name: chunking_settings func (r *PutJinaai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutJinaai { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putjinaai/request.go b/typedapi/inference/putjinaai/request.go index 3011bb9a80..79d0ea1191 100644 --- a/typedapi/inference/putjinaai/request.go +++ b/typedapi/inference/putjinaai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putjinaai @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putjinaai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_jinaai/PutJinaAiRequest.ts#L31-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_jinaai/PutJinaAiRequest.ts#L31-L90 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `rerank` task type. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `jinaai`. diff --git a/typedapi/inference/putjinaai/response.go b/typedapi/inference/putjinaai/response.go index 446562c483..5602091f7d 100644 --- a/typedapi/inference/putjinaai/response.go +++ b/typedapi/inference/putjinaai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putjinaai @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putjinaai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_jinaai/PutJinaAiResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_jinaai/PutJinaAiResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putllama/put_llama.go b/typedapi/inference/putllama/put_llama.go new file mode 100644 index 0000000000..c26e06672b --- /dev/null +++ b/typedapi/inference/putllama/put_llama.go @@ -0,0 +1,433 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Create a Llama inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `llama` +// service. +package putllama + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/llamaservicetype" +) + +const ( + tasktypeMask = iota + 1 + + llamainferenceidMask +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type PutLlama struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + tasktype string + llamainferenceid string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutLlama type alias for index. +type NewPutLlama func(tasktype, llamainferenceid string) *PutLlama + +// NewPutLlamaFunc returns a new instance of PutLlama with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutLlamaFunc(tp elastictransport.Interface) NewPutLlama { + return func(tasktype, llamainferenceid string) *PutLlama { + n := New(tp) + + n._tasktype(tasktype) + + n._llamainferenceid(llamainferenceid) + + return n + } +} + +// Create a Llama inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `llama` +// service. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-llama +func New(tp elastictransport.Interface) *PutLlama { + r := &PutLlama{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PutLlama) Raw(raw io.Reader) *PutLlama { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutLlama) Request(req *Request) *PutLlama { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutLlama) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PutLlama: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == tasktypeMask|llamainferenceidMask: + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "tasktype", r.tasktype) + } + path.WriteString(r.tasktype) + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "llamainferenceid", r.llamainferenceid) + } + path.WriteString(r.llamainferenceid) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutLlama) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "inference.put_llama") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_llama") + if reader := instrument.RecordRequestBody(ctx, "inference.put_llama", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_llama") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutLlama query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a putllama.Response +func (r PutLlama) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_llama") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the PutLlama headers map. +func (r *PutLlama) Header(key, value string) *PutLlama { + r.headers.Set(key, value) + + return r +} + +// TaskType The type of the inference task that the model will perform. +// API Name: tasktype +func (r *PutLlama) _tasktype(tasktype string) *PutLlama { + r.paramSet |= tasktypeMask + r.tasktype = tasktype + + return r +} + +// LlamaInferenceId The unique identifier of the inference endpoint. +// API Name: llamainferenceid +func (r *PutLlama) _llamainferenceid(llamainferenceid string) *PutLlama { + r.paramSet |= llamainferenceidMask + r.llamainferenceid = llamainferenceid + + return r +} + +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutLlama) Timeout(duration string) *PutLlama { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PutLlama) ErrorTrace(errortrace bool) *PutLlama { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PutLlama) FilterPath(filterpaths ...string) *PutLlama { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutLlama) Human(human bool) *PutLlama { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PutLlama) Pretty(pretty bool) *PutLlama { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `completion` or `chat_completion` task types. +// API name: chunking_settings +func (r *PutLlama) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutLlama { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + + return r +} + +// The type of service supported for the specified task type. In this case, +// `llama`. +// API name: service +func (r *PutLlama) Service(service llamaservicetype.LlamaServiceType) *PutLlama { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Service = service + return r +} + +// Settings used to install the inference model. These settings are specific to +// the `llama` service. +// API name: service_settings +func (r *PutLlama) ServiceSettings(servicesettings types.LlamaServiceSettingsVariant) *PutLlama { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings.LlamaServiceSettingsCaster() + + return r +} diff --git a/typedapi/inference/putllama/request.go b/typedapi/inference/putllama/request.go new file mode 100644 index 0000000000..40fca304b1 --- /dev/null +++ b/typedapi/inference/putllama/request.go @@ -0,0 +1,64 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putllama + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/llamaservicetype" +) + +// Request holds the request body struct for the package putllama +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_llama/PutLlamaRequest.ts#L30-L81 +type Request struct { + // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `completion` or `chat_completion` task types. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // Service The type of service supported for the specified task type. In this case, + // `llama`. + Service llamaservicetype.LlamaServiceType `json:"service"` + // ServiceSettings Settings used to install the inference model. These settings are specific to + // the `llama` service. + ServiceSettings types.LlamaServiceSettings `json:"service_settings"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Putllama request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/inference/putllama/response.go b/typedapi/inference/putllama/response.go new file mode 100644 index 0000000000..6a00c4012f --- /dev/null +++ b/typedapi/inference/putllama/response.go @@ -0,0 +1,55 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putllama + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypellama" +) + +// Response holds the response body struct for the package putllama +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_llama/PutLlamaResponse.ts#L22-L25 +type Response struct { + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // InferenceId The inference Id + InferenceId string `json:"inference_id"` + // Service The service type + Service string `json:"service"` + // ServiceSettings Settings specific to the service + ServiceSettings json.RawMessage `json:"service_settings"` + // TaskSettings Task settings specific to the service and task type + TaskSettings json.RawMessage `json:"task_settings,omitempty"` + // TaskType The task type + TaskType tasktypellama.TaskTypeLlama `json:"task_type"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/inference/putmistral/put_mistral.go b/typedapi/inference/putmistral/put_mistral.go index a23411319f..99560bf5e3 100644 --- a/typedapi/inference/putmistral/put_mistral.go +++ b/typedapi/inference/putmistral/put_mistral.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a Mistral inference endpoint. // @@ -392,6 +392,8 @@ func (r *PutMistral) Pretty(pretty bool) *PutMistral { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `completion` or `chat_completion` task types. // API name: chunking_settings func (r *PutMistral) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutMistral { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putmistral/request.go b/typedapi/inference/putmistral/request.go index 3db59c3847..83c53dbe45 100644 --- a/typedapi/inference/putmistral/request.go +++ b/typedapi/inference/putmistral/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putmistral @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putmistral // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_mistral/PutMistralRequest.ts#L30-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_mistral/PutMistralRequest.ts#L30-L81 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `completion` or `chat_completion` task types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `mistral`. diff --git a/typedapi/inference/putmistral/response.go b/typedapi/inference/putmistral/response.go index 2e686c6d8f..6c79766a89 100644 --- a/typedapi/inference/putmistral/response.go +++ b/typedapi/inference/putmistral/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putmistral @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putmistral // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_mistral/PutMistralResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_mistral/PutMistralResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putopenai/put_openai.go b/typedapi/inference/putopenai/put_openai.go index 56a2fc00e8..6c9aecfbb1 100644 --- a/typedapi/inference/putopenai/put_openai.go +++ b/typedapi/inference/putopenai/put_openai.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an OpenAI inference endpoint. // @@ -394,6 +394,8 @@ func (r *PutOpenai) Pretty(pretty bool) *PutOpenai { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `completion` or `chat_completion` task types. // API name: chunking_settings func (r *PutOpenai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutOpenai { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putopenai/request.go b/typedapi/inference/putopenai/request.go index 33f64befa2..748945a5ea 100644 --- a/typedapi/inference/putopenai/request.go +++ b/typedapi/inference/putopenai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putopenai @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putopenai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_openai/PutOpenAiRequest.ts#L31-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_openai/PutOpenAiRequest.ts#L31-L88 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `completion` or `chat_completion` task types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `openai`. diff --git a/typedapi/inference/putopenai/response.go b/typedapi/inference/putopenai/response.go index 6618b3ca61..1a9c904383 100644 --- a/typedapi/inference/putopenai/response.go +++ b/typedapi/inference/putopenai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putopenai @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putopenai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_openai/PutOpenAiResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_openai/PutOpenAiResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putopenshiftai/put_openshift_ai.go b/typedapi/inference/putopenshiftai/put_openshift_ai.go new file mode 100644 index 0000000000..48743238a3 --- /dev/null +++ b/typedapi/inference/putopenshiftai/put_openshift_ai.go @@ -0,0 +1,453 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Create an OpenShift AI inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `openshift_ai` service. +package putopenshiftai + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/openshiftaiservicetype" +) + +const ( + tasktypeMask = iota + 1 + + openshiftaiinferenceidMask +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type PutOpenshiftAi struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + tasktype string + openshiftaiinferenceid string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutOpenshiftAi type alias for index. +type NewPutOpenshiftAi func(tasktype, openshiftaiinferenceid string) *PutOpenshiftAi + +// NewPutOpenshiftAiFunc returns a new instance of PutOpenshiftAi with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutOpenshiftAiFunc(tp elastictransport.Interface) NewPutOpenshiftAi { + return func(tasktype, openshiftaiinferenceid string) *PutOpenshiftAi { + n := New(tp) + + n._tasktype(tasktype) + + n._openshiftaiinferenceid(openshiftaiinferenceid) + + return n + } +} + +// Create an OpenShift AI inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `openshift_ai` service. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openshift-ai +func New(tp elastictransport.Interface) *PutOpenshiftAi { + r := &PutOpenshiftAi{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PutOpenshiftAi) Raw(raw io.Reader) *PutOpenshiftAi { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutOpenshiftAi) Request(req *Request) *PutOpenshiftAi { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutOpenshiftAi) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PutOpenshiftAi: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == tasktypeMask|openshiftaiinferenceidMask: + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "tasktype", r.tasktype) + } + path.WriteString(r.tasktype) + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "openshiftaiinferenceid", r.openshiftaiinferenceid) + } + path.WriteString(r.openshiftaiinferenceid) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutOpenshiftAi) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "inference.put_openshift_ai") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_openshift_ai") + if reader := instrument.RecordRequestBody(ctx, "inference.put_openshift_ai", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_openshift_ai") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutOpenshiftAi query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a putopenshiftai.Response +func (r PutOpenshiftAi) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_openshift_ai") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the PutOpenshiftAi headers map. +func (r *PutOpenshiftAi) Header(key, value string) *PutOpenshiftAi { + r.headers.Set(key, value) + + return r +} + +// TaskType The type of the inference task that the model will perform. +// NOTE: The `chat_completion` task type only supports streaming and only +// through the _stream API. +// API Name: tasktype +func (r *PutOpenshiftAi) _tasktype(tasktype string) *PutOpenshiftAi { + r.paramSet |= tasktypeMask + r.tasktype = tasktype + + return r +} + +// OpenshiftaiInferenceId The unique identifier of the inference endpoint. +// API Name: openshiftaiinferenceid +func (r *PutOpenshiftAi) _openshiftaiinferenceid(openshiftaiinferenceid string) *PutOpenshiftAi { + r.paramSet |= openshiftaiinferenceidMask + r.openshiftaiinferenceid = openshiftaiinferenceid + + return r +} + +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutOpenshiftAi) Timeout(duration string) *PutOpenshiftAi { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PutOpenshiftAi) ErrorTrace(errortrace bool) *PutOpenshiftAi { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PutOpenshiftAi) FilterPath(filterpaths ...string) *PutOpenshiftAi { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutOpenshiftAi) Human(human bool) *PutOpenshiftAi { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PutOpenshiftAi) Pretty(pretty bool) *PutOpenshiftAi { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `rerank`, `completion`, or `chat_completion` task +// types. +// API name: chunking_settings +func (r *PutOpenshiftAi) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutOpenshiftAi { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + + return r +} + +// The type of service supported for the specified task type. In this case, +// `openshift_ai`. +// API name: service +func (r *PutOpenshiftAi) Service(service openshiftaiservicetype.OpenShiftAiServiceType) *PutOpenshiftAi { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Service = service + return r +} + +// Settings used to install the inference model. These settings are specific to +// the `openshift_ai` service. +// API name: service_settings +func (r *PutOpenshiftAi) ServiceSettings(servicesettings types.OpenShiftAiServiceSettingsVariant) *PutOpenshiftAi { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings.OpenShiftAiServiceSettingsCaster() + + return r +} + +// Settings to configure the inference task. +// Applies only to the `rerank` task type. +// Not applicable to the `text_embedding`, `completion`, or `chat_completion` +// task types. +// These settings are specific to the task type you specified. +// API name: task_settings +func (r *PutOpenshiftAi) TaskSettings(tasksettings types.OpenShiftAiTaskSettingsVariant) *PutOpenshiftAi { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.TaskSettings = tasksettings.OpenShiftAiTaskSettingsCaster() + + return r +} diff --git a/typedapi/inference/putopenshiftai/request.go b/typedapi/inference/putopenshiftai/request.go new file mode 100644 index 0000000000..b2a1da11a5 --- /dev/null +++ b/typedapi/inference/putopenshiftai/request.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putopenshiftai + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/openshiftaiservicetype" +) + +// Request holds the request body struct for the package putopenshiftai +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_openshift_ai/PutOpenShiftAiRequest.ts#L31-L90 +type Request struct { + // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // Service The type of service supported for the specified task type. In this case, + // `openshift_ai`. + Service openshiftaiservicetype.OpenShiftAiServiceType `json:"service"` + // ServiceSettings Settings used to install the inference model. These settings are specific to + // the `openshift_ai` service. + ServiceSettings types.OpenShiftAiServiceSettings `json:"service_settings"` + // TaskSettings Settings to configure the inference task. + // Applies only to the `rerank` task type. + // Not applicable to the `text_embedding`, `completion`, or `chat_completion` + // task types. + // These settings are specific to the task type you specified. + TaskSettings *types.OpenShiftAiTaskSettings `json:"task_settings,omitempty"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Putopenshiftai request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/inference/putopenshiftai/response.go b/typedapi/inference/putopenshiftai/response.go new file mode 100644 index 0000000000..9a80156706 --- /dev/null +++ b/typedapi/inference/putopenshiftai/response.go @@ -0,0 +1,55 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package putopenshiftai + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeopenshiftai" +) + +// Response holds the response body struct for the package putopenshiftai +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_openshift_ai/PutOpenShiftAiResponse.ts#L22-L25 +type Response struct { + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // InferenceId The inference Id + InferenceId string `json:"inference_id"` + // Service The service type + Service string `json:"service"` + // ServiceSettings Settings specific to the service + ServiceSettings json.RawMessage `json:"service_settings"` + // TaskSettings Task settings specific to the service and task type + TaskSettings json.RawMessage `json:"task_settings,omitempty"` + // TaskType The task type + TaskType tasktypeopenshiftai.TaskTypeOpenShiftAi `json:"task_type"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/inference/putvoyageai/put_voyageai.go b/typedapi/inference/putvoyageai/put_voyageai.go index cd3d133941..5d16678feb 100644 --- a/typedapi/inference/putvoyageai/put_voyageai.go +++ b/typedapi/inference/putvoyageai/put_voyageai.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a VoyageAI inference endpoint. // @@ -398,6 +398,8 @@ func (r *PutVoyageai) Pretty(pretty bool) *PutVoyageai { } // The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `rerank` task type. // API name: chunking_settings func (r *PutVoyageai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutVoyageai { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/putvoyageai/request.go b/typedapi/inference/putvoyageai/request.go index d5a15cf54c..bbe3597dcd 100644 --- a/typedapi/inference/putvoyageai/request.go +++ b/typedapi/inference/putvoyageai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putvoyageai @@ -30,10 +30,11 @@ import ( // Request holds the request body struct for the package putvoyageai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_voyageai/PutVoyageAIRequest.ts#L31-L87 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_voyageai/PutVoyageAIRequest.ts#L31-L89 type Request struct { - // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `rerank` task type. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `voyageai`. diff --git a/typedapi/inference/putvoyageai/response.go b/typedapi/inference/putvoyageai/response.go index 2fb1b1c75b..80328228f8 100644 --- a/typedapi/inference/putvoyageai/response.go +++ b/typedapi/inference/putvoyageai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putvoyageai @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putvoyageai // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_voyageai/PutVoyageAIResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_voyageai/PutVoyageAIResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/putwatsonx/put_watsonx.go b/typedapi/inference/putwatsonx/put_watsonx.go index a9e2bb06c0..8e6f47d803 100644 --- a/typedapi/inference/putwatsonx/put_watsonx.go +++ b/typedapi/inference/putwatsonx/put_watsonx.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a Watsonx inference endpoint. // @@ -399,6 +399,21 @@ func (r *PutWatsonx) Pretty(pretty bool) *PutWatsonx { return r } +// The chunking configuration object. +// Applies only to the `text_embedding` task type. +// Not applicable to the `completion` or `chat_completion` task types. +// API name: chunking_settings +func (r *PutWatsonx) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutWatsonx { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + + return r +} + // The type of service supported for the specified task type. In this case, // `watsonxai`. // API name: service diff --git a/typedapi/inference/putwatsonx/request.go b/typedapi/inference/putwatsonx/request.go index 09216f568b..ed8ad0c1b8 100644 --- a/typedapi/inference/putwatsonx/request.go +++ b/typedapi/inference/putwatsonx/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putwatsonx @@ -30,9 +30,12 @@ import ( // Request holds the request body struct for the package putwatsonx // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_watsonx/PutWatsonxRequest.ts#L29-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_watsonx/PutWatsonxRequest.ts#L30-L83 type Request struct { - + // ChunkingSettings The chunking configuration object. + // Applies only to the `text_embedding` task type. + // Not applicable to the `completion` or `chat_completion` task types. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The type of service supported for the specified task type. In this case, // `watsonxai`. Service watsonxservicetype.WatsonxServiceType `json:"service"` diff --git a/typedapi/inference/putwatsonx/response.go b/typedapi/inference/putwatsonx/response.go index d3183c4a32..53f4d69b00 100644 --- a/typedapi/inference/putwatsonx/response.go +++ b/typedapi/inference/putwatsonx/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putwatsonx @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package putwatsonx // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_watsonx/PutWatsonxResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/put_watsonx/PutWatsonxResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/rerank/request.go b/typedapi/inference/rerank/request.go index 611e6f2096..d9e40a0fe5 100644 --- a/typedapi/inference/rerank/request.go +++ b/typedapi/inference/rerank/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rerank @@ -31,22 +31,20 @@ import ( // Request holds the request body struct for the package rerank // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/rerank/RerankRequest.ts#L25-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/rerank/RerankRequest.ts#L26-L78 type Request struct { - - // Input The text on which you want to perform the inference task. - // It can be a single string or an array. - // - // > info - // > Inference endpoints for the `completion` task type currently only support a - // single string as input. + // Input The documents to rank. Input []string `json:"input"` // Query Query input. Query string `json:"query"` + // ReturnDocuments Include the document text in the response. + ReturnDocuments *bool `json:"return_documents,omitempty"` // TaskSettings Task settings for the individual inference request. // These settings are specific to the task type you specified and override the // task settings specified when initializing the service. TaskSettings json.RawMessage `json:"task_settings,omitempty"` + // TopN Limit the response to the top N documents. + TopN *int `json:"top_n,omitempty"` } // NewRequest returns a Request @@ -83,19 +81,8 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch t { case "input": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Input", err) - } - - s.Input = append(s.Input, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Input); err != nil { - return fmt.Errorf("%s | %w", "Input", err) - } + if err := dec.Decode(&s.Input); err != nil { + return fmt.Errorf("%s | %w", "Input", err) } case "query": @@ -110,11 +97,41 @@ func (s *Request) UnmarshalJSON(data []byte) error { } s.Query = o + case "return_documents": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "ReturnDocuments", err) + } + s.ReturnDocuments = &value + case bool: + s.ReturnDocuments = &v + } + case "task_settings": if err := dec.Decode(&s.TaskSettings); err != nil { return fmt.Errorf("%s | %w", "TaskSettings", err) } + case "top_n": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "TopN", err) + } + s.TopN = &value + case float64: + f := int(v) + s.TopN = &f + } + } } return nil diff --git a/typedapi/inference/rerank/rerank.go b/typedapi/inference/rerank/rerank.go index 13406fcd30..848b055ce2 100644 --- a/typedapi/inference/rerank/rerank.go +++ b/typedapi/inference/rerank/rerank.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Perform reranking inference on the service +// Perform reranking inference on the service. package rerank import ( @@ -81,7 +81,7 @@ func NewRerankFunc(tp elastictransport.Interface) NewRerank { } } -// Perform reranking inference on the service +// Perform reranking inference on the service. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference func New(tp elastictransport.Interface) *Rerank { @@ -365,21 +365,18 @@ func (r *Rerank) Pretty(pretty bool) *Rerank { return r } -// The text on which you want to perform the inference task. -// It can be a single string or an array. -// -// > info -// > Inference endpoints for the `completion` task type currently only support a -// single string as input. +// The documents to rank. // API name: input func (r *Rerank) Input(inputs ...string) *Rerank { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Input = make([]string, len(inputs)) - r.req.Input = inputs + for _, v := range inputs { + + r.req.Input = append(r.req.Input, v) + } return r } @@ -396,6 +393,19 @@ func (r *Rerank) Query(query string) *Rerank { return r } +// Include the document text in the response. +// API name: return_documents +func (r *Rerank) ReturnDocuments(returndocuments bool) *Rerank { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ReturnDocuments = &returndocuments + + return r +} + // Task settings for the individual inference request. // These settings are specific to the task type you specified and override the // task settings specified when initializing the service. @@ -410,3 +420,16 @@ func (r *Rerank) TaskSettings(tasksettings json.RawMessage) *Rerank { return r } + +// Limit the response to the top N documents. +// API name: top_n +func (r *Rerank) TopN(topn int) *Rerank { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.TopN = &topn + + return r +} diff --git a/typedapi/inference/rerank/response.go b/typedapi/inference/rerank/response.go index 343af38ab6..401745084a 100644 --- a/typedapi/inference/rerank/response.go +++ b/typedapi/inference/rerank/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rerank @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package rerank // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/rerank/RerankResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/rerank/RerankResponse.ts#L22-L25 type Response []types.RankedDocument diff --git a/typedapi/inference/sparseembedding/request.go b/typedapi/inference/sparseembedding/request.go index 43e31ded03..97d2c60560 100644 --- a/typedapi/inference/sparseembedding/request.go +++ b/typedapi/inference/sparseembedding/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package sparseembedding @@ -30,13 +30,14 @@ import ( // Request holds the request body struct for the package sparseembedding // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/sparse_embedding/SparseEmbeddingRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/sparse_embedding/SparseEmbeddingRequest.ts#L25-L64 type Request struct { - // Input Inference input. // Either a string or an array of strings. Input []string `json:"input"` - // TaskSettings Optional task settings + // TaskSettings Task settings for the individual inference request. These settings are + // specific to the you specified and override the task settings + // specified when initializing the service. TaskSettings json.RawMessage `json:"task_settings,omitempty"` } diff --git a/typedapi/inference/sparseembedding/response.go b/typedapi/inference/sparseembedding/response.go index f91e0d5487..fbd2e8c4a8 100644 --- a/typedapi/inference/sparseembedding/response.go +++ b/typedapi/inference/sparseembedding/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package sparseembedding @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package sparseembedding // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/sparse_embedding/SparseEmbeddingResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/sparse_embedding/SparseEmbeddingResponse.ts#L22-L25 type Response []types.SparseEmbeddingResult diff --git a/typedapi/inference/sparseembedding/sparse_embedding.go b/typedapi/inference/sparseembedding/sparse_embedding.go index 490ba880c5..ae9b9664c4 100644 --- a/typedapi/inference/sparseembedding/sparse_embedding.go +++ b/typedapi/inference/sparseembedding/sparse_embedding.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Perform sparse embedding inference on the service +// Perform sparse embedding inference on the service. package sparseembedding import ( @@ -81,7 +81,7 @@ func NewSparseEmbeddingFunc(tp elastictransport.Interface) NewSparseEmbedding { } } -// Perform sparse embedding inference on the service +// Perform sparse embedding inference on the service. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference func New(tp elastictransport.Interface) *SparseEmbedding { @@ -379,7 +379,9 @@ func (r *SparseEmbedding) Input(inputs ...string) *SparseEmbedding { return r } -// Optional task settings +// Task settings for the individual inference request. These settings are +// specific to the you specified and override the task settings +// specified when initializing the service. // API name: task_settings func (r *SparseEmbedding) TaskSettings(tasksettings json.RawMessage) *SparseEmbedding { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/streamcompletion/request.go b/typedapi/inference/streamcompletion/request.go index c87085e348..122e0601f8 100644 --- a/typedapi/inference/streamcompletion/request.go +++ b/typedapi/inference/streamcompletion/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package streamcompletion @@ -30,16 +30,17 @@ import ( // Request holds the request body struct for the package streamcompletion // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/stream_completion/StreamInferenceRequest.ts#L25-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/stream_completion/StreamInferenceRequest.ts#L25-L72 type Request struct { - // Input The text on which you want to perform the inference task. // It can be a single string or an array. // // NOTE: Inference endpoints for the completion task type currently only support // a single string as input. Input []string `json:"input"` - // TaskSettings Optional task settings + // TaskSettings Task settings for the individual inference request. These settings are + // specific to the you specified and override the task settings + // specified when initializing the service. TaskSettings json.RawMessage `json:"task_settings,omitempty"` } diff --git a/typedapi/inference/streamcompletion/response.go b/typedapi/inference/streamcompletion/response.go index dbadc515dd..05517dbf05 100644 --- a/typedapi/inference/streamcompletion/response.go +++ b/typedapi/inference/streamcompletion/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package streamcompletion // Response holds the response body struct for the package streamcompletion // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/stream_completion/StreamInferenceResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/stream_completion/StreamInferenceResponse.ts#L22-L25 type Response = []byte diff --git a/typedapi/inference/streamcompletion/stream_completion.go b/typedapi/inference/streamcompletion/stream_completion.go index 50d34da1c3..ed76228d8d 100644 --- a/typedapi/inference/streamcompletion/stream_completion.go +++ b/typedapi/inference/streamcompletion/stream_completion.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Perform streaming inference. +// Perform streaming completion inference on the service. +// // Get real-time responses for completion tasks by delivering answers // incrementally, reducing response times during computation. // This API works only with the completion task type. @@ -97,7 +98,8 @@ func NewStreamCompletionFunc(tp elastictransport.Interface) NewStreamCompletion } } -// Perform streaming inference. +// Perform streaming completion inference on the service. +// // Get real-time responses for completion tasks by delivering answers // incrementally, reducing response times during computation. // This API works only with the completion task type. @@ -416,7 +418,9 @@ func (r *StreamCompletion) Input(inputs ...string) *StreamCompletion { return r } -// Optional task settings +// Task settings for the individual inference request. These settings are +// specific to the you specified and override the task settings +// specified when initializing the service. // API name: task_settings func (r *StreamCompletion) TaskSettings(tasksettings json.RawMessage) *StreamCompletion { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/textembedding/request.go b/typedapi/inference/textembedding/request.go index b02940b0d1..2efbcf54d7 100644 --- a/typedapi/inference/textembedding/request.go +++ b/typedapi/inference/textembedding/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package textembedding @@ -26,17 +26,34 @@ import ( "errors" "fmt" "io" + "strconv" ) // Request holds the request body struct for the package textembedding // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/text_embedding/TextEmbeddingRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/text_embedding/TextEmbeddingRequest.ts#L25-L77 type Request struct { - // Input Inference input. // Either a string or an array of strings. Input []string `json:"input"` - // TaskSettings Optional task settings + // InputType The input data type for the text embedding model. Possible values include: + // * `SEARCH` + // * `INGEST` + // * `CLASSIFICATION` + // * `CLUSTERING` + // Not all services support all values. Unsupported values will trigger a + // validation exception. + // Accepted values depend on the configured inference service, refer to the + // relevant service-specific documentation for more info. + // + // > info + // > The `input_type` parameter specified on the root level of the request body + // will take precedence over the `input_type` parameter specified in + // `task_settings`. + InputType *string `json:"input_type,omitempty"` + // TaskSettings Task settings for the individual inference request. These settings are + // specific to the you specified and override the task settings + // specified when initializing the service. TaskSettings json.RawMessage `json:"task_settings,omitempty"` } @@ -89,6 +106,18 @@ func (s *Request) UnmarshalJSON(data []byte) error { } } + case "input_type": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "InputType", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.InputType = &o + case "task_settings": if err := dec.Decode(&s.TaskSettings); err != nil { return fmt.Errorf("%s | %w", "TaskSettings", err) diff --git a/typedapi/inference/textembedding/response.go b/typedapi/inference/textembedding/response.go index a0e7fd47c9..741b731c1d 100644 --- a/typedapi/inference/textembedding/response.go +++ b/typedapi/inference/textembedding/response.go @@ -16,30 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package textembedding import ( - "encoding/json" - "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // Response holds the response body struct for the package textembedding // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/text_embedding/TextEmbeddingResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/text_embedding/TextEmbeddingResponse.ts#L22-L25 type Response struct { - AdditionalTextEmbeddingInferenceResultProperty map[string]json.RawMessage `json:"-"` - TextEmbedding []types.TextEmbeddingResult `json:"text_embedding,omitempty"` - TextEmbeddingBits []types.TextEmbeddingByteResult `json:"text_embedding_bits,omitempty"` - TextEmbeddingBytes []types.TextEmbeddingByteResult `json:"text_embedding_bytes,omitempty"` + TextEmbedding []types.TextEmbeddingResult `json:"text_embedding,omitempty"` + TextEmbeddingBits []types.TextEmbeddingByteResult `json:"text_embedding_bits,omitempty"` + TextEmbeddingBytes []types.TextEmbeddingByteResult `json:"text_embedding_bytes,omitempty"` } // NewResponse returns a Response func NewResponse() *Response { - r := &Response{ - AdditionalTextEmbeddingInferenceResultProperty: make(map[string]json.RawMessage, 0), - } + r := &Response{} return r } diff --git a/typedapi/inference/textembedding/text_embedding.go b/typedapi/inference/textembedding/text_embedding.go index 0e6d68ace2..847ce3e094 100644 --- a/typedapi/inference/textembedding/text_embedding.go +++ b/typedapi/inference/textembedding/text_embedding.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Perform text embedding inference on the service +// Perform text embedding inference on the service. package textembedding import ( @@ -81,7 +81,7 @@ func NewTextEmbeddingFunc(tp elastictransport.Interface) NewTextEmbedding { } } -// Perform text embedding inference on the service +// Perform text embedding inference on the service. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference func New(tp elastictransport.Interface) *TextEmbedding { @@ -379,7 +379,35 @@ func (r *TextEmbedding) Input(inputs ...string) *TextEmbedding { return r } -// Optional task settings +// The input data type for the text embedding model. Possible values include: +// * `SEARCH` +// * `INGEST` +// * `CLASSIFICATION` +// * `CLUSTERING` +// Not all services support all values. Unsupported values will trigger a +// validation exception. +// Accepted values depend on the configured inference service, refer to the +// relevant service-specific documentation for more info. +// +// > info +// > The `input_type` parameter specified on the root level of the request body +// will take precedence over the `input_type` parameter specified in +// `task_settings`. +// API name: input_type +func (r *TextEmbedding) InputType(inputtype string) *TextEmbedding { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.InputType = &inputtype + + return r +} + +// Task settings for the individual inference request. These settings are +// specific to the you specified and override the task settings +// specified when initializing the service. // API name: task_settings func (r *TextEmbedding) TaskSettings(tasksettings json.RawMessage) *TextEmbedding { // Initialize the request if it is not already initialized diff --git a/typedapi/inference/update/request.go b/typedapi/inference/update/request.go index 7b66406360..df7a7a7ce5 100644 --- a/typedapi/inference/update/request.go +++ b/typedapi/inference/update/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package update @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/update/UpdateInferenceRequest.ts#L25-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/update/UpdateInferenceRequest.ts#L25-L61 type Request = types.InferenceEndpoint // NewRequest returns a Request diff --git a/typedapi/inference/update/response.go b/typedapi/inference/update/response.go index 48ca89ee77..088766f28c 100644 --- a/typedapi/inference/update/response.go +++ b/typedapi/inference/update/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package update @@ -29,10 +29,12 @@ import ( // Response holds the response body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/update/UpdateInferenceResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/update/UpdateInferenceResponse.ts#L22-L25 type Response struct { - - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/inference/update/update.go b/typedapi/inference/update/update.go index 17c4752ee4..3504ab7486 100644 --- a/typedapi/inference/update/update.go +++ b/typedapi/inference/update/update.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update an inference endpoint. // @@ -416,7 +416,10 @@ func (r *Update) Pretty(pretty bool) *Update { return r } -// Chunking configuration object +// The chunking configuration object. +// Applies only to the `sparse_embedding` and `text_embedding` task types. +// Not applicable to the `rerank`, `completion`, or `chat_completion` task +// types. // API name: chunking_settings func (r *Update) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *Update { // Initialize the request if it is not already initialized diff --git a/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go b/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go index 519fbe2642..becd46db95 100644 --- a/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go +++ b/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete GeoIP database configurations. // diff --git a/typedapi/ingest/deletegeoipdatabase/response.go b/typedapi/ingest/deletegeoipdatabase/response.go index 37e517cc82..4522265527 100644 --- a/typedapi/ingest/deletegeoipdatabase/response.go +++ b/typedapi/ingest/deletegeoipdatabase/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletegeoipdatabase // Response holds the response body struct for the package deletegeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ingest/deleteiplocationdatabase/delete_ip_location_database.go b/typedapi/ingest/deleteiplocationdatabase/delete_ip_location_database.go index 0a20a5bd7d..398dfc04b9 100644 --- a/typedapi/ingest/deleteiplocationdatabase/delete_ip_location_database.go +++ b/typedapi/ingest/deleteiplocationdatabase/delete_ip_location_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete IP geolocation database configurations. package deleteiplocationdatabase diff --git a/typedapi/ingest/deleteiplocationdatabase/response.go b/typedapi/ingest/deleteiplocationdatabase/response.go index e6ca567345..77f794f891 100644 --- a/typedapi/ingest/deleteiplocationdatabase/response.go +++ b/typedapi/ingest/deleteiplocationdatabase/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteiplocationdatabase // Response holds the response body struct for the package deleteiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ingest/deletepipeline/delete_pipeline.go b/typedapi/ingest/deletepipeline/delete_pipeline.go index bed879ec80..03b912f118 100644 --- a/typedapi/ingest/deletepipeline/delete_pipeline.go +++ b/typedapi/ingest/deletepipeline/delete_pipeline.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete pipelines. +// // Delete one or more ingest pipelines. package deletepipeline @@ -78,6 +79,7 @@ func NewDeletePipelineFunc(tp elastictransport.Interface) NewDeletePipeline { } // Delete pipelines. +// // Delete one or more ingest pipelines. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline diff --git a/typedapi/ingest/deletepipeline/response.go b/typedapi/ingest/deletepipeline/response.go index 8dfe331063..353510c2a3 100644 --- a/typedapi/ingest/deletepipeline/response.go +++ b/typedapi/ingest/deletepipeline/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletepipeline // Response holds the response body struct for the package deletepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ingest/geoipstats/geo_ip_stats.go b/typedapi/ingest/geoipstats/geo_ip_stats.go index 21785b138b..08515fbee1 100644 --- a/typedapi/ingest/geoipstats/geo_ip_stats.go +++ b/typedapi/ingest/geoipstats/geo_ip_stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get GeoIP statistics. +// // Get download statistics for GeoIP2 databases that are used with the GeoIP // processor. package geoipstats @@ -71,6 +72,7 @@ func NewGeoIpStatsFunc(tp elastictransport.Interface) NewGeoIpStats { } // Get GeoIP statistics. +// // Get download statistics for GeoIP2 databases that are used with the GeoIP // processor. // diff --git a/typedapi/ingest/geoipstats/response.go b/typedapi/ingest/geoipstats/response.go index 3942715005..4a53f891dc 100644 --- a/typedapi/ingest/geoipstats/response.go +++ b/typedapi/ingest/geoipstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package geoipstats @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package geoipstats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/geo_ip_stats/IngestGeoIpStatsResponse.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/geo_ip_stats/IngestGeoIpStatsResponse.ts#L24-L31 type Response struct { - // Nodes Downloaded GeoIP2 databases for each node. Nodes map[string]types.GeoIpNodeDatabases `json:"nodes"` // Stats Download statistics for all GeoIP2 databases. diff --git a/typedapi/ingest/getgeoipdatabase/get_geoip_database.go b/typedapi/ingest/getgeoipdatabase/get_geoip_database.go index ecce081d57..0a9ba5afbc 100644 --- a/typedapi/ingest/getgeoipdatabase/get_geoip_database.go +++ b/typedapi/ingest/getgeoipdatabase/get_geoip_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get GeoIP database configurations. // diff --git a/typedapi/ingest/getgeoipdatabase/response.go b/typedapi/ingest/getgeoipdatabase/response.go index b890e0ecfd..7816bef216 100644 --- a/typedapi/ingest/getgeoipdatabase/response.go +++ b/typedapi/ingest/getgeoipdatabase/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getgeoipdatabase @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getgeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L25-L27 type Response struct { Databases []types.GeoipDatabaseConfigurationMetadata `json:"databases"` } diff --git a/typedapi/ingest/getiplocationdatabase/get_ip_location_database.go b/typedapi/ingest/getiplocationdatabase/get_ip_location_database.go index eaf2e79cc5..cef54e998e 100644 --- a/typedapi/ingest/getiplocationdatabase/get_ip_location_database.go +++ b/typedapi/ingest/getiplocationdatabase/get_ip_location_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get IP geolocation database configurations. package getiplocationdatabase diff --git a/typedapi/ingest/getiplocationdatabase/response.go b/typedapi/ingest/getiplocationdatabase/response.go index bf3e6ea9b9..067a313073 100644 --- a/typedapi/ingest/getiplocationdatabase/response.go +++ b/typedapi/ingest/getiplocationdatabase/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getiplocationdatabase @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L24-L26 type Response struct { Databases []types.IpLocationDatabaseConfigurationMetadata `json:"databases"` } diff --git a/typedapi/ingest/getpipeline/get_pipeline.go b/typedapi/ingest/getpipeline/get_pipeline.go index 67e4ef49fa..30ca7db7f2 100644 --- a/typedapi/ingest/getpipeline/get_pipeline.go +++ b/typedapi/ingest/getpipeline/get_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get pipelines. // diff --git a/typedapi/ingest/getpipeline/response.go b/typedapi/ingest/getpipeline/response.go index 66179dcf6d..bfc145d324 100644 --- a/typedapi/ingest/getpipeline/response.go +++ b/typedapi/ingest/getpipeline/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getpipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/get_pipeline/GetPipelineResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/get_pipeline/GetPipelineResponse.ts#L23-L26 type Response map[string]types.IngestPipeline diff --git a/typedapi/ingest/processorgrok/processor_grok.go b/typedapi/ingest/processorgrok/processor_grok.go index 59a945efed..90743d233d 100644 --- a/typedapi/ingest/processorgrok/processor_grok.go +++ b/typedapi/ingest/processorgrok/processor_grok.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a grok processor. +// // Extract structured fields out of a single text field within a document. // You must choose which field to extract matched fields from, as well as the // grok pattern you expect will match. @@ -74,6 +75,7 @@ func NewProcessorGrokFunc(tp elastictransport.Interface) NewProcessorGrok { } // Run a grok processor. +// // Extract structured fields out of a single text field within a document. // You must choose which field to extract matched fields from, as well as the // grok pattern you expect will match. diff --git a/typedapi/ingest/processorgrok/response.go b/typedapi/ingest/processorgrok/response.go index 733dab7325..1207e608e3 100644 --- a/typedapi/ingest/processorgrok/response.go +++ b/typedapi/ingest/processorgrok/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package processorgrok // Response holds the response body struct for the package processorgrok // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/processor_grok/GrokProcessorPatternsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/processor_grok/GrokProcessorPatternsResponse.ts#L22-L24 type Response struct { Patterns map[string]string `json:"patterns"` } diff --git a/typedapi/ingest/putgeoipdatabase/put_geoip_database.go b/typedapi/ingest/putgeoipdatabase/put_geoip_database.go index 031d025f4a..1bde0709f4 100644 --- a/typedapi/ingest/putgeoipdatabase/put_geoip_database.go +++ b/typedapi/ingest/putgeoipdatabase/put_geoip_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a GeoIP database configuration. // diff --git a/typedapi/ingest/putgeoipdatabase/request.go b/typedapi/ingest/putgeoipdatabase/request.go index 8f1e8aea99..bdee13d430 100644 --- a/typedapi/ingest/putgeoipdatabase/request.go +++ b/typedapi/ingest/putgeoipdatabase/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putgeoipdatabase @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package putgeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/put_geoip_database/PutGeoipDatabaseRequest.ts#L25-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/put_geoip_database/PutGeoipDatabaseRequest.ts#L25-L67 type Request struct { - // Maxmind The configuration necessary to identify which IP geolocation provider to use // to download the database, as well as any provider-specific configuration // necessary for such downloading. diff --git a/typedapi/ingest/putgeoipdatabase/response.go b/typedapi/ingest/putgeoipdatabase/response.go index 9eae23993e..64c4fba9ab 100644 --- a/typedapi/ingest/putgeoipdatabase/response.go +++ b/typedapi/ingest/putgeoipdatabase/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putgeoipdatabase // Response holds the response body struct for the package putgeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ingest/putiplocationdatabase/put_ip_location_database.go b/typedapi/ingest/putiplocationdatabase/put_ip_location_database.go index 3ed807ec91..85a7caaab7 100644 --- a/typedapi/ingest/putiplocationdatabase/put_ip_location_database.go +++ b/typedapi/ingest/putiplocationdatabase/put_ip_location_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update an IP geolocation database configuration. package putiplocationdatabase @@ -383,23 +383,6 @@ func (r *PutIpLocationDatabase) Pretty(pretty bool) *PutIpLocationDatabase { return r } -// API name: AdditionalDatabaseConfigurationProperty -// AdditionalDatabaseConfigurationProperty is a single key dictionnary. -// It will replace the current value on each call. -func (r *PutIpLocationDatabase) AdditionalDatabaseConfigurationProperty(key string, value json.RawMessage) *PutIpLocationDatabase { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - tmp := make(map[string]json.RawMessage) - - tmp[key] = value - - r.req.AdditionalDatabaseConfigurationProperty = tmp - return r -} - // API name: ipinfo func (r *PutIpLocationDatabase) Ipinfo(ipinfo types.IpinfoVariant) *PutIpLocationDatabase { // Initialize the request if it is not already initialized diff --git a/typedapi/ingest/putiplocationdatabase/request.go b/typedapi/ingest/putiplocationdatabase/request.go index 9f31c8341e..18c093d78d 100644 --- a/typedapi/ingest/putiplocationdatabase/request.go +++ b/typedapi/ingest/putiplocationdatabase/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putiplocationdatabase @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/put_ip_location_database/PutIpLocationDatabaseRequest.ts#L25-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/put_ip_location_database/PutIpLocationDatabaseRequest.ts#L25-L63 type Request = types.DatabaseConfiguration // NewRequest returns a Request diff --git a/typedapi/ingest/putiplocationdatabase/response.go b/typedapi/ingest/putiplocationdatabase/response.go index 735e6632ad..a286490b30 100644 --- a/typedapi/ingest/putiplocationdatabase/response.go +++ b/typedapi/ingest/putiplocationdatabase/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putiplocationdatabase // Response holds the response body struct for the package putiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/put_ip_location_database/PutIpLocationDatabaseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/put_ip_location_database/PutIpLocationDatabaseResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ingest/putpipeline/put_pipeline.go b/typedapi/ingest/putpipeline/put_pipeline.go index 0dea3ea0f8..563318fb5c 100644 --- a/typedapi/ingest/putpipeline/put_pipeline.go +++ b/typedapi/ingest/putpipeline/put_pipeline.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a pipeline. +// // Changes made using this API take effect immediately. package putpipeline @@ -36,6 +37,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/fieldaccesspattern" ) const ( @@ -83,6 +85,7 @@ func NewPutPipelineFunc(tp elastictransport.Interface) NewPutPipeline { } // Create or update a pipeline. +// // Changes made using this API take effect immediately. // // https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines @@ -335,8 +338,8 @@ func (r *PutPipeline) Timeout(duration string) *PutPipeline { // IfVersion Required version for optimistic concurrency control for pipeline updates // API name: if_version -func (r *PutPipeline) IfVersion(versionnumber string) *PutPipeline { - r.values.Set("if_version", versionnumber) +func (r *PutPipeline) IfVersion(ifversion int) *PutPipeline { + r.values.Set("if_version", strconv.Itoa(ifversion)) return r } @@ -414,6 +417,18 @@ func (r *PutPipeline) Description(description string) *PutPipeline { return r } +// Controls how processors in this pipeline should read and write data on a +// document's source. +// API name: field_access_pattern +func (r *PutPipeline) FieldAccessPattern(fieldaccesspattern fieldaccesspattern.FieldAccessPattern) *PutPipeline { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.FieldAccessPattern = &fieldaccesspattern + return r +} + // Optional metadata about the ingest pipeline. May have any contents. This map // is not automatically generated by Elasticsearch. // API name: _meta diff --git a/typedapi/ingest/putpipeline/request.go b/typedapi/ingest/putpipeline/request.go index d2eea1fcf0..46d830ae8e 100644 --- a/typedapi/ingest/putpipeline/request.go +++ b/typedapi/ingest/putpipeline/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putpipeline @@ -29,13 +29,13 @@ import ( "strconv" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/fieldaccesspattern" ) // Request holds the request body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/put_pipeline/PutPipelineRequest.ts#L25-L90 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/put_pipeline/PutPipelineRequest.ts#L27-L100 type Request struct { - // Deprecated Marks this ingest pipeline as deprecated. // When a deprecated ingest pipeline is referenced as the default or final // pipeline when creating or updating a non-deprecated index template, @@ -43,6 +43,9 @@ type Request struct { Deprecated *bool `json:"deprecated,omitempty"` // Description Description of the ingest pipeline. Description *string `json:"description,omitempty"` + // FieldAccessPattern Controls how processors in this pipeline should read and write data on a + // document's source. + FieldAccessPattern *fieldaccesspattern.FieldAccessPattern `json:"field_access_pattern,omitempty"` // Meta_ Optional metadata about the ingest pipeline. May have any contents. This map // is not automatically generated by Elasticsearch. Meta_ types.Metadata `json:"_meta,omitempty"` @@ -121,6 +124,11 @@ func (s *Request) UnmarshalJSON(data []byte) error { } s.Description = &o + case "field_access_pattern": + if err := dec.Decode(&s.FieldAccessPattern); err != nil { + return fmt.Errorf("%s | %w", "FieldAccessPattern", err) + } + case "_meta": if err := dec.Decode(&s.Meta_); err != nil { return fmt.Errorf("%s | %w", "Meta_", err) diff --git a/typedapi/ingest/putpipeline/response.go b/typedapi/ingest/putpipeline/response.go index 51ca75ed9f..44811d4a31 100644 --- a/typedapi/ingest/putpipeline/response.go +++ b/typedapi/ingest/putpipeline/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putpipeline // Response holds the response body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/put_pipeline/PutPipelineResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/put_pipeline/PutPipelineResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ingest/simulate/request.go b/typedapi/ingest/simulate/request.go index 4845aaffba..3b157caf7c 100644 --- a/typedapi/ingest/simulate/request.go +++ b/typedapi/ingest/simulate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package simulate @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package simulate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/simulate/SimulatePipelineRequest.ts#L25-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/simulate/SimulatePipelineRequest.ts#L25-L73 type Request struct { - // Docs Sample documents to test in the pipeline. Docs []types.Document `json:"docs"` // Pipeline The pipeline to test. diff --git a/typedapi/ingest/simulate/response.go b/typedapi/ingest/simulate/response.go index 6b3914baca..24b7f0b2d0 100644 --- a/typedapi/ingest/simulate/response.go +++ b/typedapi/ingest/simulate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package simulate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/simulate/SimulatePipelineResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/simulate/SimulatePipelineResponse.ts#L22-L24 type Response struct { Docs []types.SimulateDocumentResult `json:"docs"` } diff --git a/typedapi/ingest/simulate/simulate.go b/typedapi/ingest/simulate/simulate.go index 9f4c23227f..75c030bcf8 100644 --- a/typedapi/ingest/simulate/simulate.go +++ b/typedapi/ingest/simulate/simulate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Simulate a pipeline. // diff --git a/typedapi/license/delete/delete.go b/typedapi/license/delete/delete.go index cb1a2c0627..542b91ef28 100644 --- a/typedapi/license/delete/delete.go +++ b/typedapi/license/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete the license. // diff --git a/typedapi/license/delete/response.go b/typedapi/license/delete/response.go index 4b4d817785..1e5abd3571 100644 --- a/typedapi/license/delete/response.go +++ b/typedapi/license/delete/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/delete/DeleteLicenseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/delete/DeleteLicenseResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/license/get/get.go b/typedapi/license/get/get.go index 555387fd99..a806d481e6 100644 --- a/typedapi/license/get/get.go +++ b/typedapi/license/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get license information. // @@ -303,8 +303,11 @@ func (r *Get) AcceptEnterprise(acceptenterprise bool) *Get { return r } -// Local Specifies whether to retrieve local information. The default value is -// `false`, which means the information is retrieved from the master node. +// Local Specifies whether to retrieve local information. +// From 9.2 onwards the default value is `true`, which means the information is +// retrieved from the responding node. +// In earlier versions the default is `false`, which means the information is +// retrieved from the elected master node. // API name: local func (r *Get) Local(local bool) *Get { r.values.Set("local", strconv.FormatBool(local)) diff --git a/typedapi/license/get/response.go b/typedapi/license/get/response.go index a36319a5dc..8dd6b0524f 100644 --- a/typedapi/license/get/response.go +++ b/typedapi/license/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/get/GetLicenseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/get/GetLicenseResponse.ts#L22-L24 type Response struct { License types.LicenseInformation `json:"license"` } diff --git a/typedapi/license/getbasicstatus/get_basic_status.go b/typedapi/license/getbasicstatus/get_basic_status.go index 6efb84542c..fe5fa86043 100644 --- a/typedapi/license/getbasicstatus/get_basic_status.go +++ b/typedapi/license/getbasicstatus/get_basic_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the basic license status. package getbasicstatus diff --git a/typedapi/license/getbasicstatus/response.go b/typedapi/license/getbasicstatus/response.go index 93a1c0f6ab..3cb8300236 100644 --- a/typedapi/license/getbasicstatus/response.go +++ b/typedapi/license/getbasicstatus/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getbasicstatus // Response holds the response body struct for the package getbasicstatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/get_basic_status/GetBasicLicenseStatusResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/get_basic_status/GetBasicLicenseStatusResponse.ts#L20-L22 type Response struct { EligibleToStartBasic bool `json:"eligible_to_start_basic"` } diff --git a/typedapi/license/gettrialstatus/get_trial_status.go b/typedapi/license/gettrialstatus/get_trial_status.go index 3ee6f96d3f..4199f900a2 100644 --- a/typedapi/license/gettrialstatus/get_trial_status.go +++ b/typedapi/license/gettrialstatus/get_trial_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the trial status. package gettrialstatus diff --git a/typedapi/license/gettrialstatus/response.go b/typedapi/license/gettrialstatus/response.go index 84c000dbad..0124023e38 100644 --- a/typedapi/license/gettrialstatus/response.go +++ b/typedapi/license/gettrialstatus/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package gettrialstatus // Response holds the response body struct for the package gettrialstatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/get_trial_status/GetTrialLicenseStatusResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/get_trial_status/GetTrialLicenseStatusResponse.ts#L20-L22 type Response struct { EligibleToStartTrial bool `json:"eligible_to_start_trial"` } diff --git a/typedapi/license/post/post.go b/typedapi/license/post/post.go index 25320acc06..3a793f9eb0 100644 --- a/typedapi/license/post/post.go +++ b/typedapi/license/post/post.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update the license. // diff --git a/typedapi/license/post/request.go b/typedapi/license/post/request.go index 490ce033d3..6cd0c37ef0 100644 --- a/typedapi/license/post/request.go +++ b/typedapi/license/post/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package post @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/post/PostLicenseRequest.ts#L24-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/post/PostLicenseRequest.ts#L24-L70 type Request struct { License *types.License `json:"license,omitempty"` // Licenses A sequence of one or more JSON documents containing the license information. diff --git a/typedapi/license/post/response.go b/typedapi/license/post/response.go index b18cc04372..7d9272e0b2 100644 --- a/typedapi/license/post/response.go +++ b/typedapi/license/post/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package post @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/post/PostLicenseResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/post/PostLicenseResponse.ts#L23-L29 type Response struct { Acknowledge *types.Acknowledgement `json:"acknowledge,omitempty"` Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/license/poststartbasic/post_start_basic.go b/typedapi/license/poststartbasic/post_start_basic.go index c2e0e1dc07..0947c2b833 100644 --- a/typedapi/license/poststartbasic/post_start_basic.go +++ b/typedapi/license/poststartbasic/post_start_basic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start a basic license. // diff --git a/typedapi/license/poststartbasic/response.go b/typedapi/license/poststartbasic/response.go index 1fbdf732fc..a7832ab4aa 100644 --- a/typedapi/license/poststartbasic/response.go +++ b/typedapi/license/poststartbasic/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package poststartbasic @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package poststartbasic // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/post_start_basic/StartBasicLicenseResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/post_start_basic/StartBasicLicenseResponse.ts#L23-L31 type Response struct { Acknowledge map[string][]string `json:"acknowledge,omitempty"` Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/license/poststarttrial/post_start_trial.go b/typedapi/license/poststarttrial/post_start_trial.go index 7240ae798e..cde57a05d3 100644 --- a/typedapi/license/poststarttrial/post_start_trial.go +++ b/typedapi/license/poststarttrial/post_start_trial.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start a trial. +// // Start a 30-day trial, which gives access to all subscription features. // // NOTE: You are allowed to start a trial only if your cluster has not already @@ -78,6 +79,7 @@ func NewPostStartTrialFunc(tp elastictransport.Interface) NewPostStartTrial { } // Start a trial. +// // Start a 30-day trial, which gives access to all subscription features. // // NOTE: You are allowed to start a trial only if your cluster has not already diff --git a/typedapi/license/poststarttrial/response.go b/typedapi/license/poststarttrial/response.go index 52064635be..0d4296f183 100644 --- a/typedapi/license/poststarttrial/response.go +++ b/typedapi/license/poststarttrial/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package poststarttrial @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package poststarttrial // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/post_start_trial/StartTrialLicenseResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/post_start_trial/StartTrialLicenseResponse.ts#L22-L29 type Response struct { Acknowledged bool `json:"acknowledged"` ErrorMessage *string `json:"error_message,omitempty"` diff --git a/typedapi/logstash/deletepipeline/delete_pipeline.go b/typedapi/logstash/deletepipeline/delete_pipeline.go index 3a06731404..4ec481bb15 100644 --- a/typedapi/logstash/deletepipeline/delete_pipeline.go +++ b/typedapi/logstash/deletepipeline/delete_pipeline.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a Logstash pipeline. +// // Delete a pipeline that is used for Logstash Central Management. // If the request succeeds, you receive an empty response with an appropriate // status code. @@ -78,6 +79,7 @@ func NewDeletePipelineFunc(tp elastictransport.Interface) NewDeletePipeline { } // Delete a Logstash pipeline. +// // Delete a pipeline that is used for Logstash Central Management. // If the request succeeds, you receive an empty response with an appropriate // status code. diff --git a/typedapi/logstash/getpipeline/get_pipeline.go b/typedapi/logstash/getpipeline/get_pipeline.go index 40c248f54b..99d8556125 100644 --- a/typedapi/logstash/getpipeline/get_pipeline.go +++ b/typedapi/logstash/getpipeline/get_pipeline.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get Logstash pipelines. +// // Get pipelines that are used for Logstash Central Management. package getpipeline @@ -76,6 +77,7 @@ func NewGetPipelineFunc(tp elastictransport.Interface) NewGetPipeline { } // Get Logstash pipelines. +// // Get pipelines that are used for Logstash Central Management. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-get-pipeline diff --git a/typedapi/logstash/getpipeline/response.go b/typedapi/logstash/getpipeline/response.go index 757529ea55..f766a8d70a 100644 --- a/typedapi/logstash/getpipeline/response.go +++ b/typedapi/logstash/getpipeline/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getpipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/logstash/get_pipeline/LogstashGetPipelineResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/logstash/get_pipeline/LogstashGetPipelineResponse.ts#L24-L27 type Response map[string]types.LogstashPipeline diff --git a/typedapi/logstash/putpipeline/put_pipeline.go b/typedapi/logstash/putpipeline/put_pipeline.go index 4efe5377da..cd699c1a10 100644 --- a/typedapi/logstash/putpipeline/put_pipeline.go +++ b/typedapi/logstash/putpipeline/put_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a Logstash pipeline. // @@ -257,6 +257,8 @@ func (r *PutPipeline) Header(key, value string) *PutPipeline { } // Id An identifier for the pipeline. +// Pipeline IDs must begin with a letter or underscore and contain only letters, +// underscores, dashes, hyphens and numbers. // API Name: id func (r *PutPipeline) _id(id string) *PutPipeline { r.paramSet |= idMask diff --git a/typedapi/logstash/putpipeline/request.go b/typedapi/logstash/putpipeline/request.go index eeb6b7e0bd..ab32e50754 100644 --- a/typedapi/logstash/putpipeline/request.go +++ b/typedapi/logstash/putpipeline/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putpipeline @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L52 type Request = types.LogstashPipeline // NewRequest returns a Request diff --git a/typedapi/migration/deprecations/deprecations.go b/typedapi/migration/deprecations/deprecations.go index bbddc112c1..c5916893d3 100644 --- a/typedapi/migration/deprecations/deprecations.go +++ b/typedapi/migration/deprecations/deprecations.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get deprecation information. +// // Get information about different cluster, node, and index level settings that // use deprecated features that will be removed or changed in the next major // version. @@ -81,6 +82,7 @@ func NewDeprecationsFunc(tp elastictransport.Interface) NewDeprecations { } // Get deprecation information. +// // Get information about different cluster, node, and index level settings that // use deprecated features that will be removed or changed in the next major // version. diff --git a/typedapi/migration/deprecations/response.go b/typedapi/migration/deprecations/response.go index 5d602de53f..417eadca5c 100644 --- a/typedapi/migration/deprecations/response.go +++ b/typedapi/migration/deprecations/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deprecations @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package deprecations // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/migration/deprecations/DeprecationInfoResponse.ts#L23-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/migration/deprecations/DeprecationInfoResponse.ts#L23-L54 type Response struct { - // ClusterSettings Cluster-level deprecation warnings. ClusterSettings []types.Deprecation `json:"cluster_settings"` DataStreams map[string][]types.Deprecation `json:"data_streams"` diff --git a/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go b/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go index 10b2d6b1d8..10b4467fc8 100644 --- a/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go +++ b/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get feature migration information. +// // Version upgrades sometimes require changes to how features store // configuration information and data in system indices. // Check which features need to be migrated and the status of any migrations @@ -76,6 +77,7 @@ func NewGetFeatureUpgradeStatusFunc(tp elastictransport.Interface) NewGetFeature } // Get feature migration information. +// // Version upgrades sometimes require changes to how features store // configuration information and data in system indices. // Check which features need to be migrated and the status of any migrations diff --git a/typedapi/migration/getfeatureupgradestatus/response.go b/typedapi/migration/getfeatureupgradestatus/response.go index 9e35d1b257..1953c65451 100644 --- a/typedapi/migration/getfeatureupgradestatus/response.go +++ b/typedapi/migration/getfeatureupgradestatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getfeatureupgradestatus @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package getfeatureupgradestatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L23-L28 type Response struct { Features []types.GetMigrationFeature `json:"features"` MigrationStatus migrationstatus.MigrationStatus `json:"migration_status"` diff --git a/typedapi/migration/postfeatureupgrade/post_feature_upgrade.go b/typedapi/migration/postfeatureupgrade/post_feature_upgrade.go index 4db8f8f44a..859dc9b25f 100644 --- a/typedapi/migration/postfeatureupgrade/post_feature_upgrade.go +++ b/typedapi/migration/postfeatureupgrade/post_feature_upgrade.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start the feature migration. +// // Version upgrades sometimes require changes to how features store // configuration information and data in system indices. // This API starts the automatic migration process. @@ -78,6 +79,7 @@ func NewPostFeatureUpgradeFunc(tp elastictransport.Interface) NewPostFeatureUpgr } // Start the feature migration. +// // Version upgrades sometimes require changes to how features store // configuration information and data in system indices. // This API starts the automatic migration process. diff --git a/typedapi/migration/postfeatureupgrade/response.go b/typedapi/migration/postfeatureupgrade/response.go index 7b5dd33754..b5abe707d7 100644 --- a/typedapi/migration/postfeatureupgrade/response.go +++ b/typedapi/migration/postfeatureupgrade/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package postfeatureupgrade @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package postfeatureupgrade // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L20-L26 type Response struct { Accepted bool `json:"accepted"` Features []types.PostMigrationFeature `json:"features,omitempty"` diff --git a/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go b/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go index 6278c22ff6..60bca27e8c 100644 --- a/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go +++ b/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear trained model deployment cache. // diff --git a/typedapi/ml/cleartrainedmodeldeploymentcache/response.go b/typedapi/ml/cleartrainedmodeldeploymentcache/response.go index 858034385a..9651c5c6b2 100644 --- a/typedapi/ml/cleartrainedmodeldeploymentcache/response.go +++ b/typedapi/ml/cleartrainedmodeldeploymentcache/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package cleartrainedmodeldeploymentcache // Response holds the response body struct for the package cleartrainedmodeldeploymentcache // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/clear_trained_model_deployment_cache/MlClearTrainedModelDeploymentCacheResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/clear_trained_model_deployment_cache/MlClearTrainedModelDeploymentCacheResponse.ts#L20-L24 type Response struct { Cleared bool `json:"cleared"` } diff --git a/typedapi/ml/closejob/close_job.go b/typedapi/ml/closejob/close_job.go index c2f9560a05..14a866db98 100644 --- a/typedapi/ml/closejob/close_job.go +++ b/typedapi/ml/closejob/close_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Close anomaly detection jobs. // diff --git a/typedapi/ml/closejob/request.go b/typedapi/ml/closejob/request.go index c2a5e0fdb1..2293f139ef 100644 --- a/typedapi/ml/closejob/request.go +++ b/typedapi/ml/closejob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package closejob @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package closejob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/close_job/MlCloseJobRequest.ts#L24-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/close_job/MlCloseJobRequest.ts#L24-L85 type Request struct { - // AllowNoMatch Refer to the description for the `allow_no_match` query parameter. AllowNoMatch *bool `json:"allow_no_match,omitempty"` // Force Refer to the descriptiion for the `force` query parameter. diff --git a/typedapi/ml/closejob/response.go b/typedapi/ml/closejob/response.go index 0131eb782c..457a2b177b 100644 --- a/typedapi/ml/closejob/response.go +++ b/typedapi/ml/closejob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package closejob // Response holds the response body struct for the package closejob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/close_job/MlCloseJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/close_job/MlCloseJobResponse.ts#L20-L22 type Response struct { Closed bool `json:"closed"` } diff --git a/typedapi/ml/deletecalendar/delete_calendar.go b/typedapi/ml/deletecalendar/delete_calendar.go index c54635ae72..134b3b2407 100644 --- a/typedapi/ml/deletecalendar/delete_calendar.go +++ b/typedapi/ml/deletecalendar/delete_calendar.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a calendar. // diff --git a/typedapi/ml/deletecalendar/response.go b/typedapi/ml/deletecalendar/response.go index 5bff6de555..fcfa300162 100644 --- a/typedapi/ml/deletecalendar/response.go +++ b/typedapi/ml/deletecalendar/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletecalendar // Response holds the response body struct for the package deletecalendar // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/deletecalendarevent/delete_calendar_event.go b/typedapi/ml/deletecalendarevent/delete_calendar_event.go index 644d5c9b7b..e5007cbd7b 100644 --- a/typedapi/ml/deletecalendarevent/delete_calendar_event.go +++ b/typedapi/ml/deletecalendarevent/delete_calendar_event.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete events from a calendar. package deletecalendarevent diff --git a/typedapi/ml/deletecalendarevent/response.go b/typedapi/ml/deletecalendarevent/response.go index e5c8f3bc60..36cd69e888 100644 --- a/typedapi/ml/deletecalendarevent/response.go +++ b/typedapi/ml/deletecalendarevent/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletecalendarevent // Response holds the response body struct for the package deletecalendarevent // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/deletecalendarjob/delete_calendar_job.go b/typedapi/ml/deletecalendarjob/delete_calendar_job.go index bb769af4aa..2b49cb7e88 100644 --- a/typedapi/ml/deletecalendarjob/delete_calendar_job.go +++ b/typedapi/ml/deletecalendarjob/delete_calendar_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete anomaly jobs from a calendar. package deletecalendarjob diff --git a/typedapi/ml/deletecalendarjob/response.go b/typedapi/ml/deletecalendarjob/response.go index b44c4683a4..36cabe7d2a 100644 --- a/typedapi/ml/deletecalendarjob/response.go +++ b/typedapi/ml/deletecalendarjob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletecalendarjob @@ -31,9 +31,8 @@ import ( // Response holds the response body struct for the package deletecalendarjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_calendar_job/MlDeleteCalendarJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_calendar_job/MlDeleteCalendarJobResponse.ts#L22-L31 type Response struct { - // CalendarId A string that uniquely identifies a calendar. CalendarId string `json:"calendar_id"` // Description A description of the calendar. diff --git a/typedapi/ml/deletedatafeed/delete_datafeed.go b/typedapi/ml/deletedatafeed/delete_datafeed.go index 3f5a5e3900..a7cef84989 100644 --- a/typedapi/ml/deletedatafeed/delete_datafeed.go +++ b/typedapi/ml/deletedatafeed/delete_datafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a datafeed. package deletedatafeed diff --git a/typedapi/ml/deletedatafeed/response.go b/typedapi/ml/deletedatafeed/response.go index 38549eaac1..2829c16aec 100644 --- a/typedapi/ml/deletedatafeed/response.go +++ b/typedapi/ml/deletedatafeed/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletedatafeed // Response holds the response body struct for the package deletedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_datafeed/MlDeleteDatafeedResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_datafeed/MlDeleteDatafeedResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go b/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go index 45bf3ab85f..cb4a53e31e 100644 --- a/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go +++ b/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a data frame analytics job. package deletedataframeanalytics diff --git a/typedapi/ml/deletedataframeanalytics/response.go b/typedapi/ml/deletedataframeanalytics/response.go index 369ac16799..4bb2cf1bc2 100644 --- a/typedapi/ml/deletedataframeanalytics/response.go +++ b/typedapi/ml/deletedataframeanalytics/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletedataframeanalytics // Response holds the response body struct for the package deletedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_data_frame_analytics/MlDeleteDataFrameAnalyticsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_data_frame_analytics/MlDeleteDataFrameAnalyticsResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/deleteexpireddata/delete_expired_data.go b/typedapi/ml/deleteexpireddata/delete_expired_data.go index 2804070c76..bf59c752de 100644 --- a/typedapi/ml/deleteexpireddata/delete_expired_data.go +++ b/typedapi/ml/deleteexpireddata/delete_expired_data.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete expired ML data. // diff --git a/typedapi/ml/deleteexpireddata/request.go b/typedapi/ml/deleteexpireddata/request.go index 10d95c497d..82019f306f 100644 --- a/typedapi/ml/deleteexpireddata/request.go +++ b/typedapi/ml/deleteexpireddata/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteexpireddata @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package deleteexpireddata // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts#L25-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts#L25-L85 type Request struct { - // RequestsPerSecond The desired requests per second for the deletion processes. The default // behavior is no throttling. RequestsPerSecond *float32 `json:"requests_per_second,omitempty"` diff --git a/typedapi/ml/deleteexpireddata/response.go b/typedapi/ml/deleteexpireddata/response.go index 3ddbdcba94..c9cf18b12b 100644 --- a/typedapi/ml/deleteexpireddata/response.go +++ b/typedapi/ml/deleteexpireddata/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteexpireddata // Response holds the response body struct for the package deleteexpireddata // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_expired_data/MlDeleteExpiredDataResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_expired_data/MlDeleteExpiredDataResponse.ts#L20-L22 type Response struct { Deleted bool `json:"deleted"` } diff --git a/typedapi/ml/deletefilter/delete_filter.go b/typedapi/ml/deletefilter/delete_filter.go index 9be18b2e51..a71c3d13e5 100644 --- a/typedapi/ml/deletefilter/delete_filter.go +++ b/typedapi/ml/deletefilter/delete_filter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a filter. // diff --git a/typedapi/ml/deletefilter/response.go b/typedapi/ml/deletefilter/response.go index ee1b09d2b8..3ce56df2d9 100644 --- a/typedapi/ml/deletefilter/response.go +++ b/typedapi/ml/deletefilter/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletefilter // Response holds the response body struct for the package deletefilter // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_filter/MlDeleteFilterResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_filter/MlDeleteFilterResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/deleteforecast/delete_forecast.go b/typedapi/ml/deleteforecast/delete_forecast.go index e87c11dffb..451f5bc982 100644 --- a/typedapi/ml/deleteforecast/delete_forecast.go +++ b/typedapi/ml/deleteforecast/delete_forecast.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete forecasts from a job. // diff --git a/typedapi/ml/deleteforecast/response.go b/typedapi/ml/deleteforecast/response.go index cb3fbf726f..48ff5cd3bf 100644 --- a/typedapi/ml/deleteforecast/response.go +++ b/typedapi/ml/deleteforecast/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteforecast // Response holds the response body struct for the package deleteforecast // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_forecast/MlDeleteForecastResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_forecast/MlDeleteForecastResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/deletejob/delete_job.go b/typedapi/ml/deletejob/delete_job.go index 62f75e28da..a164c31ac0 100644 --- a/typedapi/ml/deletejob/delete_job.go +++ b/typedapi/ml/deletejob/delete_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an anomaly detection job. // diff --git a/typedapi/ml/deletejob/response.go b/typedapi/ml/deletejob/response.go index 0891a0e4fb..396afc0487 100644 --- a/typedapi/ml/deletejob/response.go +++ b/typedapi/ml/deletejob/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletejob // Response holds the response body struct for the package deletejob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_job/MlDeleteJobResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_job/MlDeleteJobResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go b/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go index e6feb6ac62..e4e5a91382 100644 --- a/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go +++ b/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a model snapshot. // diff --git a/typedapi/ml/deletemodelsnapshot/response.go b/typedapi/ml/deletemodelsnapshot/response.go index fce16ebca6..65f83d6a40 100644 --- a/typedapi/ml/deletemodelsnapshot/response.go +++ b/typedapi/ml/deletemodelsnapshot/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletemodelsnapshot // Response holds the response body struct for the package deletemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_model_snapshot/MlDeleteModelSnapshotResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_model_snapshot/MlDeleteModelSnapshotResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/deletetrainedmodel/delete_trained_model.go b/typedapi/ml/deletetrainedmodel/delete_trained_model.go index 260fb321ab..35381dd95c 100644 --- a/typedapi/ml/deletetrainedmodel/delete_trained_model.go +++ b/typedapi/ml/deletetrainedmodel/delete_trained_model.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an unreferenced trained model. // diff --git a/typedapi/ml/deletetrainedmodel/response.go b/typedapi/ml/deletetrainedmodel/response.go index 792e853b38..cccbcd3165 100644 --- a/typedapi/ml/deletetrainedmodel/response.go +++ b/typedapi/ml/deletetrainedmodel/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletetrainedmodel // Response holds the response body struct for the package deletetrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go b/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go index fd5bb703b1..a270cbce72 100644 --- a/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go +++ b/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a trained model alias. // diff --git a/typedapi/ml/deletetrainedmodelalias/response.go b/typedapi/ml/deletetrainedmodelalias/response.go index 49ddefb696..9f679180db 100644 --- a/typedapi/ml/deletetrainedmodelalias/response.go +++ b/typedapi/ml/deletetrainedmodelalias/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletetrainedmodelalias // Response holds the response body struct for the package deletetrainedmodelalias // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/estimatemodelmemory/estimate_model_memory.go b/typedapi/ml/estimatemodelmemory/estimate_model_memory.go index 88735c5115..ff7eee792c 100644 --- a/typedapi/ml/estimatemodelmemory/estimate_model_memory.go +++ b/typedapi/ml/estimatemodelmemory/estimate_model_memory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Estimate job model memory usage. // diff --git a/typedapi/ml/estimatemodelmemory/request.go b/typedapi/ml/estimatemodelmemory/request.go index 4a38f3d6b8..936564a7a7 100644 --- a/typedapi/ml/estimatemodelmemory/request.go +++ b/typedapi/ml/estimatemodelmemory/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package estimatemodelmemory @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package estimatemodelmemory // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L71 type Request struct { - // AnalysisConfig For a list of the properties that you can specify in the // `analysis_config` component of the body of this API. AnalysisConfig *types.AnalysisConfig `json:"analysis_config,omitempty"` diff --git a/typedapi/ml/estimatemodelmemory/response.go b/typedapi/ml/estimatemodelmemory/response.go index e4a803d37a..8fc9aead9c 100644 --- a/typedapi/ml/estimatemodelmemory/response.go +++ b/typedapi/ml/estimatemodelmemory/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package estimatemodelmemory // Response holds the response body struct for the package estimatemodelmemory // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/estimate_model_memory/MlEstimateModelMemoryResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/estimate_model_memory/MlEstimateModelMemoryResponse.ts#L20-L24 type Response struct { ModelMemoryEstimate string `json:"model_memory_estimate"` } diff --git a/typedapi/ml/evaluatedataframe/evaluate_data_frame.go b/typedapi/ml/evaluatedataframe/evaluate_data_frame.go index f4a321b4fa..d169e26773 100644 --- a/typedapi/ml/evaluatedataframe/evaluate_data_frame.go +++ b/typedapi/ml/evaluatedataframe/evaluate_data_frame.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Evaluate data frame analytics. // diff --git a/typedapi/ml/evaluatedataframe/request.go b/typedapi/ml/evaluatedataframe/request.go index b27112f1fe..022c2363be 100644 --- a/typedapi/ml/evaluatedataframe/request.go +++ b/typedapi/ml/evaluatedataframe/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package evaluatedataframe @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package evaluatedataframe // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequest.ts#L25-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequest.ts#L25-L61 type Request struct { - // Evaluation Defines the type of evaluation you want to perform. Evaluation types.DataframeEvaluationContainer `json:"evaluation"` // Index Defines the `index` in which the evaluation will be performed. diff --git a/typedapi/ml/evaluatedataframe/response.go b/typedapi/ml/evaluatedataframe/response.go index 436f1117f6..5aea78224d 100644 --- a/typedapi/ml/evaluatedataframe/response.go +++ b/typedapi/ml/evaluatedataframe/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package evaluatedataframe @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package evaluatedataframe // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts#L26-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts#L26-L43 type Response struct { - // Classification Evaluation results for a classification analysis. // It outputs a prediction that identifies to which of the classes each document // belongs. diff --git a/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go b/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go index dc51955b6a..a8d80d92d7 100644 --- a/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go +++ b/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Explain data frame analytics config. // diff --git a/typedapi/ml/explaindataframeanalytics/request.go b/typedapi/ml/explaindataframeanalytics/request.go index b88423cd6e..e65dc95404 100644 --- a/typedapi/ml/explaindataframeanalytics/request.go +++ b/typedapi/ml/explaindataframeanalytics/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package explaindataframeanalytics @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package explaindataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequest.ts#L30-L120 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequest.ts#L30-L120 type Request struct { - // AllowLazyStart Specifies whether this job can start when there is insufficient machine // learning node capacity for it to be immediately assigned to a node. AllowLazyStart *bool `json:"allow_lazy_start,omitempty"` diff --git a/typedapi/ml/explaindataframeanalytics/response.go b/typedapi/ml/explaindataframeanalytics/response.go index a697c42c58..e2c27b8a4a 100644 --- a/typedapi/ml/explaindataframeanalytics/response.go +++ b/typedapi/ml/explaindataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package explaindataframeanalytics @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package explaindataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsResponse.ts#L25-L32 type Response struct { - // FieldSelection An array of objects that explain selection for each field, sorted by the // field names. FieldSelection []types.DataframeAnalyticsFieldSelection `json:"field_selection"` diff --git a/typedapi/ml/flushjob/flush_job.go b/typedapi/ml/flushjob/flush_job.go index bf7380883c..15341f0dfc 100644 --- a/typedapi/ml/flushjob/flush_job.go +++ b/typedapi/ml/flushjob/flush_job.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -90,6 +91,7 @@ func NewFlushJobFunc(tp elastictransport.Interface) NewFlushJob { } // 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 diff --git a/typedapi/ml/flushjob/request.go b/typedapi/ml/flushjob/request.go index 124e96d31c..4ce38ef606 100644 --- a/typedapi/ml/flushjob/request.go +++ b/typedapi/ml/flushjob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package flushjob @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package flushjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/flush_job/MlFlushJobRequest.ts#L24-L108 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/flush_job/MlFlushJobRequest.ts#L24-L109 type Request struct { - // AdvanceTime Refer to the description for the `advance_time` query parameter. AdvanceTime types.DateTime `json:"advance_time,omitempty"` // CalcInterim Refer to the description for the `calc_interim` query parameter. diff --git a/typedapi/ml/flushjob/response.go b/typedapi/ml/flushjob/response.go index 1d2bb7a141..fb4144abf9 100644 --- a/typedapi/ml/flushjob/response.go +++ b/typedapi/ml/flushjob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package flushjob // Response holds the response body struct for the package flushjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/flush_job/MlFlushJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/flush_job/MlFlushJobResponse.ts#L22-L31 type Response struct { Flushed bool `json:"flushed"` // LastFinalizedBucketEnd Provides the timestamp (in milliseconds since the epoch) of the end of diff --git a/typedapi/ml/forecast/forecast.go b/typedapi/ml/forecast/forecast.go index 53c11fcc24..f468ac916f 100644 --- a/typedapi/ml/forecast/forecast.go +++ b/typedapi/ml/forecast/forecast.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Predict future behavior of a time series. // diff --git a/typedapi/ml/forecast/request.go b/typedapi/ml/forecast/request.go index 69c6a445e8..93ac154b7c 100644 --- a/typedapi/ml/forecast/request.go +++ b/typedapi/ml/forecast/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package forecast @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package forecast // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/forecast/MlForecastJobRequest.ts#L24-L95 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/forecast/MlForecastJobRequest.ts#L24-L95 type Request struct { - // Duration Refer to the description for the `duration` query parameter. Duration types.Duration `json:"duration,omitempty"` // ExpiresIn Refer to the description for the `expires_in` query parameter. diff --git a/typedapi/ml/forecast/response.go b/typedapi/ml/forecast/response.go index 4be5f1ffb9..2445bea946 100644 --- a/typedapi/ml/forecast/response.go +++ b/typedapi/ml/forecast/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package forecast // Response holds the response body struct for the package forecast // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/forecast/MlForecastJobResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/forecast/MlForecastJobResponse.ts#L22-L27 type Response struct { Acknowledged bool `json:"acknowledged"` ForecastId string `json:"forecast_id"` diff --git a/typedapi/ml/getbuckets/get_buckets.go b/typedapi/ml/getbuckets/get_buckets.go index 0781cbbab1..b3a294809b 100644 --- a/typedapi/ml/getbuckets/get_buckets.go +++ b/typedapi/ml/getbuckets/get_buckets.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get anomaly detection job results for buckets. +// // The API presents a chronological view of the records, grouped by bucket. package getbuckets @@ -86,6 +87,7 @@ func NewGetBucketsFunc(tp elastictransport.Interface) NewGetBuckets { } // Get anomaly detection job results for buckets. +// // The API presents a chronological view of the records, grouped by bucket. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-buckets diff --git a/typedapi/ml/getbuckets/request.go b/typedapi/ml/getbuckets/request.go index c4216999c9..56b01aacac 100644 --- a/typedapi/ml/getbuckets/request.go +++ b/typedapi/ml/getbuckets/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getbuckets @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package getbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_buckets/MlGetBucketsRequest.ts#L26-L145 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_buckets/MlGetBucketsRequest.ts#L26-L146 type Request struct { - // AnomalyScore Refer to the description for the `anomaly_score` query parameter. AnomalyScore *types.Float64 `json:"anomaly_score,omitempty"` // Desc Refer to the description for the `desc` query parameter. diff --git a/typedapi/ml/getbuckets/response.go b/typedapi/ml/getbuckets/response.go index b8fec7af6a..c81572939d 100644 --- a/typedapi/ml/getbuckets/response.go +++ b/typedapi/ml/getbuckets/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getbuckets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_buckets/MlGetBucketsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_buckets/MlGetBucketsResponse.ts#L23-L28 type Response struct { Buckets []types.BucketSummary `json:"buckets"` Count int64 `json:"count"` diff --git a/typedapi/ml/getcalendarevents/get_calendar_events.go b/typedapi/ml/getcalendarevents/get_calendar_events.go index a18abfc680..9e88b82ac0 100644 --- a/typedapi/ml/getcalendarevents/get_calendar_events.go +++ b/typedapi/ml/getcalendarevents/get_calendar_events.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get info about events in calendars. package getcalendarevents diff --git a/typedapi/ml/getcalendarevents/response.go b/typedapi/ml/getcalendarevents/response.go index 66ae8851ff..abd5774093 100644 --- a/typedapi/ml/getcalendarevents/response.go +++ b/typedapi/ml/getcalendarevents/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getcalendarevents @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_calendar_events/MlGetCalendarEventsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_calendar_events/MlGetCalendarEventsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Events []types.CalendarEvent `json:"events"` diff --git a/typedapi/ml/getcalendars/get_calendars.go b/typedapi/ml/getcalendars/get_calendars.go index 95da3c0640..b9ce35870e 100644 --- a/typedapi/ml/getcalendars/get_calendars.go +++ b/typedapi/ml/getcalendars/get_calendars.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get calendar configuration info. package getcalendars diff --git a/typedapi/ml/getcalendars/request.go b/typedapi/ml/getcalendars/request.go index 8f082090bc..d33175a4b9 100644 --- a/typedapi/ml/getcalendars/request.go +++ b/typedapi/ml/getcalendars/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getcalendars @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package getcalendars // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_calendars/MlGetCalendarsRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_calendars/MlGetCalendarsRequest.ts#L25-L66 type Request struct { - // Page This object is supported only when you omit the calendar identifier. Page *types.Page `json:"page,omitempty"` } diff --git a/typedapi/ml/getcalendars/response.go b/typedapi/ml/getcalendars/response.go index 2d7cd005a6..5310c92747 100644 --- a/typedapi/ml/getcalendars/response.go +++ b/typedapi/ml/getcalendars/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getcalendars @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcalendars // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_calendars/MlGetCalendarsResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_calendars/MlGetCalendarsResponse.ts#L23-L25 type Response struct { Calendars []types.Calendar `json:"calendars"` Count int64 `json:"count"` diff --git a/typedapi/ml/getcategories/get_categories.go b/typedapi/ml/getcategories/get_categories.go index 4297b275a6..8836d058d1 100644 --- a/typedapi/ml/getcategories/get_categories.go +++ b/typedapi/ml/getcategories/get_categories.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get anomaly detection job results for categories. package getcategories diff --git a/typedapi/ml/getcategories/request.go b/typedapi/ml/getcategories/request.go index 3555804468..fa54111ee9 100644 --- a/typedapi/ml/getcategories/request.go +++ b/typedapi/ml/getcategories/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getcategories @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package getcategories // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_categories/MlGetCategoriesRequest.ts#L25-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_categories/MlGetCategoriesRequest.ts#L25-L83 type Request struct { - // Page Configures pagination. // This parameter has the `from` and `size` properties. Page *types.Page `json:"page,omitempty"` diff --git a/typedapi/ml/getcategories/response.go b/typedapi/ml/getcategories/response.go index 44f8f5b85c..89c0166482 100644 --- a/typedapi/ml/getcategories/response.go +++ b/typedapi/ml/getcategories/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getcategories @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcategories // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_categories/MlGetCategoriesResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_categories/MlGetCategoriesResponse.ts#L23-L28 type Response struct { Categories []types.Category `json:"categories"` Count int64 `json:"count"` diff --git a/typedapi/ml/getdatafeeds/get_datafeeds.go b/typedapi/ml/getdatafeeds/get_datafeeds.go index 6c2ed8172b..e24b33d9ae 100644 --- a/typedapi/ml/getdatafeeds/get_datafeeds.go +++ b/typedapi/ml/getdatafeeds/get_datafeeds.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -80,6 +81,7 @@ func NewGetDatafeedsFunc(tp elastictransport.Interface) NewGetDatafeeds { } // 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 diff --git a/typedapi/ml/getdatafeeds/response.go b/typedapi/ml/getdatafeeds/response.go index ad7f38ca7d..304008c0fc 100644 --- a/typedapi/ml/getdatafeeds/response.go +++ b/typedapi/ml/getdatafeeds/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getdatafeeds @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatafeeds // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_datafeeds/MlGetDatafeedsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_datafeeds/MlGetDatafeedsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Datafeeds []types.MLDatafeed `json:"datafeeds"` diff --git a/typedapi/ml/getdatafeedstats/get_datafeed_stats.go b/typedapi/ml/getdatafeedstats/get_datafeed_stats.go index 41582a6a21..413609471e 100644 --- a/typedapi/ml/getdatafeedstats/get_datafeed_stats.go +++ b/typedapi/ml/getdatafeedstats/get_datafeed_stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get datafeed stats. +// // 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 @@ -81,6 +82,7 @@ func NewGetDatafeedStatsFunc(tp elastictransport.Interface) NewGetDatafeedStats } // Get datafeed stats. +// // 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 diff --git a/typedapi/ml/getdatafeedstats/response.go b/typedapi/ml/getdatafeedstats/response.go index ba8f5a1f6b..2d4f58fd4e 100644 --- a/typedapi/ml/getdatafeedstats/response.go +++ b/typedapi/ml/getdatafeedstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getdatafeedstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatafeedstats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_datafeed_stats/MlGetDatafeedStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_datafeed_stats/MlGetDatafeedStatsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Datafeeds []types.DatafeedStats `json:"datafeeds"` diff --git a/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go b/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go index d6a790fb64..820b938f91 100644 --- a/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go +++ b/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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. @@ -78,6 +79,7 @@ func NewGetDataFrameAnalyticsFunc(tp elastictransport.Interface) NewGetDataFrame } // 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. diff --git a/typedapi/ml/getdataframeanalytics/response.go b/typedapi/ml/getdataframeanalytics/response.go index 5ffc5205af..d21ff45e05 100644 --- a/typedapi/ml/getdataframeanalytics/response.go +++ b/typedapi/ml/getdataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getdataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_data_frame_analytics/MlGetDataFrameAnalyticsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_data_frame_analytics/MlGetDataFrameAnalyticsResponse.ts#L23-L29 type Response struct { Count int `json:"count"` // DataFrameAnalytics An array of data frame analytics job resources, which are sorted by the id diff --git a/typedapi/ml/getdataframeanalyticsstats/get_data_frame_analytics_stats.go b/typedapi/ml/getdataframeanalyticsstats/get_data_frame_analytics_stats.go index 286600e2b9..596d5645a5 100644 --- a/typedapi/ml/getdataframeanalyticsstats/get_data_frame_analytics_stats.go +++ b/typedapi/ml/getdataframeanalyticsstats/get_data_frame_analytics_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get data frame analytics job stats. package getdataframeanalyticsstats diff --git a/typedapi/ml/getdataframeanalyticsstats/response.go b/typedapi/ml/getdataframeanalyticsstats/response.go index 99eff6cc94..fed77cea01 100644 --- a/typedapi/ml/getdataframeanalyticsstats/response.go +++ b/typedapi/ml/getdataframeanalyticsstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getdataframeanalyticsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdataframeanalyticsstats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_data_frame_analytics_stats/MlGetDataFrameAnalyticsStatsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_data_frame_analytics_stats/MlGetDataFrameAnalyticsStatsResponse.ts#L23-L29 type Response struct { Count int64 `json:"count"` // DataFrameAnalytics An array of objects that contain usage information for data frame analytics diff --git a/typedapi/ml/getfilters/get_filters.go b/typedapi/ml/getfilters/get_filters.go index 1ae1d51309..9598cca68a 100644 --- a/typedapi/ml/getfilters/get_filters.go +++ b/typedapi/ml/getfilters/get_filters.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get filters. +// // You can get a single filter or all filters. package getfilters @@ -76,6 +77,7 @@ func NewGetFiltersFunc(tp elastictransport.Interface) NewGetFilters { } // Get filters. +// // You can get a single filter or all filters. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-filters diff --git a/typedapi/ml/getfilters/response.go b/typedapi/ml/getfilters/response.go index d8b03aba55..69dba88134 100644 --- a/typedapi/ml/getfilters/response.go +++ b/typedapi/ml/getfilters/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getfilters @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfilters // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_filters/MlGetFiltersResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_filters/MlGetFiltersResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Filters []types.MLFilter `json:"filters"` diff --git a/typedapi/ml/getinfluencers/get_influencers.go b/typedapi/ml/getinfluencers/get_influencers.go index ad8a8be6d8..10aeac310e 100644 --- a/typedapi/ml/getinfluencers/get_influencers.go +++ b/typedapi/ml/getinfluencers/get_influencers.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get anomaly detection job results for influencers. +// // Influencers are the entities that have contributed to, or are to blame for, // the anomalies. Influencer results are available only if an // `influencer_field_name` is specified in the job configuration. @@ -85,6 +86,7 @@ func NewGetInfluencersFunc(tp elastictransport.Interface) NewGetInfluencers { } // Get anomaly detection job results for influencers. +// // Influencers are the entities that have contributed to, or are to blame for, // the anomalies. Influencer results are available only if an // `influencer_field_name` is specified in the job configuration. diff --git a/typedapi/ml/getinfluencers/request.go b/typedapi/ml/getinfluencers/request.go index 1c871cc2a2..bf6ccd5d16 100644 --- a/typedapi/ml/getinfluencers/request.go +++ b/typedapi/ml/getinfluencers/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getinfluencers @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package getinfluencers // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_influencers/MlGetInfluencersRequest.ts#L26-L105 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_influencers/MlGetInfluencersRequest.ts#L26-L106 type Request struct { - // Page Configures pagination. // This parameter has the `from` and `size` properties. Page *types.Page `json:"page,omitempty"` diff --git a/typedapi/ml/getinfluencers/response.go b/typedapi/ml/getinfluencers/response.go index 6b2c231670..42ba064f87 100644 --- a/typedapi/ml/getinfluencers/response.go +++ b/typedapi/ml/getinfluencers/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getinfluencers @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getinfluencers // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_influencers/MlGetInfluencersResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_influencers/MlGetInfluencersResponse.ts#L23-L29 type Response struct { Count int64 `json:"count"` // Influencers Array of influencer objects diff --git a/typedapi/ml/getjobs/get_jobs.go b/typedapi/ml/getjobs/get_jobs.go index ce46042661..3b384c4873 100644 --- a/typedapi/ml/getjobs/get_jobs.go +++ b/typedapi/ml/getjobs/get_jobs.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -79,6 +80,7 @@ func NewGetJobsFunc(tp elastictransport.Interface) NewGetJobs { } // 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 diff --git a/typedapi/ml/getjobs/response.go b/typedapi/ml/getjobs/response.go index 31c4312e81..41e3abe432 100644 --- a/typedapi/ml/getjobs/response.go +++ b/typedapi/ml/getjobs/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getjobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobs // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_jobs/MlGetJobsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_jobs/MlGetJobsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Jobs []types.Job `json:"jobs"` diff --git a/typedapi/ml/getjobstats/get_job_stats.go b/typedapi/ml/getjobstats/get_job_stats.go index 32c61e1b98..4efb616a1f 100644 --- a/typedapi/ml/getjobstats/get_job_stats.go +++ b/typedapi/ml/getjobstats/get_job_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get anomaly detection job stats. package getjobstats diff --git a/typedapi/ml/getjobstats/response.go b/typedapi/ml/getjobstats/response.go index d8518e703b..723a449dc1 100644 --- a/typedapi/ml/getjobstats/response.go +++ b/typedapi/ml/getjobstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getjobstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobstats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_job_stats/MlGetJobStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_job_stats/MlGetJobStatsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Jobs []types.JobStats `json:"jobs"` diff --git a/typedapi/ml/getmemorystats/get_memory_stats.go b/typedapi/ml/getmemorystats/get_memory_stats.go index 417ea92a8f..08002c1921 100644 --- a/typedapi/ml/getmemorystats/get_memory_stats.go +++ b/typedapi/ml/getmemorystats/get_memory_stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get machine learning memory usage info. +// // Get information about how machine learning jobs and trained models are using // memory, // on each node, both within the JVM heap, and natively, outside of the JVM. @@ -78,6 +79,7 @@ func NewGetMemoryStatsFunc(tp elastictransport.Interface) NewGetMemoryStats { } // Get machine learning memory usage info. +// // Get information about how machine learning jobs and trained models are using // memory, // on each node, both within the JVM heap, and natively, outside of the JVM. diff --git a/typedapi/ml/getmemorystats/response.go b/typedapi/ml/getmemorystats/response.go index 3df24f4eee..2ce053723d 100644 --- a/typedapi/ml/getmemorystats/response.go +++ b/typedapi/ml/getmemorystats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getmemorystats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmemorystats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_memory_stats/MlGetMemoryStatsResponse.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_memory_stats/MlGetMemoryStatsResponse.ts#L25-L31 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/ml/getmodelsnapshots/get_model_snapshots.go b/typedapi/ml/getmodelsnapshots/get_model_snapshots.go index 010e9aa7c0..72b56f10a8 100644 --- a/typedapi/ml/getmodelsnapshots/get_model_snapshots.go +++ b/typedapi/ml/getmodelsnapshots/get_model_snapshots.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get model snapshots info. package getmodelsnapshots diff --git a/typedapi/ml/getmodelsnapshots/request.go b/typedapi/ml/getmodelsnapshots/request.go index 3b0e2dedb4..45c7ba58a7 100644 --- a/typedapi/ml/getmodelsnapshots/request.go +++ b/typedapi/ml/getmodelsnapshots/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getmodelsnapshots @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package getmodelsnapshots // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts#L26-L108 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts#L26-L109 type Request struct { - // Desc Refer to the description for the `desc` query parameter. Desc *bool `json:"desc,omitempty"` // End Refer to the description for the `end` query parameter. diff --git a/typedapi/ml/getmodelsnapshots/response.go b/typedapi/ml/getmodelsnapshots/response.go index ff7e76fa35..a74d09dd1f 100644 --- a/typedapi/ml/getmodelsnapshots/response.go +++ b/typedapi/ml/getmodelsnapshots/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getmodelsnapshots @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmodelsnapshots // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_model_snapshots/MlGetModelSnapshotsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_model_snapshots/MlGetModelSnapshotsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` ModelSnapshots []types.ModelSnapshot `json:"model_snapshots"` diff --git a/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go b/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go index 607114e908..ee6bcc502b 100644 --- a/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go +++ b/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get anomaly detection job model snapshot upgrade usage info. package getmodelsnapshotupgradestats diff --git a/typedapi/ml/getmodelsnapshotupgradestats/response.go b/typedapi/ml/getmodelsnapshotupgradestats/response.go index d91c79ac15..09ce037b20 100644 --- a/typedapi/ml/getmodelsnapshotupgradestats/response.go +++ b/typedapi/ml/getmodelsnapshotupgradestats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getmodelsnapshotupgradestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmodelsnapshotupgradestats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_model_snapshot_upgrade_stats/MlGetModelSnapshotUpgradeStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_model_snapshot_upgrade_stats/MlGetModelSnapshotUpgradeStatsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` ModelSnapshotUpgrades []types.ModelSnapshotUpgrade `json:"model_snapshot_upgrades"` diff --git a/typedapi/ml/getoverallbuckets/get_overall_buckets.go b/typedapi/ml/getoverallbuckets/get_overall_buckets.go index 5a5f0447c4..9e9821d550 100644 --- a/typedapi/ml/getoverallbuckets/get_overall_buckets.go +++ b/typedapi/ml/getoverallbuckets/get_overall_buckets.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get overall bucket results. // @@ -456,7 +456,7 @@ func (r *GetOverallBuckets) ExcludeInterim(excludeinterim bool) *GetOverallBucke // Refer to the description for the `overall_score` query parameter. // API name: overall_score -func (r *GetOverallBuckets) OverallScore(overallscore string) *GetOverallBuckets { +func (r *GetOverallBuckets) OverallScore(overallscore types.Float64) *GetOverallBuckets { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() diff --git a/typedapi/ml/getoverallbuckets/request.go b/typedapi/ml/getoverallbuckets/request.go index ba6bef836a..167b2d028e 100644 --- a/typedapi/ml/getoverallbuckets/request.go +++ b/typedapi/ml/getoverallbuckets/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getoverallbuckets @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package getoverallbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L153 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L153 type Request struct { - // AllowNoMatch Refer to the description for the `allow_no_match` query parameter. AllowNoMatch *bool `json:"allow_no_match,omitempty"` // BucketSpan Refer to the description for the `bucket_span` query parameter. @@ -45,7 +44,7 @@ type Request struct { // ExcludeInterim Refer to the description for the `exclude_interim` query parameter. ExcludeInterim *bool `json:"exclude_interim,omitempty"` // OverallScore Refer to the description for the `overall_score` query parameter. - OverallScore *string `json:"overall_score,omitempty"` + OverallScore *types.Float64 `json:"overall_score,omitempty"` // Start Refer to the description for the `start` query parameter. Start types.DateTime `json:"start,omitempty"` // TopN Refer to the description for the `top_n` query parameter. @@ -124,16 +123,20 @@ func (s *Request) UnmarshalJSON(data []byte) error { } case "overall_score": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "OverallScore", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "OverallScore", err) + } + f := types.Float64(value) + s.OverallScore = &f + case float64: + f := types.Float64(v) + s.OverallScore = &f } - s.OverallScore = &o case "start": if err := dec.Decode(&s.Start); err != nil { diff --git a/typedapi/ml/getoverallbuckets/response.go b/typedapi/ml/getoverallbuckets/response.go index efc0f8bbbd..313cf99b0b 100644 --- a/typedapi/ml/getoverallbuckets/response.go +++ b/typedapi/ml/getoverallbuckets/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getoverallbuckets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getoverallbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_overall_buckets/MlGetOverallBucketsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_overall_buckets/MlGetOverallBucketsResponse.ts#L23-L29 type Response struct { Count int64 `json:"count"` // OverallBuckets Array of overall bucket objects diff --git a/typedapi/ml/getrecords/get_records.go b/typedapi/ml/getrecords/get_records.go index 9cadbfe36c..5aa4e3cfd4 100644 --- a/typedapi/ml/getrecords/get_records.go +++ b/typedapi/ml/getrecords/get_records.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get anomaly records for an anomaly detection job. +// // Records contain the detailed analytical results. They describe the anomalous // activity that has been identified in the input data based on the detector // configuration. @@ -92,6 +93,7 @@ func NewGetRecordsFunc(tp elastictransport.Interface) NewGetRecords { } // Get anomaly records for an anomaly detection job. +// // Records contain the detailed analytical results. They describe the anomalous // activity that has been identified in the input data based on the detector // configuration. diff --git a/typedapi/ml/getrecords/request.go b/typedapi/ml/getrecords/request.go index fde4d2782f..ebc66b5622 100644 --- a/typedapi/ml/getrecords/request.go +++ b/typedapi/ml/getrecords/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getrecords @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package getrecords // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts#L26-L135 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts#L26-L136 type Request struct { - // Desc Refer to the description for the `desc` query parameter. Desc *bool `json:"desc,omitempty"` // End Refer to the description for the `end` query parameter. diff --git a/typedapi/ml/getrecords/response.go b/typedapi/ml/getrecords/response.go index 880fc1736f..3f2f709cfb 100644 --- a/typedapi/ml/getrecords/response.go +++ b/typedapi/ml/getrecords/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getrecords @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrecords // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_records/MlGetAnomalyRecordsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_records/MlGetAnomalyRecordsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Records []types.Anomaly `json:"records"` diff --git a/typedapi/ml/gettrainedmodels/get_trained_models.go b/typedapi/ml/gettrainedmodels/get_trained_models.go index 8181529315..1207485c62 100644 --- a/typedapi/ml/gettrainedmodels/get_trained_models.go +++ b/typedapi/ml/gettrainedmodels/get_trained_models.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get trained model configuration info. package gettrainedmodels diff --git a/typedapi/ml/gettrainedmodels/response.go b/typedapi/ml/gettrainedmodels/response.go index 6a352bdc31..47c942bf43 100644 --- a/typedapi/ml/gettrainedmodels/response.go +++ b/typedapi/ml/gettrainedmodels/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package gettrainedmodels @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettrainedmodels // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_trained_models/MlGetTrainedModelResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_trained_models/MlGetTrainedModelResponse.ts#L23-L34 type Response struct { Count int `json:"count"` // TrainedModelConfigs An array of trained model resources, which are sorted by the model_id value diff --git a/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go b/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go index e77f712d34..66b346c4fa 100644 --- a/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go +++ b/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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. @@ -78,6 +79,7 @@ func NewGetTrainedModelsStatsFunc(tp elastictransport.Interface) NewGetTrainedMo } // 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. diff --git a/typedapi/ml/gettrainedmodelsstats/response.go b/typedapi/ml/gettrainedmodelsstats/response.go index 3a05d54e5e..91b09d0ff4 100644 --- a/typedapi/ml/gettrainedmodelsstats/response.go +++ b/typedapi/ml/gettrainedmodelsstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package gettrainedmodelsstats @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package gettrainedmodelsstats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_trained_models_stats/MlGetTrainedModelStatsResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_trained_models_stats/MlGetTrainedModelStatsResponse.ts#L23-L33 type Response struct { - // Count The total number of trained model statistics that matched the requested ID // patterns. Could be higher than the number of items in the trained_model_stats // array as the size of the array is restricted by the supplied size parameter. diff --git a/typedapi/ml/infertrainedmodel/infer_trained_model.go b/typedapi/ml/infertrainedmodel/infer_trained_model.go index 7a58950ea6..3eb556fb77 100644 --- a/typedapi/ml/infertrainedmodel/infer_trained_model.go +++ b/typedapi/ml/infertrainedmodel/infer_trained_model.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Evaluate a trained model. package infertrainedmodel diff --git a/typedapi/ml/infertrainedmodel/request.go b/typedapi/ml/infertrainedmodel/request.go index fb5fff9125..ec1cb5c84e 100644 --- a/typedapi/ml/infertrainedmodel/request.go +++ b/typedapi/ml/infertrainedmodel/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package infertrainedmodel @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package infertrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L68 type Request struct { - // Docs An array of objects to pass to the model for inference. The objects should // contain a fields matching your // configured trained model input. Typically, for NLP models, the field name is diff --git a/typedapi/ml/infertrainedmodel/response.go b/typedapi/ml/infertrainedmodel/response.go index a44f15abae..93689fd6ae 100644 --- a/typedapi/ml/infertrainedmodel/response.go +++ b/typedapi/ml/infertrainedmodel/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package infertrainedmodel @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package infertrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/infer_trained_model/MlInferTrainedModelResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/infer_trained_model/MlInferTrainedModelResponse.ts#L22-L26 type Response struct { InferenceResults []types.InferenceResponseResult `json:"inference_results"` } diff --git a/typedapi/ml/info/info.go b/typedapi/ml/info/info.go index 111188f5e6..eac24171d1 100644 --- a/typedapi/ml/info/info.go +++ b/typedapi/ml/info/info.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get machine learning information. +// // Get defaults and limits used by machine learning. // This endpoint is designed to be used by a user interface that needs to fully // understand machine learning configurations where some options are not @@ -76,6 +77,7 @@ func NewInfoFunc(tp elastictransport.Interface) NewInfo { } // Get machine learning information. +// // Get defaults and limits used by machine learning. // This endpoint is designed to be used by a user interface that needs to fully // understand machine learning configurations where some options are not diff --git a/typedapi/ml/info/response.go b/typedapi/ml/info/response.go index 82e12b07f5..45e376452b 100644 --- a/typedapi/ml/info/response.go +++ b/typedapi/ml/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/info/MlInfoResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/info/MlInfoResponse.ts#L22-L29 type Response struct { Defaults types.Defaults `json:"defaults"` Limits types.Limits `json:"limits"` diff --git a/typedapi/ml/openjob/open_job.go b/typedapi/ml/openjob/open_job.go index a3426ab748..e9d086dffb 100644 --- a/typedapi/ml/openjob/open_job.go +++ b/typedapi/ml/openjob/open_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Open anomaly detection jobs. // diff --git a/typedapi/ml/openjob/request.go b/typedapi/ml/openjob/request.go index ca8f266138..ed890f249a 100644 --- a/typedapi/ml/openjob/request.go +++ b/typedapi/ml/openjob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package openjob @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package openjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/open_job/MlOpenJobRequest.ts#L24-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/open_job/MlOpenJobRequest.ts#L24-L67 type Request struct { - // Timeout Refer to the description for the `timeout` query parameter. Timeout types.Duration `json:"timeout,omitempty"` } diff --git a/typedapi/ml/openjob/response.go b/typedapi/ml/openjob/response.go index 75b8e3efbf..c8c39dbd79 100644 --- a/typedapi/ml/openjob/response.go +++ b/typedapi/ml/openjob/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package openjob // Response holds the response body struct for the package openjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/open_job/MlOpenJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/open_job/MlOpenJobResponse.ts#L22-L31 type Response struct { - // Node The ID of the node that the job was started on. In serverless this will be // the "serverless". // If the job is allowed to open lazily and has not yet been assigned to a node, diff --git a/typedapi/ml/postcalendarevents/post_calendar_events.go b/typedapi/ml/postcalendarevents/post_calendar_events.go index 43b95048fb..3c17b600de 100644 --- a/typedapi/ml/postcalendarevents/post_calendar_events.go +++ b/typedapi/ml/postcalendarevents/post_calendar_events.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Add scheduled events to the calendar. package postcalendarevents diff --git a/typedapi/ml/postcalendarevents/request.go b/typedapi/ml/postcalendarevents/request.go index 4f3b6a0bdb..eb741ad1cc 100644 --- a/typedapi/ml/postcalendarevents/request.go +++ b/typedapi/ml/postcalendarevents/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package postcalendarevents @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package postcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/post_calendar_events/MlPostCalendarEventsRequest.ts#L24-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/post_calendar_events/MlPostCalendarEventsRequest.ts#L24-L49 type Request struct { - // Events A list of one of more scheduled events. The event’s start and end times can // be specified as integer milliseconds since the epoch or as a string in ISO // 8601 format. diff --git a/typedapi/ml/postcalendarevents/response.go b/typedapi/ml/postcalendarevents/response.go index 381c98bf1d..ad0e223557 100644 --- a/typedapi/ml/postcalendarevents/response.go +++ b/typedapi/ml/postcalendarevents/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package postcalendarevents @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package postcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/post_calendar_events/MlPostCalendarEventsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/post_calendar_events/MlPostCalendarEventsResponse.ts#L22-L24 type Response struct { Events []types.CalendarEvent `json:"events"` } diff --git a/typedapi/ml/postdata/post_data.go b/typedapi/ml/postdata/post_data.go index 57ae45d68f..75c7199c80 100644 --- a/typedapi/ml/postdata/post_data.go +++ b/typedapi/ml/postdata/post_data.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Send data to an anomaly detection job for analysis. // diff --git a/typedapi/ml/postdata/request.go b/typedapi/ml/postdata/request.go index 60fabe223c..3e148e0ffc 100644 --- a/typedapi/ml/postdata/request.go +++ b/typedapi/ml/postdata/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package postdata @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package postdata // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/post_data/MlPostJobDataRequest.ts#L24-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/post_data/MlPostJobDataRequest.ts#L24-L77 type Request = []json.RawMessage // NewRequest returns a Request diff --git a/typedapi/ml/postdata/response.go b/typedapi/ml/postdata/response.go index 29cd52acb8..265f193b8f 100644 --- a/typedapi/ml/postdata/response.go +++ b/typedapi/ml/postdata/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package postdata // Response holds the response body struct for the package postdata // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/post_data/MlPostJobDataResponse.ts#L24-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/post_data/MlPostJobDataResponse.ts#L24-L45 type Response struct { BucketCount int64 `json:"bucket_count"` EarliestRecordTimestamp *int64 `json:"earliest_record_timestamp,omitempty"` diff --git a/typedapi/ml/previewdatafeed/preview_datafeed.go b/typedapi/ml/previewdatafeed/preview_datafeed.go index 998bb5abcd..9884076d80 100644 --- a/typedapi/ml/previewdatafeed/preview_datafeed.go +++ b/typedapi/ml/previewdatafeed/preview_datafeed.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -93,6 +94,7 @@ func NewPreviewDatafeedFunc(tp elastictransport.Interface) NewPreviewDatafeed { } // 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 diff --git a/typedapi/ml/previewdatafeed/request.go b/typedapi/ml/previewdatafeed/request.go index 424b8f0181..c2edae75c8 100644 --- a/typedapi/ml/previewdatafeed/request.go +++ b/typedapi/ml/previewdatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package previewdatafeed @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package previewdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/preview_datafeed/MlPreviewDatafeedRequest.ts#L26-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/preview_datafeed/MlPreviewDatafeedRequest.ts#L26-L82 type Request struct { - // DatafeedConfig The datafeed definition to preview. DatafeedConfig *types.DatafeedConfig `json:"datafeed_config,omitempty"` // JobConfig The configuration details for the anomaly detection job that is associated diff --git a/typedapi/ml/previewdatafeed/response.go b/typedapi/ml/previewdatafeed/response.go index 5873830cc8..8d2df33616 100644 --- a/typedapi/ml/previewdatafeed/response.go +++ b/typedapi/ml/previewdatafeed/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package previewdatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package previewdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/preview_datafeed/MlPreviewDatafeedResponse.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/preview_datafeed/MlPreviewDatafeedResponse.ts#L20-L23 type Response []json.RawMessage diff --git a/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go b/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go index df345336fc..cc278f9c23 100644 --- a/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go +++ b/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Preview features used by data frame analytics. +// // Preview the extracted features used by a data frame analytics config. package previewdataframeanalytics @@ -81,6 +82,7 @@ func NewPreviewDataFrameAnalyticsFunc(tp elastictransport.Interface) NewPreviewD } // Preview features used by data frame analytics. +// // Preview the extracted features used by a data frame analytics config. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics diff --git a/typedapi/ml/previewdataframeanalytics/request.go b/typedapi/ml/previewdataframeanalytics/request.go index dc81dd6f16..53048e9f9e 100644 --- a/typedapi/ml/previewdataframeanalytics/request.go +++ b/typedapi/ml/previewdataframeanalytics/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package previewdataframeanalytics @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package previewdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L61 type Request struct { - // Config A data frame analytics config as described in create data frame analytics // jobs. Note that `id` and `dest` don’t need to be provided in the context of // this API. diff --git a/typedapi/ml/previewdataframeanalytics/response.go b/typedapi/ml/previewdataframeanalytics/response.go index ea98007795..b1f244d6ae 100644 --- a/typedapi/ml/previewdataframeanalytics/response.go +++ b/typedapi/ml/previewdataframeanalytics/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package previewdataframeanalytics // Response holds the response body struct for the package previewdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsResponse.ts#L23-L28 type Response struct { - // FeatureValues An array of objects that contain feature name and value pairs. The features // have been processed and indicate what will be sent to the model for training. FeatureValues []map[string]string `json:"feature_values"` diff --git a/typedapi/ml/putcalendar/put_calendar.go b/typedapi/ml/putcalendar/put_calendar.go index d077fb1b65..994a272b5e 100644 --- a/typedapi/ml/putcalendar/put_calendar.go +++ b/typedapi/ml/putcalendar/put_calendar.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a calendar. package putcalendar diff --git a/typedapi/ml/putcalendar/request.go b/typedapi/ml/putcalendar/request.go index ffc2c009f1..4f3ac181a7 100644 --- a/typedapi/ml/putcalendar/request.go +++ b/typedapi/ml/putcalendar/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putcalendar @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package putcalendar // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_calendar/MlPutCalendarRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_calendar/MlPutCalendarRequest.ts#L23-L52 type Request struct { - // Description A description of the calendar. Description *string `json:"description,omitempty"` // JobIds An array of anomaly detection job identifiers. diff --git a/typedapi/ml/putcalendar/response.go b/typedapi/ml/putcalendar/response.go index 2b018dc2f8..e1a94c65b7 100644 --- a/typedapi/ml/putcalendar/response.go +++ b/typedapi/ml/putcalendar/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putcalendar @@ -31,9 +31,8 @@ import ( // Response holds the response body struct for the package putcalendar // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_calendar/MlPutCalendarResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_calendar/MlPutCalendarResponse.ts#L22-L31 type Response struct { - // CalendarId A string that uniquely identifies a calendar. CalendarId string `json:"calendar_id"` // Description A description of the calendar. diff --git a/typedapi/ml/putcalendarjob/put_calendar_job.go b/typedapi/ml/putcalendarjob/put_calendar_job.go index 31b7d774b5..ed0c3e1706 100644 --- a/typedapi/ml/putcalendarjob/put_calendar_job.go +++ b/typedapi/ml/putcalendarjob/put_calendar_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Add anomaly detection job to calendar. package putcalendarjob diff --git a/typedapi/ml/putcalendarjob/response.go b/typedapi/ml/putcalendarjob/response.go index f075a84c8b..c1d29fd2f5 100644 --- a/typedapi/ml/putcalendarjob/response.go +++ b/typedapi/ml/putcalendarjob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putcalendarjob @@ -31,9 +31,8 @@ import ( // Response holds the response body struct for the package putcalendarjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_calendar_job/MlPutCalendarJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_calendar_job/MlPutCalendarJobResponse.ts#L22-L31 type Response struct { - // CalendarId A string that uniquely identifies a calendar. CalendarId string `json:"calendar_id"` // Description A description of the calendar. diff --git a/typedapi/ml/putdatafeed/put_datafeed.go b/typedapi/ml/putdatafeed/put_datafeed.go index e564038e82..f4758a765b 100644 --- a/typedapi/ml/putdatafeed/put_datafeed.go +++ b/typedapi/ml/putdatafeed/put_datafeed.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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. @@ -101,6 +102,7 @@ func NewPutDatafeedFunc(tp elastictransport.Interface) NewPutDatafeed { } // 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. diff --git a/typedapi/ml/putdatafeed/request.go b/typedapi/ml/putdatafeed/request.go index bda8a986e2..1427a94d88 100644 --- a/typedapi/ml/putdatafeed/request.go +++ b/typedapi/ml/putdatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdatafeed @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_datafeed/MlPutDatafeedRequest.ts#L37-L184 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_datafeed/MlPutDatafeedRequest.ts#L37-L185 type Request struct { - // Aggregations If set, the datafeed performs aggregation searches. // Support for aggregations is limited and should be used only with low // cardinality data. diff --git a/typedapi/ml/putdatafeed/response.go b/typedapi/ml/putdatafeed/response.go index bc13346b9a..03ff79e3ac 100644 --- a/typedapi/ml/putdatafeed/response.go +++ b/typedapi/ml/putdatafeed/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_datafeed/MlPutDatafeedResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_datafeed/MlPutDatafeedResponse.ts#L31-L49 type Response struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Authorization *types.DatafeedAuthorization `json:"authorization,omitempty"` diff --git a/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go b/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go index 7ff3b48b65..fc17e4f8f4 100644 --- a/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go +++ b/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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. // By default, the query used in the source configuration is `{"match_all": @@ -93,6 +94,7 @@ func NewPutDataFrameAnalyticsFunc(tp elastictransport.Interface) NewPutDataFrame } // 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. // By default, the query used in the source configuration is `{"match_all": diff --git a/typedapi/ml/putdataframeanalytics/request.go b/typedapi/ml/putdataframeanalytics/request.go index 53f66d8f67..4b9d211b3d 100644 --- a/typedapi/ml/putdataframeanalytics/request.go +++ b/typedapi/ml/putdataframeanalytics/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdataframeanalytics @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsRequest.ts#L30-L155 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsRequest.ts#L30-L156 type Request struct { - // AllowLazyStart Specifies whether this job can start when there is insufficient machine // learning node capacity for it to be immediately assigned to a node. If // set to `false` and a machine learning node with capacity to run the job diff --git a/typedapi/ml/putdataframeanalytics/response.go b/typedapi/ml/putdataframeanalytics/response.go index 78cd40a76c..7568a58c68 100644 --- a/typedapi/ml/putdataframeanalytics/response.go +++ b/typedapi/ml/putdataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putdataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsResponse.ts#L31-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsResponse.ts#L31-L47 type Response struct { AllowLazyStart bool `json:"allow_lazy_start"` Analysis types.DataframeAnalysisContainer `json:"analysis"` diff --git a/typedapi/ml/putfilter/put_filter.go b/typedapi/ml/putfilter/put_filter.go index 275bc4bae4..aacef16a0f 100644 --- a/typedapi/ml/putfilter/put_filter.go +++ b/typedapi/ml/putfilter/put_filter.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -86,6 +87,7 @@ func NewPutFilterFunc(tp elastictransport.Interface) NewPutFilter { } // 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 diff --git a/typedapi/ml/putfilter/request.go b/typedapi/ml/putfilter/request.go index 491ead6e62..2f22c5b5c2 100644 --- a/typedapi/ml/putfilter/request.go +++ b/typedapi/ml/putfilter/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putfilter @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package putfilter // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_filter/MlPutFilterRequest.ts#L23-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_filter/MlPutFilterRequest.ts#L23-L59 type Request struct { - // Description A description of the filter. Description *string `json:"description,omitempty"` // Items The items of the filter. A wildcard `*` can be used at the beginning or the diff --git a/typedapi/ml/putfilter/response.go b/typedapi/ml/putfilter/response.go index 5ee23ff482..e18606728d 100644 --- a/typedapi/ml/putfilter/response.go +++ b/typedapi/ml/putfilter/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putfilter // Response holds the response body struct for the package putfilter // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_filter/MlPutFilterResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_filter/MlPutFilterResponse.ts#L22-L28 type Response struct { Description string `json:"description"` FilterId string `json:"filter_id"` diff --git a/typedapi/ml/putjob/put_job.go b/typedapi/ml/putjob/put_job.go index dfc46fe10e..c3104c6a56 100644 --- a/typedapi/ml/putjob/put_job.go +++ b/typedapi/ml/putjob/put_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an anomaly detection job. // diff --git a/typedapi/ml/putjob/request.go b/typedapi/ml/putjob/request.go index 94182f7169..9ee531584e 100644 --- a/typedapi/ml/putjob/request.go +++ b/typedapi/ml/putjob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putjob @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_job/MlPutJobRequest.ts#L30-L151 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_job/MlPutJobRequest.ts#L30-L151 type Request struct { - // AllowLazyOpen Advanced configuration option. Specifies whether this job can open when there // is insufficient machine learning node capacity for it to be immediately // assigned to a node. By default, if a machine learning node with capacity to diff --git a/typedapi/ml/putjob/response.go b/typedapi/ml/putjob/response.go index b22dabf634..aa75fa9327 100644 --- a/typedapi/ml/putjob/response.go +++ b/typedapi/ml/putjob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putjob @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_job/MlPutJobResponse.ts#L29-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_job/MlPutJobResponse.ts#L29-L52 type Response struct { AllowLazyOpen bool `json:"allow_lazy_open"` AnalysisConfig types.AnalysisConfigRead `json:"analysis_config"` diff --git a/typedapi/ml/puttrainedmodel/put_trained_model.go b/typedapi/ml/puttrainedmodel/put_trained_model.go index cafe9d8edd..2f0e5685ec 100644 --- a/typedapi/ml/puttrainedmodel/put_trained_model.go +++ b/typedapi/ml/puttrainedmodel/put_trained_model.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a trained model. +// // Enable you to supply a trained model that is not created by data frame // analytics. package puttrainedmodel @@ -85,6 +86,7 @@ func NewPutTrainedModelFunc(tp elastictransport.Interface) NewPutTrainedModel { } // Create a trained model. +// // Enable you to supply a trained model that is not created by data frame // analytics. // diff --git a/typedapi/ml/puttrainedmodel/request.go b/typedapi/ml/puttrainedmodel/request.go index 40ab5be891..9092185135 100644 --- a/typedapi/ml/puttrainedmodel/request.go +++ b/typedapi/ml/puttrainedmodel/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttrainedmodel @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package puttrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts#L31-L135 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts#L31-L138 type Request struct { - // CompressedDefinition The compressed (GZipped and Base64 encoded) inference definition of the // model. If compressed_definition is specified, then definition cannot be // specified. diff --git a/typedapi/ml/puttrainedmodel/response.go b/typedapi/ml/puttrainedmodel/response.go index 8c0db1aa22..b8298352fa 100644 --- a/typedapi/ml/puttrainedmodel/response.go +++ b/typedapi/ml/puttrainedmodel/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttrainedmodel @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package puttrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L25 type Response struct { CompressedDefinition *string `json:"compressed_definition,omitempty"` // CreateTime The time when the trained model was created. diff --git a/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go b/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go index ea67adddd6..b16a074fcd 100644 --- a/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go +++ b/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -98,6 +99,7 @@ func NewPutTrainedModelAliasFunc(tp elastictransport.Interface) NewPutTrainedMod } // 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 diff --git a/typedapi/ml/puttrainedmodelalias/response.go b/typedapi/ml/puttrainedmodelalias/response.go index d318b8c31b..7119539ce6 100644 --- a/typedapi/ml/puttrainedmodelalias/response.go +++ b/typedapi/ml/puttrainedmodelalias/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttrainedmodelalias // Response holds the response body struct for the package puttrainedmodelalias // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go b/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go index 4bae4ba921..7aed34be6b 100644 --- a/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go +++ b/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create part of a trained model definition. package puttrainedmodeldefinitionpart diff --git a/typedapi/ml/puttrainedmodeldefinitionpart/request.go b/typedapi/ml/puttrainedmodeldefinitionpart/request.go index 3cd6616a99..627c324767 100644 --- a/typedapi/ml/puttrainedmodeldefinitionpart/request.go +++ b/typedapi/ml/puttrainedmodeldefinitionpart/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttrainedmodeldefinitionpart @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package puttrainedmodeldefinitionpart // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartRequest.ts#L24-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartRequest.ts#L24-L66 type Request struct { - // Definition The definition part for the model. Must be a base64 encoded string. Definition string `json:"definition"` // TotalDefinitionLength The total uncompressed definition length in bytes. Not base64 encoded. diff --git a/typedapi/ml/puttrainedmodeldefinitionpart/response.go b/typedapi/ml/puttrainedmodeldefinitionpart/response.go index 84c2b4d180..5b6380aeae 100644 --- a/typedapi/ml/puttrainedmodeldefinitionpart/response.go +++ b/typedapi/ml/puttrainedmodeldefinitionpart/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttrainedmodeldefinitionpart // Response holds the response body struct for the package puttrainedmodeldefinitionpart // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go b/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go index 74abcd8738..9bda22802b 100644 --- a/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go +++ b/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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. @@ -85,6 +86,7 @@ func NewPutTrainedModelVocabularyFunc(tp elastictransport.Interface) NewPutTrain } // 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/typedapi/ml/puttrainedmodelvocabulary/request.go b/typedapi/ml/puttrainedmodelvocabulary/request.go index d0997052b2..28c831224c 100644 --- a/typedapi/ml/puttrainedmodelvocabulary/request.go +++ b/typedapi/ml/puttrainedmodelvocabulary/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttrainedmodelvocabulary @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package puttrainedmodelvocabulary // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyRequest.ts#L24-L68 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyRequest.ts#L24-L69 type Request struct { - // Merges The optional model merges if required by the tokenizer. Merges []string `json:"merges,omitempty"` // Scores The optional vocabulary value scores if required by the tokenizer. diff --git a/typedapi/ml/puttrainedmodelvocabulary/response.go b/typedapi/ml/puttrainedmodelvocabulary/response.go index 58d3105247..c86709b726 100644 --- a/typedapi/ml/puttrainedmodelvocabulary/response.go +++ b/typedapi/ml/puttrainedmodelvocabulary/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttrainedmodelvocabulary // Response holds the response body struct for the package puttrainedmodelvocabulary // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/resetjob/reset_job.go b/typedapi/ml/resetjob/reset_job.go index c828627056..5e748c29fa 100644 --- a/typedapi/ml/resetjob/reset_job.go +++ b/typedapi/ml/resetjob/reset_job.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -81,6 +82,7 @@ func NewResetJobFunc(tp elastictransport.Interface) NewResetJob { } // 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 diff --git a/typedapi/ml/resetjob/response.go b/typedapi/ml/resetjob/response.go index 03c3de022d..953b8bebeb 100644 --- a/typedapi/ml/resetjob/response.go +++ b/typedapi/ml/resetjob/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package resetjob // Response holds the response body struct for the package resetjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/reset_job/MlResetJobResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/reset_job/MlResetJobResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/revertmodelsnapshot/request.go b/typedapi/ml/revertmodelsnapshot/request.go index fba132b59d..cfb0c2956c 100644 --- a/typedapi/ml/revertmodelsnapshot/request.go +++ b/typedapi/ml/revertmodelsnapshot/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package revertmodelsnapshot @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package revertmodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts#L23-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts#L23-L78 type Request struct { - // DeleteInterveningResults Refer to the description for the `delete_intervening_results` query // parameter. DeleteInterveningResults *bool `json:"delete_intervening_results,omitempty"` diff --git a/typedapi/ml/revertmodelsnapshot/response.go b/typedapi/ml/revertmodelsnapshot/response.go index aa82cd87c9..7d8a4ac5c7 100644 --- a/typedapi/ml/revertmodelsnapshot/response.go +++ b/typedapi/ml/revertmodelsnapshot/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package revertmodelsnapshot @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package revertmodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/revert_model_snapshot/MlRevertModelSnapshotResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/revert_model_snapshot/MlRevertModelSnapshotResponse.ts#L22-L24 type Response struct { Model types.ModelSnapshot `json:"model"` } diff --git a/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go b/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go index 5ac1193b3f..55b51f507a 100644 --- a/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go +++ b/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Revert to a snapshot. +// // The machine learning features react quickly to anomalous input, learning new // behaviors in data. Highly anomalous input increases the variance in the // models whilst the system learns whether this is a new step-change in behavior @@ -94,6 +95,7 @@ func NewRevertModelSnapshotFunc(tp elastictransport.Interface) NewRevertModelSna } // Revert to a snapshot. +// // The machine learning features react quickly to anomalous input, learning new // behaviors in data. Highly anomalous input increases the variance in the // models whilst the system learns whether this is a new step-change in behavior diff --git a/typedapi/ml/setupgrademode/response.go b/typedapi/ml/setupgrademode/response.go index 6922b9e03a..200a85cbe5 100644 --- a/typedapi/ml/setupgrademode/response.go +++ b/typedapi/ml/setupgrademode/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package setupgrademode // Response holds the response body struct for the package setupgrademode // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/set_upgrade_mode/MlSetUpgradeModeResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/set_upgrade_mode/MlSetUpgradeModeResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/setupgrademode/set_upgrade_mode.go b/typedapi/ml/setupgrademode/set_upgrade_mode.go index 77835fa244..6c2fcc071b 100644 --- a/typedapi/ml/setupgrademode/set_upgrade_mode.go +++ b/typedapi/ml/setupgrademode/set_upgrade_mode.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Set upgrade_mode for ML indices. +// // Sets a cluster wide upgrade_mode setting that prepares machine learning // indices for an upgrade. // When upgrading your cluster, in some circumstances you must restart your @@ -81,6 +82,7 @@ func NewSetUpgradeModeFunc(tp elastictransport.Interface) NewSetUpgradeMode { } // Set upgrade_mode for ML indices. +// // Sets a cluster wide upgrade_mode setting that prepares machine learning // indices for an upgrade. // When upgrading your cluster, in some circumstances you must restart your diff --git a/typedapi/ml/startdatafeed/request.go b/typedapi/ml/startdatafeed/request.go index 9755e2e55e..19a5e935d0 100644 --- a/typedapi/ml/startdatafeed/request.go +++ b/typedapi/ml/startdatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package startdatafeed @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package startdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L99 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L99 type Request struct { - // End Refer to the description for the `end` query parameter. End types.DateTime `json:"end,omitempty"` // Start Refer to the description for the `start` query parameter. diff --git a/typedapi/ml/startdatafeed/response.go b/typedapi/ml/startdatafeed/response.go index 7b14fc90f2..14fe64802c 100644 --- a/typedapi/ml/startdatafeed/response.go +++ b/typedapi/ml/startdatafeed/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package startdatafeed @@ -31,9 +31,8 @@ import ( // Response holds the response body struct for the package startdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/start_datafeed/MlStartDatafeedResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/start_datafeed/MlStartDatafeedResponse.ts#L22-L34 type Response struct { - // Node The ID of the node that the job was started on. In serverless this will be // the "serverless". // If the job is allowed to open lazily and has not yet been assigned to a node, diff --git a/typedapi/ml/startdatafeed/start_datafeed.go b/typedapi/ml/startdatafeed/start_datafeed.go index 85e12d6cb3..a3dd7a9f57 100644 --- a/typedapi/ml/startdatafeed/start_datafeed.go +++ b/typedapi/ml/startdatafeed/start_datafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start datafeeds. // diff --git a/typedapi/ml/startdataframeanalytics/response.go b/typedapi/ml/startdataframeanalytics/response.go index 9769590a8c..cadcca2dd1 100644 --- a/typedapi/ml/startdataframeanalytics/response.go +++ b/typedapi/ml/startdataframeanalytics/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package startdataframeanalytics // Response holds the response body struct for the package startdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsResponse.ts#L22-L34 type Response struct { Acknowledged bool `json:"acknowledged"` // Node The ID of the node that the job was started on. If the job is allowed to open diff --git a/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go b/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go index 4e9c4d3678..d8068d4d08 100644 --- a/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go +++ b/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -88,6 +89,7 @@ func NewStartDataFrameAnalyticsFunc(tp elastictransport.Interface) NewStartDataF } // 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 diff --git a/typedapi/ml/starttrainedmodeldeployment/request.go b/typedapi/ml/starttrainedmodeldeployment/request.go index ee1c9278fe..9745d1fbb1 100644 --- a/typedapi/ml/starttrainedmodeldeployment/request.go +++ b/typedapi/ml/starttrainedmodeldeployment/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package starttrainedmodeldeployment @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package starttrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L30-L111 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L30-L112 type Request struct { - // AdaptiveAllocations Adaptive allocations configuration. When enabled, the number of allocations // is set based on the current load. // If adaptive_allocations is enabled, do not set the number of allocations diff --git a/typedapi/ml/starttrainedmodeldeployment/response.go b/typedapi/ml/starttrainedmodeldeployment/response.go index b81a3aa685..106f50d68c 100644 --- a/typedapi/ml/starttrainedmodeldeployment/response.go +++ b/typedapi/ml/starttrainedmodeldeployment/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package starttrainedmodeldeployment @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package starttrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentResponse.ts#L22-L26 type Response struct { Assignment types.TrainedModelAssignment `json:"assignment"` } diff --git a/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go b/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go index d67aaae3a4..9f5ace4872 100644 --- a/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go +++ b/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start a trained model deployment. +// // It allocates the model to every machine learning node. package starttrainedmodeldeployment @@ -85,6 +86,7 @@ func NewStartTrainedModelDeploymentFunc(tp elastictransport.Interface) NewStartT } // Start a trained model deployment. +// // It allocates the model to every machine learning node. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-trained-model-deployment diff --git a/typedapi/ml/stopdatafeed/request.go b/typedapi/ml/stopdatafeed/request.go index 3d6075bebf..e845e33984 100644 --- a/typedapi/ml/stopdatafeed/request.go +++ b/typedapi/ml/stopdatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stopdatafeed @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package stopdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/stop_datafeed/MlStopDatafeedRequest.ts#L24-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/stop_datafeed/MlStopDatafeedRequest.ts#L24-L87 type Request struct { - // AllowNoMatch Refer to the description for the `allow_no_match` query parameter. AllowNoMatch *bool `json:"allow_no_match,omitempty"` // Force Refer to the description for the `force` query parameter. diff --git a/typedapi/ml/stopdatafeed/response.go b/typedapi/ml/stopdatafeed/response.go index 73d1277c4e..b9eee781ae 100644 --- a/typedapi/ml/stopdatafeed/response.go +++ b/typedapi/ml/stopdatafeed/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stopdatafeed // Response holds the response body struct for the package stopdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/stop_datafeed/MlStopDatafeedResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/stop_datafeed/MlStopDatafeedResponse.ts#L20-L22 type Response struct { Stopped bool `json:"stopped"` } diff --git a/typedapi/ml/stopdatafeed/stop_datafeed.go b/typedapi/ml/stopdatafeed/stop_datafeed.go index cb7ce5d0ff..168736844c 100644 --- a/typedapi/ml/stopdatafeed/stop_datafeed.go +++ b/typedapi/ml/stopdatafeed/stop_datafeed.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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. @@ -85,6 +86,7 @@ func NewStopDatafeedFunc(tp elastictransport.Interface) NewStopDatafeed { } // 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. diff --git a/typedapi/ml/stopdataframeanalytics/response.go b/typedapi/ml/stopdataframeanalytics/response.go index 11bd938e2d..4deec80bb8 100644 --- a/typedapi/ml/stopdataframeanalytics/response.go +++ b/typedapi/ml/stopdataframeanalytics/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stopdataframeanalytics // Response holds the response body struct for the package stopdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsResponse.ts#L20-L22 type Response struct { Stopped bool `json:"stopped"` } diff --git a/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go b/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go index 80ce61c316..aca39d4976 100644 --- a/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go +++ b/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Stop data frame analytics jobs. +// // A data frame analytics job can be started and stopped multiple times // throughout its lifecycle. package stopdataframeanalytics @@ -79,6 +80,7 @@ func NewStopDataFrameAnalyticsFunc(tp elastictransport.Interface) NewStopDataFra } // Stop data frame analytics jobs. +// // A data frame analytics job can be started and stopped multiple times // throughout its lifecycle. // diff --git a/typedapi/ml/stoptrainedmodeldeployment/response.go b/typedapi/ml/stoptrainedmodeldeployment/response.go index 7c1630fadd..a92745e27d 100644 --- a/typedapi/ml/stoptrainedmodeldeployment/response.go +++ b/typedapi/ml/stoptrainedmodeldeployment/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stoptrainedmodeldeployment // Response holds the response body struct for the package stoptrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentResponse.ts#L20-L22 type Response struct { Stopped bool `json:"stopped"` } diff --git a/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go b/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go index 3690827f36..703ff857e4 100644 --- a/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go +++ b/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Stop a trained model deployment. package stoptrainedmodeldeployment diff --git a/typedapi/ml/updatedatafeed/request.go b/typedapi/ml/updatedatafeed/request.go index 562553ab5b..672ac7438d 100644 --- a/typedapi/ml/updatedatafeed/request.go +++ b/typedapi/ml/updatedatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatedatafeed @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package updatedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L164 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L165 type Request struct { - // Aggregations If set, the datafeed performs aggregation searches. Support for aggregations // is limited and should be used only // with low cardinality data. diff --git a/typedapi/ml/updatedatafeed/response.go b/typedapi/ml/updatedatafeed/response.go index 0e2447d483..20e96d3c73 100644 --- a/typedapi/ml/updatedatafeed/response.go +++ b/typedapi/ml/updatedatafeed/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatedatafeed @@ -26,23 +26,31 @@ import ( // Response holds the response body struct for the package updatedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L52 type Response struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Authorization *types.DatafeedAuthorization `json:"authorization,omitempty"` ChunkingConfig types.ChunkingConfig `json:"chunking_config"` DatafeedId string `json:"datafeed_id"` DelayedDataCheckConfig *types.DelayedDataCheckConfig `json:"delayed_data_check_config,omitempty"` - Frequency types.Duration `json:"frequency,omitempty"` - Indices []string `json:"indices"` - IndicesOptions *types.IndicesOptions `json:"indices_options,omitempty"` - JobId string `json:"job_id"` - MaxEmptySearches *int `json:"max_empty_searches,omitempty"` - Query types.Query `json:"query"` - QueryDelay types.Duration `json:"query_delay"` - RuntimeMappings types.RuntimeFields `json:"runtime_mappings,omitempty"` - ScriptFields map[string]types.ScriptField `json:"script_fields,omitempty"` - ScrollSize int `json:"scroll_size"` + // Frequency The interval at which scheduled queries are made while the datafeed runs in + // real time. The default value is either the bucket span for short bucket + // spans, or, for longer bucket spans, a sensible fraction of the bucket span. + // For example: `150s`. When `frequency` is shorter than the bucket span, + // interim results for the last (partial) bucket are written then eventually + // overwritten by the full bucket results. If the datafeed uses aggregations, + // this value must be divisible by the interval of the date histogram + // aggregation. + Frequency types.Duration `json:"frequency,omitempty"` + Indices []string `json:"indices"` + IndicesOptions *types.IndicesOptions `json:"indices_options,omitempty"` + JobId string `json:"job_id"` + MaxEmptySearches *int `json:"max_empty_searches,omitempty"` + Query types.Query `json:"query"` + QueryDelay types.Duration `json:"query_delay"` + RuntimeMappings types.RuntimeFields `json:"runtime_mappings,omitempty"` + ScriptFields map[string]types.ScriptField `json:"script_fields,omitempty"` + ScrollSize int `json:"scroll_size"` } // NewResponse returns a Response diff --git a/typedapi/ml/updatedatafeed/update_datafeed.go b/typedapi/ml/updatedatafeed/update_datafeed.go index 487c0c586c..054f982162 100644 --- a/typedapi/ml/updatedatafeed/update_datafeed.go +++ b/typedapi/ml/updatedatafeed/update_datafeed.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // 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 @@ -89,6 +90,7 @@ func NewUpdateDatafeedFunc(tp elastictransport.Interface) NewUpdateDatafeed { } // 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 diff --git a/typedapi/ml/updatedataframeanalytics/request.go b/typedapi/ml/updatedataframeanalytics/request.go index 791ad85bad..3b6a5c2fcf 100644 --- a/typedapi/ml/updatedataframeanalytics/request.go +++ b/typedapi/ml/updatedataframeanalytics/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatedataframeanalytics @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package updatedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsRequest.ts#L24-L80 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsRequest.ts#L24-L81 type Request struct { - // AllowLazyStart Specifies whether this job can start when there is insufficient machine // learning node capacity for it to be immediately assigned to a node. AllowLazyStart *bool `json:"allow_lazy_start,omitempty"` diff --git a/typedapi/ml/updatedataframeanalytics/response.go b/typedapi/ml/updatedataframeanalytics/response.go index 7c5703edf3..4c8307a7be 100644 --- a/typedapi/ml/updatedataframeanalytics/response.go +++ b/typedapi/ml/updatedataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatedataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45 type Response struct { AllowLazyStart bool `json:"allow_lazy_start"` Analysis types.DataframeAnalysisContainer `json:"analysis"` diff --git a/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go b/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go index 86dc621240..b3ef2a2b2f 100644 --- a/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go +++ b/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update a data frame analytics job. package updatedataframeanalytics diff --git a/typedapi/ml/updatefilter/request.go b/typedapi/ml/updatefilter/request.go index 35c1bb7ccb..b52a96218e 100644 --- a/typedapi/ml/updatefilter/request.go +++ b/typedapi/ml/updatefilter/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatefilter @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package updatefilter // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_filter/MlUpdateFilterRequest.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_filter/MlUpdateFilterRequest.ts#L23-L61 type Request struct { - // AddItems The items to add to the filter. AddItems []string `json:"add_items,omitempty"` // Description A description for the filter. diff --git a/typedapi/ml/updatefilter/response.go b/typedapi/ml/updatefilter/response.go index f945ce7d83..b1a05a94ef 100644 --- a/typedapi/ml/updatefilter/response.go +++ b/typedapi/ml/updatefilter/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatefilter // Response holds the response body struct for the package updatefilter // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_filter/MlUpdateFilterResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_filter/MlUpdateFilterResponse.ts#L22-L28 type Response struct { Description string `json:"description"` FilterId string `json:"filter_id"` diff --git a/typedapi/ml/updatefilter/update_filter.go b/typedapi/ml/updatefilter/update_filter.go index d44852da2f..ec16e9378a 100644 --- a/typedapi/ml/updatefilter/update_filter.go +++ b/typedapi/ml/updatefilter/update_filter.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update a filter. +// // Updates the description of a filter, adds items, or removes items from the // list. package updatefilter @@ -84,6 +85,7 @@ func NewUpdateFilterFunc(tp elastictransport.Interface) NewUpdateFilter { } // Update a filter. +// // Updates the description of a filter, adds items, or removes items from the // list. // diff --git a/typedapi/ml/updatejob/request.go b/typedapi/ml/updatejob/request.go index 00ee320f4d..acfa3662b2 100644 --- a/typedapi/ml/updatejob/request.go +++ b/typedapi/ml/updatejob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatejob @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package updatejob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_job/MlUpdateJobRequest.ts#L33-L147 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_job/MlUpdateJobRequest.ts#L33-L148 type Request struct { - // AllowLazyOpen Advanced configuration option. Specifies whether this job can open when // there is insufficient machine learning node capacity for it to be // immediately assigned to a node. If `false` and a machine learning node diff --git a/typedapi/ml/updatejob/response.go b/typedapi/ml/updatejob/response.go index ffcdfb9e9f..980b7fdd20 100644 --- a/typedapi/ml/updatejob/response.go +++ b/typedapi/ml/updatejob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatejob @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatejob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_job/MlUpdateJobResponse.ts#L29-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_job/MlUpdateJobResponse.ts#L29-L53 type Response struct { AllowLazyOpen bool `json:"allow_lazy_open"` AnalysisConfig types.AnalysisConfigRead `json:"analysis_config"` diff --git a/typedapi/ml/updatejob/update_job.go b/typedapi/ml/updatejob/update_job.go index bd379b33be..29481b30c9 100644 --- a/typedapi/ml/updatejob/update_job.go +++ b/typedapi/ml/updatejob/update_job.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update an anomaly detection job. +// // Updates certain properties of an anomaly detection job. package updatejob @@ -83,6 +84,7 @@ func NewUpdateJobFunc(tp elastictransport.Interface) NewUpdateJob { } // Update an anomaly detection job. +// // Updates certain properties of an anomaly detection job. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-job diff --git a/typedapi/ml/updatemodelsnapshot/request.go b/typedapi/ml/updatemodelsnapshot/request.go index df23c8c3cd..38ff216c03 100644 --- a/typedapi/ml/updatemodelsnapshot/request.go +++ b/typedapi/ml/updatemodelsnapshot/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatemodelsnapshot @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package updatemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_model_snapshot/MlUpdateModelSnapshotRequest.ts#L23-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_model_snapshot/MlUpdateModelSnapshotRequest.ts#L23-L64 type Request struct { - // Description A description of the model snapshot. Description *string `json:"description,omitempty"` // Retain If `true`, this snapshot will not be deleted during automatic cleanup of diff --git a/typedapi/ml/updatemodelsnapshot/response.go b/typedapi/ml/updatemodelsnapshot/response.go index 5c4965cf32..aadb5b99b9 100644 --- a/typedapi/ml/updatemodelsnapshot/response.go +++ b/typedapi/ml/updatemodelsnapshot/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatemodelsnapshot @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_model_snapshot/MlUpdateModelSnapshotResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_model_snapshot/MlUpdateModelSnapshotResponse.ts#L22-L27 type Response struct { Acknowledged bool `json:"acknowledged"` Model types.ModelSnapshot `json:"model"` diff --git a/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go b/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go index 9f9031a9bb..6d6a46f5af 100644 --- a/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go +++ b/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update a snapshot. +// // Updates certain properties of a snapshot. package updatemodelsnapshot @@ -88,6 +89,7 @@ func NewUpdateModelSnapshotFunc(tp elastictransport.Interface) NewUpdateModelSna } // Update a snapshot. +// // Updates certain properties of a snapshot. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-model-snapshot diff --git a/typedapi/ml/updatetrainedmodeldeployment/request.go b/typedapi/ml/updatetrainedmodeldeployment/request.go index 8febf2deb0..0173050e4b 100644 --- a/typedapi/ml/updatetrainedmodeldeployment/request.go +++ b/typedapi/ml/updatetrainedmodeldeployment/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatetrainedmodeldeployment @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package updatetrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L25-L78 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L25-L79 type Request struct { - // AdaptiveAllocations Adaptive allocations configuration. When enabled, the number of allocations // is set based on the current load. // If adaptive_allocations is enabled, do not set the number of allocations diff --git a/typedapi/ml/updatetrainedmodeldeployment/response.go b/typedapi/ml/updatetrainedmodeldeployment/response.go index ac7226efaa..ea2181efe7 100644 --- a/typedapi/ml/updatetrainedmodeldeployment/response.go +++ b/typedapi/ml/updatetrainedmodeldeployment/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatetrainedmodeldeployment @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatetrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentResponse.ts#L22-L26 type Response struct { Assignment types.TrainedModelAssignment `json:"assignment"` } diff --git a/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go b/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go index 99e7ebbeb2..b4761dfaa6 100644 --- a/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go +++ b/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update a trained model deployment. package updatetrainedmodeldeployment diff --git a/typedapi/ml/upgradejobsnapshot/response.go b/typedapi/ml/upgradejobsnapshot/response.go index 43abdd5a35..d1f524e1e6 100644 --- a/typedapi/ml/upgradejobsnapshot/response.go +++ b/typedapi/ml/upgradejobsnapshot/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package upgradejobsnapshot // Response holds the response body struct for the package upgradejobsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/upgrade_job_snapshot/MlUpgradeJobSnapshotResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/upgrade_job_snapshot/MlUpgradeJobSnapshotResponse.ts#L22-L31 type Response struct { - // Completed When true, this means the task is complete. When false, it is still running. Completed bool `json:"completed"` // Node The ID of the node that the upgrade task was started on if it is still diff --git a/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go b/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go index ac34bef10b..8714283675 100644 --- a/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go +++ b/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Upgrade a snapshot. +// // Upgrade an anomaly detection model snapshot to the latest major version. // Over time, older snapshot formats are deprecated and removed. Anomaly // detection jobs support only snapshots that are from the current or previous @@ -91,6 +92,7 @@ func NewUpgradeJobSnapshotFunc(tp elastictransport.Interface) NewUpgradeJobSnaps } // Upgrade a snapshot. +// // Upgrade an anomaly detection model snapshot to the latest major version. // Over time, older snapshot formats are deprecated and removed. Anomaly // detection jobs support only snapshots that are from the current or previous diff --git a/typedapi/ml/validate/request.go b/typedapi/ml/validate/request.go index 1b006f1dcb..b95557b56d 100644 --- a/typedapi/ml/validate/request.go +++ b/typedapi/ml/validate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package validate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package validate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/validate/MlValidateJobRequest.ts#L27-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/validate/MlValidateJobRequest.ts#L27-L53 type Request struct { AnalysisConfig *types.AnalysisConfig `json:"analysis_config,omitempty"` AnalysisLimits *types.AnalysisLimits `json:"analysis_limits,omitempty"` diff --git a/typedapi/ml/validate/response.go b/typedapi/ml/validate/response.go index e258f90971..6ff637234f 100644 --- a/typedapi/ml/validate/response.go +++ b/typedapi/ml/validate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package validate // Response holds the response body struct for the package validate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/validate/MlValidateJobResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/validate/MlValidateJobResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/validate/validate.go b/typedapi/ml/validate/validate.go index 590e7b79ca..3ed502c2a6 100644 --- a/typedapi/ml/validate/validate.go +++ b/typedapi/ml/validate/validate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Validate an anomaly detection job. package validate diff --git a/typedapi/ml/validatedetector/request.go b/typedapi/ml/validatedetector/request.go index 6055371b78..bffde527fb 100644 --- a/typedapi/ml/validatedetector/request.go +++ b/typedapi/ml/validatedetector/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package validatedetector @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package validatedetector // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/validate_detector/MlValidateDetectorRequest.ts#L23-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/validate_detector/MlValidateDetectorRequest.ts#L23-L41 type Request = types.Detector // NewRequest returns a Request diff --git a/typedapi/ml/validatedetector/response.go b/typedapi/ml/validatedetector/response.go index cf1ae97b69..2b372c7686 100644 --- a/typedapi/ml/validatedetector/response.go +++ b/typedapi/ml/validatedetector/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package validatedetector // Response holds the response body struct for the package validatedetector // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/validate_detector/MlValidateDetectorResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/validate_detector/MlValidateDetectorResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/ml/validatedetector/validate_detector.go b/typedapi/ml/validatedetector/validate_detector.go index 169006249d..d1094184a4 100644 --- a/typedapi/ml/validatedetector/validate_detector.go +++ b/typedapi/ml/validatedetector/validate_detector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Validate an anomaly detection job. package validatedetector diff --git a/typedapi/monitoring/bulk/bulk.go b/typedapi/monitoring/bulk/bulk.go index fe7cbcbca0..6ca85b18c1 100644 --- a/typedapi/monitoring/bulk/bulk.go +++ b/typedapi/monitoring/bulk/bulk.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Send monitoring data. +// // This API is used by the monitoring features to send monitoring data. package bulk @@ -38,10 +39,6 @@ import ( "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) -const ( - type_Mask = iota + 1 -) - // ErrBuildPath is returned in case of missing parameters within the build of the request. var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") @@ -60,8 +57,6 @@ type Bulk struct { paramSet int - type_ string - spanStarted bool instrument elastictransport.Instrumentation @@ -81,6 +76,7 @@ func NewBulkFunc(tp elastictransport.Interface) NewBulk { } // Send monitoring data. +// // This API is used by the monitoring features to send monitoring data. // // https://www.elastic.co/docs/api/doc/elasticsearch @@ -165,19 +161,6 @@ func (r *Bulk) HttpRequest(ctx context.Context) (*http.Request, error) { path.WriteString("/") path.WriteString("bulk") - method = http.MethodPost - case r.paramSet == type_Mask: - path.WriteString("/") - path.WriteString("_monitoring") - path.WriteString("/") - - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordPathPart(ctx, "type_", r.type_) - } - path.WriteString(r.type_) - path.WriteString("/") - path.WriteString("bulk") - method = http.MethodPost } @@ -316,15 +299,6 @@ func (r *Bulk) Header(key, value string) *Bulk { return r } -// Type Default document type for items which don't provide one -// API Name: type_ -func (r *Bulk) Type(type_ string) *Bulk { - r.paramSet |= type_Mask - r.type_ = type_ - - return r -} - // SystemId Identifier of the monitored system // API name: system_id func (r *Bulk) SystemId(systemid string) *Bulk { diff --git a/typedapi/monitoring/bulk/request.go b/typedapi/monitoring/bulk/request.go index 860c420d5a..66aebea933 100644 --- a/typedapi/monitoring/bulk/request.go +++ b/typedapi/monitoring/bulk/request.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulk // Request holds the request body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/monitoring/bulk/BulkMonitoringRequest.ts#L24-L73 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/monitoring/bulk/BulkMonitoringRequest.ts#L24-L60 type Request = []any diff --git a/typedapi/monitoring/bulk/response.go b/typedapi/monitoring/bulk/response.go index 64195cb17a..4ac92cce65 100644 --- a/typedapi/monitoring/bulk/response.go +++ b/typedapi/monitoring/bulk/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulk @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/monitoring/bulk/BulkMonitoringResponse.ts#L23-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/monitoring/bulk/BulkMonitoringResponse.ts#L23-L32 type Response struct { Error *types.ErrorCause `json:"error,omitempty"` // Errors True if there is was an error diff --git a/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go b/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go index 2121268e38..45964e84f4 100644 --- a/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go +++ b/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear the archived repositories metering. +// // Clear the archived repositories metering information in the cluster. package clearrepositoriesmeteringarchive @@ -83,6 +84,7 @@ func NewClearRepositoriesMeteringArchiveFunc(tp elastictransport.Interface) NewC } // Clear the archived repositories metering. +// // Clear the archived repositories metering information in the cluster. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive diff --git a/typedapi/nodes/clearrepositoriesmeteringarchive/response.go b/typedapi/nodes/clearrepositoriesmeteringarchive/response.go index b09572a6e1..57e0229ed3 100644 --- a/typedapi/nodes/clearrepositoriesmeteringarchive/response.go +++ b/typedapi/nodes/clearrepositoriesmeteringarchive/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearrepositoriesmeteringarchive @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package clearrepositoriesmeteringarchive // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L37-L40 type Response struct { - // ClusterName Name of the cluster. Based on the `cluster.name` setting. ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go b/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go index e9f5955241..64349033ce 100644 --- a/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go +++ b/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get cluster repositories metering. +// // Get repositories metering information for a cluster. // This API exposes monotonically non-decreasing counters and it is expected // that clients would durably store the information needed to compute @@ -83,6 +84,7 @@ func NewGetRepositoriesMeteringInfoFunc(tp elastictransport.Interface) NewGetRep } // Get cluster repositories metering. +// // Get repositories metering information for a cluster. // This API exposes monotonically non-decreasing counters and it is expected // that clients would durably store the information needed to compute diff --git a/typedapi/nodes/getrepositoriesmeteringinfo/response.go b/typedapi/nodes/getrepositoriesmeteringinfo/response.go index 51397b9629..5181decced 100644 --- a/typedapi/nodes/getrepositoriesmeteringinfo/response.go +++ b/typedapi/nodes/getrepositoriesmeteringinfo/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getrepositoriesmeteringinfo @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package getrepositoriesmeteringinfo // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/get_repositories_metering_info/GetRepositoriesMeteringInfoResponse.ts#L36-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/get_repositories_metering_info/GetRepositoriesMeteringInfoResponse.ts#L36-L39 type Response struct { - // ClusterName Name of the cluster. Based on the `cluster.name` setting. ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/hotthreads/hot_threads.go b/typedapi/nodes/hotthreads/hot_threads.go index c4ac263033..94e2021f11 100644 --- a/typedapi/nodes/hotthreads/hot_threads.go +++ b/typedapi/nodes/hotthreads/hot_threads.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the hot threads for nodes. +// // Get a breakdown of the hot threads on each selected node in the cluster. // The output is plain text with a breakdown of the top hot threads for each // node. @@ -79,6 +80,7 @@ func NewHotThreadsFunc(tp elastictransport.Interface) NewHotThreads { } // Get the hot threads for nodes. +// // Get a breakdown of the hot threads on each selected node in the cluster. // The output is plain text with a breakdown of the top hot threads for each // node. diff --git a/typedapi/nodes/hotthreads/response.go b/typedapi/nodes/hotthreads/response.go index a06008b55e..ab71b5871e 100644 --- a/typedapi/nodes/hotthreads/response.go +++ b/typedapi/nodes/hotthreads/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package hotthreads // Response holds the response body struct for the package hotthreads // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/hot_threads/NodesHotThreadsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/hot_threads/NodesHotThreadsResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/nodes/info/info.go b/typedapi/nodes/info/info.go index 782bce3185..bcd12b0e01 100644 --- a/typedapi/nodes/info/info.go +++ b/typedapi/nodes/info/info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get node information. // diff --git a/typedapi/nodes/info/response.go b/typedapi/nodes/info/response.go index c4004268a3..1fcde89d77 100644 --- a/typedapi/nodes/info/response.go +++ b/typedapi/nodes/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/NodesInfoResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/NodesInfoResponse.ts#L30-L33 type Response struct { ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go b/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go index ccd277f461..b047649abc 100644 --- a/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go +++ b/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Reload the keystore on nodes in the cluster. // diff --git a/typedapi/nodes/reloadsecuresettings/request.go b/typedapi/nodes/reloadsecuresettings/request.go index 04b4c4d24d..c666b7b2a4 100644 --- a/typedapi/nodes/reloadsecuresettings/request.go +++ b/typedapi/nodes/reloadsecuresettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package reloadsecuresettings @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package reloadsecuresettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/reload_secure_settings/ReloadSecureSettingsRequest.ts#L24-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/reload_secure_settings/ReloadSecureSettingsRequest.ts#L24-L70 type Request struct { - // SecureSettingsPassword The password for the Elasticsearch keystore. SecureSettingsPassword *string `json:"secure_settings_password,omitempty"` } diff --git a/typedapi/nodes/reloadsecuresettings/response.go b/typedapi/nodes/reloadsecuresettings/response.go index 099b2b0a79..6bf2b38079 100644 --- a/typedapi/nodes/reloadsecuresettings/response.go +++ b/typedapi/nodes/reloadsecuresettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package reloadsecuresettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reloadsecuresettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/reload_secure_settings/ReloadSecureSettingsResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/reload_secure_settings/ReloadSecureSettingsResponse.ts#L30-L33 type Response struct { ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/stats/response.go b/typedapi/nodes/stats/response.go index cc5fef9162..636e8f0a97 100644 --- a/typedapi/nodes/stats/response.go +++ b/typedapi/nodes/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/stats/NodesStatsResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/stats/NodesStatsResponse.ts#L30-L33 type Response struct { ClusterName *string `json:"cluster_name,omitempty"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/stats/stats.go b/typedapi/nodes/stats/stats.go index 8e82221333..326adc11cc 100644 --- a/typedapi/nodes/stats/stats.go +++ b/typedapi/nodes/stats/stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get node statistics. +// // Get statistics for nodes in a cluster. // By default, all stats are returned. You can limit the returned information by // using metrics. @@ -37,7 +38,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/level" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/nodestatslevel" ) const ( @@ -85,6 +86,7 @@ func NewStatsFunc(tp elastictransport.Interface) NewStats { } // Get node statistics. +// // Get statistics for nodes in a cluster. // By default, all stats are returned. You can limit the returned information by // using metrics. @@ -456,10 +458,10 @@ func (r *Stats) IncludeSegmentFileSizes(includesegmentfilesizes bool) *Stats { return r } -// Level Indicates whether statistics are aggregated at the cluster, index, or shard +// Level Indicates whether statistics are aggregated at the node, indices, or shards // level. // API name: level -func (r *Stats) Level(level level.Level) *Stats { +func (r *Stats) Level(level nodestatslevel.NodeStatsLevel) *Stats { r.values.Set("level", level.String()) return r diff --git a/typedapi/nodes/usage/response.go b/typedapi/nodes/usage/response.go index 026b2732ee..2c483b0c61 100644 --- a/typedapi/nodes/usage/response.go +++ b/typedapi/nodes/usage/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package usage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package usage // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/usage/NodesUsageResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/usage/NodesUsageResponse.ts#L30-L33 type Response struct { ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/usage/usage.go b/typedapi/nodes/usage/usage.go index fd14c81230..21be4f2855 100644 --- a/typedapi/nodes/usage/usage.go +++ b/typedapi/nodes/usage/usage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get feature usage information. package usage @@ -342,7 +342,8 @@ func (r *Usage) NodeId(nodeid string) *Usage { } // Metric Limits the information returned to the specific metrics. -// A comma-separated list of the following options: `_all`, `rest_actions`. +// A comma-separated list of the following options: `_all`, `rest_actions`, +// `aggregations`. // API Name: metric func (r *Usage) Metric(metric string) *Usage { r.paramSet |= metricMask diff --git a/typedapi/profiling/flamegraph/flamegraph.go b/typedapi/profiling/flamegraph/flamegraph.go index 27410bb940..34c56ca3b0 100644 --- a/typedapi/profiling/flamegraph/flamegraph.go +++ b/typedapi/profiling/flamegraph/flamegraph.go @@ -16,22 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Extracts a UI-optimized structure to render flamegraphs from Universal -// Profiling. +// Returns basic information about the status of Universal Profiling. package flamegraph import ( + gobytes "bytes" "context" + "encoding/json" "errors" "fmt" "io" "net/http" "net/url" + "strconv" "strings" "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -46,6 +49,10 @@ type Flamegraph struct { raw io.Reader + req any + deferred []func(request any) error + buf *gobytes.Buffer + paramSet int spanStarted bool @@ -66,8 +73,7 @@ func NewFlamegraphFunc(tp elastictransport.Interface) NewFlamegraph { } } -// Extracts a UI-optimized structure to render flamegraphs from Universal -// Profiling. +// Returns basic information about the status of Universal Profiling. // // https://www.elastic.co/guide/en/observability/current/universal-profiling.html func New(tp elastictransport.Interface) *Flamegraph { @@ -75,6 +81,8 @@ func New(tp elastictransport.Interface) *Flamegraph { transport: tp, values: make(url.Values), headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), } if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { @@ -86,6 +94,28 @@ func New(tp elastictransport.Interface) *Flamegraph { return r } +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *Flamegraph) Raw(raw io.Reader) *Flamegraph { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *Flamegraph) Request(req any) *Flamegraph { + r.req = req + + return r +} + +// Conditions allows to set the request property with the appropriate payload. +func (r *Flamegraph) Conditions(conditions any) *Flamegraph { + r.req = conditions + + return r +} + // HttpRequest returns the http.Request object built from the // given parameters. func (r *Flamegraph) HttpRequest(ctx context.Context) (*http.Request, error) { @@ -95,6 +125,31 @@ func (r *Flamegraph) HttpRequest(ctx context.Context) (*http.Request, error) { var err error + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for Flamegraph: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + r.path.Scheme = "http" switch { @@ -182,13 +237,7 @@ func (r Flamegraph) Perform(providedCtx context.Context) (*http.Response, error) } // Do runs the request through the transport, handle the response and returns a flamegraph.Response -func (r Flamegraph) Do(ctx context.Context) (bool, error) { - return r.IsSuccess(ctx) -} - -// IsSuccess allows to run a query with a context and retrieve the result as a boolean. -// This only exists for endpoints without a request payload and allows for quick control flow. -func (r Flamegraph) IsSuccess(providedCtx context.Context) (bool, error) { +func (r Flamegraph) Do(providedCtx context.Context) (Response, error) { var ctx context.Context r.spanStarted = true if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -199,30 +248,46 @@ func (r Flamegraph) IsSuccess(providedCtx context.Context) (bool, error) { ctx = providedCtx } - res, err := r.Perform(ctx) + response := new(Response) + res, err := r.Perform(ctx) if err != nil { - return false, err - } - io.Copy(io.Discard, res.Body) - err = res.Body.Close() - if err != nil { - return false, err + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(&response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } - if res.StatusCode >= 200 && res.StatusCode < 300 { - return true, nil + return *response, nil } - if res.StatusCode != 404 { - err := fmt.Errorf("an error happened during the Flamegraph query execution, status code: %d", res.StatusCode) + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { instrument.RecordError(ctx, err) } - return false, err + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode } - return false, nil + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse } // Header set a key, value pair in the Flamegraph headers map. @@ -231,3 +296,47 @@ func (r *Flamegraph) Header(key, value string) *Flamegraph { return r } + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *Flamegraph) ErrorTrace(errortrace bool) *Flamegraph { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *Flamegraph) FilterPath(filterpaths ...string) *Flamegraph { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *Flamegraph) Human(human bool) *Flamegraph { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *Flamegraph) Pretty(pretty bool) *Flamegraph { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/profiling/flamegraph/request.go b/typedapi/profiling/flamegraph/request.go new file mode 100644 index 0000000000..84a6d59c38 --- /dev/null +++ b/typedapi/profiling/flamegraph/request.go @@ -0,0 +1,37 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package flamegraph + +import ( + "encoding/json" +) + +// Request holds the request body struct for the package flamegraph +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/profiling/flamegraph/ProfilingFlamegraphRequest.ts#L23-L39 +type Request = json.RawMessage + +// NewRequest returns a Request +func NewRequest() *Request { + r := new(json.RawMessage) + + return r +} diff --git a/typedapi/profiling/flamegraph/response.go b/typedapi/profiling/flamegraph/response.go new file mode 100644 index 0000000000..70d97f04ad --- /dev/null +++ b/typedapi/profiling/flamegraph/response.go @@ -0,0 +1,35 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package flamegraph + +import ( + "encoding/json" +) + +// Response holds the response body struct for the package flamegraph +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/profiling/flamegraph/ProfilingFlamegraphResponse.ts#L22-L25 + +type Response = json.RawMessage + +func NewResponse() *Response { + return new(Response) +} diff --git a/typedapi/profiling/stacktraces/request.go b/typedapi/profiling/stacktraces/request.go new file mode 100644 index 0000000000..81eeae4e60 --- /dev/null +++ b/typedapi/profiling/stacktraces/request.go @@ -0,0 +1,37 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package stacktraces + +import ( + "encoding/json" +) + +// Request holds the request body struct for the package stacktraces +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/profiling/stacktraces/ProfilingStacktracesRequest.ts#L23-L39 +type Request = json.RawMessage + +// NewRequest returns a Request +func NewRequest() *Request { + r := new(json.RawMessage) + + return r +} diff --git a/typedapi/profiling/stacktraces/response.go b/typedapi/profiling/stacktraces/response.go new file mode 100644 index 0000000000..ce3c5e81b9 --- /dev/null +++ b/typedapi/profiling/stacktraces/response.go @@ -0,0 +1,35 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package stacktraces + +import ( + "encoding/json" +) + +// Response holds the response body struct for the package stacktraces +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/profiling/stacktraces/ProfilingStacktracesResponse.ts#L22-L25 + +type Response = json.RawMessage + +func NewResponse() *Response { + return new(Response) +} diff --git a/typedapi/profiling/stacktraces/stacktraces.go b/typedapi/profiling/stacktraces/stacktraces.go index 9e07ba1709..e2326d3a78 100644 --- a/typedapi/profiling/stacktraces/stacktraces.go +++ b/typedapi/profiling/stacktraces/stacktraces.go @@ -16,21 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Extracts raw stacktrace information from Universal Profiling. package stacktraces import ( + gobytes "bytes" "context" + "encoding/json" "errors" "fmt" "io" "net/http" "net/url" + "strconv" "strings" "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -45,6 +49,10 @@ type Stacktraces struct { raw io.Reader + req any + deferred []func(request any) error + buf *gobytes.Buffer + paramSet int spanStarted bool @@ -73,6 +81,8 @@ func New(tp elastictransport.Interface) *Stacktraces { transport: tp, values: make(url.Values), headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), } if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { @@ -84,6 +94,28 @@ func New(tp elastictransport.Interface) *Stacktraces { return r } +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *Stacktraces) Raw(raw io.Reader) *Stacktraces { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *Stacktraces) Request(req any) *Stacktraces { + r.req = req + + return r +} + +// Conditions allows to set the request property with the appropriate payload. +func (r *Stacktraces) Conditions(conditions any) *Stacktraces { + r.req = conditions + + return r +} + // HttpRequest returns the http.Request object built from the // given parameters. func (r *Stacktraces) HttpRequest(ctx context.Context) (*http.Request, error) { @@ -93,6 +125,31 @@ func (r *Stacktraces) HttpRequest(ctx context.Context) (*http.Request, error) { var err error + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for Stacktraces: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + r.path.Scheme = "http" switch { @@ -180,13 +237,7 @@ func (r Stacktraces) Perform(providedCtx context.Context) (*http.Response, error } // Do runs the request through the transport, handle the response and returns a stacktraces.Response -func (r Stacktraces) Do(ctx context.Context) (bool, error) { - return r.IsSuccess(ctx) -} - -// IsSuccess allows to run a query with a context and retrieve the result as a boolean. -// This only exists for endpoints without a request payload and allows for quick control flow. -func (r Stacktraces) IsSuccess(providedCtx context.Context) (bool, error) { +func (r Stacktraces) Do(providedCtx context.Context) (Response, error) { var ctx context.Context r.spanStarted = true if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -197,30 +248,46 @@ func (r Stacktraces) IsSuccess(providedCtx context.Context) (bool, error) { ctx = providedCtx } - res, err := r.Perform(ctx) + response := new(Response) + res, err := r.Perform(ctx) if err != nil { - return false, err - } - io.Copy(io.Discard, res.Body) - err = res.Body.Close() - if err != nil { - return false, err + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(&response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } - if res.StatusCode >= 200 && res.StatusCode < 300 { - return true, nil + return *response, nil } - if res.StatusCode != 404 { - err := fmt.Errorf("an error happened during the Stacktraces query execution, status code: %d", res.StatusCode) + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { instrument.RecordError(ctx, err) } - return false, err + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode } - return false, nil + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse } // Header set a key, value pair in the Stacktraces headers map. @@ -229,3 +296,47 @@ func (r *Stacktraces) Header(key, value string) *Stacktraces { return r } + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *Stacktraces) ErrorTrace(errortrace bool) *Stacktraces { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *Stacktraces) FilterPath(filterpaths ...string) *Stacktraces { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *Stacktraces) Human(human bool) *Stacktraces { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *Stacktraces) Pretty(pretty bool) *Stacktraces { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/profiling/status/response.go b/typedapi/profiling/status/response.go new file mode 100644 index 0000000000..fbc6d77026 --- /dev/null +++ b/typedapi/profiling/status/response.go @@ -0,0 +1,38 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package status + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/profilingoperationmode" +) + +// Response holds the response body struct for the package status +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/profiling/status/ProfilingStatusResponse.ts#L22-L24 +type Response struct { + OperationMode profilingoperationmode.ProfilingOperationMode `json:"operation_mode"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/profiling/status/status.go b/typedapi/profiling/status/status.go index 55bcc2565a..04a959d6a2 100644 --- a/typedapi/profiling/status/status.go +++ b/typedapi/profiling/status/status.go @@ -16,21 +16,24 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Returns basic information about the status of Universal Profiling. package status import ( "context" + "encoding/json" "errors" "fmt" "io" "net/http" "net/url" + "strconv" "strings" "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -174,8 +177,57 @@ func (r Status) Perform(providedCtx context.Context) (*http.Response, error) { } // Do runs the request through the transport, handle the response and returns a status.Response -func (r Status) Do(ctx context.Context) (bool, error) { - return r.IsSuccess(ctx) +func (r Status) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "profiling.status") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse } // IsSuccess allows to run a query with a context and retrieve the result as a boolean. @@ -223,3 +275,75 @@ func (r *Status) Header(key, value string) *Status { return r } + +// MasterTimeout 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: master_timeout +func (r *Status) MasterTimeout(duration string) *Status { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout Period to wait for a response. +// If no response is received before the timeout expires, the request fails and +// returns an error. +// API name: timeout +func (r *Status) Timeout(duration string) *Status { + r.values.Set("timeout", duration) + + return r +} + +// WaitForResourcesCreated Whether to return immediately or wait until resources have been created +// API name: wait_for_resources_created +func (r *Status) WaitForResourcesCreated(waitforresourcescreated bool) *Status { + r.values.Set("wait_for_resources_created", strconv.FormatBool(waitforresourcescreated)) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *Status) ErrorTrace(errortrace bool) *Status { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *Status) FilterPath(filterpaths ...string) *Status { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *Status) Human(human bool) *Status { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *Status) Pretty(pretty bool) *Status { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/profiling/topnfunctions/topn_functions.go b/typedapi/profiling/topnfunctions/topn_functions.go index e6595052a3..c78ea1d11d 100644 --- a/typedapi/profiling/topnfunctions/topn_functions.go +++ b/typedapi/profiling/topnfunctions/topn_functions.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Extracts a list of topN functions from Universal Profiling. +// Extracts a list of topN functions from Universal Profiling package topnfunctions import ( @@ -65,7 +65,7 @@ func NewTopnFunctionsFunc(tp elastictransport.Interface) NewTopnFunctions { } } -// Extracts a list of topN functions from Universal Profiling. +// Extracts a list of topN functions from Universal Profiling // // https://www.elastic.co/guide/en/observability/current/universal-profiling.html func New(tp elastictransport.Interface) *TopnFunctions { diff --git a/typedapi/project/tags/response.go b/typedapi/project/tags/response.go new file mode 100644 index 0000000000..b95cae5acf --- /dev/null +++ b/typedapi/project/tags/response.go @@ -0,0 +1,42 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package tags + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package tags +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/project/tags/TagsResponse.ts#L38-L43 +type Response struct { + LinkedProjects map[string]types.Tags `json:"linked_projects,omitempty"` + Origin map[string]types.Tags `json:"origin"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{ + LinkedProjects: make(map[string]types.Tags, 0), + Origin: make(map[string]types.Tags, 0), + } + return r +} diff --git a/typedapi/project/tags/tags.go b/typedapi/project/tags/tags.go new file mode 100644 index 0000000000..4f77605bc9 --- /dev/null +++ b/typedapi/project/tags/tags.go @@ -0,0 +1,334 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Get tags. +// +// Get the tags that are defined for the project. +package tags + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type Tags struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewTags type alias for index. +type NewTags func() *Tags + +// NewTagsFunc returns a new instance of Tags with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewTagsFunc(tp elastictransport.Interface) NewTags { + return func() *Tags { + n := New(tp) + + return n + } +} + +// Get tags. +// +// Get the tags that are defined for the project. +// +// https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-project-tags +func New(tp elastictransport.Interface) *Tags { + r := &Tags{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *Tags) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == 0: + path.WriteString("/") + path.WriteString("_project") + path.WriteString("/") + path.WriteString("tags") + + method = http.MethodPost + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r Tags) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "project.tags") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "project.tags") + if reader := instrument.RecordRequestBody(ctx, "project.tags", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "project.tags") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the Tags query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a tags.Response +func (r Tags) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "project.tags") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r Tags) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "project.tags") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the Tags query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the Tags headers map. +func (r *Tags) Header(key, value string) *Tags { + r.headers.Set(key, value) + + return r +} + +// ProjectRouting A Lucene query using project metadata tags used to filter which projects are +// returned in the response, such as _alias:_origin or _alias:*pr*. +// API name: project_routing +func (r *Tags) ProjectRouting(projectrouting string) *Tags { + r.values.Set("project_routing", projectrouting) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *Tags) ErrorTrace(errortrace bool) *Tags { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *Tags) FilterPath(filterpaths ...string) *Tags { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *Tags) Human(human bool) *Tags { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *Tags) Pretty(pretty bool) *Tags { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/queryrules/deleterule/delete_rule.go b/typedapi/queryrules/deleterule/delete_rule.go index 6c464b8940..0fda89a3a9 100644 --- a/typedapi/queryrules/deleterule/delete_rule.go +++ b/typedapi/queryrules/deleterule/delete_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a query rule. +// // Delete a query rule within a query ruleset. // This is a destructive action that is only recoverable by re-adding the same // rule with the create or update query rule API. @@ -85,6 +86,7 @@ func NewDeleteRuleFunc(tp elastictransport.Interface) NewDeleteRule { } // Delete a query rule. +// // Delete a query rule within a query ruleset. // This is a destructive action that is only recoverable by re-adding the same // rule with the create or update query rule API. diff --git a/typedapi/queryrules/deleterule/response.go b/typedapi/queryrules/deleterule/response.go index d0bf9125e3..106b4d142b 100644 --- a/typedapi/queryrules/deleterule/response.go +++ b/typedapi/queryrules/deleterule/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleterule // Response holds the response body struct for the package deleterule // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/queryrules/deleteruleset/delete_ruleset.go b/typedapi/queryrules/deleteruleset/delete_ruleset.go index 1338556aff..1a75bed542 100644 --- a/typedapi/queryrules/deleteruleset/delete_ruleset.go +++ b/typedapi/queryrules/deleteruleset/delete_ruleset.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a query ruleset. +// // Remove a query ruleset and its associated data. // This is a destructive action that is not recoverable. package deleteruleset @@ -79,6 +80,7 @@ func NewDeleteRulesetFunc(tp elastictransport.Interface) NewDeleteRuleset { } // Delete a query ruleset. +// // Remove a query ruleset and its associated data. // This is a destructive action that is not recoverable. // diff --git a/typedapi/queryrules/deleteruleset/response.go b/typedapi/queryrules/deleteruleset/response.go index 23687fec3f..d99aeb05ec 100644 --- a/typedapi/queryrules/deleteruleset/response.go +++ b/typedapi/queryrules/deleteruleset/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteruleset // Response holds the response body struct for the package deleteruleset // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/delete_ruleset/QueryRulesetDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/delete_ruleset/QueryRulesetDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/queryrules/getrule/get_rule.go b/typedapi/queryrules/getrule/get_rule.go index 8af122ae7a..4159c66980 100644 --- a/typedapi/queryrules/getrule/get_rule.go +++ b/typedapi/queryrules/getrule/get_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a query rule. +// // Get details about a query rule within a query ruleset. package getrule @@ -83,6 +84,7 @@ func NewGetRuleFunc(tp elastictransport.Interface) NewGetRule { } // Get a query rule. +// // Get details about a query rule within a query ruleset. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-rule diff --git a/typedapi/queryrules/getrule/response.go b/typedapi/queryrules/getrule/response.go index 7f2bee7012..e60c633047 100644 --- a/typedapi/queryrules/getrule/response.go +++ b/typedapi/queryrules/getrule/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getrule @@ -27,9 +27,8 @@ import ( // Response holds the response body struct for the package getrule // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/get_rule/QueryRuleGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/get_rule/QueryRuleGetResponse.ts#L22-L25 type Response struct { - // Actions The actions to take when the rule is matched. // The format of this action depends on the rule type. Actions types.QueryRuleActions `json:"actions"` diff --git a/typedapi/queryrules/getruleset/get_ruleset.go b/typedapi/queryrules/getruleset/get_ruleset.go index b6ed5049fd..225c5e966d 100644 --- a/typedapi/queryrules/getruleset/get_ruleset.go +++ b/typedapi/queryrules/getruleset/get_ruleset.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a query ruleset. +// // Get details about a query ruleset. package getruleset @@ -78,6 +79,7 @@ func NewGetRulesetFunc(tp elastictransport.Interface) NewGetRuleset { } // Get a query ruleset. +// // Get details about a query ruleset. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset diff --git a/typedapi/queryrules/getruleset/response.go b/typedapi/queryrules/getruleset/response.go index 10e662c9ed..cf3a686b7e 100644 --- a/typedapi/queryrules/getruleset/response.go +++ b/typedapi/queryrules/getruleset/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getruleset @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package getruleset // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/get_ruleset/QueryRulesetGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/get_ruleset/QueryRulesetGetResponse.ts#L22-L25 type Response struct { - // Rules Rules associated with the query ruleset. Rules []types.QueryRule `json:"rules"` // RulesetId A unique identifier for the ruleset. diff --git a/typedapi/queryrules/listrulesets/list_rulesets.go b/typedapi/queryrules/listrulesets/list_rulesets.go index ba76238b35..53a624c9eb 100644 --- a/typedapi/queryrules/listrulesets/list_rulesets.go +++ b/typedapi/queryrules/listrulesets/list_rulesets.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get all query rulesets. +// // Get summarized information about the query rulesets. package listrulesets @@ -70,6 +71,7 @@ func NewListRulesetsFunc(tp elastictransport.Interface) NewListRulesets { } // Get all query rulesets. +// // Get summarized information about the query rulesets. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets diff --git a/typedapi/queryrules/listrulesets/response.go b/typedapi/queryrules/listrulesets/response.go index 3c4b19322f..dbc6131954 100644 --- a/typedapi/queryrules/listrulesets/response.go +++ b/typedapi/queryrules/listrulesets/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package listrulesets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listrulesets // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/list_rulesets/QueryRulesetListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/list_rulesets/QueryRulesetListResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Results []types.QueryRulesetListItem `json:"results"` diff --git a/typedapi/queryrules/putrule/put_rule.go b/typedapi/queryrules/putrule/put_rule.go index bcd9b91b4e..926e6b4d0d 100644 --- a/typedapi/queryrules/putrule/put_rule.go +++ b/typedapi/queryrules/putrule/put_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a query rule. +// // Create or update a query rule within a query ruleset. // // IMPORTANT: Due to limitations within pinned queries, you can only pin @@ -96,6 +97,7 @@ func NewPutRuleFunc(tp elastictransport.Interface) NewPutRule { } // Create or update a query rule. +// // Create or update a query rule within a query ruleset. // // IMPORTANT: Due to limitations within pinned queries, you can only pin diff --git a/typedapi/queryrules/putrule/request.go b/typedapi/queryrules/putrule/request.go index 64a289f0db..8af17bbd1f 100644 --- a/typedapi/queryrules/putrule/request.go +++ b/typedapi/queryrules/putrule/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putrule @@ -34,9 +34,8 @@ import ( // Request holds the request body struct for the package putrule // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/put_rule/QueryRulePutRequest.ts#L28-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/put_rule/QueryRulePutRequest.ts#L28-L81 type Request struct { - // Actions The actions to take when the rule is matched. // The format of this action depends on the rule type. Actions types.QueryRuleActions `json:"actions"` diff --git a/typedapi/queryrules/putrule/response.go b/typedapi/queryrules/putrule/response.go index bd25403ac5..7be8d85924 100644 --- a/typedapi/queryrules/putrule/response.go +++ b/typedapi/queryrules/putrule/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putrule @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrule // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/put_rule/QueryRulePutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/put_rule/QueryRulePutResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/queryrules/putruleset/put_ruleset.go b/typedapi/queryrules/putruleset/put_ruleset.go index 24072d5846..559b0b2be4 100644 --- a/typedapi/queryrules/putruleset/put_ruleset.go +++ b/typedapi/queryrules/putruleset/put_ruleset.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a query ruleset. +// // There is a limit of 100 rules per ruleset. // This limit can be increased by using the // `xpack.applications.rules.max_rules_per_ruleset` cluster setting. @@ -92,6 +93,7 @@ func NewPutRulesetFunc(tp elastictransport.Interface) NewPutRuleset { } // Create or update a query ruleset. +// // There is a limit of 100 rules per ruleset. // This limit can be increased by using the // `xpack.applications.rules.max_rules_per_ruleset` cluster setting. diff --git a/typedapi/queryrules/putruleset/request.go b/typedapi/queryrules/putruleset/request.go index 71a214a981..1b021cb3e8 100644 --- a/typedapi/queryrules/putruleset/request.go +++ b/typedapi/queryrules/putruleset/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putruleset @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putruleset // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L60 type Request struct { Rules []types.QueryRule `json:"rules"` } diff --git a/typedapi/queryrules/putruleset/response.go b/typedapi/queryrules/putruleset/response.go index 2c594d227a..33c7845a34 100644 --- a/typedapi/queryrules/putruleset/response.go +++ b/typedapi/queryrules/putruleset/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putruleset @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putruleset // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/put_ruleset/QueryRulesetPutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/put_ruleset/QueryRulesetPutResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/queryrules/test/request.go b/typedapi/queryrules/test/request.go index b92dde3c87..e39f1d4be3 100644 --- a/typedapi/queryrules/test/request.go +++ b/typedapi/queryrules/test/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package test @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package test // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/test/QueryRulesetTestRequest.ts#L24-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/test/QueryRulesetTestRequest.ts#L24-L58 type Request struct { - // MatchCriteria The match criteria to apply to rules in the given query ruleset. // Match criteria should match the keys defined in the `criteria.metadata` field // of the rule. diff --git a/typedapi/queryrules/test/response.go b/typedapi/queryrules/test/response.go index 26b49236a7..ddec834f8d 100644 --- a/typedapi/queryrules/test/response.go +++ b/typedapi/queryrules/test/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package test @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package test // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/test/QueryRulesetTestResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/test/QueryRulesetTestResponse.ts#L23-L28 type Response struct { MatchedRules []types.QueryRulesetMatchedRule `json:"matched_rules"` TotalMatchedRules int `json:"total_matched_rules"` diff --git a/typedapi/queryrules/test/test.go b/typedapi/queryrules/test/test.go index 1ae6424a5d..e1a5f2be3e 100644 --- a/typedapi/queryrules/test/test.go +++ b/typedapi/queryrules/test/test.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Test a query ruleset. +// // Evaluate match criteria against a query ruleset to identify the rules that // would match that criteria. package test @@ -84,6 +85,7 @@ func NewTestFunc(tp elastictransport.Interface) NewTest { } // Test a query ruleset. +// // Evaluate match criteria against a query ruleset to identify the rules that // would match that criteria. // diff --git a/typedapi/rollup/deletejob/delete_job.go b/typedapi/rollup/deletejob/delete_job.go index f2adeeab9f..13c8956583 100644 --- a/typedapi/rollup/deletejob/delete_job.go +++ b/typedapi/rollup/deletejob/delete_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a rollup job. // diff --git a/typedapi/rollup/deletejob/response.go b/typedapi/rollup/deletejob/response.go index 556f7ec65f..01ebdcee6f 100644 --- a/typedapi/rollup/deletejob/response.go +++ b/typedapi/rollup/deletejob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletejob @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deletejob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/delete_job/DeleteRollupJobResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/delete_job/DeleteRollupJobResponse.ts#L22-L27 type Response struct { Acknowledged bool `json:"acknowledged"` TaskFailures []types.TaskFailure `json:"task_failures,omitempty"` diff --git a/typedapi/rollup/getjobs/get_jobs.go b/typedapi/rollup/getjobs/get_jobs.go index d87486a1d2..7af7065d93 100644 --- a/typedapi/rollup/getjobs/get_jobs.go +++ b/typedapi/rollup/getjobs/get_jobs.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get rollup job information. +// // Get the configuration, stats, and status of rollup jobs. // // NOTE: This API returns only active (both `STARTED` and `STOPPED`) jobs. @@ -82,6 +83,7 @@ func NewGetJobsFunc(tp elastictransport.Interface) NewGetJobs { } // Get rollup job information. +// // Get the configuration, stats, and status of rollup jobs. // // NOTE: This API returns only active (both `STARTED` and `STOPPED`) jobs. diff --git a/typedapi/rollup/getjobs/response.go b/typedapi/rollup/getjobs/response.go index 2399a360be..33f10a6df0 100644 --- a/typedapi/rollup/getjobs/response.go +++ b/typedapi/rollup/getjobs/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getjobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobs // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_jobs/GetRollupJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_jobs/GetRollupJobResponse.ts#L22-L24 type Response struct { Jobs []types.RollupJob `json:"jobs"` } diff --git a/typedapi/rollup/getrollupcaps/get_rollup_caps.go b/typedapi/rollup/getrollupcaps/get_rollup_caps.go index 8a780e3262..6b438aecfb 100644 --- a/typedapi/rollup/getrollupcaps/get_rollup_caps.go +++ b/typedapi/rollup/getrollupcaps/get_rollup_caps.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the rollup job capabilities. +// // Get the capabilities of any rollup jobs that have been configured for a // specific index or index pattern. // @@ -87,6 +88,7 @@ func NewGetRollupCapsFunc(tp elastictransport.Interface) NewGetRollupCaps { } // Get the rollup job capabilities. +// // Get the capabilities of any rollup jobs that have been configured for a // specific index or index pattern. // diff --git a/typedapi/rollup/getrollupcaps/response.go b/typedapi/rollup/getrollupcaps/response.go index 2d8f242d40..20e500a87c 100644 --- a/typedapi/rollup/getrollupcaps/response.go +++ b/typedapi/rollup/getrollupcaps/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getrollupcaps @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrollupcaps // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_rollup_caps/GetRollupCapabilitiesResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_rollup_caps/GetRollupCapabilitiesResponse.ts#L24-L27 type Response map[string]types.RollupCapabilities diff --git a/typedapi/rollup/getrollupindexcaps/get_rollup_index_caps.go b/typedapi/rollup/getrollupindexcaps/get_rollup_index_caps.go index 973ecdcc68..c88e36d247 100644 --- a/typedapi/rollup/getrollupindexcaps/get_rollup_index_caps.go +++ b/typedapi/rollup/getrollupindexcaps/get_rollup_index_caps.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the rollup index capabilities. +// // Get the rollup capabilities of all jobs inside of a rollup index. // A single rollup index may store the data for multiple rollup jobs and may // have a variety of capabilities depending on those jobs. This API enables you @@ -85,6 +86,7 @@ func NewGetRollupIndexCapsFunc(tp elastictransport.Interface) NewGetRollupIndexC } // Get the rollup index capabilities. +// // Get the rollup capabilities of all jobs inside of a rollup index. // A single rollup index may store the data for multiple rollup jobs and may // have a variety of capabilities depending on those jobs. This API enables you diff --git a/typedapi/rollup/getrollupindexcaps/response.go b/typedapi/rollup/getrollupindexcaps/response.go index 4f8cfa2e5a..6f7d1dcd37 100644 --- a/typedapi/rollup/getrollupindexcaps/response.go +++ b/typedapi/rollup/getrollupindexcaps/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getrollupindexcaps @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrollupindexcaps // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_rollup_index_caps/GetRollupIndexCapabilitiesResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_rollup_index_caps/GetRollupIndexCapabilitiesResponse.ts#L24-L27 type Response map[string]types.IndexCapabilities diff --git a/typedapi/rollup/putjob/put_job.go b/typedapi/rollup/putjob/put_job.go index 5c3bc5492f..fdede2d1a7 100644 --- a/typedapi/rollup/putjob/put_job.go +++ b/typedapi/rollup/putjob/put_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a rollup job. // diff --git a/typedapi/rollup/putjob/request.go b/typedapi/rollup/putjob/request.go index dd3d7e176c..f923f385b6 100644 --- a/typedapi/rollup/putjob/request.go +++ b/typedapi/rollup/putjob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putjob @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/put_job/CreateRollupJobRequest.ts#L27-L105 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/put_job/CreateRollupJobRequest.ts#L27-L105 type Request struct { - // Cron A cron string which defines the intervals when the rollup job should be // executed. When the interval // triggers, the indexer attempts to rollup the data in the index pattern. The diff --git a/typedapi/rollup/putjob/response.go b/typedapi/rollup/putjob/response.go index 569c68a5bc..c7fe7b025c 100644 --- a/typedapi/rollup/putjob/response.go +++ b/typedapi/rollup/putjob/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putjob // Response holds the response body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/put_job/CreateRollupJobResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/put_job/CreateRollupJobResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/rollup/rollupsearch/request.go b/typedapi/rollup/rollupsearch/request.go index e16f40c7fc..392d600583 100644 --- a/typedapi/rollup/rollupsearch/request.go +++ b/typedapi/rollup/rollupsearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rollupsearch @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package rollupsearch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/rollup_search/RollupSearchRequest.ts#L27-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/rollup_search/RollupSearchRequest.ts#L27-L90 type Request struct { - // Aggregations Specifies aggregations. Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` // Query Specifies a DSL query that is subject to some limitations. diff --git a/typedapi/rollup/rollupsearch/response.go b/typedapi/rollup/rollupsearch/response.go index 1d1144b4d5..abb5764a25 100644 --- a/typedapi/rollup/rollupsearch/response.go +++ b/typedapi/rollup/rollupsearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package rollupsearch @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package rollupsearch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/rollup_search/RollupSearchResponse.ts#L27-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/rollup_search/RollupSearchResponse.ts#L27-L36 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Hits types.HitsMetadata `json:"hits"` @@ -200,6 +200,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := types.NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := types.NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -228,6 +235,20 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := types.NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := types.NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := types.NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/rollup/rollupsearch/rollup_search.go b/typedapi/rollup/rollupsearch/rollup_search.go index 7154cce2a4..287b338ebc 100644 --- a/typedapi/rollup/rollupsearch/rollup_search.go +++ b/typedapi/rollup/rollupsearch/rollup_search.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Search rolled-up data. +// // The rollup search endpoint is needed because, internally, rolled-up documents // utilize a different document structure than the original data. // It rewrites standard Query DSL into a format that matches the rollup @@ -99,6 +100,7 @@ func NewRollupSearchFunc(tp elastictransport.Interface) NewRollupSearch { } // Search rolled-up data. +// // The rollup search endpoint is needed because, internally, rolled-up documents // utilize a different document structure than the original data. // It rewrites standard Query DSL into a format that matches the rollup diff --git a/typedapi/rollup/startjob/response.go b/typedapi/rollup/startjob/response.go index 5534b6f5d1..77e3a776bb 100644 --- a/typedapi/rollup/startjob/response.go +++ b/typedapi/rollup/startjob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package startjob // Response holds the response body struct for the package startjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/start_job/StartRollupJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/start_job/StartRollupJobResponse.ts#L20-L22 type Response struct { Started bool `json:"started"` } diff --git a/typedapi/rollup/startjob/start_job.go b/typedapi/rollup/startjob/start_job.go index 57e6fea840..0839729679 100644 --- a/typedapi/rollup/startjob/start_job.go +++ b/typedapi/rollup/startjob/start_job.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start rollup jobs. +// // If you try to start a job that does not exist, an exception occurs. // If you try to start a job that is already started, nothing happens. package startjob @@ -79,6 +80,7 @@ func NewStartJobFunc(tp elastictransport.Interface) NewStartJob { } // Start rollup jobs. +// // If you try to start a job that does not exist, an exception occurs. // If you try to start a job that is already started, nothing happens. // diff --git a/typedapi/rollup/stopjob/response.go b/typedapi/rollup/stopjob/response.go index 724ec92644..807002effd 100644 --- a/typedapi/rollup/stopjob/response.go +++ b/typedapi/rollup/stopjob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stopjob // Response holds the response body struct for the package stopjob // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/stop_job/StopRollupJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/stop_job/StopRollupJobResponse.ts#L20-L22 type Response struct { Stopped bool `json:"stopped"` } diff --git a/typedapi/rollup/stopjob/stop_job.go b/typedapi/rollup/stopjob/stop_job.go index e8cd6772fb..c0be12ce5c 100644 --- a/typedapi/rollup/stopjob/stop_job.go +++ b/typedapi/rollup/stopjob/stop_job.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Stop rollup jobs. +// // If you try to stop a job that does not exist, an exception occurs. // If you try to stop a job that is already stopped, nothing happens. // @@ -92,6 +93,7 @@ func NewStopJobFunc(tp elastictransport.Interface) NewStopJob { } // Stop rollup jobs. +// // If you try to stop a job that does not exist, an exception occurs. // If you try to stop a job that is already stopped, nothing happens. // diff --git a/typedapi/searchablesnapshots/cachestats/cache_stats.go b/typedapi/searchablesnapshots/cachestats/cache_stats.go index 36e81b0602..f5e9669688 100644 --- a/typedapi/searchablesnapshots/cachestats/cache_stats.go +++ b/typedapi/searchablesnapshots/cachestats/cache_stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get cache statistics. +// // Get statistics about the shared cache for partially mounted indices. package cachestats @@ -76,6 +77,7 @@ func NewCacheStatsFunc(tp elastictransport.Interface) NewCacheStats { } // Get cache statistics. +// // Get statistics about the shared cache for partially mounted indices. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-cache-stats diff --git a/typedapi/searchablesnapshots/cachestats/response.go b/typedapi/searchablesnapshots/cachestats/response.go index fb152a264b..1d7eac9c39 100644 --- a/typedapi/searchablesnapshots/cachestats/response.go +++ b/typedapi/searchablesnapshots/cachestats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package cachestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package cachestats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/searchable_snapshots/cache_stats/Response.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/searchable_snapshots/cache_stats/Response.ts#L24-L28 type Response struct { Nodes map[string]types.Node `json:"nodes"` } diff --git a/typedapi/searchablesnapshots/clearcache/clear_cache.go b/typedapi/searchablesnapshots/clearcache/clear_cache.go index 28f1b319b6..2e62838791 100644 --- a/typedapi/searchablesnapshots/clearcache/clear_cache.go +++ b/typedapi/searchablesnapshots/clearcache/clear_cache.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear the cache. +// // Clear indices and data streams from the shared cache for partially mounted // indices. package clearcache @@ -78,6 +79,7 @@ func NewClearCacheFunc(tp elastictransport.Interface) NewClearCache { } // Clear the cache. +// // Clear indices and data streams from the shared cache for partially mounted // indices. // diff --git a/typedapi/searchablesnapshots/clearcache/response.go b/typedapi/searchablesnapshots/clearcache/response.go index 57f6bca0aa..4edfb545d2 100644 --- a/typedapi/searchablesnapshots/clearcache/response.go +++ b/typedapi/searchablesnapshots/clearcache/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearcache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcache // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheResponse.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/searchablesnapshots/mount/mount.go b/typedapi/searchablesnapshots/mount/mount.go index 3480edab84..a237f6441b 100644 --- a/typedapi/searchablesnapshots/mount/mount.go +++ b/typedapi/searchablesnapshots/mount/mount.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Mount a snapshot. +// // Mount a snapshot as a searchable snapshot index. // Do not use this API for snapshots managed by index lifecycle management // (ILM). @@ -91,6 +92,7 @@ func NewMountFunc(tp elastictransport.Interface) NewMount { } // Mount a snapshot. +// // Mount a snapshot as a searchable snapshot index. // Do not use this API for snapshots managed by index lifecycle management // (ILM). diff --git a/typedapi/searchablesnapshots/mount/request.go b/typedapi/searchablesnapshots/mount/request.go index 07cdf6d9c1..8323d05aad 100644 --- a/typedapi/searchablesnapshots/mount/request.go +++ b/typedapi/searchablesnapshots/mount/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mount @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package mount // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L26-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L26-L93 type Request struct { - // IgnoreIndexSettings The names of settings that should be removed from the index when it is // mounted. IgnoreIndexSettings []string `json:"ignore_index_settings,omitempty"` diff --git a/typedapi/searchablesnapshots/mount/response.go b/typedapi/searchablesnapshots/mount/response.go index 0d56567561..4d97048180 100644 --- a/typedapi/searchablesnapshots/mount/response.go +++ b/typedapi/searchablesnapshots/mount/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package mount @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mount // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/searchable_snapshots/mount/SearchableSnapshotsMountResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/searchable_snapshots/mount/SearchableSnapshotsMountResponse.ts#L22-L26 type Response struct { Snapshot types.MountedSnapshot `json:"snapshot"` } diff --git a/typedapi/searchablesnapshots/stats/response.go b/typedapi/searchablesnapshots/stats/response.go index 2d946eca61..6c30deafb5 100644 --- a/typedapi/searchablesnapshots/stats/response.go +++ b/typedapi/searchablesnapshots/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27 type Response struct { Stats json.RawMessage `json:"stats,omitempty"` Total json.RawMessage `json:"total,omitempty"` diff --git a/typedapi/searchablesnapshots/stats/stats.go b/typedapi/searchablesnapshots/stats/stats.go index 04d77ac1d0..a29ba18126 100644 --- a/typedapi/searchablesnapshots/stats/stats.go +++ b/typedapi/searchablesnapshots/stats/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get searchable snapshot statistics. package stats diff --git a/typedapi/searchapplication/delete/delete.go b/typedapi/searchapplication/delete/delete.go index 68cb8efa52..50a335e658 100644 --- a/typedapi/searchapplication/delete/delete.go +++ b/typedapi/searchapplication/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a search application. // diff --git a/typedapi/searchapplication/delete/response.go b/typedapi/searchapplication/delete/response.go index 7ce3326ef0..c13b5a8797 100644 --- a/typedapi/searchapplication/delete/response.go +++ b/typedapi/searchapplication/delete/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/delete/SearchApplicationsDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/delete/SearchApplicationsDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go b/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go index 9635d88251..f135071551 100644 --- a/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go +++ b/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a behavioral analytics collection. +// // The associated data stream is also deleted. package deletebehavioralanalytics @@ -78,6 +79,7 @@ func NewDeleteBehavioralAnalyticsFunc(tp elastictransport.Interface) NewDeleteBe } // Delete a behavioral analytics collection. +// // The associated data stream is also deleted. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete-behavioral-analytics diff --git a/typedapi/searchapplication/deletebehavioralanalytics/response.go b/typedapi/searchapplication/deletebehavioralanalytics/response.go index c14930606b..92a1f53e90 100644 --- a/typedapi/searchapplication/deletebehavioralanalytics/response.go +++ b/typedapi/searchapplication/deletebehavioralanalytics/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletebehavioralanalytics // Response holds the response body struct for the package deletebehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/searchapplication/get/get.go b/typedapi/searchapplication/get/get.go index d6f5f50b29..1559d795be 100644 --- a/typedapi/searchapplication/get/get.go +++ b/typedapi/searchapplication/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get search application details. package get diff --git a/typedapi/searchapplication/get/response.go b/typedapi/searchapplication/get/response.go index 86722a7da3..37691aefb4 100644 --- a/typedapi/searchapplication/get/response.go +++ b/typedapi/searchapplication/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/get/SearchApplicationsGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/get/SearchApplicationsGetResponse.ts#L22-L25 type Response struct { - // AnalyticsCollectionName Analytics collection associated to the Search Application. AnalyticsCollectionName *string `json:"analytics_collection_name,omitempty"` // Indices Indices that are part of the Search Application. diff --git a/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go b/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go index e446fcfafd..fc6411c49a 100644 --- a/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go +++ b/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get behavioral analytics collections. package getbehavioralanalytics diff --git a/typedapi/searchapplication/getbehavioralanalytics/response.go b/typedapi/searchapplication/getbehavioralanalytics/response.go index 9965a8ec64..373f8ef703 100644 --- a/typedapi/searchapplication/getbehavioralanalytics/response.go +++ b/typedapi/searchapplication/getbehavioralanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getbehavioralanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getbehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponse.ts#L24-L27 type Response map[string]types.AnalyticsCollection diff --git a/typedapi/searchapplication/list/list.go b/typedapi/searchapplication/list/list.go index 718b9a4696..53bc410a53 100644 --- a/typedapi/searchapplication/list/list.go +++ b/typedapi/searchapplication/list/list.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get search applications. +// // Get information about search applications. package list @@ -70,6 +71,7 @@ func NewListFunc(tp elastictransport.Interface) NewList { } // Get search applications. +// // Get information about search applications. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics diff --git a/typedapi/searchapplication/list/response.go b/typedapi/searchapplication/list/response.go index 8b940408b2..b02e12c5e8 100644 --- a/typedapi/searchapplication/list/response.go +++ b/typedapi/searchapplication/list/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package list @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/list/SearchApplicationsListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/list/SearchApplicationsListResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Results []types.SearchApplication `json:"results"` diff --git a/typedapi/searchapplication/postbehavioralanalyticsevent/post_behavioral_analytics_event.go b/typedapi/searchapplication/postbehavioralanalyticsevent/post_behavioral_analytics_event.go index 709daa2892..7592f5fd4d 100644 --- a/typedapi/searchapplication/postbehavioralanalyticsevent/post_behavioral_analytics_event.go +++ b/typedapi/searchapplication/postbehavioralanalyticsevent/post_behavioral_analytics_event.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a behavioral analytics collection event. package postbehavioralanalyticsevent diff --git a/typedapi/searchapplication/postbehavioralanalyticsevent/request.go b/typedapi/searchapplication/postbehavioralanalyticsevent/request.go index 1772d58704..53e7c02c44 100644 --- a/typedapi/searchapplication/postbehavioralanalyticsevent/request.go +++ b/typedapi/searchapplication/postbehavioralanalyticsevent/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package postbehavioralanalyticsevent @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package postbehavioralanalyticsevent // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostRequest.ts#L24-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostRequest.ts#L24-L59 type Request = json.RawMessage // NewRequest returns a Request diff --git a/typedapi/searchapplication/postbehavioralanalyticsevent/response.go b/typedapi/searchapplication/postbehavioralanalyticsevent/response.go index c46edac2b6..32c3c0e38a 100644 --- a/typedapi/searchapplication/postbehavioralanalyticsevent/response.go +++ b/typedapi/searchapplication/postbehavioralanalyticsevent/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package postbehavioralanalyticsevent @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package postbehavioralanalyticsevent // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostResponse.ts#L22-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostResponse.ts#L22-L47 type Response struct { Accepted bool `json:"accepted"` Event json.RawMessage `json:"event,omitempty"` diff --git a/typedapi/searchapplication/put/put.go b/typedapi/searchapplication/put/put.go index 0538cf2811..068b4c56dc 100644 --- a/typedapi/searchapplication/put/put.go +++ b/typedapi/searchapplication/put/put.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a search application. package put diff --git a/typedapi/searchapplication/put/request.go b/typedapi/searchapplication/put/request.go index 70ee79ca0a..cdfd2511e0 100644 --- a/typedapi/searchapplication/put/request.go +++ b/typedapi/searchapplication/put/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package put @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/put/SearchApplicationsPutRequest.ts#L23-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/put/SearchApplicationsPutRequest.ts#L23-L58 type Request = types.SearchApplicationParameters // NewRequest returns a Request diff --git a/typedapi/searchapplication/put/response.go b/typedapi/searchapplication/put/response.go index 4fa0a37c38..651edd84a0 100644 --- a/typedapi/searchapplication/put/response.go +++ b/typedapi/searchapplication/put/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package put @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/put/SearchApplicationsPutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/put/SearchApplicationsPutResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go b/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go index 42b0c91e5a..a8da829044 100644 --- a/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go +++ b/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a behavioral analytics collection. package putbehavioralanalytics diff --git a/typedapi/searchapplication/putbehavioralanalytics/response.go b/typedapi/searchapplication/putbehavioralanalytics/response.go index 23eb9b21e7..271fb55b55 100644 --- a/typedapi/searchapplication/putbehavioralanalytics/response.go +++ b/typedapi/searchapplication/putbehavioralanalytics/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putbehavioralanalytics // Response holds the response body struct for the package putbehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L23-L26 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/searchapplication/renderquery/render_query.go b/typedapi/searchapplication/renderquery/render_query.go index 2d406d40a3..07444adeff 100644 --- a/typedapi/searchapplication/renderquery/render_query.go +++ b/typedapi/searchapplication/renderquery/render_query.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Render a search application query. +// // Generate an Elasticsearch query using the specified query parameters and the // search template associated with the search application or a default template // if none is specified. @@ -92,6 +93,7 @@ func NewRenderQueryFunc(tp elastictransport.Interface) NewRenderQuery { } // Render a search application query. +// // Generate an Elasticsearch query using the specified query parameters and the // search template associated with the search application or a default template // if none is specified. diff --git a/typedapi/searchapplication/renderquery/request.go b/typedapi/searchapplication/renderquery/request.go index 8a3fa66a69..75c1f70ff0 100644 --- a/typedapi/searchapplication/renderquery/request.go +++ b/typedapi/searchapplication/renderquery/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package renderquery @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package renderquery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/render_query/SearchApplicationsRenderQueryRequest.ts#L24-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/render_query/SearchApplicationsRenderQueryRequest.ts#L24-L55 type Request struct { Params map[string]json.RawMessage `json:"params,omitempty"` } diff --git a/typedapi/searchapplication/renderquery/response.go b/typedapi/searchapplication/renderquery/response.go index 1bf6b8f7ca..7febad40df 100644 --- a/typedapi/searchapplication/renderquery/response.go +++ b/typedapi/searchapplication/renderquery/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package renderquery // Response holds the response body struct for the package renderquery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/render_query/SearchApplicationsRenderQueryResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/render_query/SearchApplicationsRenderQueryResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/searchapplication/search/request.go b/typedapi/searchapplication/search/request.go index 92a749ce1c..9e49498122 100644 --- a/typedapi/searchapplication/search/request.go +++ b/typedapi/searchapplication/search/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package search @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/search/SearchApplicationsSearchRequest.ts#L24-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/search/SearchApplicationsSearchRequest.ts#L24-L62 type Request struct { - // Params Query parameters specific to this request, which will override any defaults // specified in the template. Params map[string]json.RawMessage `json:"params,omitempty"` diff --git a/typedapi/searchapplication/search/response.go b/typedapi/searchapplication/search/response.go index 0b1e39e247..71a7c40fc2 100644 --- a/typedapi/searchapplication/search/response.go +++ b/typedapi/searchapplication/search/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/search/SearchApplicationsSearchResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/search/SearchApplicationsSearchResponse.ts#L22-L25 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` @@ -234,6 +234,13 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := types.NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := types.NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -262,6 +269,20 @@ func (s *Response) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := types.NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := types.NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := types.NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/searchapplication/search/search.go b/typedapi/searchapplication/search/search.go index 1782cd3e39..65a8d12e60 100644 --- a/typedapi/searchapplication/search/search.go +++ b/typedapi/searchapplication/search/search.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a search application search. +// // Generate and run an Elasticsearch query that uses the specified query // parameteter and the search template associated with the search application or // default template. @@ -87,6 +88,7 @@ func NewSearchFunc(tp elastictransport.Interface) NewSearch { } // Run a search application search. +// // Generate and run an Elasticsearch query that uses the specified query // parameteter and the search template associated with the search application or // default template. diff --git a/typedapi/security/activateuserprofile/activate_user_profile.go b/typedapi/security/activateuserprofile/activate_user_profile.go index 94f8ee05b4..00024eb174 100644 --- a/typedapi/security/activateuserprofile/activate_user_profile.go +++ b/typedapi/security/activateuserprofile/activate_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Activate a user profile. // diff --git a/typedapi/security/activateuserprofile/request.go b/typedapi/security/activateuserprofile/request.go index 112c627f3c..793cb43784 100644 --- a/typedapi/security/activateuserprofile/request.go +++ b/typedapi/security/activateuserprofile/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package activateuserprofile @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package activateuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/activate_user_profile/Request.ts#L23-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/activate_user_profile/Request.ts#L23-L76 type Request struct { - // AccessToken The user's Elasticsearch access token or JWT. // Both `access` and `id` JWT token types are supported and they depend on the // underlying JWT realm configuration. diff --git a/typedapi/security/activateuserprofile/response.go b/typedapi/security/activateuserprofile/response.go index c41ebbbdd8..55934be915 100644 --- a/typedapi/security/activateuserprofile/response.go +++ b/typedapi/security/activateuserprofile/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package activateuserprofile @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package activateuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/activate_user_profile/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/activate_user_profile/Response.ts#L22-L25 type Response struct { Data map[string]json.RawMessage `json:"data"` Doc_ types.UserProfileHitMetadata `json:"_doc"` diff --git a/typedapi/security/authenticate/authenticate.go b/typedapi/security/authenticate/authenticate.go index 2efc5c1875..c2768c4462 100644 --- a/typedapi/security/authenticate/authenticate.go +++ b/typedapi/security/authenticate/authenticate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Authenticate a user. // diff --git a/typedapi/security/authenticate/response.go b/typedapi/security/authenticate/response.go index 2ea69fdc86..69edb16ff2 100644 --- a/typedapi/security/authenticate/response.go +++ b/typedapi/security/authenticate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package authenticate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package authenticate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/authenticate/SecurityAuthenticateResponse.ts#L24-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/authenticate/SecurityAuthenticateResponse.ts#L25-L43 type Response struct { ApiKey *types.AuthenticateApiKey `json:"api_key,omitempty"` AuthenticationRealm types.RealmInfo `json:"authentication_realm"` diff --git a/typedapi/security/bulkdeleterole/bulk_delete_role.go b/typedapi/security/bulkdeleterole/bulk_delete_role.go index f3f4463a57..0dc5d9b9bd 100644 --- a/typedapi/security/bulkdeleterole/bulk_delete_role.go +++ b/typedapi/security/bulkdeleterole/bulk_delete_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Bulk delete roles. // diff --git a/typedapi/security/bulkdeleterole/request.go b/typedapi/security/bulkdeleterole/request.go index efcee09501..1f6e91e1b4 100644 --- a/typedapi/security/bulkdeleterole/request.go +++ b/typedapi/security/bulkdeleterole/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulkdeleterole @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package bulkdeleterole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/bulk_delete_role/SecurityBulkDeleteRoleRequest.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/bulk_delete_role/SecurityBulkDeleteRoleRequest.ts#L23-L50 type Request struct { - // Names An array of role names to delete Names []string `json:"names"` } diff --git a/typedapi/security/bulkdeleterole/response.go b/typedapi/security/bulkdeleterole/response.go index ba5efd3224..d36d62addc 100644 --- a/typedapi/security/bulkdeleterole/response.go +++ b/typedapi/security/bulkdeleterole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulkdeleterole @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package bulkdeleterole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/bulk_delete_role/SecurityBulkDeleteRoleResponse.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/bulk_delete_role/SecurityBulkDeleteRoleResponse.ts#L22-L37 type Response struct { - // Deleted Array of deleted roles Deleted []string `json:"deleted,omitempty"` // Errors Present if any deletes resulted in errors diff --git a/typedapi/security/bulkputrole/bulk_put_role.go b/typedapi/security/bulkputrole/bulk_put_role.go index 668fb272ea..d20d85ceea 100644 --- a/typedapi/security/bulkputrole/bulk_put_role.go +++ b/typedapi/security/bulkputrole/bulk_put_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Bulk create or update roles. // diff --git a/typedapi/security/bulkputrole/request.go b/typedapi/security/bulkputrole/request.go index 458cccaa50..1dbfb745c9 100644 --- a/typedapi/security/bulkputrole/request.go +++ b/typedapi/security/bulkputrole/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulkputrole @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package bulkputrole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/bulk_put_role/SecurityBulkPutRoleRequest.ts#L25-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/bulk_put_role/SecurityBulkPutRoleRequest.ts#L25-L52 type Request struct { - // Roles A dictionary of role name to RoleDescriptor objects to add or update Roles map[string]types.RoleDescriptor `json:"roles"` } diff --git a/typedapi/security/bulkputrole/response.go b/typedapi/security/bulkputrole/response.go index 780732e3b9..4161e4b391 100644 --- a/typedapi/security/bulkputrole/response.go +++ b/typedapi/security/bulkputrole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulkputrole @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package bulkputrole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/bulk_put_role/SecurityBulkPutRoleResponse.ts#L22-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/bulk_put_role/SecurityBulkPutRoleResponse.ts#L22-L41 type Response struct { - // Created Array of created roles Created []string `json:"created,omitempty"` // Errors Present if any updates resulted in errors diff --git a/typedapi/security/bulkupdateapikeys/bulk_update_api_keys.go b/typedapi/security/bulkupdateapikeys/bulk_update_api_keys.go index 6357b4bc88..dac308ff03 100644 --- a/typedapi/security/bulkupdateapikeys/bulk_update_api_keys.go +++ b/typedapi/security/bulkupdateapikeys/bulk_update_api_keys.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Bulk update API keys. +// // Update the attributes for multiple API keys. // // IMPORTANT: It is not possible to use an API key as the authentication @@ -101,6 +102,7 @@ func NewBulkUpdateApiKeysFunc(tp elastictransport.Interface) NewBulkUpdateApiKey } // Bulk update API keys. +// // Update the attributes for multiple API keys. // // IMPORTANT: It is not possible to use an API key as the authentication diff --git a/typedapi/security/bulkupdateapikeys/request.go b/typedapi/security/bulkupdateapikeys/request.go index 65e64dd3db..274b867432 100644 --- a/typedapi/security/bulkupdateapikeys/request.go +++ b/typedapi/security/bulkupdateapikeys/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulkupdateapikeys @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package bulkupdateapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysRequest.ts#L26-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysRequest.ts#L26-L84 type Request struct { - // Expiration Expiration time for the API keys. // By default, API keys never expire. // This property can be omitted to leave the value unchanged. diff --git a/typedapi/security/bulkupdateapikeys/response.go b/typedapi/security/bulkupdateapikeys/response.go index 2f2ad4cdf8..55242ae4c1 100644 --- a/typedapi/security/bulkupdateapikeys/response.go +++ b/typedapi/security/bulkupdateapikeys/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package bulkupdateapikeys @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulkupdateapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysResponse.ts#L22-L28 type Response struct { Errors *types.BulkError `json:"errors,omitempty"` Noops []string `json:"noops"` diff --git a/typedapi/security/changepassword/change_password.go b/typedapi/security/changepassword/change_password.go index f7cbb09322..9a5e99cdf7 100644 --- a/typedapi/security/changepassword/change_password.go +++ b/typedapi/security/changepassword/change_password.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Change passwords. // diff --git a/typedapi/security/changepassword/request.go b/typedapi/security/changepassword/request.go index acd3a242ae..42c6881ecb 100644 --- a/typedapi/security/changepassword/request.go +++ b/typedapi/security/changepassword/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package changepassword @@ -31,9 +31,8 @@ import ( // Request holds the request body struct for the package changepassword // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/change_password/SecurityChangePasswordRequest.ts#L23-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/change_password/SecurityChangePasswordRequest.ts#L23-L65 type Request struct { - // Password The new password value. Passwords must be at least 6 characters long. Password *string `json:"password,omitempty"` // PasswordHash A hash of the new password value. This must be produced using the same diff --git a/typedapi/security/changepassword/response.go b/typedapi/security/changepassword/response.go index cdbb8310ee..dee02bfb53 100644 --- a/typedapi/security/changepassword/response.go +++ b/typedapi/security/changepassword/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package changepassword // Response holds the response body struct for the package changepassword // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/change_password/SecurityChangePasswordResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/change_password/SecurityChangePasswordResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/security/clearapikeycache/clear_api_key_cache.go b/typedapi/security/clearapikeycache/clear_api_key_cache.go index 511a464681..b95358ce2d 100644 --- a/typedapi/security/clearapikeycache/clear_api_key_cache.go +++ b/typedapi/security/clearapikeycache/clear_api_key_cache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear the API key cache. // diff --git a/typedapi/security/clearapikeycache/response.go b/typedapi/security/clearapikeycache/response.go index 59fcea5b53..f81bb0ac56 100644 --- a/typedapi/security/clearapikeycache/response.go +++ b/typedapi/security/clearapikeycache/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearapikeycache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearapikeycache // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/clear_api_key_cache/SecurityClearApiKeyCacheResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/clear_api_key_cache/SecurityClearApiKeyCacheResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/clearcachedprivileges/clear_cached_privileges.go b/typedapi/security/clearcachedprivileges/clear_cached_privileges.go index a530b431f7..0ef0fcc6a2 100644 --- a/typedapi/security/clearcachedprivileges/clear_cached_privileges.go +++ b/typedapi/security/clearcachedprivileges/clear_cached_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear the privileges cache. // diff --git a/typedapi/security/clearcachedprivileges/response.go b/typedapi/security/clearcachedprivileges/response.go index 7895a85a00..c72567e369 100644 --- a/typedapi/security/clearcachedprivileges/response.go +++ b/typedapi/security/clearcachedprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearcachedprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/clear_cached_privileges/SecurityClearCachedPrivilegesResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/clear_cached_privileges/SecurityClearCachedPrivilegesResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/clearcachedrealms/clear_cached_realms.go b/typedapi/security/clearcachedrealms/clear_cached_realms.go index 8203258110..d368f166da 100644 --- a/typedapi/security/clearcachedrealms/clear_cached_realms.go +++ b/typedapi/security/clearcachedrealms/clear_cached_realms.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear the user cache. // diff --git a/typedapi/security/clearcachedrealms/response.go b/typedapi/security/clearcachedrealms/response.go index 7d32f3186b..07ef4957c3 100644 --- a/typedapi/security/clearcachedrealms/response.go +++ b/typedapi/security/clearcachedrealms/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearcachedrealms @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedrealms // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/clear_cached_realms/SecurityClearCachedRealmsResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/clear_cached_realms/SecurityClearCachedRealmsResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/clearcachedroles/clear_cached_roles.go b/typedapi/security/clearcachedroles/clear_cached_roles.go index 977cf439c5..cafd52c1b2 100644 --- a/typedapi/security/clearcachedroles/clear_cached_roles.go +++ b/typedapi/security/clearcachedroles/clear_cached_roles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear the roles cache. // diff --git a/typedapi/security/clearcachedroles/response.go b/typedapi/security/clearcachedroles/response.go index b7651b5b6d..8db3d32ff2 100644 --- a/typedapi/security/clearcachedroles/response.go +++ b/typedapi/security/clearcachedroles/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearcachedroles @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedroles // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/clear_cached_roles/ClearCachedRolesResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/clear_cached_roles/ClearCachedRolesResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go b/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go index 14f04e8c10..4b34b215d2 100644 --- a/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go +++ b/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear service account token caches. // diff --git a/typedapi/security/clearcachedservicetokens/response.go b/typedapi/security/clearcachedservicetokens/response.go index 392b40192a..081d1be710 100644 --- a/typedapi/security/clearcachedservicetokens/response.go +++ b/typedapi/security/clearcachedservicetokens/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearcachedservicetokens @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedservicetokens // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/clear_cached_service_tokens/ClearCachedServiceTokensResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/clear_cached_service_tokens/ClearCachedServiceTokensResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/createapikey/create_api_key.go b/typedapi/security/createapikey/create_api_key.go index 149b1afc8a..346b998e04 100644 --- a/typedapi/security/createapikey/create_api_key.go +++ b/typedapi/security/createapikey/create_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create an API key. // diff --git a/typedapi/security/createapikey/request.go b/typedapi/security/createapikey/request.go index c60cbb7dbb..2c2b4c4094 100644 --- a/typedapi/security/createapikey/request.go +++ b/typedapi/security/createapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createapikey @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package createapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L86 type Request struct { - // Expiration The expiration time for the API key. // By default, API keys never expire. Expiration types.Duration `json:"expiration,omitempty"` diff --git a/typedapi/security/createapikey/response.go b/typedapi/security/createapikey/response.go index 7122deb9ea..4accaa7cf1 100644 --- a/typedapi/security/createapikey/response.go +++ b/typedapi/security/createapikey/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createapikey // Response holds the response body struct for the package createapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50 type Response struct { - // ApiKey Generated API key. ApiKey string `json:"api_key"` // Encoded API key credentials which is the base64-encoding of diff --git a/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go b/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go index 033063f586..0c2a27cef6 100644 --- a/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go +++ b/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a cross-cluster API key. // @@ -413,6 +413,22 @@ func (r *CreateCrossClusterApiKey) Access(access types.AccessVariant) *CreateCro return r } +// The certificate identity to associate with this API key. +// This field is used to restrict the API key to connections authenticated by a +// specific TLS certificate. +// The value should match the certificate's distinguished name (DN) pattern. +// API name: certificate_identity +func (r *CreateCrossClusterApiKey) CertificateIdentity(certificateidentity string) *CreateCrossClusterApiKey { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.CertificateIdentity = &certificateidentity + + return r +} + // Expiration time for the API key. // By default, API keys never expire. // API name: expiration diff --git a/typedapi/security/createcrossclusterapikey/request.go b/typedapi/security/createcrossclusterapikey/request.go index fb46d668b9..0dca5cf377 100644 --- a/typedapi/security/createcrossclusterapikey/request.go +++ b/typedapi/security/createcrossclusterapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createcrossclusterapikey @@ -26,15 +26,15 @@ import ( "errors" "fmt" "io" + "strconv" "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // Request holds the request body struct for the package createcrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyRequest.ts#L25-L80 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyRequest.ts#L25-L86 type Request struct { - // Access The access to be granted to this API key. // The access is composed of permissions for cross-cluster search and // cross-cluster replication. @@ -45,6 +45,11 @@ type Request struct { // The creation process automatically converts the access specification to a // role descriptor which has relevant privileges assigned accordingly. Access types.Access `json:"access"` + // CertificateIdentity The certificate identity to associate with this API key. + // This field is used to restrict the API key to connections authenticated by a + // specific TLS certificate. + // The value should match the certificate's distinguished name (DN) pattern. + CertificateIdentity *string `json:"certificate_identity,omitempty"` // Expiration Expiration time for the API key. // By default, API keys never expire. Expiration types.Duration `json:"expiration,omitempty"` @@ -95,6 +100,18 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Access", err) } + case "certificate_identity": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "CertificateIdentity", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.CertificateIdentity = &o + case "expiration": if err := dec.Decode(&s.Expiration); err != nil { return fmt.Errorf("%s | %w", "Expiration", err) diff --git a/typedapi/security/createcrossclusterapikey/response.go b/typedapi/security/createcrossclusterapikey/response.go index f374c0b8e3..c84ea0d455 100644 --- a/typedapi/security/createcrossclusterapikey/response.go +++ b/typedapi/security/createcrossclusterapikey/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createcrossclusterapikey // Response holds the response body struct for the package createcrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyResponse.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyResponse.ts#L23-L48 type Response struct { - // ApiKey Generated API key. ApiKey string `json:"api_key"` // Encoded API key credentials which is the base64-encoding of diff --git a/typedapi/security/createservicetoken/create_service_token.go b/typedapi/security/createservicetoken/create_service_token.go index a032eccafe..0fbe7c20d3 100644 --- a/typedapi/security/createservicetoken/create_service_token.go +++ b/typedapi/security/createservicetoken/create_service_token.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a service account token. // diff --git a/typedapi/security/createservicetoken/response.go b/typedapi/security/createservicetoken/response.go index ede966979a..9b9867d70a 100644 --- a/typedapi/security/createservicetoken/response.go +++ b/typedapi/security/createservicetoken/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createservicetoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package createservicetoken // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/create_service_token/CreateServiceTokenResponse.ts#L22-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/create_service_token/CreateServiceTokenResponse.ts#L22-L30 type Response struct { Created bool `json:"created"` Token types.ServiceToken `json:"token"` diff --git a/typedapi/security/delegatepki/delegate_pki.go b/typedapi/security/delegatepki/delegate_pki.go index d1cea47312..74d24248bb 100644 --- a/typedapi/security/delegatepki/delegate_pki.go +++ b/typedapi/security/delegatepki/delegate_pki.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delegate PKI authentication. // diff --git a/typedapi/security/delegatepki/request.go b/typedapi/security/delegatepki/request.go index 98c508850c..0b8daf2710 100644 --- a/typedapi/security/delegatepki/request.go +++ b/typedapi/security/delegatepki/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delegatepki @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package delegatepki // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delegate_pki/SecurityDelegatePkiRequest.ts#L22-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delegate_pki/SecurityDelegatePkiRequest.ts#L22-L57 type Request struct { - // X509CertificateChain The X509Certificate chain, which is represented as an ordered string array. // Each string in the array is a base64-encoded (Section 4 of RFC4648 - not // base64url-encoded) of the certificate's DER encoding. diff --git a/typedapi/security/delegatepki/response.go b/typedapi/security/delegatepki/response.go index ca22fd48f4..82ea21da54 100644 --- a/typedapi/security/delegatepki/response.go +++ b/typedapi/security/delegatepki/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delegatepki @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package delegatepki // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L24-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L24-L41 type Response struct { - // AccessToken An access token associated with the subject distinguished name of the // client's certificate. AccessToken string `json:"access_token"` diff --git a/typedapi/security/deleteprivileges/delete_privileges.go b/typedapi/security/deleteprivileges/delete_privileges.go index b309163068..b1ee11e02e 100644 --- a/typedapi/security/deleteprivileges/delete_privileges.go +++ b/typedapi/security/deleteprivileges/delete_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete application privileges. // diff --git a/typedapi/security/deleteprivileges/response.go b/typedapi/security/deleteprivileges/response.go index 1436073916..e39bc8b43e 100644 --- a/typedapi/security/deleteprivileges/response.go +++ b/typedapi/security/deleteprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deleteprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delete_privileges/SecurityDeletePrivilegesResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delete_privileges/SecurityDeletePrivilegesResponse.ts#L23-L26 type Response map[string]map[string]types.FoundStatus diff --git a/typedapi/security/deleterole/delete_role.go b/typedapi/security/deleterole/delete_role.go index e254bf8e37..caca880b46 100644 --- a/typedapi/security/deleterole/delete_role.go +++ b/typedapi/security/deleterole/delete_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete roles. // diff --git a/typedapi/security/deleterole/response.go b/typedapi/security/deleterole/response.go index f765c8ef52..490ce44467 100644 --- a/typedapi/security/deleterole/response.go +++ b/typedapi/security/deleterole/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleterole // Response holds the response body struct for the package deleterole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delete_role/SecurityDeleteRoleResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delete_role/SecurityDeleteRoleResponse.ts#L20-L28 type Response struct { - // Found If the role is successfully deleted, `found` is `true`. // Otherwise, `found` is `false`. Found bool `json:"found"` diff --git a/typedapi/security/deleterolemapping/delete_role_mapping.go b/typedapi/security/deleterolemapping/delete_role_mapping.go index c18cc5583e..bf0154aa03 100644 --- a/typedapi/security/deleterolemapping/delete_role_mapping.go +++ b/typedapi/security/deleterolemapping/delete_role_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete role mappings. // diff --git a/typedapi/security/deleterolemapping/response.go b/typedapi/security/deleterolemapping/response.go index 2145bfc3f9..74d4907554 100644 --- a/typedapi/security/deleterolemapping/response.go +++ b/typedapi/security/deleterolemapping/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleterolemapping // Response holds the response body struct for the package deleterolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delete_role_mapping/SecurityDeleteRoleMappingResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delete_role_mapping/SecurityDeleteRoleMappingResponse.ts#L20-L28 type Response struct { - // Found If the mapping is successfully deleted, `found` is `true`. // Otherwise, `found` is `false`. Found bool `json:"found"` diff --git a/typedapi/security/deleteservicetoken/delete_service_token.go b/typedapi/security/deleteservicetoken/delete_service_token.go index 5fe0d7980e..e7f8fbbe5b 100644 --- a/typedapi/security/deleteservicetoken/delete_service_token.go +++ b/typedapi/security/deleteservicetoken/delete_service_token.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete service account tokens. // diff --git a/typedapi/security/deleteservicetoken/response.go b/typedapi/security/deleteservicetoken/response.go index a2eefbae32..fa19fb3763 100644 --- a/typedapi/security/deleteservicetoken/response.go +++ b/typedapi/security/deleteservicetoken/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteservicetoken // Response holds the response body struct for the package deleteservicetoken // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delete_service_token/DeleteServiceTokenResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delete_service_token/DeleteServiceTokenResponse.ts#L20-L28 type Response struct { - // Found If the service account token is successfully deleted, the request returns // `{"found": true}`. // Otherwise, the response will have status code 404 and `found` is set to diff --git a/typedapi/security/deleteuser/delete_user.go b/typedapi/security/deleteuser/delete_user.go index 95ea594348..a265cb9940 100644 --- a/typedapi/security/deleteuser/delete_user.go +++ b/typedapi/security/deleteuser/delete_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete users. // diff --git a/typedapi/security/deleteuser/response.go b/typedapi/security/deleteuser/response.go index 768d8f2927..0e99518616 100644 --- a/typedapi/security/deleteuser/response.go +++ b/typedapi/security/deleteuser/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteuser // Response holds the response body struct for the package deleteuser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delete_user/SecurityDeleteUserResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delete_user/SecurityDeleteUserResponse.ts#L20-L28 type Response struct { - // Found If the user is successfully deleted, the request returns `{"found": true}`. // Otherwise, `found` is set to `false`. Found bool `json:"found"` diff --git a/typedapi/security/disableuser/disable_user.go b/typedapi/security/disableuser/disable_user.go index 7480849fb0..67599e639a 100644 --- a/typedapi/security/disableuser/disable_user.go +++ b/typedapi/security/disableuser/disable_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Disable users. // diff --git a/typedapi/security/disableuser/response.go b/typedapi/security/disableuser/response.go index bce70f19c8..bf99bd2dbd 100644 --- a/typedapi/security/disableuser/response.go +++ b/typedapi/security/disableuser/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package disableuser // Response holds the response body struct for the package disableuser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/disable_user/SecurityDisableUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/disable_user/SecurityDisableUserResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/security/disableuserprofile/disable_user_profile.go b/typedapi/security/disableuserprofile/disable_user_profile.go index 02ce4864b2..92cc9e0d51 100644 --- a/typedapi/security/disableuserprofile/disable_user_profile.go +++ b/typedapi/security/disableuserprofile/disable_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Disable a user profile. // diff --git a/typedapi/security/disableuserprofile/response.go b/typedapi/security/disableuserprofile/response.go index ba87dcc98e..e45dd13eba 100644 --- a/typedapi/security/disableuserprofile/response.go +++ b/typedapi/security/disableuserprofile/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package disableuserprofile // Response holds the response body struct for the package disableuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/disable_user_profile/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/disable_user_profile/Response.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/security/enableuser/enable_user.go b/typedapi/security/enableuser/enable_user.go index 8f6b5d5506..97843b3452 100644 --- a/typedapi/security/enableuser/enable_user.go +++ b/typedapi/security/enableuser/enable_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Enable users. // diff --git a/typedapi/security/enableuser/response.go b/typedapi/security/enableuser/response.go index 6f2e204cfb..3fb6689c3c 100644 --- a/typedapi/security/enableuser/response.go +++ b/typedapi/security/enableuser/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package enableuser // Response holds the response body struct for the package enableuser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/enable_user/SecurityEnableUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/enable_user/SecurityEnableUserResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/security/enableuserprofile/enable_user_profile.go b/typedapi/security/enableuserprofile/enable_user_profile.go index d341160e9c..74a7b274cc 100644 --- a/typedapi/security/enableuserprofile/enable_user_profile.go +++ b/typedapi/security/enableuserprofile/enable_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Enable a user profile. // diff --git a/typedapi/security/enableuserprofile/response.go b/typedapi/security/enableuserprofile/response.go index 18765828c5..3ca436b8db 100644 --- a/typedapi/security/enableuserprofile/response.go +++ b/typedapi/security/enableuserprofile/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package enableuserprofile // Response holds the response body struct for the package enableuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/enable_user_profile/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/enable_user_profile/Response.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/security/enrollkibana/enroll_kibana.go b/typedapi/security/enrollkibana/enroll_kibana.go index c39be36a2c..c367a98007 100644 --- a/typedapi/security/enrollkibana/enroll_kibana.go +++ b/typedapi/security/enrollkibana/enroll_kibana.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Enroll Kibana. // diff --git a/typedapi/security/enrollkibana/response.go b/typedapi/security/enrollkibana/response.go index 0200e3a895..45464ed83b 100644 --- a/typedapi/security/enrollkibana/response.go +++ b/typedapi/security/enrollkibana/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package enrollkibana @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package enrollkibana // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/enroll_kibana/Response.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/enroll_kibana/Response.ts#L20-L29 type Response struct { - // HttpCa The CA certificate used to sign the node certificates that Elasticsearch uses // for TLS on the HTTP layer. // The certificate is returned as a Base64 encoded string of the ASN.1 DER diff --git a/typedapi/security/enrollnode/enroll_node.go b/typedapi/security/enrollnode/enroll_node.go index a465d3dc28..9a9a6ef8bb 100644 --- a/typedapi/security/enrollnode/enroll_node.go +++ b/typedapi/security/enrollnode/enroll_node.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Enroll a node. // diff --git a/typedapi/security/enrollnode/response.go b/typedapi/security/enrollnode/response.go index 8f13b003e9..bad4c33c0d 100644 --- a/typedapi/security/enrollnode/response.go +++ b/typedapi/security/enrollnode/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package enrollnode // Response holds the response body struct for the package enrollnode // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/enroll_node/Response.ts#L20-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/enroll_node/Response.ts#L20-L47 type Response struct { - // HttpCaCert The CA certificate that can be used by the new node in order to sign its // certificate for the HTTP layer, as a Base64 encoded string of the ASN.1 DER // encoding of the certificate. diff --git a/typedapi/security/getapikey/get_api_key.go b/typedapi/security/getapikey/get_api_key.go index 30cb0e8d7d..714e9eac99 100644 --- a/typedapi/security/getapikey/get_api_key.go +++ b/typedapi/security/getapikey/get_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get API key information. // diff --git a/typedapi/security/getapikey/response.go b/typedapi/security/getapikey/response.go index d36117d1af..15b4605ef1 100644 --- a/typedapi/security/getapikey/response.go +++ b/typedapi/security/getapikey/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getapikey @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_api_key/SecurityGetApiKeyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_api_key/SecurityGetApiKeyResponse.ts#L22-L24 type Response struct { ApiKeys []types.ApiKey `json:"api_keys"` } diff --git a/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go b/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go index 22ab3d28f9..6fc29dad3f 100644 --- a/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go +++ b/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get builtin privileges. // diff --git a/typedapi/security/getbuiltinprivileges/response.go b/typedapi/security/getbuiltinprivileges/response.go index c7c99e9dd8..0d3915385c 100644 --- a/typedapi/security/getbuiltinprivileges/response.go +++ b/typedapi/security/getbuiltinprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getbuiltinprivileges @@ -27,9 +27,8 @@ import ( // Response holds the response body struct for the package getbuiltinprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L42 type Response struct { - // Cluster The list of cluster privileges that are understood by this version of // Elasticsearch. Cluster []clusterprivilege.ClusterPrivilege `json:"cluster"` diff --git a/typedapi/security/getprivileges/get_privileges.go b/typedapi/security/getprivileges/get_privileges.go index 3bf05d94fb..702b2c9846 100644 --- a/typedapi/security/getprivileges/get_privileges.go +++ b/typedapi/security/getprivileges/get_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get application privileges. // diff --git a/typedapi/security/getprivileges/response.go b/typedapi/security/getprivileges/response.go index f594284c43..c312c471a8 100644 --- a/typedapi/security/getprivileges/response.go +++ b/typedapi/security/getprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L29 type Response map[string]map[string]types.PrivilegesActions diff --git a/typedapi/security/getrole/get_role.go b/typedapi/security/getrole/get_role.go index 5d8c7b3db2..1995132cfd 100644 --- a/typedapi/security/getrole/get_role.go +++ b/typedapi/security/getrole/get_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get roles. // diff --git a/typedapi/security/getrole/response.go b/typedapi/security/getrole/response.go index c232decec1..55d131ebcd 100644 --- a/typedapi/security/getrole/response.go +++ b/typedapi/security/getrole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_role/SecurityGetRoleResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_role/SecurityGetRoleResponse.ts#L23-L31 type Response map[string]types.Role diff --git a/typedapi/security/getrolemapping/get_role_mapping.go b/typedapi/security/getrolemapping/get_role_mapping.go index 3edb056fe0..030a959746 100644 --- a/typedapi/security/getrolemapping/get_role_mapping.go +++ b/typedapi/security/getrolemapping/get_role_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get role mappings. // diff --git a/typedapi/security/getrolemapping/response.go b/typedapi/security/getrolemapping/response.go index 52bcfde785..4ced5910a7 100644 --- a/typedapi/security/getrolemapping/response.go +++ b/typedapi/security/getrolemapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getrolemapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L29 type Response map[string]types.SecurityRoleMapping diff --git a/typedapi/security/getserviceaccounts/get_service_accounts.go b/typedapi/security/getserviceaccounts/get_service_accounts.go index 853b692f13..07b556988c 100644 --- a/typedapi/security/getserviceaccounts/get_service_accounts.go +++ b/typedapi/security/getserviceaccounts/get_service_accounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get service accounts. // diff --git a/typedapi/security/getserviceaccounts/response.go b/typedapi/security/getserviceaccounts/response.go index 84b70c59de..d6a10b9a42 100644 --- a/typedapi/security/getserviceaccounts/response.go +++ b/typedapi/security/getserviceaccounts/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getserviceaccounts @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getserviceaccounts // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_service_accounts/GetServiceAccountsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_service_accounts/GetServiceAccountsResponse.ts#L23-L29 type Response map[string]types.RoleDescriptorWrapper diff --git a/typedapi/security/getservicecredentials/get_service_credentials.go b/typedapi/security/getservicecredentials/get_service_credentials.go index 748a235835..c80af6ded6 100644 --- a/typedapi/security/getservicecredentials/get_service_credentials.go +++ b/typedapi/security/getservicecredentials/get_service_credentials.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get service account credentials. // diff --git a/typedapi/security/getservicecredentials/response.go b/typedapi/security/getservicecredentials/response.go index 084cdf099f..d6ef6a25ac 100644 --- a/typedapi/security/getservicecredentials/response.go +++ b/typedapi/security/getservicecredentials/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getservicecredentials @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getservicecredentials // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_service_credentials/GetServiceCredentialsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_service_credentials/GetServiceCredentialsResponse.ts#L25-L35 type Response struct { Count int `json:"count"` // NodesCredentials Service account credentials collected from all nodes of the cluster. diff --git a/typedapi/security/getsettings/get_settings.go b/typedapi/security/getsettings/get_settings.go index 8f8ee27626..bbdef787b1 100644 --- a/typedapi/security/getsettings/get_settings.go +++ b/typedapi/security/getsettings/get_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get security index settings. // diff --git a/typedapi/security/getsettings/response.go b/typedapi/security/getsettings/response.go index fe5931be7e..2e6fbe3ce3 100644 --- a/typedapi/security/getsettings/response.go +++ b/typedapi/security/getsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getsettings @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_settings/SecurityGetSettingsResponse.ts#L21-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_settings/SecurityGetSettingsResponse.ts#L21-L36 type Response struct { - // Security Settings for the index used for most security configuration, including native // realm users and roles configured with the API. Security types.SecuritySettings `json:"security"` diff --git a/typedapi/security/getstats/get_stats.go b/typedapi/security/getstats/get_stats.go new file mode 100644 index 0000000000..31c20fbee3 --- /dev/null +++ b/typedapi/security/getstats/get_stats.go @@ -0,0 +1,331 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Get security stats. +// +// Gather security usage statistics from all node(s) within the cluster. +package getstats + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type GetStats struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetStats type alias for index. +type NewGetStats func() *GetStats + +// NewGetStatsFunc returns a new instance of GetStats with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetStatsFunc(tp elastictransport.Interface) NewGetStats { + return func() *GetStats { + n := New(tp) + + return n + } +} + +// Get security stats. +// +// Gather security usage statistics from all node(s) within the cluster. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-stats +func New(tp elastictransport.Interface) *GetStats { + r := &GetStats{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *GetStats) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == 0: + path.WriteString("/") + path.WriteString("_security") + path.WriteString("/") + path.WriteString("stats") + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r GetStats) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "security.get_stats") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "security.get_stats") + if reader := instrument.RecordRequestBody(ctx, "security.get_stats", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "security.get_stats") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetStats query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a getstats.Response +func (r GetStats) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "security.get_stats") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r GetStats) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "security.get_stats") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the GetStats query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the GetStats headers map. +func (r *GetStats) Header(key, value string) *GetStats { + r.headers.Set(key, value) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *GetStats) ErrorTrace(errortrace bool) *GetStats { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *GetStats) FilterPath(filterpaths ...string) *GetStats { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *GetStats) Human(human bool) *GetStats { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *GetStats) Pretty(pretty bool) *GetStats { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/security/getstats/response.go b/typedapi/security/getstats/response.go new file mode 100644 index 0000000000..a0918ef570 --- /dev/null +++ b/typedapi/security/getstats/response.go @@ -0,0 +1,41 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package getstats + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package getstats +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_stats/SecurityStatsResponse.ts#L24-L31 +type Response struct { + // Nodes A map of node IDs to security statistics for that node. + Nodes map[string]types.NodeSecurityStats `json:"nodes"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{ + Nodes: make(map[string]types.NodeSecurityStats, 0), + } + return r +} diff --git a/typedapi/security/gettoken/get_token.go b/typedapi/security/gettoken/get_token.go index 1939c399b4..21c2685cd9 100644 --- a/typedapi/security/gettoken/get_token.go +++ b/typedapi/security/gettoken/get_token.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a token. // diff --git a/typedapi/security/gettoken/request.go b/typedapi/security/gettoken/request.go index f696a77f20..87e066731f 100644 --- a/typedapi/security/gettoken/request.go +++ b/typedapi/security/gettoken/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package gettoken @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package gettoken // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_token/GetUserAccessTokenRequest.ts#L25-L90 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_token/GetUserAccessTokenRequest.ts#L25-L90 type Request struct { - // GrantType The type of grant. // Supported grant types are: `password`, `_kerberos`, `client_credentials`, and // `refresh_token`. diff --git a/typedapi/security/gettoken/response.go b/typedapi/security/gettoken/response.go index 3dd88e8b46..e77c2a0aaa 100644 --- a/typedapi/security/gettoken/response.go +++ b/typedapi/security/gettoken/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package gettoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettoken // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_token/GetUserAccessTokenResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_token/GetUserAccessTokenResponse.ts#L23-L33 type Response struct { AccessToken string `json:"access_token"` Authentication types.AuthenticatedUser `json:"authentication"` diff --git a/typedapi/security/getuser/get_user.go b/typedapi/security/getuser/get_user.go index 655e295f9d..0292b122b3 100644 --- a/typedapi/security/getuser/get_user.go +++ b/typedapi/security/getuser/get_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get users. // diff --git a/typedapi/security/getuser/response.go b/typedapi/security/getuser/response.go index 757dfe666e..2082a7f363 100644 --- a/typedapi/security/getuser/response.go +++ b/typedapi/security/getuser/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getuser @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_user/SecurityGetUserResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_user/SecurityGetUserResponse.ts#L23-L30 type Response map[string]types.User diff --git a/typedapi/security/getuserprivileges/get_user_privileges.go b/typedapi/security/getuserprivileges/get_user_privileges.go index b71b7aa6dc..dd0b38ee76 100644 --- a/typedapi/security/getuserprivileges/get_user_privileges.go +++ b/typedapi/security/getuserprivileges/get_user_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get user privileges. // diff --git a/typedapi/security/getuserprivileges/response.go b/typedapi/security/getuserprivileges/response.go index df6a9a85bf..b552693fdd 100644 --- a/typedapi/security/getuserprivileges/response.go +++ b/typedapi/security/getuserprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getuserprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuserprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L28-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L28-L38 type Response struct { Applications []types.ApplicationPrivileges `json:"applications"` Cluster []string `json:"cluster"` diff --git a/typedapi/security/getuserprofile/get_user_profile.go b/typedapi/security/getuserprofile/get_user_profile.go index 25f3f5f99c..60d666a598 100644 --- a/typedapi/security/getuserprofile/get_user_profile.go +++ b/typedapi/security/getuserprofile/get_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a user profile. // diff --git a/typedapi/security/getuserprofile/response.go b/typedapi/security/getuserprofile/response.go index 0b0f8c0afe..529f4d65c9 100644 --- a/typedapi/security/getuserprofile/response.go +++ b/typedapi/security/getuserprofile/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getuserprofile @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_user_profile/Response.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_user_profile/Response.ts#L23-L33 type Response struct { Errors *types.GetUserProfileErrors `json:"errors,omitempty"` // Profiles A successful call returns the JSON representation of the user profile and its diff --git a/typedapi/security/grantapikey/grant_api_key.go b/typedapi/security/grantapikey/grant_api_key.go index 3e9474cab3..66d808786f 100644 --- a/typedapi/security/grantapikey/grant_api_key.go +++ b/typedapi/security/grantapikey/grant_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Grant an API key. // diff --git a/typedapi/security/grantapikey/request.go b/typedapi/security/grantapikey/request.go index d0fb1d4ed8..a7a88a23f5 100644 --- a/typedapi/security/grantapikey/request.go +++ b/typedapi/security/grantapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package grantapikey @@ -34,9 +34,8 @@ import ( // Request holds the request body struct for the package grantapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts#L24-L102 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts#L24-L102 type Request struct { - // AccessToken The user's access token. // If you specify the `access_token` grant type, this parameter is required. // It is not valid with other grant types. diff --git a/typedapi/security/grantapikey/response.go b/typedapi/security/grantapikey/response.go index e5e205a75e..577e7e7067 100644 --- a/typedapi/security/grantapikey/response.go +++ b/typedapi/security/grantapikey/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package grantapikey // Response holds the response body struct for the package grantapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/grant_api_key/SecurityGrantApiKeyResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/grant_api_key/SecurityGrantApiKeyResponse.ts#L23-L31 type Response struct { ApiKey string `json:"api_key"` Encoded string `json:"encoded"` diff --git a/typedapi/security/hasprivileges/has_privileges.go b/typedapi/security/hasprivileges/has_privileges.go index 9e29a7e070..94fe691552 100644 --- a/typedapi/security/hasprivileges/has_privileges.go +++ b/typedapi/security/hasprivileges/has_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check user privileges. // diff --git a/typedapi/security/hasprivileges/request.go b/typedapi/security/hasprivileges/request.go index ae50dbd464..5c664a4292 100644 --- a/typedapi/security/hasprivileges/request.go +++ b/typedapi/security/hasprivileges/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package hasprivileges @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package hasprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L59 type Request struct { Application []types.ApplicationPrivilegesCheck `json:"application,omitempty"` // Cluster A list of the cluster privileges that you want to check. diff --git a/typedapi/security/hasprivileges/response.go b/typedapi/security/hasprivileges/response.go index bc5093db52..3c5095598d 100644 --- a/typedapi/security/hasprivileges/response.go +++ b/typedapi/security/hasprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package hasprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package hasprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges/SecurityHasPrivilegesResponse.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges/SecurityHasPrivilegesResponse.ts#L24-L35 type Response struct { Application types.ApplicationsPrivileges `json:"application"` Cluster map[string]bool `json:"cluster"` diff --git a/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go b/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go index 4c6394280a..3cc6fb2121 100644 --- a/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go +++ b/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Check user profile privileges. // diff --git a/typedapi/security/hasprivilegesuserprofile/request.go b/typedapi/security/hasprivilegesuserprofile/request.go index 1ae6113b58..ffb447c2b9 100644 --- a/typedapi/security/hasprivilegesuserprofile/request.go +++ b/typedapi/security/hasprivilegesuserprofile/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package hasprivilegesuserprofile @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package hasprivilegesuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges_user_profile/Request.ts#L24-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges_user_profile/Request.ts#L24-L55 type Request struct { - // Privileges An object containing all the privileges to be checked. Privileges types.PrivilegesCheck `json:"privileges"` // Uids A list of profile IDs. The privileges are checked for associated users of the diff --git a/typedapi/security/hasprivilegesuserprofile/response.go b/typedapi/security/hasprivilegesuserprofile/response.go index eeeed51733..415fb989c0 100644 --- a/typedapi/security/hasprivilegesuserprofile/response.go +++ b/typedapi/security/hasprivilegesuserprofile/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package hasprivilegesuserprofile @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package hasprivilegesuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges_user_profile/Response.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges_user_profile/Response.ts#L23-L38 type Response struct { - // Errors The subset of the requested profile IDs for which an error // was encountered. It does not include the missing profile IDs // or the profile IDs of the users that do not have all the diff --git a/typedapi/security/invalidateapikey/invalidate_api_key.go b/typedapi/security/invalidateapikey/invalidate_api_key.go index 7c122f302d..1a920911e3 100644 --- a/typedapi/security/invalidateapikey/invalidate_api_key.go +++ b/typedapi/security/invalidateapikey/invalidate_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Invalidate API keys. // diff --git a/typedapi/security/invalidateapikey/request.go b/typedapi/security/invalidateapikey/request.go index 6cb600a207..2e921dd894 100644 --- a/typedapi/security/invalidateapikey/request.go +++ b/typedapi/security/invalidateapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package invalidateapikey @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package invalidateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L82 type Request struct { Id *string `json:"id,omitempty"` // Ids A list of API key ids. diff --git a/typedapi/security/invalidateapikey/response.go b/typedapi/security/invalidateapikey/response.go index 1c3bd0ffc4..9eef96dd52 100644 --- a/typedapi/security/invalidateapikey/response.go +++ b/typedapi/security/invalidateapikey/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package invalidateapikey @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package invalidateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L46 type Response struct { - // ErrorCount The number of errors that were encountered when invalidating the API keys. ErrorCount int `json:"error_count"` // ErrorDetails Details about the errors. diff --git a/typedapi/security/invalidatetoken/invalidate_token.go b/typedapi/security/invalidatetoken/invalidate_token.go index 5735d1fbd8..3fe8128ff7 100644 --- a/typedapi/security/invalidatetoken/invalidate_token.go +++ b/typedapi/security/invalidatetoken/invalidate_token.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Invalidate a token. // diff --git a/typedapi/security/invalidatetoken/request.go b/typedapi/security/invalidatetoken/request.go index ce68c658ef..754ba71015 100644 --- a/typedapi/security/invalidatetoken/request.go +++ b/typedapi/security/invalidatetoken/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package invalidatetoken @@ -31,9 +31,8 @@ import ( // Request holds the request body struct for the package invalidatetoken // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/invalidate_token/SecurityInvalidateTokenRequest.ts#L23-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/invalidate_token/SecurityInvalidateTokenRequest.ts#L23-L71 type Request struct { - // RealmName The name of an authentication realm. // This parameter cannot be used with either `refresh_token` or `token`. RealmName *string `json:"realm_name,omitempty"` diff --git a/typedapi/security/invalidatetoken/response.go b/typedapi/security/invalidatetoken/response.go index 78b234d8a9..4529c90d53 100644 --- a/typedapi/security/invalidatetoken/response.go +++ b/typedapi/security/invalidatetoken/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package invalidatetoken @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package invalidatetoken // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/invalidate_token/SecurityInvalidateTokenResponse.ts#L23-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/invalidate_token/SecurityInvalidateTokenResponse.ts#L23-L46 type Response struct { - // ErrorCount The number of errors that were encountered when invalidating the tokens. ErrorCount int64 `json:"error_count"` // ErrorDetails Details about the errors. diff --git a/typedapi/security/oidcauthenticate/oidc_authenticate.go b/typedapi/security/oidcauthenticate/oidc_authenticate.go index 9b16a6f3a7..79d0b847ed 100644 --- a/typedapi/security/oidcauthenticate/oidc_authenticate.go +++ b/typedapi/security/oidcauthenticate/oidc_authenticate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Authenticate OpenID Connect. // diff --git a/typedapi/security/oidcauthenticate/request.go b/typedapi/security/oidcauthenticate/request.go index 35ebb098a9..4061020126 100644 --- a/typedapi/security/oidcauthenticate/request.go +++ b/typedapi/security/oidcauthenticate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package oidcauthenticate @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package oidcauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/oidc_authenticate/Request.ts#L22-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/oidc_authenticate/Request.ts#L22-L62 type Request struct { - // Nonce Associate a client session with an ID token and mitigate replay attacks. // This value needs to be the same as the one that was provided to the // `/_security/oidc/prepare` API or the one that was generated by Elasticsearch diff --git a/typedapi/security/oidcauthenticate/response.go b/typedapi/security/oidcauthenticate/response.go index adb6e98ea0..52b88c055d 100644 --- a/typedapi/security/oidcauthenticate/response.go +++ b/typedapi/security/oidcauthenticate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package oidcauthenticate // Response holds the response body struct for the package oidcauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/oidc_authenticate/Response.ts#L22-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/oidc_authenticate/Response.ts#L22-L41 type Response struct { - // AccessToken The Elasticsearch access token. AccessToken string `json:"access_token"` // ExpiresIn The duration (in seconds) of the tokens. diff --git a/typedapi/security/oidclogout/oidc_logout.go b/typedapi/security/oidclogout/oidc_logout.go index 414bca3cee..481ae5eaba 100644 --- a/typedapi/security/oidclogout/oidc_logout.go +++ b/typedapi/security/oidclogout/oidc_logout.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Logout of OpenID Connect. // diff --git a/typedapi/security/oidclogout/request.go b/typedapi/security/oidclogout/request.go index 6f694ce8bf..dc7e9dd223 100644 --- a/typedapi/security/oidclogout/request.go +++ b/typedapi/security/oidclogout/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package oidclogout @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package oidclogout // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/oidc_logout/Request.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/oidc_logout/Request.ts#L22-L52 type Request struct { - // RefreshToken The refresh token to be invalidated. RefreshToken *string `json:"refresh_token,omitempty"` // Token The access token to be invalidated. diff --git a/typedapi/security/oidclogout/response.go b/typedapi/security/oidclogout/response.go index 32307ca536..e6b8af80bb 100644 --- a/typedapi/security/oidclogout/response.go +++ b/typedapi/security/oidclogout/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package oidclogout // Response holds the response body struct for the package oidclogout // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/oidc_logout/Response.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/oidc_logout/Response.ts#L20-L27 type Response struct { - // Redirect A URI that points to the end session endpoint of the OpenID Connect Provider // with all the parameters of the logout request as HTTP GET parameters. Redirect string `json:"redirect"` diff --git a/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go b/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go index bf4bc4018d..771d9d1d7a 100644 --- a/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go +++ b/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Prepare OpenID connect authentication. // diff --git a/typedapi/security/oidcprepareauthentication/request.go b/typedapi/security/oidcprepareauthentication/request.go index d731f38750..0fbd2f1c60 100644 --- a/typedapi/security/oidcprepareauthentication/request.go +++ b/typedapi/security/oidcprepareauthentication/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package oidcprepareauthentication @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package oidcprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/oidc_prepare_authentication/Request.ts#L22-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/oidc_prepare_authentication/Request.ts#L22-L71 type Request struct { - // Iss In the case of a third party initiated single sign on, this is the issuer // identifier for the OP that the RP is to send the authentication request to. // It cannot be specified when *realm* is specified. diff --git a/typedapi/security/oidcprepareauthentication/response.go b/typedapi/security/oidcprepareauthentication/response.go index 90211c244e..6bfb43e590 100644 --- a/typedapi/security/oidcprepareauthentication/response.go +++ b/typedapi/security/oidcprepareauthentication/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package oidcprepareauthentication // Response holds the response body struct for the package oidcprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/oidc_prepare_authentication/Response.ts#L20-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/oidc_prepare_authentication/Response.ts#L20-L30 type Response struct { Nonce string `json:"nonce"` Realm string `json:"realm"` diff --git a/typedapi/security/putprivileges/put_privileges.go b/typedapi/security/putprivileges/put_privileges.go index 248f319a8d..62ded3004e 100644 --- a/typedapi/security/putprivileges/put_privileges.go +++ b/typedapi/security/putprivileges/put_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update application privileges. // diff --git a/typedapi/security/putprivileges/request.go b/typedapi/security/putprivileges/request.go index ea4bca51f7..ab0d5c9c60 100644 --- a/typedapi/security/putprivileges/request.go +++ b/typedapi/security/putprivileges/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putprivileges @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_privileges/SecurityPutPrivilegesRequest.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/put_privileges/SecurityPutPrivilegesRequest.ts#L25-L67 type Request = map[string]map[string]types.PrivilegesActions // NewRequest returns a Request diff --git a/typedapi/security/putprivileges/response.go b/typedapi/security/putprivileges/response.go index 4acf8e0dad..cf6ba5de31 100644 --- a/typedapi/security/putprivileges/response.go +++ b/typedapi/security/putprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_privileges/SecurityPutPrivilegesResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/put_privileges/SecurityPutPrivilegesResponse.ts#L23-L28 type Response map[string]map[string]types.CreatedStatus diff --git a/typedapi/security/putrole/put_role.go b/typedapi/security/putrole/put_role.go index db2bb76e9b..75a46b5bf9 100644 --- a/typedapi/security/putrole/put_role.go +++ b/typedapi/security/putrole/put_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update roles. // diff --git a/typedapi/security/putrole/request.go b/typedapi/security/putrole/request.go index 975ca1afd0..2bb5af0fa6 100644 --- a/typedapi/security/putrole/request.go +++ b/typedapi/security/putrole/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putrole @@ -34,9 +34,8 @@ import ( // Request holds the request body struct for the package putrole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_role/SecurityPutRoleRequest.ts#L32-L111 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/put_role/SecurityPutRoleRequest.ts#L32-L111 type Request struct { - // Applications A list of application privilege entries. Applications []types.ApplicationPrivileges `json:"applications,omitempty"` // Cluster A list of cluster privileges. These privileges define the cluster-level diff --git a/typedapi/security/putrole/response.go b/typedapi/security/putrole/response.go index d2e6372977..4dac8642ba 100644 --- a/typedapi/security/putrole/response.go +++ b/typedapi/security/putrole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putrole @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package putrole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_role/SecurityPutRoleResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/put_role/SecurityPutRoleResponse.ts#L22-L29 type Response struct { - // Role When an existing role is updated, `created` is set to `false`. Role types.CreatedStatus `json:"role"` } diff --git a/typedapi/security/putrolemapping/put_role_mapping.go b/typedapi/security/putrolemapping/put_role_mapping.go index 7941488b45..771bdd4129 100644 --- a/typedapi/security/putrolemapping/put_role_mapping.go +++ b/typedapi/security/putrolemapping/put_role_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update role mappings. // diff --git a/typedapi/security/putrolemapping/request.go b/typedapi/security/putrolemapping/request.go index b178bb4b84..cf1bf872ba 100644 --- a/typedapi/security/putrolemapping/request.go +++ b/typedapi/security/putrolemapping/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putrolemapping @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_role_mapping/SecurityPutRoleMappingRequest.ts#L25-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/put_role_mapping/SecurityPutRoleMappingRequest.ts#L25-L103 type Request struct { - // Enabled Mappings that have `enabled` set to `false` are ignored when role mapping is // performed. Enabled *bool `json:"enabled,omitempty"` diff --git a/typedapi/security/putrolemapping/response.go b/typedapi/security/putrolemapping/response.go index c7e808d556..1f0cab06a3 100644 --- a/typedapi/security/putrolemapping/response.go +++ b/typedapi/security/putrolemapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putrolemapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_role_mapping/SecurityPutRoleMappingResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/put_role_mapping/SecurityPutRoleMappingResponse.ts#L22-L24 type Response struct { Created *bool `json:"created,omitempty"` RoleMapping types.CreatedStatus `json:"role_mapping"` diff --git a/typedapi/security/putuser/put_user.go b/typedapi/security/putuser/put_user.go index f19d183470..4d45c186dd 100644 --- a/typedapi/security/putuser/put_user.go +++ b/typedapi/security/putuser/put_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update users. // diff --git a/typedapi/security/putuser/request.go b/typedapi/security/putuser/request.go index ab12c68c52..d05d26364b 100644 --- a/typedapi/security/putuser/request.go +++ b/typedapi/security/putuser/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putuser @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putuser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_user/SecurityPutUserRequest.ts#L23-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/put_user/SecurityPutUserRequest.ts#L23-L101 type Request struct { - // Email The email of the user. Email *string `json:"email,omitempty"` // Enabled Specifies whether the user is enabled. diff --git a/typedapi/security/putuser/response.go b/typedapi/security/putuser/response.go index bc3c2f59a1..166f6fa68f 100644 --- a/typedapi/security/putuser/response.go +++ b/typedapi/security/putuser/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putuser // Response holds the response body struct for the package putuser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_user/SecurityPutUserResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/put_user/SecurityPutUserResponse.ts#L20-L28 type Response struct { - // Created A successful call returns a JSON structure that shows whether the user has // been created or updated. // When an existing user is updated, `created` is set to `false`. diff --git a/typedapi/security/queryapikeys/query_api_keys.go b/typedapi/security/queryapikeys/query_api_keys.go index 02f34b19cf..7fa2f30100 100644 --- a/typedapi/security/queryapikeys/query_api_keys.go +++ b/typedapi/security/queryapikeys/query_api_keys.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Find API keys with a query. // diff --git a/typedapi/security/queryapikeys/request.go b/typedapi/security/queryapikeys/request.go index 6c0a0ce912..e43a0f0b5c 100644 --- a/typedapi/security/queryapikeys/request.go +++ b/typedapi/security/queryapikeys/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package queryapikeys @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package queryapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_api_keys/QueryApiKeysRequest.ts#L26-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_api_keys/QueryApiKeysRequest.ts#L26-L127 type Request struct { - // Aggregations Any aggregations to run over the corpus of returned API keys. // Aggregations and queries work together. Aggregations are computed only on the // API keys that match the query. diff --git a/typedapi/security/queryapikeys/response.go b/typedapi/security/queryapikeys/response.go index 42f5cb3868..58c38a61f7 100644 --- a/typedapi/security/queryapikeys/response.go +++ b/typedapi/security/queryapikeys/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package queryapikeys @@ -34,9 +34,8 @@ import ( // Response holds the response body struct for the package queryapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_api_keys/QueryApiKeysResponse.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_api_keys/QueryApiKeysResponse.ts#L26-L45 type Response struct { - // Aggregations The aggregations result, if requested. Aggregations map[string]types.ApiKeyAggregate `json:"aggregations,omitempty"` // ApiKeys A list of API key information. diff --git a/typedapi/security/queryrole/query_role.go b/typedapi/security/queryrole/query_role.go index 053de07e93..1659e12240 100644 --- a/typedapi/security/queryrole/query_role.go +++ b/typedapi/security/queryrole/query_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Find roles with a query. // @@ -423,7 +423,9 @@ func (r *QueryRole) Size(size int) *QueryRole { } // The sort definition. -// You can sort on `username`, `roles`, or `enabled`. +// You can sort on `name`, `description`, `metadata`, +// `applications.application`, `applications.privileges`, +// and `applications.resources`. // In addition, sort can also be applied to the `_doc` field to sort by index // order. // API name: sort diff --git a/typedapi/security/queryrole/request.go b/typedapi/security/queryrole/request.go index d679490dd1..1201b97588 100644 --- a/typedapi/security/queryrole/request.go +++ b/typedapi/security/queryrole/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package queryrole @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package queryrole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_role/QueryRolesRequest.ts#L25-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_role/QueryRolesRequest.ts#L25-L86 type Request struct { - // From The starting document offset. // It must not be negative. // By default, you cannot page through more than 10,000 hits using the `from` @@ -61,7 +60,9 @@ type Request struct { // To page through more hits, use the `search_after` parameter. Size *int `json:"size,omitempty"` // Sort The sort definition. - // You can sort on `username`, `roles`, or `enabled`. + // You can sort on `name`, `description`, `metadata`, + // `applications.application`, `applications.privileges`, + // and `applications.resources`. // In addition, sort can also be applied to the `_doc` field to sort by index // order. Sort []types.SortCombinations `json:"sort,omitempty"` diff --git a/typedapi/security/queryrole/response.go b/typedapi/security/queryrole/response.go index dbbd01fb69..51397595ca 100644 --- a/typedapi/security/queryrole/response.go +++ b/typedapi/security/queryrole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package queryrole @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package queryrole // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_role/QueryRolesResponse.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_role/QueryRolesResponse.ts#L23-L43 type Response struct { - // Count The number of roles returned in the response. Count int `json:"count"` // Roles A list of roles that match the query. diff --git a/typedapi/security/queryuser/query_user.go b/typedapi/security/queryuser/query_user.go index 2b548a1f51..adae26fb74 100644 --- a/typedapi/security/queryuser/query_user.go +++ b/typedapi/security/queryuser/query_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Find users with a query. // diff --git a/typedapi/security/queryuser/request.go b/typedapi/security/queryuser/request.go index 5327978f5c..d0885897a1 100644 --- a/typedapi/security/queryuser/request.go +++ b/typedapi/security/queryuser/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package queryuser @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package queryuser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_user/SecurityQueryUserRequest.ts#L25-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_user/SecurityQueryUserRequest.ts#L25-L91 type Request struct { - // From The starting document offset. // It must not be negative. // By default, you cannot page through more than 10,000 hits using the `from` diff --git a/typedapi/security/queryuser/response.go b/typedapi/security/queryuser/response.go index 95a7482bd5..fecc03d5cf 100644 --- a/typedapi/security/queryuser/response.go +++ b/typedapi/security/queryuser/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package queryuser @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package queryuser // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_user/SecurityQueryUserResponse.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_user/SecurityQueryUserResponse.ts#L23-L38 type Response struct { - // Count The number of users returned in the response. Count int `json:"count"` // Total The total number of users found. diff --git a/typedapi/security/samlauthenticate/request.go b/typedapi/security/samlauthenticate/request.go index 836768ccda..c717eaed81 100644 --- a/typedapi/security/samlauthenticate/request.go +++ b/typedapi/security/samlauthenticate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samlauthenticate @@ -31,9 +31,8 @@ import ( // Request holds the request body struct for the package samlauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_authenticate/Request.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_authenticate/Request.ts#L23-L61 type Request struct { - // Content The SAML response as it was sent by the user's browser, usually a Base64 // encoded XML document. Content string `json:"content"` diff --git a/typedapi/security/samlauthenticate/response.go b/typedapi/security/samlauthenticate/response.go index 4faba4562e..7fedf87a49 100644 --- a/typedapi/security/samlauthenticate/response.go +++ b/typedapi/security/samlauthenticate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samlauthenticate // Response holds the response body struct for the package samlauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_authenticate/Response.ts#L22-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_authenticate/Response.ts#L22-L45 type Response struct { - // AccessToken The access token that was generated by Elasticsearch. AccessToken string `json:"access_token"` // ExpiresIn The amount of time (in seconds) left until the token expires. diff --git a/typedapi/security/samlauthenticate/saml_authenticate.go b/typedapi/security/samlauthenticate/saml_authenticate.go index 590af2757c..6c93472782 100644 --- a/typedapi/security/samlauthenticate/saml_authenticate.go +++ b/typedapi/security/samlauthenticate/saml_authenticate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Authenticate SAML. // diff --git a/typedapi/security/samlcompletelogout/request.go b/typedapi/security/samlcompletelogout/request.go index a5b5c43ca2..c8f16c0c3c 100644 --- a/typedapi/security/samlcompletelogout/request.go +++ b/typedapi/security/samlcompletelogout/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samlcompletelogout @@ -31,9 +31,8 @@ import ( // Request holds the request body struct for the package samlcompletelogout // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_complete_logout/Request.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_complete_logout/Request.ts#L23-L61 type Request struct { - // Content If the SAML IdP sends the logout response with the HTTP-Post binding, this // field must be set to the value of the SAMLResponse form parameter from the // logout response. diff --git a/typedapi/security/samlcompletelogout/saml_complete_logout.go b/typedapi/security/samlcompletelogout/saml_complete_logout.go index b5f797d211..3304543628 100644 --- a/typedapi/security/samlcompletelogout/saml_complete_logout.go +++ b/typedapi/security/samlcompletelogout/saml_complete_logout.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Logout of SAML completely. // diff --git a/typedapi/security/samlinvalidate/request.go b/typedapi/security/samlinvalidate/request.go index 20959bd671..764fa205fc 100644 --- a/typedapi/security/samlinvalidate/request.go +++ b/typedapi/security/samlinvalidate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samlinvalidate @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package samlinvalidate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_invalidate/Request.ts#L22-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_invalidate/Request.ts#L22-L61 type Request struct { - // Acs The Assertion Consumer Service URL that matches the one of the SAML realm in // Elasticsearch that should be used. You must specify either this parameter or // the `realm` parameter. diff --git a/typedapi/security/samlinvalidate/response.go b/typedapi/security/samlinvalidate/response.go index f02f7ec613..124fd53691 100644 --- a/typedapi/security/samlinvalidate/response.go +++ b/typedapi/security/samlinvalidate/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samlinvalidate // Response holds the response body struct for the package samlinvalidate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_invalidate/Response.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_invalidate/Response.ts#L22-L37 type Response struct { - // Invalidated The number of tokens that were invalidated as part of this logout. Invalidated int `json:"invalidated"` // Realm The realm name of the SAML realm in Elasticsearch that authenticated the diff --git a/typedapi/security/samlinvalidate/saml_invalidate.go b/typedapi/security/samlinvalidate/saml_invalidate.go index cb45112151..39c51ce26d 100644 --- a/typedapi/security/samlinvalidate/saml_invalidate.go +++ b/typedapi/security/samlinvalidate/saml_invalidate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Invalidate SAML. // diff --git a/typedapi/security/samllogout/request.go b/typedapi/security/samllogout/request.go index 3cb8fda942..2cbbb09710 100644 --- a/typedapi/security/samllogout/request.go +++ b/typedapi/security/samllogout/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samllogout @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package samllogout // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_logout/Request.ts#L22-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_logout/Request.ts#L22-L57 type Request struct { - // RefreshToken The refresh token that was returned as a response to calling the SAML // authenticate API. // Alternatively, the most recent refresh token that was received after diff --git a/typedapi/security/samllogout/response.go b/typedapi/security/samllogout/response.go index e8e70faaf9..5bb6d1d864 100644 --- a/typedapi/security/samllogout/response.go +++ b/typedapi/security/samllogout/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samllogout // Response holds the response body struct for the package samllogout // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_logout/Response.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_logout/Response.ts#L20-L28 type Response struct { - // Redirect A URL that contains a SAML logout request as a parameter. // You can use this URL to be redirected back to the SAML IdP and to initiate // Single Logout. diff --git a/typedapi/security/samllogout/saml_logout.go b/typedapi/security/samllogout/saml_logout.go index 3ef393b8f6..241d874234 100644 --- a/typedapi/security/samllogout/saml_logout.go +++ b/typedapi/security/samllogout/saml_logout.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Logout of SAML. // diff --git a/typedapi/security/samlprepareauthentication/request.go b/typedapi/security/samlprepareauthentication/request.go index feb53fea17..0aa7c8868e 100644 --- a/typedapi/security/samlprepareauthentication/request.go +++ b/typedapi/security/samlprepareauthentication/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samlprepareauthentication @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package samlprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_prepare_authentication/Request.ts#L22-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_prepare_authentication/Request.ts#L22-L67 type Request struct { - // Acs The Assertion Consumer Service URL that matches the one of the SAML realms in // Elasticsearch. // The realm is used to generate the authentication request. You must specify diff --git a/typedapi/security/samlprepareauthentication/response.go b/typedapi/security/samlprepareauthentication/response.go index 8520c48ee5..d501205b95 100644 --- a/typedapi/security/samlprepareauthentication/response.go +++ b/typedapi/security/samlprepareauthentication/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samlprepareauthentication // Response holds the response body struct for the package samlprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_prepare_authentication/Response.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_prepare_authentication/Response.ts#L22-L37 type Response struct { - // Id A unique identifier for the SAML Request to be stored by the caller of the // API. Id string `json:"id"` diff --git a/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go b/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go index 72edb4aedb..ab3db06056 100644 --- a/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go +++ b/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Prepare SAML authentication. // diff --git a/typedapi/security/samlserviceprovidermetadata/response.go b/typedapi/security/samlserviceprovidermetadata/response.go index 77494c4d06..abfb2018ef 100644 --- a/typedapi/security/samlserviceprovidermetadata/response.go +++ b/typedapi/security/samlserviceprovidermetadata/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package samlserviceprovidermetadata // Response holds the response body struct for the package samlserviceprovidermetadata // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/saml_service_provider_metadata/Response.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/saml_service_provider_metadata/Response.ts#L20-L27 type Response struct { - // Metadata An XML string that contains a SAML Service Provider's metadata for the realm. Metadata string `json:"metadata"` } diff --git a/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go b/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go index dded854eff..6893f95ad8 100644 --- a/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go +++ b/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create SAML service provider metadata. // diff --git a/typedapi/security/suggestuserprofiles/request.go b/typedapi/security/suggestuserprofiles/request.go index b47a8d2df1..baf2f8bae4 100644 --- a/typedapi/security/suggestuserprofiles/request.go +++ b/typedapi/security/suggestuserprofiles/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package suggestuserprofiles @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package suggestuserprofiles // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/suggest_user_profiles/Request.ts#L24-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/suggest_user_profiles/Request.ts#L24-L81 type Request struct { - // Data A comma-separated list of filters for the `data` field of the profile // document. // To return all content use `data=*`. diff --git a/typedapi/security/suggestuserprofiles/response.go b/typedapi/security/suggestuserprofiles/response.go index ab046ec6cb..c13f90bb62 100644 --- a/typedapi/security/suggestuserprofiles/response.go +++ b/typedapi/security/suggestuserprofiles/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package suggestuserprofiles @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package suggestuserprofiles // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/suggest_user_profiles/Response.ts#L29-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/suggest_user_profiles/Response.ts#L29-L44 type Response struct { - // Profiles A list of profile documents, ordered by relevance, that match the search // criteria. Profiles []types.UserProfile `json:"profiles"` diff --git a/typedapi/security/suggestuserprofiles/suggest_user_profiles.go b/typedapi/security/suggestuserprofiles/suggest_user_profiles.go index a6d90843f4..674b57341b 100644 --- a/typedapi/security/suggestuserprofiles/suggest_user_profiles.go +++ b/typedapi/security/suggestuserprofiles/suggest_user_profiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Suggest a user profile. // diff --git a/typedapi/security/updateapikey/request.go b/typedapi/security/updateapikey/request.go index 3a70c27421..d3b4f5ff64 100644 --- a/typedapi/security/updateapikey/request.go +++ b/typedapi/security/updateapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateapikey @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package updateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_api_key/Request.ts#L26-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/update_api_key/Request.ts#L26-L91 type Request struct { - // Expiration The expiration time for the API key. // By default, API keys never expire. // This property can be omitted to leave the expiration unchanged. diff --git a/typedapi/security/updateapikey/response.go b/typedapi/security/updateapikey/response.go index 8f11649dfd..2455f80251 100644 --- a/typedapi/security/updateapikey/response.go +++ b/typedapi/security/updateapikey/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateapikey // Response holds the response body struct for the package updateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_api_key/Response.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/update_api_key/Response.ts#L20-L28 type Response struct { - // Updated If `true`, the API key was updated. // If `false`, the API key didn't change because no change was detected. Updated bool `json:"updated"` diff --git a/typedapi/security/updateapikey/update_api_key.go b/typedapi/security/updateapikey/update_api_key.go index 1428d04204..48b8ccb9d9 100644 --- a/typedapi/security/updateapikey/update_api_key.go +++ b/typedapi/security/updateapikey/update_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update an API key. // diff --git a/typedapi/security/updatecrossclusterapikey/request.go b/typedapi/security/updatecrossclusterapikey/request.go index aaa43ff12b..32806db57f 100644 --- a/typedapi/security/updatecrossclusterapikey/request.go +++ b/typedapi/security/updatecrossclusterapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatecrossclusterapikey @@ -26,15 +26,15 @@ import ( "errors" "fmt" "io" + "strconv" "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // Request holds the request body struct for the package updatecrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyRequest.ts#L25-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyRequest.ts#L25-L94 type Request struct { - // Access The access to be granted to this API key. // The access is composed of permissions for cross cluster search and cross // cluster replication. @@ -42,6 +42,16 @@ type Request struct { // When specified, the new access assignment fully replaces the previously // assigned access. Access types.Access `json:"access"` + // CertificateIdentity The certificate identity to associate with this API key. + // This field is used to restrict the API key to connections authenticated by a + // specific TLS certificate. + // The value should match the certificate's distinguished name (DN) pattern. + // When specified, this fully replaces any previously assigned certificate + // identity. + // To clear an existing certificate identity, explicitly set this field to + // `null`. + // When omitted, the existing certificate identity remains unchanged. + CertificateIdentity *string `json:"certificate_identity,omitempty"` // Expiration The expiration time for the API key. // By default, API keys never expire. This property can be omitted to leave the // value unchanged. @@ -93,6 +103,18 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Access", err) } + case "certificate_identity": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "CertificateIdentity", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.CertificateIdentity = &o + case "expiration": if err := dec.Decode(&s.Expiration); err != nil { return fmt.Errorf("%s | %w", "Expiration", err) diff --git a/typedapi/security/updatecrossclusterapikey/response.go b/typedapi/security/updatecrossclusterapikey/response.go index 0611abf87c..f381b9e9fc 100644 --- a/typedapi/security/updatecrossclusterapikey/response.go +++ b/typedapi/security/updatecrossclusterapikey/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatecrossclusterapikey // Response holds the response body struct for the package updatecrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyResponse.ts#L20-L28 type Response struct { - // Updated If `true`, the API key was updated. // If `false`, the API key didn’t change because no change was detected. Updated bool `json:"updated"` diff --git a/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go b/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go index 05f754b00b..15e2cd265e 100644 --- a/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go +++ b/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update a cross-cluster API key. // @@ -433,6 +433,27 @@ func (r *UpdateCrossClusterApiKey) Access(access types.AccessVariant) *UpdateCro return r } +// The certificate identity to associate with this API key. +// This field is used to restrict the API key to connections authenticated by a +// specific TLS certificate. +// The value should match the certificate's distinguished name (DN) pattern. +// When specified, this fully replaces any previously assigned certificate +// identity. +// To clear an existing certificate identity, explicitly set this field to +// `null`. +// When omitted, the existing certificate identity remains unchanged. +// API name: certificate_identity +func (r *UpdateCrossClusterApiKey) CertificateIdentity(certificateidentity string) *UpdateCrossClusterApiKey { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.CertificateIdentity = &certificateidentity + + return r +} + // The expiration time for the API key. // By default, API keys never expire. This property can be omitted to leave the // value unchanged. diff --git a/typedapi/security/updatesettings/request.go b/typedapi/security/updatesettings/request.go index 46fcbf775f..8f6c638d7a 100644 --- a/typedapi/security/updatesettings/request.go +++ b/typedapi/security/updatesettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatesettings @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_settings/SecurityUpdateSettingsRequest.ts#L24-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/update_settings/SecurityUpdateSettingsRequest.ts#L24-L72 type Request struct { - // Security Settings for the index used for most security configuration, including native // realm users and roles configured with the API. Security *types.SecuritySettings `json:"security,omitempty"` diff --git a/typedapi/security/updatesettings/response.go b/typedapi/security/updatesettings/response.go index f912818f20..64cc1d1540 100644 --- a/typedapi/security/updatesettings/response.go +++ b/typedapi/security/updatesettings/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatesettings // Response holds the response body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_settings/SecurityUpdateSettingsResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/update_settings/SecurityUpdateSettingsResponse.ts#L20-L24 type Response struct { Acknowledged bool `json:"acknowledged"` } diff --git a/typedapi/security/updatesettings/update_settings.go b/typedapi/security/updatesettings/update_settings.go index fe9f3bd737..408689d49e 100644 --- a/typedapi/security/updatesettings/update_settings.go +++ b/typedapi/security/updatesettings/update_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update security index settings. // diff --git a/typedapi/security/updateuserprofiledata/request.go b/typedapi/security/updateuserprofiledata/request.go index 4f4390bc7f..6294c006be 100644 --- a/typedapi/security/updateuserprofiledata/request.go +++ b/typedapi/security/updateuserprofiledata/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateuserprofiledata @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package updateuserprofiledata // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_user_profile_data/Request.ts#L27-L98 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/update_user_profile_data/Request.ts#L27-L98 type Request struct { - // Data Non-searchable data that you want to associate with the user profile. // This field supports a nested data structure. // Within the `data` object, top-level keys cannot begin with an underscore diff --git a/typedapi/security/updateuserprofiledata/response.go b/typedapi/security/updateuserprofiledata/response.go index 09dd1b0919..29fbb3ebe8 100644 --- a/typedapi/security/updateuserprofiledata/response.go +++ b/typedapi/security/updateuserprofiledata/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updateuserprofiledata // Response holds the response body struct for the package updateuserprofiledata // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_user_profile_data/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/update_user_profile_data/Response.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/security/updateuserprofiledata/update_user_profile_data.go b/typedapi/security/updateuserprofiledata/update_user_profile_data.go index cbcefd8602..968ecc5d6b 100644 --- a/typedapi/security/updateuserprofiledata/update_user_profile_data.go +++ b/typedapi/security/updateuserprofiledata/update_user_profile_data.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update user profile data. // diff --git a/typedapi/shutdown/deletenode/delete_node.go b/typedapi/shutdown/deletenode/delete_node.go index 113f7de583..dce7f17988 100644 --- a/typedapi/shutdown/deletenode/delete_node.go +++ b/typedapi/shutdown/deletenode/delete_node.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Cancel node shutdown preparations. +// // Remove a node from the shutdown list so it can resume normal operations. // You must explicitly clear the shutdown request when a node rejoins the // cluster or when a node has permanently left the cluster. @@ -45,7 +46,6 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) const ( @@ -89,6 +89,7 @@ func NewDeleteNodeFunc(tp elastictransport.Interface) NewDeleteNode { } // Cancel node shutdown preparations. +// // Remove a node from the shutdown list so it can resume normal operations. // You must explicitly clear the shutdown request when a node rejoins the // cluster or when a node has permanently left the cluster. @@ -331,8 +332,8 @@ func (r *DeleteNode) _nodeid(nodeid string) *DeleteNode { // MasterTimeout 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: master_timeout -func (r *DeleteNode) MasterTimeout(mastertimeout timeunit.TimeUnit) *DeleteNode { - r.values.Set("master_timeout", mastertimeout.String()) +func (r *DeleteNode) MasterTimeout(duration string) *DeleteNode { + r.values.Set("master_timeout", duration) return r } @@ -340,8 +341,8 @@ func (r *DeleteNode) MasterTimeout(mastertimeout timeunit.TimeUnit) *DeleteNode // Timeout Period to wait for a response. If no response is received before the timeout // expires, the request fails and returns an error. // API name: timeout -func (r *DeleteNode) Timeout(timeout timeunit.TimeUnit) *DeleteNode { - r.values.Set("timeout", timeout.String()) +func (r *DeleteNode) Timeout(duration string) *DeleteNode { + r.values.Set("timeout", duration) return r } diff --git a/typedapi/shutdown/deletenode/response.go b/typedapi/shutdown/deletenode/response.go index 29cc85b334..8d969d7973 100644 --- a/typedapi/shutdown/deletenode/response.go +++ b/typedapi/shutdown/deletenode/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletenode // Response holds the response body struct for the package deletenode // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/delete_node/ShutdownDeleteNodeResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/delete_node/ShutdownDeleteNodeResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/shutdown/getnode/get_node.go b/typedapi/shutdown/getnode/get_node.go index cdffcad2b8..0026cfd973 100644 --- a/typedapi/shutdown/getnode/get_node.go +++ b/typedapi/shutdown/getnode/get_node.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the shutdown status. // @@ -45,7 +45,6 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" ) const ( @@ -324,7 +323,7 @@ func (r *GetNode) Header(key, value string) *GetNode { return r } -// NodeId Which node for which to retrieve the shutdown status +// NodeId Comma-separated list of nodes for which to retrieve the shutdown status // API Name: nodeid func (r *GetNode) NodeId(nodeid string) *GetNode { r.paramSet |= nodeidMask @@ -336,8 +335,8 @@ func (r *GetNode) NodeId(nodeid string) *GetNode { // MasterTimeout 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: master_timeout -func (r *GetNode) MasterTimeout(mastertimeout timeunit.TimeUnit) *GetNode { - r.values.Set("master_timeout", mastertimeout.String()) +func (r *GetNode) MasterTimeout(duration string) *GetNode { + r.values.Set("master_timeout", duration) return r } diff --git a/typedapi/shutdown/getnode/response.go b/typedapi/shutdown/getnode/response.go index 4e68ae5834..f666f1a6c5 100644 --- a/typedapi/shutdown/getnode/response.go +++ b/typedapi/shutdown/getnode/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getnode @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getnode // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L23-L27 type Response struct { Nodes []types.NodeShutdownStatus `json:"nodes"` } diff --git a/typedapi/shutdown/putnode/put_node.go b/typedapi/shutdown/putnode/put_node.go index ef06933da2..fa291d8015 100644 --- a/typedapi/shutdown/putnode/put_node.go +++ b/typedapi/shutdown/putnode/put_node.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Prepare a node to be shut down. // @@ -58,7 +58,6 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/timeunit" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/type_" ) @@ -368,8 +367,8 @@ func (r *PutNode) _nodeid(nodeid string) *PutNode { // If no response is received before the timeout expires, the request fails and // returns an error. // API name: master_timeout -func (r *PutNode) MasterTimeout(mastertimeout timeunit.TimeUnit) *PutNode { - r.values.Set("master_timeout", mastertimeout.String()) +func (r *PutNode) MasterTimeout(duration string) *PutNode { + r.values.Set("master_timeout", duration) return r } @@ -378,8 +377,8 @@ func (r *PutNode) MasterTimeout(mastertimeout timeunit.TimeUnit) *PutNode { // If no response is received before the timeout expires, the request fails and // returns an error. // API name: timeout -func (r *PutNode) Timeout(timeout timeunit.TimeUnit) *PutNode { - r.values.Set("timeout", timeout.String()) +func (r *PutNode) Timeout(duration string) *PutNode { + r.values.Set("timeout", duration) return r } diff --git a/typedapi/shutdown/putnode/request.go b/typedapi/shutdown/putnode/request.go index 04abcabf9a..b228a07f2e 100644 --- a/typedapi/shutdown/putnode/request.go +++ b/typedapi/shutdown/putnode/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putnode @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package putnode // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L108 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L108 type Request struct { - // AllocationDelay Only valid if type is restart. // Controls how long Elasticsearch will wait for the node to restart and join // the cluster before reassigning its shards to other nodes. diff --git a/typedapi/shutdown/putnode/response.go b/typedapi/shutdown/putnode/response.go index cd548c89b5..4e63e8f246 100644 --- a/typedapi/shutdown/putnode/response.go +++ b/typedapi/shutdown/putnode/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putnode // Response holds the response body struct for the package putnode // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/simulate/ingest/ingest.go b/typedapi/simulate/ingest/ingest.go index c38e3f07d0..bcf5ea362b 100644 --- a/typedapi/simulate/ingest/ingest.go +++ b/typedapi/simulate/ingest/ingest.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Simulate data ingestion. +// // Run ingest pipelines against a set of provided documents, optionally with // substitute pipeline definitions, to simulate ingesting data into an index. // @@ -68,6 +69,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/mergetype" ) const ( @@ -113,6 +115,7 @@ func NewIngestFunc(tp elastictransport.Interface) NewIngest { } // Simulate data ingestion. +// // Run ingest pipelines against a set of provided documents, optionally with // substitute pipeline definitions, to simulate ingesting data into an index. // @@ -396,6 +399,20 @@ func (r *Ingest) Pipeline(pipelinename string) *Ingest { return r } +// MergeType The mapping merge type if mapping overrides are being provided in +// mapping_addition. +// The allowed values are one of index or template. +// The index option merges mappings the way they would be merged into an +// existing index. +// The template option merges mappings the way they would be merged into a +// template. +// API name: merge_type +func (r *Ingest) MergeType(mergetype mergetype.MergeType) *Ingest { + r.values.Set("merge_type", mergetype.String()) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/simulate/ingest/request.go b/typedapi/simulate/ingest/request.go index a514b627b1..330e4f861f 100644 --- a/typedapi/simulate/ingest/request.go +++ b/typedapi/simulate/ingest/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package ingest @@ -29,9 +29,8 @@ import ( // Request holds the request body struct for the package ingest // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/simulate/ingest/SimulateIngestRequest.ts#L29-L100 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/simulate/ingest/SimulateIngestRequest.ts#L29-L109 type Request struct { - // ComponentTemplateSubstitutions A map of component template names to substitute component template definition // objects. ComponentTemplateSubstitutions map[string]types.ComponentTemplateNode `json:"component_template_substitutions,omitempty"` diff --git a/typedapi/simulate/ingest/response.go b/typedapi/simulate/ingest/response.go index 0019baf100..a597ffd05d 100644 --- a/typedapi/simulate/ingest/response.go +++ b/typedapi/simulate/ingest/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package ingest @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package ingest // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/simulate/ingest/SimulateIngestResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/simulate/ingest/SimulateIngestResponse.ts#L28-L30 type Response struct { Docs []types.SimulateIngestDocumentResult `json:"docs"` } diff --git a/typedapi/slm/deletelifecycle/delete_lifecycle.go b/typedapi/slm/deletelifecycle/delete_lifecycle.go index 0781a5bb87..09a3c8cb23 100644 --- a/typedapi/slm/deletelifecycle/delete_lifecycle.go +++ b/typedapi/slm/deletelifecycle/delete_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a policy. +// // Delete a snapshot lifecycle policy definition. // This operation prevents any future snapshots from being taken but does not // cancel in-progress snapshots or remove previously-taken snapshots. @@ -80,6 +81,7 @@ func NewDeleteLifecycleFunc(tp elastictransport.Interface) NewDeleteLifecycle { } // Delete a policy. +// // Delete a snapshot lifecycle policy definition. // This operation prevents any future snapshots from being taken but does not // cancel in-progress snapshots or remove previously-taken snapshots. diff --git a/typedapi/slm/deletelifecycle/response.go b/typedapi/slm/deletelifecycle/response.go index 7d92af3f90..48607b374d 100644 --- a/typedapi/slm/deletelifecycle/response.go +++ b/typedapi/slm/deletelifecycle/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletelifecycle // Response holds the response body struct for the package deletelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/delete_lifecycle/DeleteSnapshotLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/delete_lifecycle/DeleteSnapshotLifecycleResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/slm/executelifecycle/execute_lifecycle.go b/typedapi/slm/executelifecycle/execute_lifecycle.go index 8f008b1aa5..4509f34437 100644 --- a/typedapi/slm/executelifecycle/execute_lifecycle.go +++ b/typedapi/slm/executelifecycle/execute_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a policy. +// // Immediately create a snapshot according to the snapshot lifecycle policy // without waiting for the scheduled time. // The snapshot policy is normally applied according to its schedule, but you @@ -82,6 +83,7 @@ func NewExecuteLifecycleFunc(tp elastictransport.Interface) NewExecuteLifecycle } // Run a policy. +// // Immediately create a snapshot according to the snapshot lifecycle policy // without waiting for the scheduled time. // The snapshot policy is normally applied according to its schedule, but you diff --git a/typedapi/slm/executelifecycle/response.go b/typedapi/slm/executelifecycle/response.go index 66373ad965..15ee32fde7 100644 --- a/typedapi/slm/executelifecycle/response.go +++ b/typedapi/slm/executelifecycle/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package executelifecycle // Response holds the response body struct for the package executelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/execute_lifecycle/ExecuteSnapshotLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/execute_lifecycle/ExecuteSnapshotLifecycleResponse.ts#L22-L24 type Response struct { SnapshotName string `json:"snapshot_name"` } diff --git a/typedapi/slm/executeretention/execute_retention.go b/typedapi/slm/executeretention/execute_retention.go index 4e73350fcc..3f6df24762 100644 --- a/typedapi/slm/executeretention/execute_retention.go +++ b/typedapi/slm/executeretention/execute_retention.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a retention policy. +// // Manually apply the retention policy to force immediate removal of snapshots // that are expired according to the snapshot lifecycle policy retention rules. // The retention policy is normally applied according to its schedule. @@ -72,6 +73,7 @@ func NewExecuteRetentionFunc(tp elastictransport.Interface) NewExecuteRetention } // Run a retention policy. +// // Manually apply the retention policy to force immediate removal of snapshots // that are expired according to the snapshot lifecycle policy retention rules. // The retention policy is normally applied according to its schedule. diff --git a/typedapi/slm/executeretention/response.go b/typedapi/slm/executeretention/response.go index 520e102b12..717e0c5a0e 100644 --- a/typedapi/slm/executeretention/response.go +++ b/typedapi/slm/executeretention/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package executeretention // Response holds the response body struct for the package executeretention // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/execute_retention/ExecuteRetentionResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/execute_retention/ExecuteRetentionResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/slm/getlifecycle/get_lifecycle.go b/typedapi/slm/getlifecycle/get_lifecycle.go index 092708c16f..0984316f7b 100644 --- a/typedapi/slm/getlifecycle/get_lifecycle.go +++ b/typedapi/slm/getlifecycle/get_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get policy information. +// // Get snapshot lifecycle policy definitions and information about the latest // snapshot attempts. package getlifecycle @@ -77,6 +78,7 @@ func NewGetLifecycleFunc(tp elastictransport.Interface) NewGetLifecycle { } // Get policy information. +// // Get snapshot lifecycle policy definitions and information about the latest // snapshot attempts. // diff --git a/typedapi/slm/getlifecycle/response.go b/typedapi/slm/getlifecycle/response.go index c40af1dd68..6d4f1776c0 100644 --- a/typedapi/slm/getlifecycle/response.go +++ b/typedapi/slm/getlifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getlifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/get_lifecycle/GetSnapshotLifecycleResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/get_lifecycle/GetSnapshotLifecycleResponse.ts#L24-L27 type Response map[string]types.SnapshotLifecycle diff --git a/typedapi/slm/getstats/get_stats.go b/typedapi/slm/getstats/get_stats.go index 586c7ef89f..71c8da6a25 100644 --- a/typedapi/slm/getstats/get_stats.go +++ b/typedapi/slm/getstats/get_stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get snapshot lifecycle management statistics. +// // Get global and policy-level statistics about actions taken by snapshot // lifecycle management. package getstats @@ -71,6 +72,7 @@ func NewGetStatsFunc(tp elastictransport.Interface) NewGetStats { } // Get snapshot lifecycle management statistics. +// // Get global and policy-level statistics about actions taken by snapshot // lifecycle management. // diff --git a/typedapi/slm/getstats/response.go b/typedapi/slm/getstats/response.go index 2903adfe5d..ceed1a9ee2 100644 --- a/typedapi/slm/getstats/response.go +++ b/typedapi/slm/getstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/get_stats/GetSnapshotLifecycleStatsResponse.ts#L24-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/get_stats/GetSnapshotLifecycleStatsResponse.ts#L24-L37 type Response struct { PolicyStats []types.SnapshotPolicyStats `json:"policy_stats"` RetentionDeletionTime types.Duration `json:"retention_deletion_time"` diff --git a/typedapi/slm/getstatus/get_status.go b/typedapi/slm/getstatus/get_status.go index 3dee2b2bd9..4beace32dd 100644 --- a/typedapi/slm/getstatus/get_status.go +++ b/typedapi/slm/getstatus/get_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the snapshot lifecycle management status. package getstatus diff --git a/typedapi/slm/getstatus/response.go b/typedapi/slm/getstatus/response.go index 204e48d61f..eb44f54815 100644 --- a/typedapi/slm/getstatus/response.go +++ b/typedapi/slm/getstatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getstatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/get_status/GetSnapshotLifecycleManagementStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/get_status/GetSnapshotLifecycleManagementStatusResponse.ts#L22-L24 type Response struct { OperationMode lifecycleoperationmode.LifecycleOperationMode `json:"operation_mode"` } diff --git a/typedapi/slm/putlifecycle/put_lifecycle.go b/typedapi/slm/putlifecycle/put_lifecycle.go index a4ef41afdf..70d0efc882 100644 --- a/typedapi/slm/putlifecycle/put_lifecycle.go +++ b/typedapi/slm/putlifecycle/put_lifecycle.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a policy. +// // Create or update a snapshot lifecycle policy. // If the policy already exists, this request increments the policy version. // Only the latest version of a policy is stored. @@ -85,6 +86,7 @@ func NewPutLifecycleFunc(tp elastictransport.Interface) NewPutLifecycle { } // Create or update a policy. +// // Create or update a snapshot lifecycle policy. // If the policy already exists, this request increments the policy version. // Only the latest version of a policy is stored. diff --git a/typedapi/slm/putlifecycle/request.go b/typedapi/slm/putlifecycle/request.go index 1085e015cd..2e54e96acc 100644 --- a/typedapi/slm/putlifecycle/request.go +++ b/typedapi/slm/putlifecycle/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putlifecycle @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/put_lifecycle/PutSnapshotLifecycleRequest.ts#L26-L89 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/put_lifecycle/PutSnapshotLifecycleRequest.ts#L26-L90 type Request struct { - // Config Configuration for each snapshot created by the policy. Config *types.Configuration `json:"config,omitempty"` // Name Name automatically assigned to each snapshot created by the policy. Date math diff --git a/typedapi/slm/putlifecycle/response.go b/typedapi/slm/putlifecycle/response.go index 1294a82866..b3eadf13bd 100644 --- a/typedapi/slm/putlifecycle/response.go +++ b/typedapi/slm/putlifecycle/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putlifecycle // Response holds the response body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/put_lifecycle/PutSnapshotLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/put_lifecycle/PutSnapshotLifecycleResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/slm/start/response.go b/typedapi/slm/start/response.go index 565a2fcc08..c9fdd52927 100644 --- a/typedapi/slm/start/response.go +++ b/typedapi/slm/start/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/slm/start/start.go b/typedapi/slm/start/start.go index 7b0aa11054..ec94692d78 100644 --- a/typedapi/slm/start/start.go +++ b/typedapi/slm/start/start.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start snapshot lifecycle management. +// // Snapshot lifecycle management (SLM) starts automatically when a cluster is // formed. // Manually starting SLM is necessary only if it has been stopped using the stop @@ -73,6 +74,7 @@ func NewStartFunc(tp elastictransport.Interface) NewStart { } // Start snapshot lifecycle management. +// // Snapshot lifecycle management (SLM) starts automatically when a cluster is // formed. // Manually starting SLM is necessary only if it has been stopped using the stop diff --git a/typedapi/slm/stop/response.go b/typedapi/slm/stop/response.go index 5ec0b58931..a8bf262ea1 100644 --- a/typedapi/slm/stop/response.go +++ b/typedapi/slm/stop/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/slm/stop/stop.go b/typedapi/slm/stop/stop.go index a30d6b4f5c..9dc180e855 100644 --- a/typedapi/slm/stop/stop.go +++ b/typedapi/slm/stop/stop.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Stop snapshot lifecycle management. +// // Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. // This API is useful when you are performing maintenance on a cluster and need // to prevent SLM from performing any actions on your data streams or indices. @@ -81,6 +82,7 @@ func NewStopFunc(tp elastictransport.Interface) NewStop { } // Stop snapshot lifecycle management. +// // Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. // This API is useful when you are performing maintenance on a cluster and need // to prevent SLM from performing any actions on your data streams or indices. diff --git a/typedapi/snapshot/cleanuprepository/cleanup_repository.go b/typedapi/snapshot/cleanuprepository/cleanup_repository.go index 6fc4a25e9f..af15b2cbbe 100644 --- a/typedapi/snapshot/cleanuprepository/cleanup_repository.go +++ b/typedapi/snapshot/cleanuprepository/cleanup_repository.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clean up the snapshot repository. +// // Trigger the review of the contents of a snapshot repository and delete any // stale data not referenced by existing snapshots. package cleanuprepository @@ -79,6 +80,7 @@ func NewCleanupRepositoryFunc(tp elastictransport.Interface) NewCleanupRepositor } // Clean up the snapshot repository. +// // Trigger the review of the contents of a snapshot repository and delete any // stale data not referenced by existing snapshots. // diff --git a/typedapi/snapshot/cleanuprepository/response.go b/typedapi/snapshot/cleanuprepository/response.go index e95f9375e2..d92884bc66 100644 --- a/typedapi/snapshot/cleanuprepository/response.go +++ b/typedapi/snapshot/cleanuprepository/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package cleanuprepository @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package cleanuprepository // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L22-L27 type Response struct { - // Results Statistics for cleanup operations. Results types.CleanupRepositoryResults `json:"results"` } diff --git a/typedapi/snapshot/clone/clone.go b/typedapi/snapshot/clone/clone.go index 4561de086a..d8cd3749f2 100644 --- a/typedapi/snapshot/clone/clone.go +++ b/typedapi/snapshot/clone/clone.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clone a snapshot. +// // Clone part of all of a snapshot into another snapshot in the same repository. package clone @@ -93,6 +94,7 @@ func NewCloneFunc(tp elastictransport.Interface) NewClone { } // Clone a snapshot. +// // Clone part of all of a snapshot into another snapshot in the same repository. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-clone diff --git a/typedapi/snapshot/clone/request.go b/typedapi/snapshot/clone/request.go index d2e70fc4c7..333c336132 100644 --- a/typedapi/snapshot/clone/request.go +++ b/typedapi/snapshot/clone/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clone @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/clone/SnapshotCloneRequest.ts#L24-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/clone/SnapshotCloneRequest.ts#L24-L71 type Request struct { - // Indices A comma-separated list of indices to include in the snapshot. // Multi-target syntax is supported. Indices string `json:"indices"` diff --git a/typedapi/snapshot/clone/response.go b/typedapi/snapshot/clone/response.go index 4908f85e70..7556d8f8c7 100644 --- a/typedapi/snapshot/clone/response.go +++ b/typedapi/snapshot/clone/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clone // Response holds the response body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/clone/SnapshotCloneResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/clone/SnapshotCloneResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/snapshot/create/create.go b/typedapi/snapshot/create/create.go index 938ec3fc90..7127db3a89 100644 --- a/typedapi/snapshot/create/create.go +++ b/typedapi/snapshot/create/create.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a snapshot. +// // Take a snapshot of a cluster or of data streams and indices. package create @@ -89,6 +90,7 @@ func NewCreateFunc(tp elastictransport.Interface) NewCreate { } // Create a snapshot. +// // Take a snapshot of a cluster or of data streams and indices. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create diff --git a/typedapi/snapshot/create/request.go b/typedapi/snapshot/create/request.go index 6fa7934d04..6b289e8937 100644 --- a/typedapi/snapshot/create/request.go +++ b/typedapi/snapshot/create/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package create @@ -34,9 +34,8 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/create/SnapshotCreateRequest.ts#L24-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/create/SnapshotCreateRequest.ts#L24-L127 type Request struct { - // ExpandWildcards Determines how wildcard patterns in the `indices` parameter match data // streams and indices. // It supports comma-separated values such as `open,hidden`. diff --git a/typedapi/snapshot/create/response.go b/typedapi/snapshot/create/response.go index ec6ed1c2f6..62117a1186 100644 --- a/typedapi/snapshot/create/response.go +++ b/typedapi/snapshot/create/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package create @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/create/SnapshotCreateResponse.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/create/SnapshotCreateResponse.ts#L22-L35 type Response struct { - // Accepted Equals `true` if the snapshot was accepted. Present when the request had // `wait_for_completion` set to `false` Accepted *bool `json:"accepted,omitempty"` diff --git a/typedapi/snapshot/createrepository/create_repository.go b/typedapi/snapshot/createrepository/create_repository.go index ed6eac3c0e..67de296795 100644 --- a/typedapi/snapshot/createrepository/create_repository.go +++ b/typedapi/snapshot/createrepository/create_repository.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a snapshot repository. +// // IMPORTANT: If you are migrating searchable snapshots, the repository name // must be identical in the source and destination clusters. // To register a snapshot repository, the cluster's global metadata must be @@ -93,6 +94,7 @@ func NewCreateRepositoryFunc(tp elastictransport.Interface) NewCreateRepository } // Create or update a snapshot repository. +// // IMPORTANT: If you are migrating searchable snapshots, the repository name // must be identical in the source and destination clusters. // To register a snapshot repository, the cluster's global metadata must be diff --git a/typedapi/snapshot/createrepository/request.go b/typedapi/snapshot/createrepository/request.go index ca66fdd042..c6576d7264 100644 --- a/typedapi/snapshot/createrepository/request.go +++ b/typedapi/snapshot/createrepository/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createrepository @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package createrepository // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L80 type Request = types.Repository diff --git a/typedapi/snapshot/createrepository/response.go b/typedapi/snapshot/createrepository/response.go index 4f8af286bb..1e506e87de 100644 --- a/typedapi/snapshot/createrepository/response.go +++ b/typedapi/snapshot/createrepository/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package createrepository // Response holds the response body struct for the package createrepository // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/create_repository/SnapshotCreateRepositoryResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/create_repository/SnapshotCreateRepositoryResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/snapshot/delete/delete.go b/typedapi/snapshot/delete/delete.go index 0c6b5ad5bb..90ddf7d71f 100644 --- a/typedapi/snapshot/delete/delete.go +++ b/typedapi/snapshot/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete snapshots. package delete diff --git a/typedapi/snapshot/delete/response.go b/typedapi/snapshot/delete/response.go index 85c8b5f41e..4f1a40f7df 100644 --- a/typedapi/snapshot/delete/response.go +++ b/typedapi/snapshot/delete/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/delete/SnapshotDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/delete/SnapshotDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/snapshot/deleterepository/delete_repository.go b/typedapi/snapshot/deleterepository/delete_repository.go index e9106441bd..96f996977f 100644 --- a/typedapi/snapshot/deleterepository/delete_repository.go +++ b/typedapi/snapshot/deleterepository/delete_repository.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete snapshot repositories. +// // When a repository is unregistered, Elasticsearch removes only the reference // to the location where the repository is storing the snapshots. // The snapshots themselves are left untouched and in place. @@ -80,6 +81,7 @@ func NewDeleteRepositoryFunc(tp elastictransport.Interface) NewDeleteRepository } // Delete snapshot repositories. +// // When a repository is unregistered, Elasticsearch removes only the reference // to the location where the repository is storing the snapshots. // The snapshots themselves are left untouched and in place. diff --git a/typedapi/snapshot/deleterepository/response.go b/typedapi/snapshot/deleterepository/response.go index 52aa165e0b..323971345e 100644 --- a/typedapi/snapshot/deleterepository/response.go +++ b/typedapi/snapshot/deleterepository/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleterepository // Response holds the response body struct for the package deleterepository // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/delete_repository/SnapshotDeleteRepositoryResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/delete_repository/SnapshotDeleteRepositoryResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/snapshot/get/get.go b/typedapi/snapshot/get/get.go index 688be15de8..6f387f273f 100644 --- a/typedapi/snapshot/get/get.go +++ b/typedapi/snapshot/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get snapshot information. // diff --git a/typedapi/snapshot/get/response.go b/typedapi/snapshot/get/response.go index 0d9475142e..5212ecd1a6 100644 --- a/typedapi/snapshot/get/response.go +++ b/typedapi/snapshot/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/get/SnapshotGetResponse.ts#L25-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/get/SnapshotGetResponse.ts#L25-L47 type Response struct { - // Next If the request contained a size limit and there might be more results, a // `next` field will be added to the response. // It can be used as the `after` query parameter to fetch additional results. diff --git a/typedapi/snapshot/getrepository/get_repository.go b/typedapi/snapshot/getrepository/get_repository.go index acada47598..f2d610a153 100644 --- a/typedapi/snapshot/getrepository/get_repository.go +++ b/typedapi/snapshot/getrepository/get_repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get snapshot repository information. package getrepository diff --git a/typedapi/snapshot/getrepository/response.go b/typedapi/snapshot/getrepository/response.go index f21d432733..06972f7911 100644 --- a/typedapi/snapshot/getrepository/response.go +++ b/typedapi/snapshot/getrepository/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getrepository @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package getrepository // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/get_repository/SnapshotGetRepositoryResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/get_repository/SnapshotGetRepositoryResponse.ts#L23-L26 type Response map[string]types.Repository diff --git a/typedapi/snapshot/repositoryanalyze/repository_analyze.go b/typedapi/snapshot/repositoryanalyze/repository_analyze.go index 969f0c4788..321c09bf91 100644 --- a/typedapi/snapshot/repositoryanalyze/repository_analyze.go +++ b/typedapi/snapshot/repositoryanalyze/repository_analyze.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Analyze a snapshot repository. // @@ -698,7 +698,7 @@ func (r *RepositoryAnalyze) _repository(repository string) *RepositoryAnalyze { } // BlobCount The total number of blobs to write to the repository during the test. -// For realistic experiments, you should set it to at least `2000`. +// For realistic experiments, set this parameter to at least `2000`. // API name: blob_count func (r *RepositoryAnalyze) BlobCount(blobcount int) *RepositoryAnalyze { r.values.Set("blob_count", strconv.Itoa(blobcount)) @@ -707,6 +707,7 @@ func (r *RepositoryAnalyze) BlobCount(blobcount int) *RepositoryAnalyze { } // Concurrency The number of operations to run concurrently during the test. +// For realistic experiments, leave this parameter unset. // API name: concurrency func (r *RepositoryAnalyze) Concurrency(concurrency int) *RepositoryAnalyze { r.values.Set("concurrency", strconv.Itoa(concurrency)) @@ -727,6 +728,7 @@ func (r *RepositoryAnalyze) Detailed(detailed bool) *RepositoryAnalyze { // EarlyReadNodeCount The number of nodes on which to perform an early read operation while writing // each blob. // Early read operations are only rarely performed. +// For realistic experiments, leave this parameter unset. // API name: early_read_node_count func (r *RepositoryAnalyze) EarlyReadNodeCount(earlyreadnodecount int) *RepositoryAnalyze { r.values.Set("early_read_node_count", strconv.Itoa(earlyreadnodecount)) @@ -735,7 +737,7 @@ func (r *RepositoryAnalyze) EarlyReadNodeCount(earlyreadnodecount int) *Reposito } // MaxBlobSize The maximum size of a blob to be written during the test. -// For realistic experiments, you should set it to at least `2gb`. +// For realistic experiments, set this parameter to at least `2gb`. // API name: max_blob_size func (r *RepositoryAnalyze) MaxBlobSize(bytesize string) *RepositoryAnalyze { r.values.Set("max_blob_size", bytesize) @@ -744,7 +746,7 @@ func (r *RepositoryAnalyze) MaxBlobSize(bytesize string) *RepositoryAnalyze { } // MaxTotalDataSize An upper limit on the total size of all the blobs written during the test. -// For realistic experiments, you should set it to at least `1tb`. +// For realistic experiments, set this parameter to at least `1tb`. // API name: max_total_data_size func (r *RepositoryAnalyze) MaxTotalDataSize(bytesize string) *RepositoryAnalyze { r.values.Set("max_total_data_size", bytesize) @@ -754,6 +756,7 @@ func (r *RepositoryAnalyze) MaxTotalDataSize(bytesize string) *RepositoryAnalyze // RareActionProbability The probability of performing a rare action such as an early read, an // overwrite, or an aborted write on each blob. +// For realistic experiments, leave this parameter unset. // API name: rare_action_probability func (r *RepositoryAnalyze) RareActionProbability(rareactionprobability string) *RepositoryAnalyze { r.values.Set("rare_action_probability", rareactionprobability) @@ -762,6 +765,7 @@ func (r *RepositoryAnalyze) RareActionProbability(rareactionprobability string) } // RarelyAbortWrites Indicates whether to rarely cancel writes before they complete. +// For realistic experiments, leave this parameter unset. // API name: rarely_abort_writes func (r *RepositoryAnalyze) RarelyAbortWrites(rarelyabortwrites bool) *RepositoryAnalyze { r.values.Set("rarely_abort_writes", strconv.FormatBool(rarelyabortwrites)) @@ -770,6 +774,7 @@ func (r *RepositoryAnalyze) RarelyAbortWrites(rarelyabortwrites bool) *Repositor } // ReadNodeCount The number of nodes on which to read a blob after writing. +// For realistic experiments, leave this parameter unset. // API name: read_node_count func (r *RepositoryAnalyze) ReadNodeCount(readnodecount int) *RepositoryAnalyze { r.values.Set("read_node_count", strconv.Itoa(readnodecount)) @@ -778,7 +783,7 @@ func (r *RepositoryAnalyze) ReadNodeCount(readnodecount int) *RepositoryAnalyze } // RegisterOperationCount The minimum number of linearizable register operations to perform in total. -// For realistic experiments, you should set it to at least `100`. +// For realistic experiments, set this parameter to at least `100`. // API name: register_operation_count func (r *RepositoryAnalyze) RegisterOperationCount(registeroperationcount int) *RepositoryAnalyze { r.values.Set("register_operation_count", strconv.Itoa(registeroperationcount)) @@ -792,6 +797,7 @@ func (r *RepositoryAnalyze) RegisterOperationCount(registeroperationcount int) * // seed in each experiment. // Note that the operations are performed concurrently so might not always // happen in the same order on each run. +// For realistic experiments, leave this parameter unset. // API name: seed func (r *RepositoryAnalyze) Seed(seed int) *RepositoryAnalyze { r.values.Set("seed", strconv.Itoa(seed)) @@ -802,6 +808,8 @@ func (r *RepositoryAnalyze) Seed(seed int) *RepositoryAnalyze { // Timeout The period of time to wait for the test to complete. // If no response is received before the timeout expires, the test is cancelled // and returns an error. +// For realistic experiments, set this parameter sufficiently long to allow the +// test to complete. // API name: timeout func (r *RepositoryAnalyze) Timeout(duration string) *RepositoryAnalyze { r.values.Set("timeout", duration) diff --git a/typedapi/snapshot/repositoryanalyze/response.go b/typedapi/snapshot/repositoryanalyze/response.go index 18110e0999..f1464baffd 100644 --- a/typedapi/snapshot/repositoryanalyze/response.go +++ b/typedapi/snapshot/repositoryanalyze/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package repositoryanalyze @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package repositoryanalyze // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L24-L108 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L24-L108 type Response struct { - // BlobCount The number of blobs written to the repository during the test. BlobCount int `json:"blob_count"` // BlobPath The path in the repository under which all the blobs were written during the diff --git a/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go b/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go index 252d776593..6d33439cb3 100644 --- a/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go +++ b/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Verify the repository integrity. +// // Verify the integrity of the contents of a snapshot repository. // // This API enables you to perform a comprehensive check of the contents of a @@ -141,6 +142,7 @@ func NewRepositoryVerifyIntegrityFunc(tp elastictransport.Interface) NewReposito } // Verify the repository integrity. +// // Verify the integrity of the contents of a snapshot repository. // // This API enables you to perform a comprehensive check of the contents of a diff --git a/typedapi/snapshot/repositoryverifyintegrity/response.go b/typedapi/snapshot/repositoryverifyintegrity/response.go index 48c6c2ac22..169dd74bac 100644 --- a/typedapi/snapshot/repositoryverifyintegrity/response.go +++ b/typedapi/snapshot/repositoryverifyintegrity/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package repositoryverifyintegrity @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package repositoryverifyintegrity // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityResponse.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/snapshot/restore/request.go b/typedapi/snapshot/restore/request.go index ad20a7d4ef..f3cb017142 100644 --- a/typedapi/snapshot/restore/request.go +++ b/typedapi/snapshot/restore/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package restore @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package restore // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/restore/SnapshotRestoreRequest.ts#L25-L175 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/restore/SnapshotRestoreRequest.ts#L25-L176 type Request struct { - // FeatureStates The feature states to restore. // If `include_global_state` is `true`, the request restores all feature states // in the snapshot by default. diff --git a/typedapi/snapshot/restore/response.go b/typedapi/snapshot/restore/response.go index 480787e0cb..17a32efe27 100644 --- a/typedapi/snapshot/restore/response.go +++ b/typedapi/snapshot/restore/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package restore @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package restore // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/restore/SnapshotRestoreResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/restore/SnapshotRestoreResponse.ts#L23-L28 type Response struct { Accepted *bool `json:"accepted,omitempty"` Snapshot *types.SnapshotRestore `json:"snapshot,omitempty"` diff --git a/typedapi/snapshot/restore/restore.go b/typedapi/snapshot/restore/restore.go index 6d826df11c..dc77b685d0 100644 --- a/typedapi/snapshot/restore/restore.go +++ b/typedapi/snapshot/restore/restore.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Restore a snapshot. +// // Restore a snapshot of a cluster or data streams and indices. // // You can restore a snapshot only to a running cluster with an elected master @@ -113,6 +114,7 @@ func NewRestoreFunc(tp elastictransport.Interface) NewRestore { } // Restore a snapshot. +// // Restore a snapshot of a cluster or data streams and indices. // // You can restore a snapshot only to a running cluster with an elected master diff --git a/typedapi/snapshot/status/response.go b/typedapi/snapshot/status/response.go index 4776f535de..20dbdb79c7 100644 --- a/typedapi/snapshot/status/response.go +++ b/typedapi/snapshot/status/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package status @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package status // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/status/SnapshotStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/status/SnapshotStatusResponse.ts#L22-L24 type Response struct { Snapshots []types.Status `json:"snapshots"` } diff --git a/typedapi/snapshot/status/status.go b/typedapi/snapshot/status/status.go index 75b14f38fc..1a3ef2d7d1 100644 --- a/typedapi/snapshot/status/status.go +++ b/typedapi/snapshot/status/status.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the snapshot status. +// // Get a detailed description of the current state for each shard participating // in the snapshot. // @@ -33,6 +34,18 @@ // If needed, you can specify `` and `` to retrieve // information for specific snapshots, even if they're not currently running. // +// Note that the stats will not be available for any shard snapshots in an +// ongoing snapshot completed by a node that (even momentarily) left the +// cluster. +// Loading the stats from the repository is an expensive operation (see the +// WARNING below). +// Therefore the stats values for such shards will be -1 even though the "stage" +// value will be "DONE", in order to minimize latency. +// A "description" field will be present for a shard snapshot completed by a +// departed node explaining why the shard snapshot's stats results are invalid. +// Consequently, the total stats for the index will be less than expected due to +// the missing values from these shards. +// // WARNING: Using the API to return the status of any snapshots other than // currently running snapshots can be expensive. // The API requires a read from the repository for each shard in each snapshot. @@ -103,6 +116,7 @@ func NewStatusFunc(tp elastictransport.Interface) NewStatus { } // Get the snapshot status. +// // Get a detailed description of the current state for each shard participating // in the snapshot. // @@ -117,6 +131,18 @@ func NewStatusFunc(tp elastictransport.Interface) NewStatus { // If needed, you can specify `` and `` to retrieve // information for specific snapshots, even if they're not currently running. // +// Note that the stats will not be available for any shard snapshots in an +// ongoing snapshot completed by a node that (even momentarily) left the +// cluster. +// Loading the stats from the repository is an expensive operation (see the +// WARNING below). +// Therefore the stats values for such shards will be -1 even though the "stage" +// value will be "DONE", in order to minimize latency. +// A "description" field will be present for a shard snapshot completed by a +// departed node explaining why the shard snapshot's stats results are invalid. +// Consequently, the total stats for the index will be less than expected due to +// the missing values from these shards. +// // WARNING: Using the API to return the status of any snapshots other than // currently running snapshots can be expensive. // The API requires a read from the repository for each shard in each snapshot. diff --git a/typedapi/snapshot/verifyrepository/response.go b/typedapi/snapshot/verifyrepository/response.go index cd19d3bbb4..b237e5eab9 100644 --- a/typedapi/snapshot/verifyrepository/response.go +++ b/typedapi/snapshot/verifyrepository/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package verifyrepository @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package verifyrepository // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L31 type Response struct { - // Nodes Information about the nodes connected to the snapshot repository. // The key is the ID of the node. Nodes map[string]types.CompactNodeInfo `json:"nodes"` diff --git a/typedapi/snapshot/verifyrepository/verify_repository.go b/typedapi/snapshot/verifyrepository/verify_repository.go index d5f8414a18..fbcf67dbdc 100644 --- a/typedapi/snapshot/verifyrepository/verify_repository.go +++ b/typedapi/snapshot/verifyrepository/verify_repository.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Verify a snapshot repository. +// // Check for common misconfigurations in a snapshot repository. package verifyrepository @@ -78,6 +79,7 @@ func NewVerifyRepositoryFunc(tp elastictransport.Interface) NewVerifyRepository } // Verify a snapshot repository. +// // Check for common misconfigurations in a snapshot repository. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository diff --git a/typedapi/sql/clearcursor/clear_cursor.go b/typedapi/sql/clearcursor/clear_cursor.go index e2bf81d651..4a869c1a3a 100644 --- a/typedapi/sql/clearcursor/clear_cursor.go +++ b/typedapi/sql/clearcursor/clear_cursor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Clear an SQL search cursor. package clearcursor diff --git a/typedapi/sql/clearcursor/request.go b/typedapi/sql/clearcursor/request.go index cef5ed4649..e34e572ef0 100644 --- a/typedapi/sql/clearcursor/request.go +++ b/typedapi/sql/clearcursor/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearcursor @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package clearcursor // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L43 type Request struct { - // Cursor Cursor to clear. Cursor string `json:"cursor"` } diff --git a/typedapi/sql/clearcursor/response.go b/typedapi/sql/clearcursor/response.go index 048fb673e9..b6f7b9cebd 100644 --- a/typedapi/sql/clearcursor/response.go +++ b/typedapi/sql/clearcursor/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package clearcursor // Response holds the response body struct for the package clearcursor // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/clear_cursor/ClearSqlCursorResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/clear_cursor/ClearSqlCursorResponse.ts#L20-L22 type Response struct { Succeeded bool `json:"succeeded"` } diff --git a/typedapi/sql/deleteasync/delete_async.go b/typedapi/sql/deleteasync/delete_async.go index dee2880b8b..7214beae3d 100644 --- a/typedapi/sql/deleteasync/delete_async.go +++ b/typedapi/sql/deleteasync/delete_async.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete an async SQL search. +// // Delete an async SQL search or a stored synchronous SQL search. // If the search is still running, the API cancels it. // @@ -85,6 +86,7 @@ func NewDeleteAsyncFunc(tp elastictransport.Interface) NewDeleteAsync { } // Delete an async SQL search. +// // Delete an async SQL search or a stored synchronous SQL search. // If the search is still running, the API cancels it. // diff --git a/typedapi/sql/deleteasync/response.go b/typedapi/sql/deleteasync/response.go index 3ffdb4eef5..4dcde12ba3 100644 --- a/typedapi/sql/deleteasync/response.go +++ b/typedapi/sql/deleteasync/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deleteasync // Response holds the response body struct for the package deleteasync // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/sql/getasync/get_async.go b/typedapi/sql/getasync/get_async.go index fdb9c0a883..3344176f26 100644 --- a/typedapi/sql/getasync/get_async.go +++ b/typedapi/sql/getasync/get_async.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get async SQL search results. +// // Get the current status and available results for an async SQL search or // stored synchronous SQL search. // @@ -82,6 +83,7 @@ func NewGetAsyncFunc(tp elastictransport.Interface) NewGetAsync { } // Get async SQL search results. +// // Get the current status and available results for an async SQL search or // stored synchronous SQL search. // diff --git a/typedapi/sql/getasync/response.go b/typedapi/sql/getasync/response.go index 2f1b7d4f30..f162f0450a 100644 --- a/typedapi/sql/getasync/response.go +++ b/typedapi/sql/getasync/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getasync @@ -28,9 +28,8 @@ import ( // Response holds the response body struct for the package getasync // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/get_async/SqlGetAsyncResponse.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/get_async/SqlGetAsyncResponse.ts#L23-L60 type Response struct { - // Columns Column headings for the search results. Each object is a column. Columns []types.Column `json:"columns,omitempty"` // Cursor The cursor for the next set of paginated results. diff --git a/typedapi/sql/getasyncstatus/get_async_status.go b/typedapi/sql/getasyncstatus/get_async_status.go index c6a755ecf4..95f9e37173 100644 --- a/typedapi/sql/getasyncstatus/get_async_status.go +++ b/typedapi/sql/getasyncstatus/get_async_status.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get the async SQL search status. +// // Get the current status of an async SQL search or a stored synchronous SQL // search. package getasyncstatus @@ -79,6 +80,7 @@ func NewGetAsyncStatusFunc(tp elastictransport.Interface) NewGetAsyncStatus { } // Get the async SQL search status. +// // Get the current status of an async SQL search or a stored synchronous SQL // search. // diff --git a/typedapi/sql/getasyncstatus/response.go b/typedapi/sql/getasyncstatus/response.go index 5f4250686b..e4d9524a7d 100644 --- a/typedapi/sql/getasyncstatus/response.go +++ b/typedapi/sql/getasyncstatus/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getasyncstatus // Response holds the response body struct for the package getasyncstatus // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/get_async_status/SqlGetAsyncStatusResponse.ts#L23-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/get_async_status/SqlGetAsyncStatusResponse.ts#L23-L55 type Response struct { - // CompletionStatus The HTTP status code for the search. // The API returns this property only for completed searches. CompletionStatus *uint `json:"completion_status,omitempty"` diff --git a/typedapi/sql/query/query.go b/typedapi/sql/query/query.go index 3f98920778..5a70f264d2 100644 --- a/typedapi/sql/query/query.go +++ b/typedapi/sql/query/query.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get SQL search results. +// // Run an SQL request. package query @@ -76,6 +77,7 @@ func NewQueryFunc(tp elastictransport.Interface) NewQuery { } // Get SQL search results. +// // Run an SQL request. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-query @@ -302,6 +304,24 @@ func (r *Query) Format(format sqlformat.SqlFormat) *Query { return r } +// ProjectRouting Specifies a subset of projects to target for the search using project +// metadata tags in a subset of Lucene query syntax. +// Allowed Lucene queries: the _alias tag and a single value (possibly +// wildcarded). +// Examples: +// +// _alias:my-project +// _alias:_origin +// _alias:*pr* +// +// Supported in serverless only. +// API name: project_routing +func (r *Query) ProjectRouting(projectrouting string) *Query { + r.values.Set("project_routing", projectrouting) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/sql/query/request.go b/typedapi/sql/query/request.go index ad7347e580..a118cb28c9 100644 --- a/typedapi/sql/query/request.go +++ b/typedapi/sql/query/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package query @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/query/QuerySqlRequest.ts#L27-L151 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/query/QuerySqlRequest.ts#L28-L165 type Request struct { - // AllowPartialSearchResults If `true`, the response has partial results when there are shard request // timeouts or shard failures. // If `false`, the API returns an error with no partial results. diff --git a/typedapi/sql/query/response.go b/typedapi/sql/query/response.go index 66c6f2f0d1..56c183d385 100644 --- a/typedapi/sql/query/response.go +++ b/typedapi/sql/query/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package query @@ -28,9 +28,8 @@ import ( // Response holds the response body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/query/QuerySqlResponse.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/query/QuerySqlResponse.ts#L23-L60 type Response struct { - // Columns Column headings for the search results. Each object is a column. Columns []types.Column `json:"columns,omitempty"` // Cursor The cursor for the next set of paginated results. diff --git a/typedapi/sql/translate/request.go b/typedapi/sql/translate/request.go index c0562ee2fb..748d693dca 100644 --- a/typedapi/sql/translate/request.go +++ b/typedapi/sql/translate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package translate @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package translate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/translate/TranslateSqlRequest.ts#L25-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/translate/TranslateSqlRequest.ts#L25-L66 type Request struct { - // FetchSize The maximum number of rows (or entries) to return in one response. FetchSize *int `json:"fetch_size,omitempty"` // Filter The Elasticsearch query DSL for additional filtering. diff --git a/typedapi/sql/translate/response.go b/typedapi/sql/translate/response.go index f388d5c3c5..8f08600f71 100644 --- a/typedapi/sql/translate/response.go +++ b/typedapi/sql/translate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package translate @@ -33,14 +33,15 @@ import ( // Response holds the response body struct for the package translate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/translate/TranslateSqlResponse.ts#L27-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/translate/TranslateSqlResponse.ts#L28-L39 type Response struct { - Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` - Fields []types.FieldAndFormat `json:"fields,omitempty"` - Query *types.Query `json:"query,omitempty"` - Size *int64 `json:"size,omitempty"` - Sort []types.SortCombinations `json:"sort,omitempty"` - Source_ types.SourceConfig `json:"_source,omitempty"` + Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` + Fields []types.FieldAndFormat `json:"fields,omitempty"` + Query *types.Query `json:"query,omitempty"` + Size *int64 `json:"size,omitempty"` + Sort []types.SortCombinations `json:"sort,omitempty"` + Source_ types.SourceConfig `json:"_source,omitempty"` + TrackTotalHits types.TrackHits `json:"track_total_hits,omitempty"` } // NewResponse returns a Response @@ -150,6 +151,11 @@ func (s *Response) UnmarshalJSON(data []byte) error { } } + case "track_total_hits": + if err := dec.Decode(&s.TrackTotalHits); err != nil { + return fmt.Errorf("%s | %w", "TrackTotalHits", err) + } + } } return nil diff --git a/typedapi/sql/translate/translate.go b/typedapi/sql/translate/translate.go index 329f3a6990..2da8b2c422 100644 --- a/typedapi/sql/translate/translate.go +++ b/typedapi/sql/translate/translate.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Translate SQL into Elasticsearch queries. +// // Translate an SQL search into a search API request containing Query DSL. // It accepts the same request body parameters as the SQL search API, excluding // `cursor`. @@ -77,6 +78,7 @@ func NewTranslateFunc(tp elastictransport.Interface) NewTranslate { } // Translate SQL into Elasticsearch queries. +// // Translate an SQL search into a search API request containing Query DSL. // It accepts the same request body parameters as the SQL search API, excluding // `cursor`. diff --git a/typedapi/ssl/certificates/certificates.go b/typedapi/ssl/certificates/certificates.go index 40ac83aea0..6a9c6111ce 100644 --- a/typedapi/ssl/certificates/certificates.go +++ b/typedapi/ssl/certificates/certificates.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get SSL certificates. // diff --git a/typedapi/ssl/certificates/response.go b/typedapi/ssl/certificates/response.go index 3bfdf33c03..8b1a6eb247 100644 --- a/typedapi/ssl/certificates/response.go +++ b/typedapi/ssl/certificates/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package certificates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package certificates // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ssl/certificates/GetCertificatesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ssl/certificates/GetCertificatesResponse.ts#L22-L25 type Response []types.CertificateInformation diff --git a/typedapi/streams/logsdisable/logs_disable.go b/typedapi/streams/logsdisable/logs_disable.go index 6666281684..d2b1496020 100644 --- a/typedapi/streams/logsdisable/logs_disable.go +++ b/typedapi/streams/logsdisable/logs_disable.go @@ -16,21 +16,26 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Disable the Logs Streams feature for this cluster +// Disable logs stream. +// +// Turn off the logs stream feature for this cluster. package logsdisable import ( "context" + "encoding/json" "errors" "fmt" "io" "net/http" "net/url" + "strconv" "strings" "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -65,9 +70,11 @@ func NewLogsDisableFunc(tp elastictransport.Interface) NewLogsDisable { } } -// Disable the Logs Streams feature for this cluster +// Disable logs stream. +// +// Turn off the logs stream feature for this cluster. // -// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-logs-disable.html +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO func New(tp elastictransport.Interface) *LogsDisable { r := &LogsDisable{ transport: tp, @@ -176,8 +183,57 @@ func (r LogsDisable) Perform(providedCtx context.Context) (*http.Response, error } // Do runs the request through the transport, handle the response and returns a logsdisable.Response -func (r LogsDisable) Do(ctx context.Context) (bool, error) { - return r.IsSuccess(ctx) +func (r LogsDisable) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "streams.logs_disable") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse } // IsSuccess allows to run a query with a context and retrieve the result as a boolean. @@ -225,3 +281,67 @@ func (r *LogsDisable) Header(key, value string) *LogsDisable { return r } + +// MasterTimeout The period to wait for a connection to the master node. +// If no response is received before the timeout expires, the request fails and +// returns an error. +// API name: master_timeout +func (r *LogsDisable) MasterTimeout(duration string) *LogsDisable { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout The period to wait for a response. +// If no response is received before the timeout expires, the request fails and +// returns an error. +// API name: timeout +func (r *LogsDisable) Timeout(duration string) *LogsDisable { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *LogsDisable) ErrorTrace(errortrace bool) *LogsDisable { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *LogsDisable) FilterPath(filterpaths ...string) *LogsDisable { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *LogsDisable) Human(human bool) *LogsDisable { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *LogsDisable) Pretty(pretty bool) *LogsDisable { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/streams/logsdisable/response.go b/typedapi/streams/logsdisable/response.go new file mode 100644 index 0000000000..daffa9a396 --- /dev/null +++ b/typedapi/streams/logsdisable/response.go @@ -0,0 +1,36 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package logsdisable + +// Response holds the response body struct for the package logsdisable +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/streams/logs_disable/StreamsLogsDisableResponse.ts#L22-L25 +type Response struct { + // Acknowledged For a successful response, this value is always true. On failure, an + // exception is returned instead. + Acknowledged bool `json:"acknowledged"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/streams/logsenable/logs_enable.go b/typedapi/streams/logsenable/logs_enable.go index df3c81c7b4..07734353d2 100644 --- a/typedapi/streams/logsenable/logs_enable.go +++ b/typedapi/streams/logsenable/logs_enable.go @@ -16,21 +16,32 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Enable the Logs Streams feature for this cluster +// Enable logs stream. +// +// Turn on the logs stream feature for this cluster. +// +// NOTE: To protect existing data, this feature can be turned on only if the +// cluster does not have existing indices or data streams that match the pattern +// `logs|logs.*`. +// If those indices or data streams exist, a `409 - Conflict` response and error +// is returned. package logsenable import ( "context" + "encoding/json" "errors" "fmt" "io" "net/http" "net/url" + "strconv" "strings" "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -65,9 +76,17 @@ func NewLogsEnableFunc(tp elastictransport.Interface) NewLogsEnable { } } -// Enable the Logs Streams feature for this cluster +// Enable logs stream. +// +// Turn on the logs stream feature for this cluster. +// +// NOTE: To protect existing data, this feature can be turned on only if the +// cluster does not have existing indices or data streams that match the pattern +// `logs|logs.*`. +// If those indices or data streams exist, a `409 - Conflict` response and error +// is returned. // -// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-logs-enable.html +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO func New(tp elastictransport.Interface) *LogsEnable { r := &LogsEnable{ transport: tp, @@ -176,8 +195,57 @@ func (r LogsEnable) Perform(providedCtx context.Context) (*http.Response, error) } // Do runs the request through the transport, handle the response and returns a logsenable.Response -func (r LogsEnable) Do(ctx context.Context) (bool, error) { - return r.IsSuccess(ctx) +func (r LogsEnable) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "streams.logs_enable") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse } // IsSuccess allows to run a query with a context and retrieve the result as a boolean. @@ -225,3 +293,67 @@ func (r *LogsEnable) Header(key, value string) *LogsEnable { return r } + +// MasterTimeout The period to wait for a connection to the master node. +// If no response is received before the timeout expires, the request fails and +// returns an error. +// API name: master_timeout +func (r *LogsEnable) MasterTimeout(duration string) *LogsEnable { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout The period to wait for a response. +// If no response is received before the timeout expires, the request fails and +// returns an error. +// API name: timeout +func (r *LogsEnable) Timeout(duration string) *LogsEnable { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *LogsEnable) ErrorTrace(errortrace bool) *LogsEnable { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *LogsEnable) FilterPath(filterpaths ...string) *LogsEnable { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *LogsEnable) Human(human bool) *LogsEnable { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *LogsEnable) Pretty(pretty bool) *LogsEnable { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/streams/logsenable/response.go b/typedapi/streams/logsenable/response.go new file mode 100644 index 0000000000..dd576279fb --- /dev/null +++ b/typedapi/streams/logsenable/response.go @@ -0,0 +1,36 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package logsenable + +// Response holds the response body struct for the package logsenable +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/streams/logs_enable/StreamsLogsEnableResponse.ts#L22-L25 +type Response struct { + // Acknowledged For a successful response, this value is always true. On failure, an + // exception is returned instead. + Acknowledged bool `json:"acknowledged"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/streams/status/response.go b/typedapi/streams/status/response.go new file mode 100644 index 0000000000..9cdc519d4c --- /dev/null +++ b/typedapi/streams/status/response.go @@ -0,0 +1,38 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package status + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package status +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/streams/status/StreamsStatusResponse.ts#L20-L24 +type Response struct { + Logs types.LogsStatus `json:"logs"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/streams/status/status.go b/typedapi/streams/status/status.go index 61ed64c740..10fec12370 100644 --- a/typedapi/streams/status/status.go +++ b/typedapi/streams/status/status.go @@ -16,21 +16,26 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Return the current status of the streams feature for each streams type +// Get the status of streams. +// +// Get the current status for all types of streams. package status import ( "context" + "encoding/json" "errors" "fmt" "io" "net/http" "net/url" + "strconv" "strings" "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -65,9 +70,11 @@ func NewStatusFunc(tp elastictransport.Interface) NewStatus { } } -// Return the current status of the streams feature for each streams type +// Get the status of streams. +// +// Get the current status for all types of streams. // -// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-status.html +// https://www.elastic.co/docs/api/doc/elasticsearch#TODO func New(tp elastictransport.Interface) *Status { r := &Status{ transport: tp, @@ -174,8 +181,57 @@ func (r Status) Perform(providedCtx context.Context) (*http.Response, error) { } // Do runs the request through the transport, handle the response and returns a status.Response -func (r Status) Do(ctx context.Context) (bool, error) { - return r.IsSuccess(ctx) +func (r Status) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "streams.status") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse } // IsSuccess allows to run a query with a context and retrieve the result as a boolean. @@ -223,3 +279,56 @@ func (r *Status) Header(key, value string) *Status { return r } + +// MasterTimeout 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: master_timeout +func (r *Status) MasterTimeout(duration string) *Status { + r.values.Set("master_timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *Status) ErrorTrace(errortrace bool) *Status { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *Status) FilterPath(filterpaths ...string) *Status { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *Status) Human(human bool) *Status { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *Status) Pretty(pretty bool) *Status { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/synonyms/deletesynonym/delete_synonym.go b/typedapi/synonyms/deletesynonym/delete_synonym.go index 26733a8262..de175aab28 100644 --- a/typedapi/synonyms/deletesynonym/delete_synonym.go +++ b/typedapi/synonyms/deletesynonym/delete_synonym.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a synonym set. // diff --git a/typedapi/synonyms/deletesynonym/response.go b/typedapi/synonyms/deletesynonym/response.go index 1463e0a700..5c6a627363 100644 --- a/typedapi/synonyms/deletesynonym/response.go +++ b/typedapi/synonyms/deletesynonym/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletesynonym // Response holds the response body struct for the package deletesynonym // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go b/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go index 9ef6e0491a..9783078645 100644 --- a/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go +++ b/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a synonym rule. +// // Delete a synonym rule from a synonym set. package deletesynonymrule @@ -83,6 +84,7 @@ func NewDeleteSynonymRuleFunc(tp elastictransport.Interface) NewDeleteSynonymRul } // Delete a synonym rule. +// // Delete a synonym rule from a synonym set. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule diff --git a/typedapi/synonyms/deletesynonymrule/response.go b/typedapi/synonyms/deletesynonymrule/response.go index f335ccc86f..15724b57ae 100644 --- a/typedapi/synonyms/deletesynonymrule/response.go +++ b/typedapi/synonyms/deletesynonymrule/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletesynonymrule @@ -27,9 +27,8 @@ import ( // Response holds the response body struct for the package deletesynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L25 type Response struct { - // ReloadAnalyzersDetails Updating synonyms in a synonym set can reload the associated analyzers in // case refresh is set to true. // This information is the analyzers reloading result. diff --git a/typedapi/synonyms/getsynonym/get_synonym.go b/typedapi/synonyms/getsynonym/get_synonym.go index 563056820d..90a9ec0d64 100644 --- a/typedapi/synonyms/getsynonym/get_synonym.go +++ b/typedapi/synonyms/getsynonym/get_synonym.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a synonym set. package getsynonym diff --git a/typedapi/synonyms/getsynonym/response.go b/typedapi/synonyms/getsynonym/response.go index 39f92bb6ec..15f1abeb9e 100644 --- a/typedapi/synonyms/getsynonym/response.go +++ b/typedapi/synonyms/getsynonym/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getsynonym @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package getsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/get_synonym/SynonymsGetResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/get_synonym/SynonymsGetResponse.ts#L23-L34 type Response struct { - // Count The total number of synonyms rules that the synonyms set contains. Count int `json:"count"` // SynonymsSet Synonym rule details. diff --git a/typedapi/synonyms/getsynonymrule/get_synonym_rule.go b/typedapi/synonyms/getsynonymrule/get_synonym_rule.go index ac5d09271a..5a48df2c44 100644 --- a/typedapi/synonyms/getsynonymrule/get_synonym_rule.go +++ b/typedapi/synonyms/getsynonymrule/get_synonym_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a synonym rule. +// // Get a synonym rule from a synonym set. package getsynonymrule @@ -83,6 +84,7 @@ func NewGetSynonymRuleFunc(tp elastictransport.Interface) NewGetSynonymRule { } // Get a synonym rule. +// // Get a synonym rule from a synonym set. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule diff --git a/typedapi/synonyms/getsynonymrule/response.go b/typedapi/synonyms/getsynonymrule/response.go index 28e3886a2b..3d3507a629 100644 --- a/typedapi/synonyms/getsynonymrule/response.go +++ b/typedapi/synonyms/getsynonymrule/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getsynonymrule // Response holds the response body struct for the package getsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L25 type Response struct { - // Id Synonym Rule identifier Id string `json:"id"` // Synonyms Synonyms, in Solr format, that conform the synonym rule. diff --git a/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go b/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go index abbc4b81e0..b677db4bd8 100644 --- a/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go +++ b/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get all synonym sets. +// // Get a summary of all defined synonym sets. package getsynonymssets @@ -70,6 +71,7 @@ func NewGetSynonymsSetsFunc(tp elastictransport.Interface) NewGetSynonymsSets { } // Get all synonym sets. +// // Get a summary of all defined synonym sets. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym diff --git a/typedapi/synonyms/getsynonymssets/response.go b/typedapi/synonyms/getsynonymssets/response.go index 6b820c4df1..c2c6f78846 100644 --- a/typedapi/synonyms/getsynonymssets/response.go +++ b/typedapi/synonyms/getsynonymssets/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getsynonymssets @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package getsynonymssets // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L23-L34 type Response struct { - // Count The total number of synonyms sets defined. Count int `json:"count"` // Results The identifier and total number of defined synonym rules for each synonyms diff --git a/typedapi/synonyms/putsynonym/put_synonym.go b/typedapi/synonyms/putsynonym/put_synonym.go index 7844564667..eb25b1da74 100644 --- a/typedapi/synonyms/putsynonym/put_synonym.go +++ b/typedapi/synonyms/putsynonym/put_synonym.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a synonym set. +// // Synonyms sets are limited to a maximum of 10,000 synonym rules per set. // If you need to manage more synonym rules, you can create multiple synonym // sets. @@ -93,6 +94,7 @@ func NewPutSynonymFunc(tp elastictransport.Interface) NewPutSynonym { } // Create or update a synonym set. +// // Synonyms sets are limited to a maximum of 10,000 synonym rules per set. // If you need to manage more synonym rules, you can create multiple synonym // sets. diff --git a/typedapi/synonyms/putsynonym/request.go b/typedapi/synonyms/putsynonym/request.go index 7b67f6f2f1..f46be5fb11 100644 --- a/typedapi/synonyms/putsynonym/request.go +++ b/typedapi/synonyms/putsynonym/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putsynonym @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package putsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/put_synonym/SynonymsPutRequest.ts#L23-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/put_synonym/SynonymsPutRequest.ts#L23-L68 type Request struct { - // SynonymsSet The synonym rules definitions for the synonyms set. SynonymsSet []types.SynonymRule `json:"synonyms_set"` } diff --git a/typedapi/synonyms/putsynonym/response.go b/typedapi/synonyms/putsynonym/response.go index fbf1179e7e..0071dcde49 100644 --- a/typedapi/synonyms/putsynonym/response.go +++ b/typedapi/synonyms/putsynonym/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putsynonym @@ -27,9 +27,8 @@ import ( // Response holds the response body struct for the package putsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/put_synonym/SynonymsPutResponse.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/put_synonym/SynonymsPutResponse.ts#L23-L36 type Response struct { - // ReloadAnalyzersDetails Updating a synonyms set can reload the associated analyzers in case refresh // is set to true. // This information is the analyzers reloading result. diff --git a/typedapi/synonyms/putsynonymrule/put_synonym_rule.go b/typedapi/synonyms/putsynonymrule/put_synonym_rule.go index 5f1e42c627..d1e94a5f26 100644 --- a/typedapi/synonyms/putsynonymrule/put_synonym_rule.go +++ b/typedapi/synonyms/putsynonymrule/put_synonym_rule.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a synonym rule. +// // Create or update a synonym rule in a synonym set. // // If any of the synonym rules included is invalid, the API returns an error. @@ -93,6 +94,7 @@ func NewPutSynonymRuleFunc(tp elastictransport.Interface) NewPutSynonymRule { } // Create or update a synonym rule. +// // Create or update a synonym rule in a synonym set. // // If any of the synonym rules included is invalid, the API returns an error. diff --git a/typedapi/synonyms/putsynonymrule/request.go b/typedapi/synonyms/putsynonymrule/request.go index 05f256bca0..94c3b6bd1b 100644 --- a/typedapi/synonyms/putsynonymrule/request.go +++ b/typedapi/synonyms/putsynonymrule/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putsynonymrule @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package putsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L69 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L70 type Request struct { - // Synonyms The synonym rule information definition, which must be in Solr format. Synonyms string `json:"synonyms"` } diff --git a/typedapi/synonyms/putsynonymrule/response.go b/typedapi/synonyms/putsynonymrule/response.go index 2d6707549b..02f5206e6f 100644 --- a/typedapi/synonyms/putsynonymrule/response.go +++ b/typedapi/synonyms/putsynonymrule/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putsynonymrule @@ -27,9 +27,8 @@ import ( // Response holds the response body struct for the package putsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L25 type Response struct { - // ReloadAnalyzersDetails Updating synonyms in a synonym set can reload the associated analyzers in // case refresh is set to true. // This information is the analyzers reloading result. diff --git a/typedapi/tasks/cancel/cancel.go b/typedapi/tasks/cancel/cancel.go index 5fe0b20b53..4ea4ec72c6 100644 --- a/typedapi/tasks/cancel/cancel.go +++ b/typedapi/tasks/cancel/cancel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Cancel a task. // diff --git a/typedapi/tasks/cancel/response.go b/typedapi/tasks/cancel/response.go index 5077caac20..f50390552c 100644 --- a/typedapi/tasks/cancel/response.go +++ b/typedapi/tasks/cancel/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package cancel @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package cancel // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/cancel/CancelTasksResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/tasks/cancel/CancelTasksResponse.ts#L22-L25 type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the diff --git a/typedapi/tasks/get/get.go b/typedapi/tasks/get/get.go index d8d1483767..7006369738 100644 --- a/typedapi/tasks/get/get.go +++ b/typedapi/tasks/get/get.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get task information. +// // Get information about a task currently running in the cluster. // // WARNING: The task management API is new and should still be considered a beta @@ -85,6 +86,7 @@ func NewGetFunc(tp elastictransport.Interface) NewGet { } // Get task information. +// // Get information about a task currently running in the cluster. // // WARNING: The task management API is new and should still be considered a beta diff --git a/typedapi/tasks/get/response.go b/typedapi/tasks/get/response.go index ddfa9aa544..99a209e0bd 100644 --- a/typedapi/tasks/get/response.go +++ b/typedapi/tasks/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package get @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/get/GetTaskResponse.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/tasks/get/GetTaskResponse.ts#L24-L31 type Response struct { Completed bool `json:"completed"` Error *types.ErrorCause `json:"error,omitempty"` diff --git a/typedapi/tasks/list/list.go b/typedapi/tasks/list/list.go index a5c2d8f32b..abe13defb1 100644 --- a/typedapi/tasks/list/list.go +++ b/typedapi/tasks/list/list.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get all tasks. +// // Get information about the tasks currently running on one or more nodes in the // cluster. // @@ -138,6 +139,7 @@ func NewListFunc(tp elastictransport.Interface) NewList { } // Get all tasks. +// // Get information about the tasks currently running on one or more nodes in the // cluster. // diff --git a/typedapi/tasks/list/response.go b/typedapi/tasks/list/response.go index 75e8bb99ba..01603d1fdb 100644 --- a/typedapi/tasks/list/response.go +++ b/typedapi/tasks/list/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package list @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/list/ListTasksResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/tasks/list/ListTasksResponse.ts#L22-L25 type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the diff --git a/typedapi/textstructure/findfieldstructure/find_field_structure.go b/typedapi/textstructure/findfieldstructure/find_field_structure.go index 8822373c26..3dd847841b 100644 --- a/typedapi/textstructure/findfieldstructure/find_field_structure.go +++ b/typedapi/textstructure/findfieldstructure/find_field_structure.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Find the structure of a text field. +// // Find the structure of a text field in an Elasticsearch index. // // This API provides a starting point for extracting further information from @@ -97,6 +98,7 @@ func NewFindFieldStructureFunc(tp elastictransport.Interface) NewFindFieldStruct } // Find the structure of a text field. +// // Find the structure of a text field in an Elasticsearch index. // // This API provides a starting point for extracting further information from @@ -337,8 +339,12 @@ func (r *FindFieldStructure) Header(key, value string) *FindFieldStructure { // If the text does not have a header row, columns are named "column1", // "column2", "column3", for example. // API name: column_names -func (r *FindFieldStructure) ColumnNames(columnnames string) *FindFieldStructure { - r.values.Set("column_names", columnnames) +func (r *FindFieldStructure) ColumnNames(columnnames ...string) *FindFieldStructure { + tmp := []string{} + for _, item := range columnnames { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("column_names", strings.Join(tmp, ",")) return r } diff --git a/typedapi/textstructure/findfieldstructure/response.go b/typedapi/textstructure/findfieldstructure/response.go index c4ef74ba8e..63d782dc2a 100644 --- a/typedapi/textstructure/findfieldstructure/response.go +++ b/typedapi/textstructure/findfieldstructure/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package findfieldstructure @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package findfieldstructure // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/find_field_structure/FindFieldStructureResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/find_field_structure/FindFieldStructureResponse.ts#L31-L49 type Response struct { Charset string `json:"charset"` EcsCompatibility *ecscompatibilitytype.EcsCompatibilityType `json:"ecs_compatibility,omitempty"` diff --git a/typedapi/textstructure/findmessagestructure/find_message_structure.go b/typedapi/textstructure/findmessagestructure/find_message_structure.go index c8ecc873a3..c86bc4e587 100644 --- a/typedapi/textstructure/findmessagestructure/find_message_structure.go +++ b/typedapi/textstructure/findmessagestructure/find_message_structure.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Find the structure of text messages. +// // Find the structure of a list of text messages. // The messages must contain data that is suitable to be ingested into // Elasticsearch. @@ -104,6 +105,7 @@ func NewFindMessageStructureFunc(tp elastictransport.Interface) NewFindMessageSt } // Find the structure of text messages. +// // Find the structure of a list of text messages. // The messages must contain data that is suitable to be ingested into // Elasticsearch. @@ -355,8 +357,12 @@ func (r *FindMessageStructure) Header(key, value string) *FindMessageStructure { // If the text does not have a header role, columns are named "column1", // "column2", "column3", for example. // API name: column_names -func (r *FindMessageStructure) ColumnNames(columnnames string) *FindMessageStructure { - r.values.Set("column_names", columnnames) +func (r *FindMessageStructure) ColumnNames(columnnames ...string) *FindMessageStructure { + tmp := []string{} + for _, item := range columnnames { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("column_names", strings.Join(tmp, ",")) return r } diff --git a/typedapi/textstructure/findmessagestructure/request.go b/typedapi/textstructure/findmessagestructure/request.go index b8ffb9e054..d1fa48d16a 100644 --- a/typedapi/textstructure/findmessagestructure/request.go +++ b/typedapi/textstructure/findmessagestructure/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package findmessagestructure @@ -27,9 +27,8 @@ import ( // Request holds the request body struct for the package findmessagestructure // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/find_message_structure/FindMessageStructureRequest.ts#L25-L174 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/find_message_structure/FindMessageStructureRequest.ts#L25-L176 type Request struct { - // Messages The list of messages you want to analyze. Messages []string `json:"messages"` } diff --git a/typedapi/textstructure/findmessagestructure/response.go b/typedapi/textstructure/findmessagestructure/response.go index 7e9f9a844d..e96d59dfd7 100644 --- a/typedapi/textstructure/findmessagestructure/response.go +++ b/typedapi/textstructure/findmessagestructure/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package findmessagestructure @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package findmessagestructure // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/find_message_structure/FindMessageStructureResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/find_message_structure/FindMessageStructureResponse.ts#L31-L49 type Response struct { Charset string `json:"charset"` EcsCompatibility *ecscompatibilitytype.EcsCompatibilityType `json:"ecs_compatibility,omitempty"` diff --git a/typedapi/textstructure/findstructure/find_structure.go b/typedapi/textstructure/findstructure/find_structure.go index 05a43e5236..8f6c4a9b52 100644 --- a/typedapi/textstructure/findstructure/find_structure.go +++ b/typedapi/textstructure/findstructure/find_structure.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Find the structure of a text file. +// // The text file must contain data that is suitable to be ingested into // Elasticsearch. // @@ -61,6 +62,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/findstructureformat" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -100,6 +102,7 @@ func NewFindStructureFunc(tp elastictransport.Interface) NewFindStructure { } // Find the structure of a text file. +// // The text file must contain data that is suitable to be ingested into // Elasticsearch. // @@ -367,8 +370,12 @@ func (r *FindStructure) Charset(charset string) *FindStructure { // If the text does not have a header role, columns are named "column1", // "column2", "column3", for example. // API name: column_names -func (r *FindStructure) ColumnNames(columnnames string) *FindStructure { - r.values.Set("column_names", columnnames) +func (r *FindStructure) ColumnNames(columnnames ...string) *FindStructure { + tmp := []string{} + for _, item := range columnnames { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("column_names", strings.Join(tmp, ",")) return r } @@ -428,8 +435,8 @@ func (r *FindStructure) Explain(explain bool) *FindStructure { // the API tolerates up to 5% of rows that have a different number of columns // than the first row. // API name: format -func (r *FindStructure) Format(format string) *FindStructure { - r.values.Set("format", format) +func (r *FindStructure) Format(format findstructureformat.FindStructureFormat) *FindStructure { + r.values.Set("format", format.String()) return r } diff --git a/typedapi/textstructure/findstructure/request.go b/typedapi/textstructure/findstructure/request.go index bd66c394bb..a660f3f933 100644 --- a/typedapi/textstructure/findstructure/request.go +++ b/typedapi/textstructure/findstructure/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package findstructure @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package findstructure // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/find_structure/FindStructureRequest.ts#L24-L208 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/find_structure/FindStructureRequest.ts#L24-L209 type Request = []json.RawMessage // NewRequest returns a Request diff --git a/typedapi/textstructure/findstructure/response.go b/typedapi/textstructure/findstructure/response.go index 4958fc3f40..a516ba884e 100644 --- a/typedapi/textstructure/findstructure/response.go +++ b/typedapi/textstructure/findstructure/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package findstructure @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package findstructure // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/find_structure/FindStructureResponse.ts#L27-L97 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/find_structure/FindStructureResponse.ts#L27-L97 type Response struct { - // Charset The character encoding used to parse the text. Charset string `json:"charset"` // ColumnNames If `format` is `delimited`, the `column_names` field lists the column names diff --git a/typedapi/textstructure/testgrokpattern/request.go b/typedapi/textstructure/testgrokpattern/request.go index 7a3cf66187..12a82e1a3b 100644 --- a/typedapi/textstructure/testgrokpattern/request.go +++ b/typedapi/textstructure/testgrokpattern/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package testgrokpattern @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package testgrokpattern // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/test_grok_pattern/TestGrokPatternRequest.ts#L23-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/test_grok_pattern/TestGrokPatternRequest.ts#L23-L60 type Request struct { - // GrokPattern The Grok pattern to run on the text. GrokPattern string `json:"grok_pattern"` // Text The lines of text to run the Grok pattern on. diff --git a/typedapi/textstructure/testgrokpattern/response.go b/typedapi/textstructure/testgrokpattern/response.go index 7faeadbb45..d907590ff4 100644 --- a/typedapi/textstructure/testgrokpattern/response.go +++ b/typedapi/textstructure/testgrokpattern/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package testgrokpattern @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package testgrokpattern // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/test_grok_pattern/TestGrokPatternResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/test_grok_pattern/TestGrokPatternResponse.ts#L22-L26 type Response struct { Matches []types.MatchedText `json:"matches"` } diff --git a/typedapi/textstructure/testgrokpattern/test_grok_pattern.go b/typedapi/textstructure/testgrokpattern/test_grok_pattern.go index 811abcd366..996742e9b7 100644 --- a/typedapi/textstructure/testgrokpattern/test_grok_pattern.go +++ b/typedapi/textstructure/testgrokpattern/test_grok_pattern.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Test a Grok pattern. +// // Test a Grok pattern on one or more lines of text. // The API indicates whether the lines match the pattern together with the // offsets and lengths of the matched substrings. @@ -77,6 +78,7 @@ func NewTestGrokPatternFunc(tp elastictransport.Interface) NewTestGrokPattern { } // Test a Grok pattern. +// // Test a Grok pattern on one or more lines of text. // The API indicates whether the lines match the pattern together with the // offsets and lengths of the matched substrings. diff --git a/typedapi/transform/deletetransform/delete_transform.go b/typedapi/transform/deletetransform/delete_transform.go index ee88184dbf..190b6627b6 100644 --- a/typedapi/transform/deletetransform/delete_transform.go +++ b/typedapi/transform/deletetransform/delete_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a transform. package deletetransform diff --git a/typedapi/transform/deletetransform/response.go b/typedapi/transform/deletetransform/response.go index 9c47b55be7..9794b70924 100644 --- a/typedapi/transform/deletetransform/response.go +++ b/typedapi/transform/deletetransform/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletetransform // Response holds the response body struct for the package deletetransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/delete_transform/DeleteTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/delete_transform/DeleteTransformResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/transform/getnodestats/get_node_stats.go b/typedapi/transform/getnodestats/get_node_stats.go index a17c3fe8e9..899804c091 100644 --- a/typedapi/transform/getnodestats/get_node_stats.go +++ b/typedapi/transform/getnodestats/get_node_stats.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c -// Retrieves transform usage information for transform nodes. +// Retrieves transform usage information for transform nodes package getnodestats import ( @@ -65,7 +65,7 @@ func NewGetNodeStatsFunc(tp elastictransport.Interface) NewGetNodeStats { } } -// Retrieves transform usage information for transform nodes. +// Retrieves transform usage information for transform nodes // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html func New(tp elastictransport.Interface) *GetNodeStats { diff --git a/typedapi/transform/gettransform/get_transform.go b/typedapi/transform/gettransform/get_transform.go index cee117a648..4185d5be2b 100644 --- a/typedapi/transform/gettransform/get_transform.go +++ b/typedapi/transform/gettransform/get_transform.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get transforms. +// // Get configuration information for transforms. package gettransform @@ -76,6 +77,7 @@ func NewGetTransformFunc(tp elastictransport.Interface) NewGetTransform { } // Get transforms. +// // Get configuration information for transforms. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform diff --git a/typedapi/transform/gettransform/response.go b/typedapi/transform/gettransform/response.go index 422c9a9be2..f6043ea47a 100644 --- a/typedapi/transform/gettransform/response.go +++ b/typedapi/transform/gettransform/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package gettransform @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform/GetTransformResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform/GetTransformResponse.ts#L23-L25 type Response struct { Count int64 `json:"count"` Transforms []types.TransformSummary `json:"transforms"` diff --git a/typedapi/transform/gettransformstats/get_transform_stats.go b/typedapi/transform/gettransformstats/get_transform_stats.go index 05591aca4f..a03494fcf0 100644 --- a/typedapi/transform/gettransformstats/get_transform_stats.go +++ b/typedapi/transform/gettransformstats/get_transform_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get transform stats. // diff --git a/typedapi/transform/gettransformstats/response.go b/typedapi/transform/gettransformstats/response.go index d90626ee5e..2ba7acfbbc 100644 --- a/typedapi/transform/gettransformstats/response.go +++ b/typedapi/transform/gettransformstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package gettransformstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettransformstats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform_stats/GetTransformStatsResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform_stats/GetTransformStatsResponse.ts#L23-L25 type Response struct { Count int64 `json:"count"` Transforms []types.TransformStats `json:"transforms"` diff --git a/typedapi/transform/previewtransform/preview_transform.go b/typedapi/transform/previewtransform/preview_transform.go index 2988120bee..9a4fbc7dbf 100644 --- a/typedapi/transform/previewtransform/preview_transform.go +++ b/typedapi/transform/previewtransform/preview_transform.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Preview a transform. +// // Generates a preview of the results that you will get when you create a // transform with the same configuration. // @@ -88,6 +89,7 @@ func NewPreviewTransformFunc(tp elastictransport.Interface) NewPreviewTransform } // Preview a transform. +// // Generates a preview of the results that you will get when you create a // transform with the same configuration. // diff --git a/typedapi/transform/previewtransform/request.go b/typedapi/transform/previewtransform/request.go index e599c32dfa..3ddba26280 100644 --- a/typedapi/transform/previewtransform/request.go +++ b/typedapi/transform/previewtransform/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package previewtransform @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package previewtransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/preview_transform/PreviewTransformRequest.ts#L33-L119 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/preview_transform/PreviewTransformRequest.ts#L33-L120 type Request struct { - // Description Free text description of the transform. Description *string `json:"description,omitempty"` // Dest The destination for the transform. diff --git a/typedapi/transform/previewtransform/response.go b/typedapi/transform/previewtransform/response.go index 5d1a3b970e..1ee7a8bca8 100644 --- a/typedapi/transform/previewtransform/response.go +++ b/typedapi/transform/previewtransform/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package previewtransform @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package previewtransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/preview_transform/PreviewTransformResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/preview_transform/PreviewTransformResponse.ts#L22-L27 type Response struct { GeneratedDestIndex types.IndexState `json:"generated_dest_index"` Preview []json.RawMessage `json:"preview"` diff --git a/typedapi/transform/puttransform/put_transform.go b/typedapi/transform/puttransform/put_transform.go index 9bc3ce7b3b..114155c831 100644 --- a/typedapi/transform/puttransform/put_transform.go +++ b/typedapi/transform/puttransform/put_transform.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create a transform. +// // Creates a transform. // // A transform copies data from source indices, transforms it, and persists it @@ -116,6 +117,7 @@ func NewPutTransformFunc(tp elastictransport.Interface) NewPutTransform { } // Create a transform. +// // Creates a transform. // // A transform copies data from source indices, transforms it, and persists it diff --git a/typedapi/transform/puttransform/request.go b/typedapi/transform/puttransform/request.go index f21878d60a..63575091b2 100644 --- a/typedapi/transform/puttransform/request.go +++ b/typedapi/transform/puttransform/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttransform @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package puttransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/put_transform/PutTransformRequest.ts#L33-L130 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/put_transform/PutTransformRequest.ts#L33-L132 type Request struct { - // Description Free text description of the transform. Description *string `json:"description,omitempty"` // Dest The destination for the transform. diff --git a/typedapi/transform/puttransform/response.go b/typedapi/transform/puttransform/response.go index d41a468d22..f6de32488c 100644 --- a/typedapi/transform/puttransform/response.go +++ b/typedapi/transform/puttransform/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package puttransform // Response holds the response body struct for the package puttransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/put_transform/PutTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/put_transform/PutTransformResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/transform/resettransform/reset_transform.go b/typedapi/transform/resettransform/reset_transform.go index 530276320a..5aa3cae6eb 100644 --- a/typedapi/transform/resettransform/reset_transform.go +++ b/typedapi/transform/resettransform/reset_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Reset a transform. // diff --git a/typedapi/transform/resettransform/response.go b/typedapi/transform/resettransform/response.go index 54ff1c0bd0..253ec83a4c 100644 --- a/typedapi/transform/resettransform/response.go +++ b/typedapi/transform/resettransform/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package resettransform // Response holds the response body struct for the package resettransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/reset_transform/ResetTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/reset_transform/ResetTransformResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/transform/schedulenowtransform/response.go b/typedapi/transform/schedulenowtransform/response.go index efb5be55de..65ff38dbcd 100644 --- a/typedapi/transform/schedulenowtransform/response.go +++ b/typedapi/transform/schedulenowtransform/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package schedulenowtransform // Response holds the response body struct for the package schedulenowtransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L24 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/transform/schedulenowtransform/schedule_now_transform.go b/typedapi/transform/schedulenowtransform/schedule_now_transform.go index 8cac877ce0..c4ab376b08 100644 --- a/typedapi/transform/schedulenowtransform/schedule_now_transform.go +++ b/typedapi/transform/schedulenowtransform/schedule_now_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Schedule a transform to start now. // diff --git a/typedapi/transform/setupgrademode/response.go b/typedapi/transform/setupgrademode/response.go new file mode 100644 index 0000000000..51fcf085de --- /dev/null +++ b/typedapi/transform/setupgrademode/response.go @@ -0,0 +1,36 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package setupgrademode + +// Response holds the response body struct for the package setupgrademode +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/set_upgrade_mode/TransformSetUpgradeModeResponse.ts#L22-L25 +type Response struct { + // Acknowledged For a successful response, this value is always true. On failure, an + // exception is returned instead. + Acknowledged bool `json:"acknowledged"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/transform/setupgrademode/set_upgrade_mode.go b/typedapi/transform/setupgrademode/set_upgrade_mode.go new file mode 100644 index 0000000000..83743b0b0f --- /dev/null +++ b/typedapi/transform/setupgrademode/set_upgrade_mode.go @@ -0,0 +1,365 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Set upgrade_mode for transform indices. +// +// Sets a cluster wide upgrade_mode setting that prepares transform +// indices for an upgrade. +// When upgrading your cluster, in some circumstances you must restart your +// nodes and reindex your transform indices. In those circumstances, +// there must be no transforms running. You can close the transforms, +// do the upgrade, then open all the transforms again. Alternatively, +// you can use this API to temporarily halt tasks associated with the transforms +// and prevent new transforms from opening. You can also use this API +// during upgrades that do not require you to reindex your transform +// indices, though stopping transforms is not a requirement in that case. +// You can see the current value for the upgrade_mode setting by using the get +// transform info API. +package setupgrademode + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type SetUpgradeMode struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewSetUpgradeMode type alias for index. +type NewSetUpgradeMode func() *SetUpgradeMode + +// NewSetUpgradeModeFunc returns a new instance of SetUpgradeMode with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewSetUpgradeModeFunc(tp elastictransport.Interface) NewSetUpgradeMode { + return func() *SetUpgradeMode { + n := New(tp) + + return n + } +} + +// Set upgrade_mode for transform indices. +// +// Sets a cluster wide upgrade_mode setting that prepares transform +// indices for an upgrade. +// When upgrading your cluster, in some circumstances you must restart your +// nodes and reindex your transform indices. In those circumstances, +// there must be no transforms running. You can close the transforms, +// do the upgrade, then open all the transforms again. Alternatively, +// you can use this API to temporarily halt tasks associated with the transforms +// and prevent new transforms from opening. You can also use this API +// during upgrades that do not require you to reindex your transform +// indices, though stopping transforms is not a requirement in that case. +// You can see the current value for the upgrade_mode setting by using the get +// transform info API. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode +func New(tp elastictransport.Interface) *SetUpgradeMode { + r := &SetUpgradeMode{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *SetUpgradeMode) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == 0: + path.WriteString("/") + path.WriteString("_transform") + path.WriteString("/") + path.WriteString("set_upgrade_mode") + + method = http.MethodPost + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r SetUpgradeMode) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "transform.set_upgrade_mode") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "transform.set_upgrade_mode") + if reader := instrument.RecordRequestBody(ctx, "transform.set_upgrade_mode", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "transform.set_upgrade_mode") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the SetUpgradeMode query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a setupgrademode.Response +func (r SetUpgradeMode) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "transform.set_upgrade_mode") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r SetUpgradeMode) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "transform.set_upgrade_mode") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the SetUpgradeMode query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the SetUpgradeMode headers map. +func (r *SetUpgradeMode) Header(key, value string) *SetUpgradeMode { + r.headers.Set(key, value) + + return r +} + +// Enabled When `true`, it enables `upgrade_mode` which temporarily halts all +// transform tasks and prohibits new transform tasks from +// starting. +// API name: enabled +func (r *SetUpgradeMode) Enabled(enabled bool) *SetUpgradeMode { + r.values.Set("enabled", strconv.FormatBool(enabled)) + + return r +} + +// Timeout The time to wait for the request to be completed. +// API name: timeout +func (r *SetUpgradeMode) Timeout(duration string) *SetUpgradeMode { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *SetUpgradeMode) ErrorTrace(errortrace bool) *SetUpgradeMode { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *SetUpgradeMode) FilterPath(filterpaths ...string) *SetUpgradeMode { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"exists_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *SetUpgradeMode) Human(human bool) *SetUpgradeMode { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *SetUpgradeMode) Pretty(pretty bool) *SetUpgradeMode { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/transform/starttransform/response.go b/typedapi/transform/starttransform/response.go index 363546f083..36d4ef62c8 100644 --- a/typedapi/transform/starttransform/response.go +++ b/typedapi/transform/starttransform/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package starttransform // Response holds the response body struct for the package starttransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/start_transform/StartTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/start_transform/StartTransformResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/transform/starttransform/start_transform.go b/typedapi/transform/starttransform/start_transform.go index 8a7e7951f1..f24c3e681d 100644 --- a/typedapi/transform/starttransform/start_transform.go +++ b/typedapi/transform/starttransform/start_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start a transform. // diff --git a/typedapi/transform/stoptransform/response.go b/typedapi/transform/stoptransform/response.go index 52671b677f..610adbe529 100644 --- a/typedapi/transform/stoptransform/response.go +++ b/typedapi/transform/stoptransform/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stoptransform // Response holds the response body struct for the package stoptransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/stop_transform/StopTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/stop_transform/StopTransformResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/transform/stoptransform/stop_transform.go b/typedapi/transform/stoptransform/stop_transform.go index 1e1c3639f7..f79d48b7ed 100644 --- a/typedapi/transform/stoptransform/stop_transform.go +++ b/typedapi/transform/stoptransform/stop_transform.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Stop transforms. +// // Stops one or more transforms. package stoptransform @@ -78,6 +79,7 @@ func NewStopTransformFunc(tp elastictransport.Interface) NewStopTransform { } // Stop transforms. +// // Stops one or more transforms. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-stop-transform diff --git a/typedapi/transform/updatetransform/request.go b/typedapi/transform/updatetransform/request.go index bc89e17718..7a5296c5d6 100644 --- a/typedapi/transform/updatetransform/request.go +++ b/typedapi/transform/updatetransform/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatetransform @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package updatetransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/update_transform/UpdateTransformRequest.ts#L31-L113 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/update_transform/UpdateTransformRequest.ts#L31-L114 type Request struct { - // Description Free text description of the transform. Description *string `json:"description,omitempty"` // Dest The destination for the transform. diff --git a/typedapi/transform/updatetransform/response.go b/typedapi/transform/updatetransform/response.go index f71dac22a3..c7c2f2b0aa 100644 --- a/typedapi/transform/updatetransform/response.go +++ b/typedapi/transform/updatetransform/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatetransform @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatetransform // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/update_transform/UpdateTransformResponse.ts#L33-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/update_transform/UpdateTransformResponse.ts#L33-L51 type Response struct { Authorization *types.TransformAuthorization `json:"authorization,omitempty"` CreateTime int64 `json:"create_time"` diff --git a/typedapi/transform/updatetransform/update_transform.go b/typedapi/transform/updatetransform/update_transform.go index d908ea1bda..4d45a4e4a6 100644 --- a/typedapi/transform/updatetransform/update_transform.go +++ b/typedapi/transform/updatetransform/update_transform.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update a transform. +// // Updates certain properties of a transform. // // All updated properties except `description` do not take effect until after @@ -93,6 +94,7 @@ func NewUpdateTransformFunc(tp elastictransport.Interface) NewUpdateTransform { } // Update a transform. +// // Updates certain properties of a transform. // // All updated properties except `description` do not take effect until after diff --git a/typedapi/transform/upgradetransforms/response.go b/typedapi/transform/upgradetransforms/response.go index 9eec1e2193..58c3c50497 100644 --- a/typedapi/transform/upgradetransforms/response.go +++ b/typedapi/transform/upgradetransforms/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package upgradetransforms // Response holds the response body struct for the package upgradetransforms // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/upgrade_transforms/UpgradeTransformsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/upgrade_transforms/UpgradeTransformsResponse.ts#L25-L34 type Response struct { - // NeedsUpdate The number of transforms that need to be upgraded. NeedsUpdate int `json:"needs_update"` // NoAction The number of transforms that don’t require upgrading. diff --git a/typedapi/transform/upgradetransforms/upgrade_transforms.go b/typedapi/transform/upgradetransforms/upgrade_transforms.go index be5a92144f..059d839136 100644 --- a/typedapi/transform/upgradetransforms/upgrade_transforms.go +++ b/typedapi/transform/upgradetransforms/upgrade_transforms.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Upgrade all transforms. // diff --git a/typedapi/types/access.go b/typedapi/types/access.go index a267f04121..3b06ed0baa 100644 --- a/typedapi/types/access.go +++ b/typedapi/types/access.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Access type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Access.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Access.ts#L22-L31 type Access struct { // Replication A list of indices permission entries for cross-cluster replication. Replication []ReplicationAccess `json:"replication,omitempty"` diff --git a/typedapi/types/acknowledgement.go b/typedapi/types/acknowledgement.go index fb085f7736..355a3e109a 100644 --- a/typedapi/types/acknowledgement.go +++ b/typedapi/types/acknowledgement.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Acknowledgement type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/post/types.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/post/types.ts#L20-L23 type Acknowledgement struct { License []string `json:"license"` Message string `json:"message"` diff --git a/typedapi/types/acknowledgestate.go b/typedapi/types/acknowledgestate.go index 67aca0f8fe..e857db0f2a 100644 --- a/typedapi/types/acknowledgestate.go +++ b/typedapi/types/acknowledgestate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // AcknowledgeState type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L109-L112 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L109-L112 type AcknowledgeState struct { State acknowledgementoptions.AcknowledgementOptions `json:"state"` Timestamp DateTime `json:"timestamp"` diff --git a/typedapi/types/actionstatus.go b/typedapi/types/actionstatus.go index 9dfd018eb9..af0b8c3bd3 100644 --- a/typedapi/types/actionstatus.go +++ b/typedapi/types/actionstatus.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ActionStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L125-L130 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L125-L130 type ActionStatus struct { Ack AcknowledgeState `json:"ack"` LastExecution *ExecutionState `json:"last_execution,omitempty"` diff --git a/typedapi/types/activationstate.go b/typedapi/types/activationstate.go index 2ec1e7d43c..c95b19af10 100644 --- a/typedapi/types/activationstate.go +++ b/typedapi/types/activationstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ActivationState type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Activation.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Activation.ts#L24-L27 type ActivationState struct { Active bool `json:"active"` Timestamp DateTime `json:"timestamp"` diff --git a/typedapi/types/activationstatus.go b/typedapi/types/activationstatus.go index f66932e818..9c18bcfd60 100644 --- a/typedapi/types/activationstatus.go +++ b/typedapi/types/activationstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ActivationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Activation.ts#L29-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Activation.ts#L29-L33 type ActivationStatus struct { Actions WatcherStatusActions `json:"actions"` State ActivationState `json:"state"` diff --git a/typedapi/types/adaptiveallocations.go b/typedapi/types/adaptiveallocations.go index c9e0575429..c359b43981 100644 --- a/typedapi/types/adaptiveallocations.go +++ b/typedapi/types/adaptiveallocations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AdaptiveAllocations type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L99-L116 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L99-L116 type AdaptiveAllocations struct { // Enabled Turn on `adaptive_allocations`. Enabled *bool `json:"enabled,omitempty"` diff --git a/typedapi/types/adaptiveallocationssettings.go b/typedapi/types/adaptiveallocationssettings.go index 5eaa430f65..6c02b2041c 100644 --- a/typedapi/types/adaptiveallocationssettings.go +++ b/typedapi/types/adaptiveallocationssettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AdaptiveAllocationsSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L109-L125 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L110-L126 type AdaptiveAllocationsSettings struct { // Enabled If true, adaptive_allocations is enabled Enabled bool `json:"enabled"` diff --git a/typedapi/types/adaptiveselection.go b/typedapi/types/adaptiveselection.go index d2ac559ac7..3c018715d0 100644 --- a/typedapi/types/adaptiveselection.go +++ b/typedapi/types/adaptiveselection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AdaptiveSelection type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L441-L470 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L441-L470 type AdaptiveSelection struct { // AvgQueueSize The exponentially weighted moving average queue size of search requests on // the keyed node. diff --git a/typedapi/types/addaction.go b/typedapi/types/addaction.go index 3d8f276937..7096b55092 100644 --- a/typedapi/types/addaction.go +++ b/typedapi/types/addaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AddAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/types.ts#L41-L95 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/update_aliases/types.ts#L41-L95 type AddAction struct { // Alias Alias for the action. // Index alias names support date math. @@ -47,7 +47,7 @@ type AddAction struct { // IndexRouting Value used to route indexing operations to a specific shard. // If specified, this overwrites the `routing` value for indexing operations. // Data stream aliases don’t support this parameter. - IndexRouting *string `json:"index_routing,omitempty"` + IndexRouting []string `json:"index_routing,omitempty"` // Indices Data streams or indices for the action. // Supports wildcards (`*`). Indices []string `json:"indices,omitempty"` @@ -59,11 +59,11 @@ type AddAction struct { MustExist *bool `json:"must_exist,omitempty"` // Routing Value used to route indexing and search operations to a specific shard. // Data stream aliases don’t support this parameter. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` // SearchRouting Value used to route search operations to a specific shard. // If specified, this overwrites the `routing` value for search operations. // Data stream aliases don’t support this parameter. - SearchRouting *string `json:"search_routing,omitempty"` + SearchRouting []string `json:"search_routing,omitempty"` } func (s *AddAction) UnmarshalJSON(data []byte) error { @@ -113,8 +113,19 @@ func (s *AddAction) UnmarshalJSON(data []byte) error { } case "index_routing": - if err := dec.Decode(&s.IndexRouting); err != nil { - return fmt.Errorf("%s | %w", "IndexRouting", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "IndexRouting", err) + } + + s.IndexRouting = append(s.IndexRouting, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.IndexRouting); err != nil { + return fmt.Errorf("%s | %w", "IndexRouting", err) + } } case "indices": @@ -176,13 +187,35 @@ func (s *AddAction) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "search_routing": - if err := dec.Decode(&s.SearchRouting); err != nil { - return fmt.Errorf("%s | %w", "SearchRouting", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "SearchRouting", err) + } + + s.SearchRouting = append(s.SearchRouting, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.SearchRouting); err != nil { + return fmt.Errorf("%s | %w", "SearchRouting", err) + } } } diff --git a/typedapi/types/addindicesblockstatus.go b/typedapi/types/addindicesblockstatus.go index 53d5ad8a3b..82aa0a88bd 100644 --- a/typedapi/types/addindicesblockstatus.go +++ b/typedapi/types/addindicesblockstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AddIndicesBlockStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/add_block/IndicesAddBlockResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/add_block/IndicesAddBlockResponse.ts#L30-L33 type AddIndicesBlockStatus struct { Blocked bool `json:"blocked"` Name string `json:"name"` diff --git a/typedapi/types/adjacencymatrixaggregate.go b/typedapi/types/adjacencymatrixaggregate.go index d8315862ac..46f33749e1 100644 --- a/typedapi/types/adjacencymatrixaggregate.go +++ b/typedapi/types/adjacencymatrixaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // AdjacencyMatrixAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L649-L654 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L721-L726 type AdjacencyMatrixAggregate struct { Buckets BucketsAdjacencyMatrixBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/adjacencymatrixaggregation.go b/typedapi/types/adjacencymatrixaggregation.go index 99cb4f61e0..f14c83df23 100644 --- a/typedapi/types/adjacencymatrixaggregation.go +++ b/typedapi/types/adjacencymatrixaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AdjacencyMatrixAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L60-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L60-L70 type AdjacencyMatrixAggregation struct { // Filters Filters used to create buckets. // At least one filter is required. diff --git a/typedapi/types/adjacencymatrixbucket.go b/typedapi/types/adjacencymatrixbucket.go index 95278bf64f..e48cdf218a 100644 --- a/typedapi/types/adjacencymatrixbucket.go +++ b/typedapi/types/adjacencymatrixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // AdjacencyMatrixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L656-L658 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L728-L730 type AdjacencyMatrixBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -204,6 +204,13 @@ func (s *AdjacencyMatrixBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -232,6 +239,20 @@ func (s *AdjacencyMatrixBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/aggregate.go b/typedapi/types/aggregate.go index 72b08b39be..2665e3bcfa 100644 --- a/typedapi/types/aggregate.go +++ b/typedapi/types/aggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -38,10 +38,13 @@ package types // SimpleValueAggregate // DerivativeAggregate // BucketMetricValueAggregate +// ChangePointAggregate // StatsAggregate // StatsBucketAggregate // ExtendedStatsAggregate // ExtendedStatsBucketAggregate +// CartesianBoundsAggregate +// CartesianCentroidAggregate // GeoBoundsAggregate // GeoCentroidAggregate // HistogramAggregate @@ -93,5 +96,5 @@ package types // MatrixStatsAggregate // GeoLineAggregate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L38-L125 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L40-L130 type Aggregate any diff --git a/typedapi/types/aggregatemetricdoubleproperty.go b/typedapi/types/aggregatemetricdoubleproperty.go index 4b6d78d7bc..9e17982b5e 100644 --- a/typedapi/types/aggregatemetricdoubleproperty.go +++ b/typedapi/types/aggregatemetricdoubleproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // AggregateMetricDoubleProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/complex.ts#L60-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/complex.ts#L60-L66 type AggregateMetricDoubleProperty struct { DefaultMetric string `json:"default_metric"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` diff --git a/typedapi/types/aggregateorder.go b/typedapi/types/aggregateorder.go index 80a1500733..bf58e4c62d 100644 --- a/typedapi/types/aggregateorder.go +++ b/typedapi/types/aggregateorder.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // map[string]sortorder.SortOrder // []map[string]sortorder.SortOrder // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1052-L1054 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1081-L1083 type AggregateOrder any type AggregateOrderVariant interface { diff --git a/typedapi/types/aggregateoutput.go b/typedapi/types/aggregateoutput.go index f92b34eaab..c10eccf5f6 100644 --- a/typedapi/types/aggregateoutput.go +++ b/typedapi/types/aggregateoutput.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // AggregateOutput type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L101-L106 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L101-L106 type AggregateOutput struct { Exponent *Weights `json:"exponent,omitempty"` LogisticRegression *Weights `json:"logistic_regression,omitempty"` diff --git a/typedapi/types/aggregationbreakdown.go b/typedapi/types/aggregationbreakdown.go index 19eb48deb5..5918bf66f4 100644 --- a/typedapi/types/aggregationbreakdown.go +++ b/typedapi/types/aggregationbreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AggregationBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L26-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L26-L39 type AggregationBreakdown struct { BuildAggregation int64 `json:"build_aggregation"` BuildAggregationCount int64 `json:"build_aggregation_count"` diff --git a/typedapi/types/aggregationprofile.go b/typedapi/types/aggregationprofile.go index 7c0cf301de..6247be9d98 100644 --- a/typedapi/types/aggregationprofile.go +++ b/typedapi/types/aggregationprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AggregationProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L85-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L85-L92 type AggregationProfile struct { Breakdown AggregationBreakdown `json:"breakdown"` Children []AggregationProfile `json:"children,omitempty"` diff --git a/typedapi/types/aggregationprofiledebug.go b/typedapi/types/aggregationprofiledebug.go index 410f221476..28c62102e2 100644 --- a/typedapi/types/aggregationprofiledebug.go +++ b/typedapi/types/aggregationprofiledebug.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AggregationProfileDebug type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L42-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L42-L76 type AggregationProfileDebug struct { BruteForceUsed *int `json:"brute_force_used,omitempty"` BuiltBuckets *int `json:"built_buckets,omitempty"` diff --git a/typedapi/types/aggregationprofiledelegatedebugfilter.go b/typedapi/types/aggregationprofiledelegatedebugfilter.go index 796f122cf8..e995f14d35 100644 --- a/typedapi/types/aggregationprofiledelegatedebugfilter.go +++ b/typedapi/types/aggregationprofiledelegatedebugfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AggregationProfileDelegateDebugFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L78-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L78-L83 type AggregationProfileDelegateDebugFilter struct { Query *string `json:"query,omitempty"` ResultsFromMetadata *int `json:"results_from_metadata,omitempty"` diff --git a/typedapi/types/aggregationrange.go b/typedapi/types/aggregationrange.go index 4589a35830..8ad3ff927e 100644 --- a/typedapi/types/aggregationrange.go +++ b/typedapi/types/aggregationrange.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AggregationRange type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L691-L704 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L694-L707 type AggregationRange struct { // From Start of the range (inclusive). From *Float64 `json:"from,omitempty"` diff --git a/typedapi/types/aggregations.go b/typedapi/types/aggregations.go index a06d4da294..dc0c20f3ac 100644 --- a/typedapi/types/aggregations.go +++ b/typedapi/types/aggregations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Aggregations type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/AggregationContainer.ts#L107-L533 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/AggregationContainer.ts#L110-L555 type Aggregations struct { AdditionalAggregationsProperty map[string]json.RawMessage `json:"-"` // AdjacencyMatrix A bucket aggregation returning a form of adjacency matrix. @@ -76,8 +76,23 @@ type Aggregations struct { // Cardinality A single-value metrics aggregation that calculates an approximate count of // distinct values. Cardinality *CardinalityAggregation `json:"cardinality,omitempty"` + // CartesianBounds A metric aggregation that computes the spatial bounding box containing all + // values for a Point or Shape field. + CartesianBounds *CartesianBoundsAggregation `json:"cartesian_bounds,omitempty"` + // CartesianCentroid A metric aggregation that computes the weighted centroid from all coordinate + // values for point and shape fields. + CartesianCentroid *CartesianCentroidAggregation `json:"cartesian_centroid,omitempty"` // CategorizeText A multi-bucket aggregation that groups semi-structured text into buckets. CategorizeText *CategorizeTextAggregation `json:"categorize_text,omitempty"` + // ChangePoint A sibling pipeline that detects, spikes, dips, and change points in a metric. + // Given a distribution of values provided by the sibling multi-bucket + // aggregation, + // this aggregation indicates the bucket of any spike or dip and/or the bucket + // at which + // the largest change in the distribution of values, if they are statistically + // significant. + // There must be at least 22 bucketed values. Fewer than 1,000 is preferred. + ChangePoint *ChangePointAggregation `json:"change_point,omitempty"` // Children A single bucket aggregation that selects child documents that have the // specified type, as defined in a `join` field. Children *ChildrenAggregation `json:"children,omitempty"` @@ -374,11 +389,26 @@ func (s *Aggregations) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Cardinality", err) } + case "cartesian_bounds": + if err := dec.Decode(&s.CartesianBounds); err != nil { + return fmt.Errorf("%s | %w", "CartesianBounds", err) + } + + case "cartesian_centroid": + if err := dec.Decode(&s.CartesianCentroid); err != nil { + return fmt.Errorf("%s | %w", "CartesianCentroid", err) + } + case "categorize_text": if err := dec.Decode(&s.CategorizeText); err != nil { return fmt.Errorf("%s | %w", "CategorizeText", err) } + case "change_point": + if err := dec.Decode(&s.ChangePoint); err != nil { + return fmt.Errorf("%s | %w", "ChangePoint", err) + } + case "children": if err := dec.Decode(&s.Children); err != nil { return fmt.Errorf("%s | %w", "Children", err) @@ -439,7 +469,7 @@ func (s *Aggregations) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Filters", err) } - case "frequent_item_sets": + case "frequent_item_sets", "frequent_items": if err := dec.Decode(&s.FrequentItemSets); err != nil { return fmt.Errorf("%s | %w", "FrequentItemSets", err) } diff --git a/typedapi/types/ai21servicesettings.go b/typedapi/types/ai21servicesettings.go new file mode 100644 index 0000000000..6526de3210 --- /dev/null +++ b/typedapi/types/ai21servicesettings.go @@ -0,0 +1,122 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// Ai21ServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L292-L317 +type Ai21ServiceSettings struct { + // ApiKey A valid API key for accessing AI21 API. + // + // IMPORTANT: You need to provide the API key only once, during the inference + // model creation. + // The get inference endpoint API does not retrieve your API key. + // After creating the inference model, you cannot change the associated API key. + // If you want to use a different API key, delete the inference model and + // recreate it with the same name and the updated API key. + ApiKey *string `json:"api_key,omitempty"` + // ModelId The name of the model to use for the inference task. + // Refer to the AI21 models documentation for the list of supported models and + // versions. + // Service has been tested and confirmed to be working for `completion` and + // `chat_completion` tasks with the following models: + // * `jamba-mini` + // * `jamba-large` + ModelId string `json:"model_id"` + // RateLimit This setting helps to minimize the number of rate limit errors returned from + // the AI21 API. + // By default, the `ai21` service sets the number of requests allowed per minute + // to 200. Please refer to AI21 documentation for more details. + RateLimit *RateLimitSetting `json:"rate_limit,omitempty"` +} + +func (s *Ai21ServiceSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "api_key": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ApiKey", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ApiKey = &o + + case "model_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ModelId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ModelId = o + + case "rate_limit": + if err := dec.Decode(&s.RateLimit); err != nil { + return fmt.Errorf("%s | %w", "RateLimit", err) + } + + } + } + return nil +} + +// NewAi21ServiceSettings returns a Ai21ServiceSettings. +func NewAi21ServiceSettings() *Ai21ServiceSettings { + r := &Ai21ServiceSettings{} + + return r +} + +type Ai21ServiceSettingsVariant interface { + Ai21ServiceSettingsCaster() *Ai21ServiceSettings +} + +func (s *Ai21ServiceSettings) Ai21ServiceSettingsCaster() *Ai21ServiceSettings { + return s +} diff --git a/typedapi/types/alias.go b/typedapi/types/alias.go index 0fd0286cb2..45688e129a 100644 --- a/typedapi/types/alias.go +++ b/typedapi/types/alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,23 +31,23 @@ import ( // Alias type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/Alias.ts#L23-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/Alias.ts#L23-L53 type Alias struct { // Filter Query used to limit documents the alias can access. Filter *Query `json:"filter,omitempty"` // IndexRouting Value used to route indexing operations to a specific shard. // If specified, this overwrites the `routing` value for indexing operations. - IndexRouting *string `json:"index_routing,omitempty"` + IndexRouting []string `json:"index_routing,omitempty"` // IsHidden If `true`, the alias is hidden. // All indices for the alias must have the same `is_hidden` value. IsHidden *bool `json:"is_hidden,omitempty"` // IsWriteIndex If `true`, the index is the write index for the alias. IsWriteIndex *bool `json:"is_write_index,omitempty"` // Routing Value used to route indexing and search operations to a specific shard. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` // SearchRouting Value used to route search operations to a specific shard. // If specified, this overwrites the `routing` value for search operations. - SearchRouting *string `json:"search_routing,omitempty"` + SearchRouting []string `json:"search_routing,omitempty"` } func (s *Alias) UnmarshalJSON(data []byte) error { @@ -71,8 +71,19 @@ func (s *Alias) UnmarshalJSON(data []byte) error { } case "index_routing": - if err := dec.Decode(&s.IndexRouting); err != nil { - return fmt.Errorf("%s | %w", "IndexRouting", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "IndexRouting", err) + } + + s.IndexRouting = append(s.IndexRouting, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.IndexRouting); err != nil { + return fmt.Errorf("%s | %w", "IndexRouting", err) + } } case "is_hidden": @@ -104,13 +115,35 @@ func (s *Alias) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "search_routing": - if err := dec.Decode(&s.SearchRouting); err != nil { - return fmt.Errorf("%s | %w", "SearchRouting", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "SearchRouting", err) + } + + s.SearchRouting = append(s.SearchRouting, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.SearchRouting); err != nil { + return fmt.Errorf("%s | %w", "SearchRouting", err) + } } } diff --git a/typedapi/types/aliasdefinition.go b/typedapi/types/aliasdefinition.go index 79f6a14184..5528b9225e 100644 --- a/typedapi/types/aliasdefinition.go +++ b/typedapi/types/aliasdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AliasDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/AliasDefinition.ts#L22-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/AliasDefinition.ts#L22-L54 type AliasDefinition struct { // Filter Query used to limit documents the alias can access. Filter *Query `json:"filter,omitempty"` diff --git a/typedapi/types/aliasesrecord.go b/typedapi/types/aliasesrecord.go index 2649a05084..cc8ee05249 100644 --- a/typedapi/types/aliasesrecord.go +++ b/typedapi/types/aliasesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AliasesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/aliases/types.ts#L22-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/aliases/types.ts#L22-L53 type AliasesRecord struct { // Alias alias name Alias *string `json:"alias,omitempty"` diff --git a/typedapi/types/alibabacloudservicesettings.go b/typedapi/types/alibabacloudservicesettings.go index 85b72c75ba..5ade180782 100644 --- a/typedapi/types/alibabacloudservicesettings.go +++ b/typedapi/types/alibabacloudservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AlibabaCloudServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L292-L337 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L328-L373 type AlibabaCloudServiceSettings struct { // ApiKey A valid API key for the AlibabaCloud AI Search API. ApiKey string `json:"api_key"` diff --git a/typedapi/types/alibabacloudtasksettings.go b/typedapi/types/alibabacloudtasksettings.go index b66cb49232..9a8b3a0061 100644 --- a/typedapi/types/alibabacloudtasksettings.go +++ b/typedapi/types/alibabacloudtasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AlibabaCloudTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L339-L353 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L375-L389 type AlibabaCloudTaskSettings struct { // InputType For a `sparse_embedding` or `text_embedding` task, specify the type of input // passed to the model. diff --git a/typedapi/types/allfield.go b/typedapi/types/allfield.go index 578aac3830..30d489d84a 100644 --- a/typedapi/types/allfield.go +++ b/typedapi/types/allfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AllField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L29-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/meta-fields.ts#L29-L40 type AllField struct { Analyzer string `json:"analyzer"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/allocateaction.go b/typedapi/types/allocateaction.go index d59516c219..7e91e87ccd 100644 --- a/typedapi/types/allocateaction.go +++ b/typedapi/types/allocateaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AllocateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L133-L139 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L136-L142 type AllocateAction struct { Exclude map[string]string `json:"exclude,omitempty"` Include map[string]string `json:"include,omitempty"` diff --git a/typedapi/types/allocationdecision.go b/typedapi/types/allocationdecision.go index 70406b4681..46fad4a5f9 100644 --- a/typedapi/types/allocationdecision.go +++ b/typedapi/types/allocationdecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // AllocationDecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L27-L31 type AllocationDecision struct { Decider string `json:"decider"` Decision allocationexplaindecision.AllocationExplainDecision `json:"decision"` diff --git a/typedapi/types/allocationrecord.go b/typedapi/types/allocationrecord.go index eba33c0647..90f48578e1 100644 --- a/typedapi/types/allocationrecord.go +++ b/typedapi/types/allocationrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AllocationRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/allocation/types.ts#L25-L99 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/allocation/types.ts#L25-L99 type AllocationRecord struct { // DiskAvail Free disk space available to Elasticsearch. // Elasticsearch retrieves this metric from the node’s operating system. diff --git a/typedapi/types/allocationstore.go b/typedapi/types/allocationstore.go index 0470f80c48..1df1dfafe8 100644 --- a/typedapi/types/allocationstore.go +++ b/typedapi/types/allocationstore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AllocationStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L40-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L40-L47 type AllocationStore struct { AllocationId string `json:"allocation_id"` Found bool `json:"found"` diff --git a/typedapi/types/alwayscondition.go b/typedapi/types/alwayscondition.go index f1c7970170..048fd8d9af 100644 --- a/typedapi/types/alwayscondition.go +++ b/typedapi/types/alwayscondition.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // AlwaysCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L26-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Conditions.ts#L26-L26 type AlwaysCondition struct { } diff --git a/typedapi/types/amazonbedrockservicesettings.go b/typedapi/types/amazonbedrockservicesettings.go index 5c83b9de98..167167aeab 100644 --- a/typedapi/types/amazonbedrockservicesettings.go +++ b/typedapi/types/amazonbedrockservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AmazonBedrockServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L366-L408 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L402-L444 type AmazonBedrockServiceSettings struct { // AccessKey A valid AWS access key that has permissions to use Amazon Bedrock and access // to models for inference requests. diff --git a/typedapi/types/amazonbedrocktasksettings.go b/typedapi/types/amazonbedrocktasksettings.go index 53f76ae299..895498cda0 100644 --- a/typedapi/types/amazonbedrocktasksettings.go +++ b/typedapi/types/amazonbedrocktasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AmazonBedrockTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L410-L434 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L446-L470 type AmazonBedrockTaskSettings struct { // MaxNewTokens For a `completion` task, it sets the maximum number for the output tokens to // be generated. diff --git a/typedapi/types/amazonsagemakerservicesettings.go b/typedapi/types/amazonsagemakerservicesettings.go index 93ec8cf6b5..91a8ebe3c6 100644 --- a/typedapi/types/amazonsagemakerservicesettings.go +++ b/typedapi/types/amazonsagemakerservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // AmazonSageMakerServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L445-L499 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L481-L535 type AmazonSageMakerServiceSettings struct { // AccessKey A valid AWS access key that has permissions to use Amazon SageMaker and // access to models for invoking requests. diff --git a/typedapi/types/amazonsagemakertasksettings.go b/typedapi/types/amazonsagemakertasksettings.go index 34fbcf4716..75dd02905e 100644 --- a/typedapi/types/amazonsagemakertasksettings.go +++ b/typedapi/types/amazonsagemakertasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AmazonSageMakerTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L535-L564 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L571-L600 type AmazonSageMakerTaskSettings struct { // CustomAttributes The AWS custom attributes passed verbatim through to the model running in the // SageMaker Endpoint. diff --git a/typedapi/types/analysisconfig.go b/typedapi/types/analysisconfig.go index 5e42a13174..6e10562931 100644 --- a/typedapi/types/analysisconfig.go +++ b/typedapi/types/analysisconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnalysisConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Analysis.ts#L29-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Analysis.ts#L29-L77 type AnalysisConfig struct { // BucketSpan The size of the interval that the analysis is aggregated into, typically // between `5m` and `1h`. This value should be either a whole number of days or diff --git a/typedapi/types/analysisconfigread.go b/typedapi/types/analysisconfigread.go index 3387810449..cdaf01c4da 100644 --- a/typedapi/types/analysisconfigread.go +++ b/typedapi/types/analysisconfigread.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnalysisConfigRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Analysis.ts#L79-L148 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Analysis.ts#L79-L148 type AnalysisConfigRead struct { // BucketSpan The size of the interval that the analysis is aggregated into, typically // between `5m` and `1h`. diff --git a/typedapi/types/analysislimits.go b/typedapi/types/analysislimits.go index 9423b8ea5c..9ed423f934 100644 --- a/typedapi/types/analysislimits.go +++ b/typedapi/types/analysislimits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnalysisLimits type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Analysis.ts#L161-L172 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Analysis.ts#L161-L172 type AnalysisLimits struct { // CategorizationExamplesLimit The maximum number of examples stored per category in memory and in the // results data store. If you increase this value, more examples are available, diff --git a/typedapi/types/analysismemorylimit.go b/typedapi/types/analysismemorylimit.go index cb408c912b..c29d3e6b0b 100644 --- a/typedapi/types/analysismemorylimit.go +++ b/typedapi/types/analysismemorylimit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnalysisMemoryLimit type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Analysis.ts#L174-L179 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Analysis.ts#L174-L179 type AnalysisMemoryLimit struct { // ModelMemoryLimit Limits can be applied for the resources required to hold the mathematical // models in memory. These limits are approximate and can be set per job. They diff --git a/typedapi/types/analytics.go b/typedapi/types/analytics.go index f370e9a295..fc7a7fe08f 100644 --- a/typedapi/types/analytics.go +++ b/typedapi/types/analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Analytics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L340-L342 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L373-L375 type Analytics struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/analyticscollection.go b/typedapi/types/analyticscollection.go index 86e8c14213..27d6090858 100644 --- a/typedapi/types/analyticscollection.go +++ b/typedapi/types/analyticscollection.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // AnalyticsCollection type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/_types/BehavioralAnalytics.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/_types/BehavioralAnalytics.ts#L22-L27 type AnalyticsCollection struct { // EventDataStream Data stream for the collection. EventDataStream EventDataStream `json:"event_data_stream"` diff --git a/typedapi/types/analyticsstatistics.go b/typedapi/types/analyticsstatistics.go index 85bd7f74d4..cd93af15bf 100644 --- a/typedapi/types/analyticsstatistics.go +++ b/typedapi/types/analyticsstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnalyticsStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L58-L68 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L58-L68 type AnalyticsStatistics struct { BoxplotUsage int64 `json:"boxplot_usage"` CumulativeCardinalityUsage int64 `json:"cumulative_cardinality_usage"` diff --git a/typedapi/types/analyzedetail.go b/typedapi/types/analyzedetail.go index c7515da212..20b05bf4bf 100644 --- a/typedapi/types/analyzedetail.go +++ b/typedapi/types/analyzedetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnalyzeDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/types.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/analyze/types.ts#L24-L30 type AnalyzeDetail struct { Analyzer *AnalyzerDetail `json:"analyzer,omitempty"` Charfilters []CharFilterDetail `json:"charfilters,omitempty"` diff --git a/typedapi/types/analyzer.go b/typedapi/types/analyzer.go index 62b2b8106f..3f1f511812 100644 --- a/typedapi/types/analyzer.go +++ b/typedapi/types/analyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -72,7 +72,7 @@ package types // TurkishAnalyzer // ThaiAnalyzer // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L427-L480 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L427-L480 type Analyzer any type AnalyzerVariant interface { diff --git a/typedapi/types/analyzerdetail.go b/typedapi/types/analyzerdetail.go index a30035f8d0..66877f4b2c 100644 --- a/typedapi/types/analyzerdetail.go +++ b/typedapi/types/analyzerdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnalyzerDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/types.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/analyze/types.ts#L32-L35 type AnalyzerDetail struct { Name string `json:"name"` Tokens []ExplainAnalyzeToken `json:"tokens"` diff --git a/typedapi/types/analyzetoken.go b/typedapi/types/analyzetoken.go index ebb183b205..4f4ffbdf07 100644 --- a/typedapi/types/analyzetoken.go +++ b/typedapi/types/analyzetoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnalyzeToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/types.ts#L37-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/analyze/types.ts#L37-L44 type AnalyzeToken struct { EndOffset int64 `json:"end_offset"` Position int64 `json:"position"` diff --git a/typedapi/types/anomaly.go b/typedapi/types/anomaly.go index ae23a1fff3..1f8c7d7fa1 100644 --- a/typedapi/types/anomaly.go +++ b/typedapi/types/anomaly.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Anomaly type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Anomaly.ts#L24-L121 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Anomaly.ts#L24-L121 type Anomaly struct { // Actual The actual value for the bucket. Actual []Float64 `json:"actual,omitempty"` diff --git a/typedapi/types/anomalycause.go b/typedapi/types/anomalycause.go index bde01c1e9d..fced97e37f 100644 --- a/typedapi/types/anomalycause.go +++ b/typedapi/types/anomalycause.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnomalyCause type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Anomaly.ts#L123-L139 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Anomaly.ts#L123-L139 type AnomalyCause struct { Actual []Float64 `json:"actual,omitempty"` ByFieldName *string `json:"by_field_name,omitempty"` diff --git a/typedapi/types/anomalydetectors.go b/typedapi/types/anomalydetectors.go index 0c5d4e034c..cf86204958 100644 --- a/typedapi/types/anomalydetectors.go +++ b/typedapi/types/anomalydetectors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnomalyDetectors type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/info/types.ts#L46-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/info/types.ts#L46-L52 type AnomalyDetectors struct { CategorizationAnalyzer CategorizationAnalyzer `json:"categorization_analyzer"` CategorizationExamplesLimit int `json:"categorization_examples_limit"` diff --git a/typedapi/types/anomalyexplanation.go b/typedapi/types/anomalyexplanation.go index ba68338345..7194890d6c 100644 --- a/typedapi/types/anomalyexplanation.go +++ b/typedapi/types/anomalyexplanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnomalyExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Anomaly.ts#L157-L198 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Anomaly.ts#L157-L198 type AnomalyExplanation struct { // AnomalyCharacteristicsImpact Impact from the duration and magnitude of the detected anomaly relative to // the historical average. diff --git a/typedapi/types/anthropicservicesettings.go b/typedapi/types/anthropicservicesettings.go index 424a42794b..55ce607b09 100644 --- a/typedapi/types/anthropicservicesettings.go +++ b/typedapi/types/anthropicservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnthropicServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L588-L604 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L624-L640 type AnthropicServiceSettings struct { // ApiKey A valid API key for the Anthropic API. ApiKey string `json:"api_key"` diff --git a/typedapi/types/anthropictasksettings.go b/typedapi/types/anthropictasksettings.go index 096981877b..46f6fe6712 100644 --- a/typedapi/types/anthropictasksettings.go +++ b/typedapi/types/anthropictasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AnthropicTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L606-L631 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L642-L667 type AnthropicTaskSettings struct { // MaxTokens For a `completion` task, it is the maximum number of tokens to generate // before stopping. diff --git a/typedapi/types/apikey.go b/typedapi/types/apikey.go index d3ae354a9d..9fbec019cc 100644 --- a/typedapi/types/apikey.go +++ b/typedapi/types/apikey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/ApiKey.ts#L27-L113 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/ApiKey.ts#L27-L120 type ApiKey struct { // Access The access granted to cross-cluster API keys. // The access is composed of permissions for cross cluster search and cross @@ -42,6 +42,11 @@ type ApiKey struct { // When specified, the new access assignment fully replaces the previously // assigned access. Access *Access `json:"access,omitempty"` + // CertificateIdentity The certificate identity associated with a cross-cluster API key. + // Restricts the API key to connections authenticated by a specific TLS + // certificate. + // Only applicable to cross-cluster API keys. + CertificateIdentity *string `json:"certificate_identity,omitempty"` // Creation Creation time for the API key in milliseconds. Creation int64 `json:"creation"` // Expiration Expiration time for the API key in milliseconds. @@ -104,6 +109,18 @@ func (s *ApiKey) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Access", err) } + case "certificate_identity": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "CertificateIdentity", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.CertificateIdentity = &o + case "creation": if err := dec.Decode(&s.Creation); err != nil { return fmt.Errorf("%s | %w", "Creation", err) diff --git a/typedapi/types/apikeyaggregate.go b/typedapi/types/apikeyaggregate.go index 9a165d2f04..5af7ac72d3 100644 --- a/typedapi/types/apikeyaggregate.go +++ b/typedapi/types/apikeyaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,5 +36,5 @@ package types // DateRangeAggregate // CompositeAggregate // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_api_keys/types.ts#L122-L139 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_api_keys/types.ts#L122-L139 type ApiKeyAggregate any diff --git a/typedapi/types/apikeyaggregationcontainer.go b/typedapi/types/apikeyaggregationcontainer.go index e759df9aab..c97fb47035 100644 --- a/typedapi/types/apikeyaggregationcontainer.go +++ b/typedapi/types/apikeyaggregationcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ApiKeyAggregationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_api_keys/types.ts#L63-L120 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_api_keys/types.ts#L63-L120 type ApiKeyAggregationContainer struct { AdditionalApiKeyAggregationContainerProperty map[string]json.RawMessage `json:"-"` // Aggregations Sub-aggregations for this aggregation. diff --git a/typedapi/types/apikeyauthorization.go b/typedapi/types/apikeyauthorization.go index 06aa4f5e24..62689da82f 100644 --- a/typedapi/types/apikeyauthorization.go +++ b/typedapi/types/apikeyauthorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ApiKeyAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Authorization.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Authorization.ts#L20-L29 type ApiKeyAuthorization struct { // Id The identifier for the API key. Id string `json:"id"` diff --git a/typedapi/types/apikeyfiltersaggregation.go b/typedapi/types/apikeyfiltersaggregation.go index 2ed1bfd665..1a7b548a36 100644 --- a/typedapi/types/apikeyfiltersaggregation.go +++ b/typedapi/types/apikeyfiltersaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ApiKeyFiltersAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_api_keys/types.ts#L207-L227 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_api_keys/types.ts#L207-L227 type ApiKeyFiltersAggregation struct { // Filters Collection of queries from which to build buckets. Filters BucketsApiKeyQueryContainer `json:"filters,omitempty"` diff --git a/typedapi/types/apikeyquerycontainer.go b/typedapi/types/apikeyquerycontainer.go index dba61f75e5..dfab98bdf2 100644 --- a/typedapi/types/apikeyquerycontainer.go +++ b/typedapi/types/apikeyquerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ApiKeyQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_api_keys/types.ts#L141-L205 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_api_keys/types.ts#L141-L205 type ApiKeyQueryContainer struct { AdditionalApiKeyQueryContainerProperty map[string]json.RawMessage `json:"-"` // Bool Matches documents matching boolean combinations of other queries. diff --git a/typedapi/types/apostrophetokenfilter.go b/typedapi/types/apostrophetokenfilter.go index cf87cb214d..0368f4ca85 100644 --- a/typedapi/types/apostrophetokenfilter.go +++ b/typedapi/types/apostrophetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ApostropheTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L451-L453 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L486-L488 type ApostropheTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/appendprocessor.go b/typedapi/types/appendprocessor.go index 6e282db4dd..7d1b806751 100644 --- a/typedapi/types/appendprocessor.go +++ b/typedapi/types/appendprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,11 +31,14 @@ import ( // AppendProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L329-L344 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L329-L348 type AppendProcessor struct { // AllowDuplicates If `false`, the processor does not append values already present in the // field. AllowDuplicates *bool `json:"allow_duplicates,omitempty"` + // CopyFrom The origin field which will be appended to `field`, cannot set `value` + // simultaneously. + CopyFrom *string `json:"copy_from,omitempty"` // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. Description *string `json:"description,omitempty"` @@ -51,8 +54,9 @@ type AppendProcessor struct { // Tag Identifier for the processor. // Useful for debugging and metrics. Tag *string `json:"tag,omitempty"` - // Value The value to be appended. Supports template snippets. - Value []json.RawMessage `json:"value"` + // Value The value to be appended. Supports template snippets. May specify only one of + // `value` or `copy_from`. + Value []json.RawMessage `json:"value,omitempty"` } func (s *AppendProcessor) UnmarshalJSON(data []byte) error { @@ -84,6 +88,11 @@ func (s *AppendProcessor) UnmarshalJSON(data []byte) error { s.AllowDuplicates = &v } + case "copy_from": + if err := dec.Decode(&s.CopyFrom); err != nil { + return fmt.Errorf("%s | %w", "CopyFrom", err) + } + case "description": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/applicationglobaluserprivileges.go b/typedapi/types/applicationglobaluserprivileges.go index db2bf7ccb8..2603208fd2 100644 --- a/typedapi/types/applicationglobaluserprivileges.go +++ b/typedapi/types/applicationglobaluserprivileges.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ApplicationGlobalUserPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L436-L438 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L436-L438 type ApplicationGlobalUserPrivileges struct { Manage ManageUserPrivileges `json:"manage"` } diff --git a/typedapi/types/applicationprivileges.go b/typedapi/types/applicationprivileges.go index 54a70b598f..1ad6050017 100644 --- a/typedapi/types/applicationprivileges.go +++ b/typedapi/types/applicationprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ApplicationPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L27-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L27-L40 type ApplicationPrivileges struct { // Application The name of the application to which this entry applies. Application string `json:"application"` diff --git a/typedapi/types/applicationprivilegescheck.go b/typedapi/types/applicationprivilegescheck.go index 16bf6b3680..ad19580d76 100644 --- a/typedapi/types/applicationprivilegescheck.go +++ b/typedapi/types/applicationprivilegescheck.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ApplicationPrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges/types.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges/types.ts#L24-L34 type ApplicationPrivilegesCheck struct { // Application The name of the application. Application string `json:"application"` diff --git a/typedapi/types/applicationsprivileges.go b/typedapi/types/applicationsprivileges.go index a7da8252c3..24fdb2c7a7 100644 --- a/typedapi/types/applicationsprivileges.go +++ b/typedapi/types/applicationsprivileges.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ApplicationsPrivileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges/types.ts#L47-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges/types.ts#L49-L49 type ApplicationsPrivileges map[string]ResourcePrivileges diff --git a/typedapi/types/arabicanalyzer.go b/typedapi/types/arabicanalyzer.go index de49bee8e1..d03c90a0ea 100644 --- a/typedapi/types/arabicanalyzer.go +++ b/typedapi/types/arabicanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ArabicAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L72-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L72-L77 type ArabicAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/arabicnormalizationtokenfilter.go b/typedapi/types/arabicnormalizationtokenfilter.go index c7549a723a..d30dfeae96 100644 --- a/typedapi/types/arabicnormalizationtokenfilter.go +++ b/typedapi/types/arabicnormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ArabicNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L455-L457 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L490-L492 type ArabicNormalizationTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/arabicstemtokenfilter.go b/typedapi/types/arabicstemtokenfilter.go index c95fc75297..aef5f40dd5 100644 --- a/typedapi/types/arabicstemtokenfilter.go +++ b/typedapi/types/arabicstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ArabicStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L547-L549 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L584-L586 type ArabicStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/archive.go b/typedapi/types/archive.go index 68d837f5be..ebf4c7b964 100644 --- a/typedapi/types/archive.go +++ b/typedapi/types/archive.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Archive type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L45-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L45-L47 type Archive struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/armeniananalyzer.go b/typedapi/types/armeniananalyzer.go index 0144bebad5..4b16285a29 100644 --- a/typedapi/types/armeniananalyzer.go +++ b/typedapi/types/armeniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ArmenianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L79-L84 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L79-L84 type ArmenianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/arraycomparecondition.go b/typedapi/types/arraycomparecondition.go index 5b19f7fad5..79bac3c923 100644 --- a/typedapi/types/arraycomparecondition.go +++ b/typedapi/types/arraycomparecondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ArrayCompareCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L33-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Conditions.ts#L33-L40 type ArrayCompareCondition struct { ArrayCompareCondition map[conditionop.ConditionOp]ArrayCompareOpParams `json:"-"` Path string `json:"path"` diff --git a/typedapi/types/arraycompareopparams.go b/typedapi/types/arraycompareopparams.go index 5039db3b16..38046df50d 100644 --- a/typedapi/types/arraycompareopparams.go +++ b/typedapi/types/arraycompareopparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // ArrayCompareOpParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Conditions.ts#L28-L31 type ArrayCompareOpParams struct { Quantifier quantifier.Quantifier `json:"quantifier"` Value FieldValue `json:"value"` diff --git a/typedapi/types/arraypercentilesitem.go b/typedapi/types/arraypercentilesitem.go index a36b3408a9..162e60ef08 100644 --- a/typedapi/types/arraypercentilesitem.go +++ b/typedapi/types/arraypercentilesitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,9 +31,9 @@ import ( // ArrayPercentilesItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L162-L166 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L167-L171 type ArrayPercentilesItem struct { - Key string `json:"key"` + Key Float64 `json:"key"` Value *Float64 `json:"value,omitempty"` ValueAsString *string `json:"value_as_string,omitempty"` } @@ -54,16 +54,20 @@ func (s *ArrayPercentilesItem) UnmarshalJSON(data []byte) error { switch t { case "key": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Key", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "Key", err) + } + f := Float64(value) + s.Key = f + case float64: + f := Float64(v) + s.Key = f } - s.Key = o case "value": if err := dec.Decode(&s.Value); err != nil { diff --git a/typedapi/types/asciifoldingtokenfilter.go b/typedapi/types/asciifoldingtokenfilter.go index 4ecb1df93c..a1cd32316e 100644 --- a/typedapi/types/asciifoldingtokenfilter.go +++ b/typedapi/types/asciifoldingtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // AsciiFoldingTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L213-L217 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L224-L228 type AsciiFoldingTokenFilter struct { // PreserveOriginal If `true`, emit both original tokens and folded tokens. Defaults to `false`. PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` diff --git a/typedapi/types/asyncsearch.go b/typedapi/types/asyncsearch.go index 197c7566dc..a45173eb56 100644 --- a/typedapi/types/asyncsearch.go +++ b/typedapi/types/asyncsearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // AsyncSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/_types/AsyncSearch.ts#L30-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/async_search/_types/AsyncSearch.ts#L30-L56 type AsyncSearch struct { // Aggregations Partial aggregations results, coming from the shards that have already // completed running the query. @@ -208,6 +208,13 @@ func (s *AsyncSearch) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -236,6 +243,20 @@ func (s *AsyncSearch) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/attachmentprocessor.go b/typedapi/types/attachmentprocessor.go index cc9fd4e236..1c966388dd 100644 --- a/typedapi/types/attachmentprocessor.go +++ b/typedapi/types/attachmentprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AttachmentProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L346-L387 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L350-L391 type AttachmentProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/audit.go b/typedapi/types/audit.go index eb86d8c53e..08bcd504d5 100644 --- a/typedapi/types/audit.go +++ b/typedapi/types/audit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Audit type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L70-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L70-L72 type Audit struct { Enabled bool `json:"enabled"` Outputs []string `json:"outputs,omitempty"` diff --git a/typedapi/types/authenticateapikey.go b/typedapi/types/authenticateapikey.go index 6b9e9be697..064e8419e7 100644 --- a/typedapi/types/authenticateapikey.go +++ b/typedapi/types/authenticateapikey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,14 +26,19 @@ import ( "errors" "fmt" "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/apikeymanagedby" ) // AuthenticateApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/authenticate/SecurityAuthenticateResponse.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/authenticate/SecurityAuthenticateResponse.ts#L45-L50 type AuthenticateApiKey struct { - Id string `json:"id"` - Name *string `json:"name,omitempty"` + Id string `json:"id"` + Internal *bool `json:"internal,omitempty"` + ManagedBy apikeymanagedby.ApiKeyManagedBy `json:"managed_by"` + Name *string `json:"name,omitempty"` } func (s *AuthenticateApiKey) UnmarshalJSON(data []byte) error { @@ -56,6 +61,25 @@ func (s *AuthenticateApiKey) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Id", err) } + case "internal": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "Internal", err) + } + s.Internal = &value + case bool: + s.Internal = &v + } + + case "managed_by": + if err := dec.Decode(&s.ManagedBy); err != nil { + return fmt.Errorf("%s | %w", "ManagedBy", err) + } + case "name": if err := dec.Decode(&s.Name); err != nil { return fmt.Errorf("%s | %w", "Name", err) diff --git a/typedapi/types/authenticateduser.go b/typedapi/types/authenticateduser.go index 9a2cf55a32..436454b5b9 100644 --- a/typedapi/types/authenticateduser.go +++ b/typedapi/types/authenticateduser.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AuthenticatedUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_token/types.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_token/types.ts#L60-L65 type AuthenticatedUser struct { AuthenticationProvider *AuthenticationProvider `json:"authentication_provider,omitempty"` AuthenticationRealm UserRealm `json:"authentication_realm"` diff --git a/typedapi/types/authenticatetoken.go b/typedapi/types/authenticatetoken.go index bd1a8273d3..192d638c31 100644 --- a/typedapi/types/authenticatetoken.go +++ b/typedapi/types/authenticatetoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AuthenticateToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/authenticate/types.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/authenticate/types.ts#L22-L29 type AuthenticateToken struct { Name string `json:"name"` Type *string `json:"type,omitempty"` diff --git a/typedapi/types/authentication.go b/typedapi/types/authentication.go index 4ba9f3d58d..eb85ad388b 100644 --- a/typedapi/types/authentication.go +++ b/typedapi/types/authentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Authentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L43-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L43-L55 type Authentication struct { ApiKey map[string]string `json:"api_key,omitempty"` AuthenticationRealm AuthenticationRealm `json:"authentication_realm"` diff --git a/typedapi/types/authenticationprovider.go b/typedapi/types/authenticationprovider.go index b629d77469..fdde81def5 100644 --- a/typedapi/types/authenticationprovider.go +++ b/typedapi/types/authenticationprovider.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AuthenticationProvider type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_token/types.ts#L55-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_token/types.ts#L55-L58 type AuthenticationProvider struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/authenticationrealm.go b/typedapi/types/authenticationrealm.go index 4b30838243..acbaa29616 100644 --- a/typedapi/types/authenticationrealm.go +++ b/typedapi/types/authenticationrealm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AuthenticationRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L57-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L57-L61 type AuthenticationRealm struct { Domain *string `json:"domain,omitempty"` Name string `json:"name"` diff --git a/typedapi/types/autodatehistogramaggregate.go b/typedapi/types/autodatehistogramaggregate.go index 4e020cf0f2..88c58df064 100644 --- a/typedapi/types/autodatehistogramaggregate.go +++ b/typedapi/types/autodatehistogramaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // AutoDateHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L393-L400 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L465-L472 type AutoDateHistogramAggregate struct { Buckets BucketsDateHistogramBucket `json:"buckets"` Interval string `json:"interval"` diff --git a/typedapi/types/autodatehistogramaggregation.go b/typedapi/types/autodatehistogramaggregation.go index 68fb5f9b8e..990ce36e2b 100644 --- a/typedapi/types/autodatehistogramaggregation.go +++ b/typedapi/types/autodatehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // AutoDateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L72-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L72-L110 type AutoDateHistogramAggregation struct { // Buckets The target number of buckets. Buckets *int `json:"buckets,omitempty"` diff --git a/typedapi/types/autofollowedcluster.go b/typedapi/types/autofollowedcluster.go index cf4df00dc3..a8afda9db9 100644 --- a/typedapi/types/autofollowedcluster.go +++ b/typedapi/types/autofollowedcluster.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // AutoFollowedCluster type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/stats/types.ts.ts#L26-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/stats/types.ts.ts#L26-L30 type AutoFollowedCluster struct { ClusterName string `json:"cluster_name"` LastSeenMetadataVersion int64 `json:"last_seen_metadata_version"` diff --git a/typedapi/types/autofollowpattern.go b/typedapi/types/autofollowpattern.go index 2b88bd1c8c..187801c133 100644 --- a/typedapi/types/autofollowpattern.go +++ b/typedapi/types/autofollowpattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // AutoFollowPattern type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/get_auto_follow_pattern/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/get_auto_follow_pattern/types.ts#L23-L26 type AutoFollowPattern struct { Name string `json:"name"` Pattern AutoFollowPatternSummary `json:"pattern"` diff --git a/typedapi/types/autofollowpatternsummary.go b/typedapi/types/autofollowpatternsummary.go index 5543a389ed..045c322257 100644 --- a/typedapi/types/autofollowpatternsummary.go +++ b/typedapi/types/autofollowpatternsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AutoFollowPatternSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/get_auto_follow_pattern/types.ts#L28-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/get_auto_follow_pattern/types.ts#L28-L52 type AutoFollowPatternSummary struct { Active bool `json:"active"` // FollowIndexPattern The name of follower index. diff --git a/typedapi/types/autofollowstats.go b/typedapi/types/autofollowstats.go index 7b2e04b029..899692ba95 100644 --- a/typedapi/types/autofollowstats.go +++ b/typedapi/types/autofollowstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AutoFollowStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/stats/types.ts.ts#L32-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/stats/types.ts.ts#L32-L47 type AutoFollowStats struct { AutoFollowedClusters []AutoFollowedCluster `json:"auto_followed_clusters"` // NumberOfFailedFollowIndices The number of indices that the auto-follow coordinator failed to diff --git a/typedapi/types/autoscalingcapacity.go b/typedapi/types/autoscalingcapacity.go index 9aeb3ec00e..d936e46cdb 100644 --- a/typedapi/types/autoscalingcapacity.go +++ b/typedapi/types/autoscalingcapacity.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // AutoscalingCapacity type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L38-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L38-L41 type AutoscalingCapacity struct { Node AutoscalingResources `json:"node"` Total AutoscalingResources `json:"total"` diff --git a/typedapi/types/autoscalingdecider.go b/typedapi/types/autoscalingdecider.go index 9c591e03d7..d7cc0ab365 100644 --- a/typedapi/types/autoscalingdecider.go +++ b/typedapi/types/autoscalingdecider.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AutoscalingDecider type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L52-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L52-L56 type AutoscalingDecider struct { ReasonDetails json.RawMessage `json:"reason_details,omitempty"` ReasonSummary *string `json:"reason_summary,omitempty"` diff --git a/typedapi/types/autoscalingdeciders.go b/typedapi/types/autoscalingdeciders.go index 3bc696a77f..b15e2108c5 100644 --- a/typedapi/types/autoscalingdeciders.go +++ b/typedapi/types/autoscalingdeciders.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // AutoscalingDeciders type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L31-L36 type AutoscalingDeciders struct { CurrentCapacity AutoscalingCapacity `json:"current_capacity"` CurrentNodes []AutoscalingNode `json:"current_nodes"` diff --git a/typedapi/types/autoscalingnode.go b/typedapi/types/autoscalingnode.go index f76d97f92e..aab1119679 100644 --- a/typedapi/types/autoscalingnode.go +++ b/typedapi/types/autoscalingnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // AutoscalingNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L48-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L48-L50 type AutoscalingNode struct { Name string `json:"name"` } diff --git a/typedapi/types/autoscalingpolicy.go b/typedapi/types/autoscalingpolicy.go index a3f8e7a2ec..2abba2c7ad 100644 --- a/typedapi/types/autoscalingpolicy.go +++ b/typedapi/types/autoscalingpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // AutoscalingPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/_types/AutoscalingPolicy.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/_types/AutoscalingPolicy.ts#L23-L30 type AutoscalingPolicy struct { // Deciders Decider settings. Deciders map[string]json.RawMessage `json:"deciders"` diff --git a/typedapi/types/autoscalingresources.go b/typedapi/types/autoscalingresources.go index c36e0d9373..788ab4d699 100644 --- a/typedapi/types/autoscalingresources.go +++ b/typedapi/types/autoscalingresources.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AutoscalingResources type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L43-L46 type AutoscalingResources struct { Memory int `json:"memory"` Storage int `json:"storage"` diff --git a/typedapi/types/averageaggregation.go b/typedapi/types/averageaggregation.go index 327149200a..46fc60a427 100644 --- a/typedapi/types/averageaggregation.go +++ b/typedapi/types/averageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L55-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L55-L55 type AverageAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/averagebucketaggregation.go b/typedapi/types/averagebucketaggregation.go index 4453336494..d689cad8eb 100644 --- a/typedapi/types/averagebucketaggregation.go +++ b/typedapi/types/averagebucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // AverageBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L78-L81 type AverageBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/avgaggregate.go b/typedapi/types/avgaggregate.go index b8c856cd77..d3bf544ead 100644 --- a/typedapi/types/avgaggregate.go +++ b/typedapi/types/avgaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AvgAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L218-L222 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L223-L227 type AvgAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to diff --git a/typedapi/types/azureaistudioservicesettings.go b/typedapi/types/azureaistudioservicesettings.go index 9b08c17232..8c0bd330ed 100644 --- a/typedapi/types/azureaistudioservicesettings.go +++ b/typedapi/types/azureaistudioservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AzureAiStudioServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L641-L683 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L677-L719 type AzureAiStudioServiceSettings struct { // ApiKey A valid API key of your Azure AI Studio model deployment. // This key can be found on the overview page for your deployment in the diff --git a/typedapi/types/azureaistudiotasksettings.go b/typedapi/types/azureaistudiotasksettings.go index 7869c49aeb..f32f19bf3f 100644 --- a/typedapi/types/azureaistudiotasksettings.go +++ b/typedapi/types/azureaistudiotasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AzureAiStudioTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L685-L713 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L721-L758 type AzureAiStudioTaskSettings struct { // DoSample For a `completion` task, instruct the inference process to perform sampling. // It has no effect unless `temperature` or `top_p` is specified. @@ -39,11 +39,16 @@ type AzureAiStudioTaskSettings struct { // MaxNewTokens For a `completion` task, provide a hint for the maximum number of output // tokens to be generated. MaxNewTokens *int `json:"max_new_tokens,omitempty"` + // ReturnDocuments For a `rerank` task, return doc text within the results. + ReturnDocuments *bool `json:"return_documents,omitempty"` // Temperature For a `completion` task, control the apparent creativity of generated // completions with a sampling temperature. // It must be a number in the range of 0.0 to 2.0. // It should not be used if `top_p` is specified. Temperature *float32 `json:"temperature,omitempty"` + // TopN For a `rerank` task, the number of most relevant documents to return. + // It defaults to the number of the documents. + TopN *int `json:"top_n,omitempty"` // TopP For a `completion` task, make the model consider the results of the tokens // with nucleus sampling probability. // It is an alternative value to `temperature` and must be a number in the range @@ -102,6 +107,20 @@ func (s *AzureAiStudioTaskSettings) UnmarshalJSON(data []byte) error { s.MaxNewTokens = &f } + case "return_documents": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "ReturnDocuments", err) + } + s.ReturnDocuments = &value + case bool: + s.ReturnDocuments = &v + } + case "temperature": var tmp any dec.Decode(&tmp) @@ -118,6 +137,22 @@ func (s *AzureAiStudioTaskSettings) UnmarshalJSON(data []byte) error { s.Temperature = &f } + case "top_n": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "TopN", err) + } + s.TopN = &value + case float64: + f := int(v) + s.TopN = &f + } + case "top_p": var tmp any dec.Decode(&tmp) diff --git a/typedapi/types/azureopenaiservicesettings.go b/typedapi/types/azureopenaiservicesettings.go index 544b0ee44f..a719a3a8b4 100644 --- a/typedapi/types/azureopenaiservicesettings.go +++ b/typedapi/types/azureopenaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AzureOpenAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L724-L769 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L770-L815 type AzureOpenAIServiceSettings struct { // ApiKey A valid API key for your Azure OpenAI account. // You must specify either `api_key` or `entra_id`. diff --git a/typedapi/types/azureopenaitasksettings.go b/typedapi/types/azureopenaitasksettings.go index 9a3c6946f7..d533232ad9 100644 --- a/typedapi/types/azureopenaitasksettings.go +++ b/typedapi/types/azureopenaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AzureOpenAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L771-L777 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L817-L823 type AzureOpenAITaskSettings struct { // User For a `completion` or `text_embedding` task, specify the user issuing the // request. diff --git a/typedapi/types/azurerepository.go b/typedapi/types/azurerepository.go index be262954d9..24325e7f05 100644 --- a/typedapi/types/azurerepository.go +++ b/typedapi/types/azurerepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // AzureRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L40-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L40-L50 type AzureRepository struct { // Settings The repository settings. Settings *AzureRepositorySettings `json:"settings,omitempty"` diff --git a/typedapi/types/azurerepositorysettings.go b/typedapi/types/azurerepositorysettings.go index 6aa6eadaf4..ef0699b926 100644 --- a/typedapi/types/azurerepositorysettings.go +++ b/typedapi/types/azurerepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // AzureRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L145-L196 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L145-L196 type AzureRepositorySettings struct { // BasePath The path to the repository data within the container. // It defaults to the root directory. diff --git a/typedapi/types/base.go b/typedapi/types/base.go index 3c1db531b9..ef9f7e187d 100644 --- a/typedapi/types/base.go +++ b/typedapi/types/base.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Base type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L27-L30 type Base struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/basqueanalyzer.go b/typedapi/types/basqueanalyzer.go index c0b5894ed9..767508b77f 100644 --- a/typedapi/types/basqueanalyzer.go +++ b/typedapi/types/basqueanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BasqueAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L86-L91 type BasqueAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/bengalianalyzer.go b/typedapi/types/bengalianalyzer.go index 92c4e8f759..cc82ab9e90 100644 --- a/typedapi/types/bengalianalyzer.go +++ b/typedapi/types/bengalianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BengaliAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L93-L98 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L93-L98 type BengaliAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/bengalinormalizationtokenfilter.go b/typedapi/types/bengalinormalizationtokenfilter.go index 6d45a6ccfe..25ed454ded 100644 --- a/typedapi/types/bengalinormalizationtokenfilter.go +++ b/typedapi/types/bengalinormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // BengaliNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L490-L492 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L525-L527 type BengaliNormalizationTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/binaryproperty.go b/typedapi/types/binaryproperty.go index 52bbc64b62..56965685d8 100644 --- a/typedapi/types/binaryproperty.go +++ b/typedapi/types/binaryproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // BinaryProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L57-L59 type BinaryProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` diff --git a/typedapi/types/blobdetails.go b/typedapi/types/blobdetails.go index ef869305dc..5659c92bc5 100644 --- a/typedapi/types/blobdetails.go +++ b/typedapi/types/blobdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BlobDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L250-L284 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L250-L284 type BlobDetails struct { // Name The name of the blob. Name string `json:"name"` diff --git a/typedapi/types/body.go b/typedapi/types/body.go index 74deee5270..e38e216312 100644 --- a/typedapi/types/body.go +++ b/typedapi/types/body.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Body type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/list_queries/ListQueriesResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/list_queries/ListQueriesResponse.ts#L24-L30 type Body struct { Id int64 `json:"id"` Node string `json:"node"` diff --git a/typedapi/types/booleanproperty.go b/typedapi/types/booleanproperty.go index fc26f6216c..4083802036 100644 --- a/typedapi/types/booleanproperty.go +++ b/typedapi/types/booleanproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // BooleanProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L60-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L61-L76 type BooleanProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/boolquery.go b/typedapi/types/boolquery.go index 414b25c741..e473ccb599 100644 --- a/typedapi/types/boolquery.go +++ b/typedapi/types/boolquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BoolQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L29-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L29-L56 type BoolQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/boostingquery.go b/typedapi/types/boostingquery.go index b1be9f4f53..5887d81d5f 100644 --- a/typedapi/types/boostingquery.go +++ b/typedapi/types/boostingquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BoostingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L58-L74 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L58-L74 type BoostingQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/boxplotaggregate.go b/typedapi/types/boxplotaggregate.go index 3006a1fae1..27fe0d4030 100644 --- a/typedapi/types/boxplotaggregate.go +++ b/typedapi/types/boxplotaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BoxPlotAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L808-L827 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L880-L899 type BoxPlotAggregate struct { Lower Float64 `json:"lower"` LowerAsString *string `json:"lower_as_string,omitempty"` diff --git a/typedapi/types/boxplotaggregation.go b/typedapi/types/boxplotaggregation.go index 756408d070..87232ea154 100644 --- a/typedapi/types/boxplotaggregation.go +++ b/typedapi/types/boxplotaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // BoxplotAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L57-L68 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L57-L68 type BoxplotAggregation struct { // Compression Limits the maximum number of nodes used by the underlying TDigest algorithm // to `20 * compression`, enabling control of memory usage and approximation diff --git a/typedapi/types/braziliananalyzer.go b/typedapi/types/braziliananalyzer.go index a1eb2ae976..1078225b63 100644 --- a/typedapi/types/braziliananalyzer.go +++ b/typedapi/types/braziliananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BrazilianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L100-L104 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L100-L104 type BrazilianAnalyzer struct { Stopwords StopWords `json:"stopwords,omitempty"` StopwordsPath *string `json:"stopwords_path,omitempty"` diff --git a/typedapi/types/brazilianstemtokenfilter.go b/typedapi/types/brazilianstemtokenfilter.go index 589076b688..97bad6328e 100644 --- a/typedapi/types/brazilianstemtokenfilter.go +++ b/typedapi/types/brazilianstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // BrazilianStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L494-L496 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L529-L531 type BrazilianStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/breaker.go b/typedapi/types/breaker.go index edf7d88809..b8024bb1bf 100644 --- a/typedapi/types/breaker.go +++ b/typedapi/types/breaker.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Breaker type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L472-L497 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L472-L497 type Breaker struct { // EstimatedSize Estimated memory used for the operation. EstimatedSize *string `json:"estimated_size,omitempty"` diff --git a/typedapi/types/bucketcorrelationaggregation.go b/typedapi/types/bucketcorrelationaggregation.go index b10e22d69f..11bb9979c8 100644 --- a/typedapi/types/bucketcorrelationaggregation.go +++ b/typedapi/types/bucketcorrelationaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // BucketCorrelationAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L139-L146 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L139-L146 type BucketCorrelationAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/bucketcorrelationfunction.go b/typedapi/types/bucketcorrelationfunction.go index 16f3366486..d071c00d72 100644 --- a/typedapi/types/bucketcorrelationfunction.go +++ b/typedapi/types/bucketcorrelationfunction.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // BucketCorrelationFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L148-L153 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L148-L153 type BucketCorrelationFunction struct { // CountCorrelation The configuration to calculate a count correlation. This function is designed // for determining the correlation of a term value and a given metric. diff --git a/typedapi/types/bucketcorrelationfunctioncountcorrelation.go b/typedapi/types/bucketcorrelationfunctioncountcorrelation.go index d5d6ebd4b1..f2cb013bf0 100644 --- a/typedapi/types/bucketcorrelationfunctioncountcorrelation.go +++ b/typedapi/types/bucketcorrelationfunctioncountcorrelation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // BucketCorrelationFunctionCountCorrelation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L155-L158 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L155-L158 type BucketCorrelationFunctionCountCorrelation struct { // Indicator The indicator with which to correlate the configured `bucket_path` values. Indicator BucketCorrelationFunctionCountCorrelationIndicator `json:"indicator"` diff --git a/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go b/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go index b69a3905ce..488c5bd94b 100644 --- a/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go +++ b/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BucketCorrelationFunctionCountCorrelationIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L160-L178 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L160-L178 type BucketCorrelationFunctionCountCorrelationIndicator struct { // DocCount The total number of documents that initially created the expectations. It’s // required to be greater diff --git a/typedapi/types/bucketinfluencer.go b/typedapi/types/bucketinfluencer.go index fc69a1260b..a0030f9903 100644 --- a/typedapi/types/bucketinfluencer.go +++ b/typedapi/types/bucketinfluencer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BucketInfluencer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Bucket.ts#L79-L127 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Bucket.ts#L79-L128 type BucketInfluencer struct { // AnomalyScore A normalized score between 0-100, which is calculated for each bucket // influencer. This score might be updated as diff --git a/typedapi/types/bucketksaggregation.go b/typedapi/types/bucketksaggregation.go index 85d261bb68..38ae2ce09b 100644 --- a/typedapi/types/bucketksaggregation.go +++ b/typedapi/types/bucketksaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BucketKsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L103-L137 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L103-L137 type BucketKsAggregation struct { // Alternative A list of string values indicating which K-S test alternative to calculate. // The valid values diff --git a/typedapi/types/bucketmetricvalueaggregate.go b/typedapi/types/bucketmetricvalueaggregate.go index 3936ad7c33..7c8201d0f1 100644 --- a/typedapi/types/bucketmetricvalueaggregate.go +++ b/typedapi/types/bucketmetricvalueaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BucketMetricValueAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L250-L253 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L255-L258 type BucketMetricValueAggregate struct { Keys []string `json:"keys"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/bucketsadjacencymatrixbucket.go b/typedapi/types/bucketsadjacencymatrixbucket.go index 431ff39a48..7aeb8c5168 100644 --- a/typedapi/types/bucketsadjacencymatrixbucket.go +++ b/typedapi/types/bucketsadjacencymatrixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]AdjacencyMatrixBucket // []AdjacencyMatrixBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsAdjacencyMatrixBucket any diff --git a/typedapi/types/bucketsapikeyquerycontainer.go b/typedapi/types/bucketsapikeyquerycontainer.go index 5e40c30fc2..e8e9ba9bed 100644 --- a/typedapi/types/bucketsapikeyquerycontainer.go +++ b/typedapi/types/bucketsapikeyquerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // map[string]ApiKeyQueryContainer // []ApiKeyQueryContainer // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsApiKeyQueryContainer any type BucketsApiKeyQueryContainerVariant interface { diff --git a/typedapi/types/bucketscompositebucket.go b/typedapi/types/bucketscompositebucket.go index e787c357d1..894b1a0c52 100644 --- a/typedapi/types/bucketscompositebucket.go +++ b/typedapi/types/bucketscompositebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]CompositeBucket // []CompositeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsCompositeBucket any diff --git a/typedapi/types/bucketscriptaggregation.go b/typedapi/types/bucketscriptaggregation.go index 74040521c3..fcb69b38d0 100644 --- a/typedapi/types/bucketscriptaggregation.go +++ b/typedapi/types/bucketscriptaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // BucketScriptAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L83-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L83-L91 type BucketScriptAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/bucketsdatehistogrambucket.go b/typedapi/types/bucketsdatehistogrambucket.go index 749519d8ed..6494d81517 100644 --- a/typedapi/types/bucketsdatehistogrambucket.go +++ b/typedapi/types/bucketsdatehistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]DateHistogramBucket // []DateHistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsDateHistogramBucket any diff --git a/typedapi/types/bucketsdoubletermsbucket.go b/typedapi/types/bucketsdoubletermsbucket.go index 384d783822..d7d4478a57 100644 --- a/typedapi/types/bucketsdoubletermsbucket.go +++ b/typedapi/types/bucketsdoubletermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]DoubleTermsBucket // []DoubleTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsDoubleTermsBucket any diff --git a/typedapi/types/bucketselectoraggregation.go b/typedapi/types/bucketselectoraggregation.go index 14d07c7ca4..1dd4018a82 100644 --- a/typedapi/types/bucketselectoraggregation.go +++ b/typedapi/types/bucketselectoraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // BucketSelectorAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L93-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L93-L101 type BucketSelectorAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/bucketsfiltersbucket.go b/typedapi/types/bucketsfiltersbucket.go index c440eed52c..03cae4017b 100644 --- a/typedapi/types/bucketsfiltersbucket.go +++ b/typedapi/types/bucketsfiltersbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]FiltersBucket // []FiltersBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsFiltersBucket any diff --git a/typedapi/types/bucketsfrequentitemsetsbucket.go b/typedapi/types/bucketsfrequentitemsetsbucket.go index 0ed7aafa87..326c80eee6 100644 --- a/typedapi/types/bucketsfrequentitemsetsbucket.go +++ b/typedapi/types/bucketsfrequentitemsetsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]FrequentItemSetsBucket // []FrequentItemSetsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsFrequentItemSetsBucket any diff --git a/typedapi/types/bucketsgeohashgridbucket.go b/typedapi/types/bucketsgeohashgridbucket.go index 49a8baa87d..110c1c1591 100644 --- a/typedapi/types/bucketsgeohashgridbucket.go +++ b/typedapi/types/bucketsgeohashgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]GeoHashGridBucket // []GeoHashGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsGeoHashGridBucket any diff --git a/typedapi/types/bucketsgeohexgridbucket.go b/typedapi/types/bucketsgeohexgridbucket.go index 614c430bb4..d06b16c3b1 100644 --- a/typedapi/types/bucketsgeohexgridbucket.go +++ b/typedapi/types/bucketsgeohexgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]GeoHexGridBucket // []GeoHexGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsGeoHexGridBucket any diff --git a/typedapi/types/bucketsgeotilegridbucket.go b/typedapi/types/bucketsgeotilegridbucket.go index c8ec99d785..6eba5d7674 100644 --- a/typedapi/types/bucketsgeotilegridbucket.go +++ b/typedapi/types/bucketsgeotilegridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]GeoTileGridBucket // []GeoTileGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsGeoTileGridBucket any diff --git a/typedapi/types/bucketshistogrambucket.go b/typedapi/types/bucketshistogrambucket.go index ec2c542adc..12db327690 100644 --- a/typedapi/types/bucketshistogrambucket.go +++ b/typedapi/types/bucketshistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]HistogramBucket // []HistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsHistogramBucket any diff --git a/typedapi/types/bucketsipprefixbucket.go b/typedapi/types/bucketsipprefixbucket.go index 0ea52705be..bb2ec471ae 100644 --- a/typedapi/types/bucketsipprefixbucket.go +++ b/typedapi/types/bucketsipprefixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]IpPrefixBucket // []IpPrefixBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsIpPrefixBucket any diff --git a/typedapi/types/bucketsiprangebucket.go b/typedapi/types/bucketsiprangebucket.go index 63deffabcc..528d33332c 100644 --- a/typedapi/types/bucketsiprangebucket.go +++ b/typedapi/types/bucketsiprangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]IpRangeBucket // []IpRangeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsIpRangeBucket any diff --git a/typedapi/types/bucketslongraretermsbucket.go b/typedapi/types/bucketslongraretermsbucket.go index 286d5e7eb6..bc1942daed 100644 --- a/typedapi/types/bucketslongraretermsbucket.go +++ b/typedapi/types/bucketslongraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]LongRareTermsBucket // []LongRareTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsLongRareTermsBucket any diff --git a/typedapi/types/bucketslongtermsbucket.go b/typedapi/types/bucketslongtermsbucket.go index dee4f3acb8..7448e02efd 100644 --- a/typedapi/types/bucketslongtermsbucket.go +++ b/typedapi/types/bucketslongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]LongTermsBucket // []LongTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsLongTermsBucket any diff --git a/typedapi/types/bucketsmultitermsbucket.go b/typedapi/types/bucketsmultitermsbucket.go index 5c283375aa..1ca1060ba2 100644 --- a/typedapi/types/bucketsmultitermsbucket.go +++ b/typedapi/types/bucketsmultitermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]MultiTermsBucket // []MultiTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsMultiTermsBucket any diff --git a/typedapi/types/bucketsortaggregation.go b/typedapi/types/bucketsortaggregation.go index c587aec08b..78225791f2 100644 --- a/typedapi/types/bucketsortaggregation.go +++ b/typedapi/types/bucketsortaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // BucketSortAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L180-L204 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L180-L204 type BucketSortAggregation struct { // From Buckets in positions prior to `from` will be truncated. From *int `json:"from,omitempty"` diff --git a/typedapi/types/bucketspath.go b/typedapi/types/bucketspath.go index 2f175fa3f6..5f8f77ee70 100644 --- a/typedapi/types/bucketspath.go +++ b/typedapi/types/bucketspath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ package types // []string // map[string]string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L53-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L53-L59 type BucketsPath any type BucketsPathVariant interface { diff --git a/typedapi/types/bucketsquery.go b/typedapi/types/bucketsquery.go index fa4ca1d799..3bb9327c3f 100644 --- a/typedapi/types/bucketsquery.go +++ b/typedapi/types/bucketsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // map[string]Query // []Query // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsQuery any type BucketsQueryVariant interface { diff --git a/typedapi/types/bucketsrangebucket.go b/typedapi/types/bucketsrangebucket.go index 5dc406477a..153368b158 100644 --- a/typedapi/types/bucketsrangebucket.go +++ b/typedapi/types/bucketsrangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]RangeBucket // []RangeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsRangeBucket any diff --git a/typedapi/types/bucketssignificantlongtermsbucket.go b/typedapi/types/bucketssignificantlongtermsbucket.go index ceb2f680ad..b33e06d12a 100644 --- a/typedapi/types/bucketssignificantlongtermsbucket.go +++ b/typedapi/types/bucketssignificantlongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]SignificantLongTermsBucket // []SignificantLongTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsSignificantLongTermsBucket any diff --git a/typedapi/types/bucketssignificantstringtermsbucket.go b/typedapi/types/bucketssignificantstringtermsbucket.go index f04349356b..9801c46f0b 100644 --- a/typedapi/types/bucketssignificantstringtermsbucket.go +++ b/typedapi/types/bucketssignificantstringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]SignificantStringTermsBucket // []SignificantStringTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsSignificantStringTermsBucket any diff --git a/typedapi/types/bucketsstringraretermsbucket.go b/typedapi/types/bucketsstringraretermsbucket.go index ae46524d1f..788079f71d 100644 --- a/typedapi/types/bucketsstringraretermsbucket.go +++ b/typedapi/types/bucketsstringraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]StringRareTermsBucket // []StringRareTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsStringRareTermsBucket any diff --git a/typedapi/types/bucketsstringtermsbucket.go b/typedapi/types/bucketsstringtermsbucket.go index fd306c9eb3..957159f1d4 100644 --- a/typedapi/types/bucketsstringtermsbucket.go +++ b/typedapi/types/bucketsstringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]StringTermsBucket // []StringTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsStringTermsBucket any diff --git a/typedapi/types/bucketstimeseriesbucket.go b/typedapi/types/bucketstimeseriesbucket.go index 4821f77d37..aecbe16b06 100644 --- a/typedapi/types/bucketstimeseriesbucket.go +++ b/typedapi/types/bucketstimeseriesbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]TimeSeriesBucket // []TimeSeriesBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsTimeSeriesBucket any diff --git a/typedapi/types/bucketsummary.go b/typedapi/types/bucketsummary.go index 2155c80641..1682ad2c51 100644 --- a/typedapi/types/bucketsummary.go +++ b/typedapi/types/bucketsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BucketSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Bucket.ts#L30-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Bucket.ts#L30-L77 type BucketSummary struct { // AnomalyScore The maximum anomaly score, between 0-100, for any of the bucket influencers. // This is an overall, rate-limited diff --git a/typedapi/types/bucketsvariablewidthhistogrambucket.go b/typedapi/types/bucketsvariablewidthhistogrambucket.go index dbc3f1d406..5b57a85950 100644 --- a/typedapi/types/bucketsvariablewidthhistogrambucket.go +++ b/typedapi/types/bucketsvariablewidthhistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]VariableWidthHistogramBucket // []VariableWidthHistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsVariableWidthHistogramBucket any diff --git a/typedapi/types/bucketsvoid.go b/typedapi/types/bucketsvoid.go index d839ca8eda..a17cab37e7 100644 --- a/typedapi/types/bucketsvoid.go +++ b/typedapi/types/bucketsvoid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // map[string]any // []any // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L362-L371 type BucketsVoid any diff --git a/typedapi/types/buildinformation.go b/typedapi/types/buildinformation.go index 7acfd62cd1..cc2155b708 100644 --- a/typedapi/types/buildinformation.go +++ b/typedapi/types/buildinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BuildInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/info/types.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/info/types.ts#L24-L27 type BuildInformation struct { Date DateTime `json:"date"` Hash string `json:"hash"` diff --git a/typedapi/types/bulgariananalyzer.go b/typedapi/types/bulgariananalyzer.go index 98f8330afa..af3694881b 100644 --- a/typedapi/types/bulgariananalyzer.go +++ b/typedapi/types/bulgariananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BulgarianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L106-L111 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L106-L111 type BulgarianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/bulkerror.go b/typedapi/types/bulkerror.go index dc2a62625b..fb90e32277 100644 --- a/typedapi/types/bulkerror.go +++ b/typedapi/types/bulkerror.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BulkError type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Bulk.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Bulk.ts#L24-L33 type BulkError struct { // Count The number of errors Count int `json:"count"` diff --git a/typedapi/types/bulkindexbyscrollfailure.go b/typedapi/types/bulkindexbyscrollfailure.go index 11caa63764..4ed390bcaf 100644 --- a/typedapi/types/bulkindexbyscrollfailure.go +++ b/typedapi/types/bulkindexbyscrollfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BulkIndexByScrollFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Errors.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Errors.ts#L64-L69 type BulkIndexByScrollFailure struct { Cause ErrorCause `json:"cause"` Id string `json:"id"` diff --git a/typedapi/types/bulkstats.go b/typedapi/types/bulkstats.go index 74ebfdc7b8..f6a10b1ee1 100644 --- a/typedapi/types/bulkstats.go +++ b/typedapi/types/bulkstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BulkStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L71-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L71-L81 type BulkStats struct { AvgSize ByteSize `json:"avg_size,omitempty"` AvgSizeInBytes int64 `json:"avg_size_in_bytes"` diff --git a/typedapi/types/bytenumberproperty.go b/typedapi/types/bytenumberproperty.go index 4635801dd1..9323fbd461 100644 --- a/typedapi/types/bytenumberproperty.go +++ b/typedapi/types/bytenumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // ByteNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L187-L190 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L188-L191 type ByteNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/bytesize.go b/typedapi/types/bytesize.go index 842904e53b..adaff93924 100644 --- a/typedapi/types/bytesize.go +++ b/typedapi/types/bytesize.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L90-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L89-L90 type ByteSize any type ByteSizeVariant interface { diff --git a/typedapi/types/bytesprocessor.go b/typedapi/types/bytesprocessor.go index 318c02c435..8238753d59 100644 --- a/typedapi/types/bytesprocessor.go +++ b/typedapi/types/bytesprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // BytesProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L556-L572 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L560-L576 type BytesProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/cachequeries.go b/typedapi/types/cachequeries.go index e216124cca..f01b5a45c6 100644 --- a/typedapi/types/cachequeries.go +++ b/typedapi/types/cachequeries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CacheQueries type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L434-L436 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L441-L443 type CacheQueries struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/cachestats.go b/typedapi/types/cachestats.go index 665b81ed5a..0cd9c86ef4 100644 --- a/typedapi/types/cachestats.go +++ b/typedapi/types/cachestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/stats/types.ts#L38-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/stats/types.ts#L38-L50 type CacheStats struct { Count int `json:"count"` Evictions int `json:"evictions"` diff --git a/typedapi/types/calendar.go b/typedapi/types/calendar.go index e08e299d7d..73499fa62e 100644 --- a/typedapi/types/calendar.go +++ b/typedapi/types/calendar.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Calendar type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_calendars/types.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_calendars/types.ts#L22-L29 type Calendar struct { // CalendarId A string that uniquely identifies a calendar. CalendarId string `json:"calendar_id"` diff --git a/typedapi/types/calendarevent.go b/typedapi/types/calendarevent.go index 00574ebe7b..0cc60c7ad5 100644 --- a/typedapi/types/calendarevent.go +++ b/typedapi/types/calendarevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CalendarEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/CalendarEvent.ts#L24-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/CalendarEvent.ts#L24-L46 type CalendarEvent struct { // CalendarId A string that uniquely identifies a calendar. CalendarId *string `json:"calendar_id,omitempty"` diff --git a/typedapi/types/cardinalityaggregate.go b/typedapi/types/cardinalityaggregate.go index eebec5424d..fddea83b5f 100644 --- a/typedapi/types/cardinalityaggregate.go +++ b/typedapi/types/cardinalityaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CardinalityAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L140-L143 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L145-L148 type CardinalityAggregate struct { Meta Metadata `json:"meta,omitempty"` Value int64 `json:"value"` diff --git a/typedapi/types/cardinalityaggregation.go b/typedapi/types/cardinalityaggregation.go index 09fa23e69b..831352b149 100644 --- a/typedapi/types/cardinalityaggregation.go +++ b/typedapi/types/cardinalityaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // CardinalityAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L93-L105 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L93-L105 type CardinalityAggregation struct { // ExecutionHint Mechanism by which cardinality aggregations is run. ExecutionHint *cardinalityexecutionmode.CardinalityExecutionMode `json:"execution_hint,omitempty"` diff --git a/typedapi/types/cartesianboundsaggregate.go b/typedapi/types/cartesianboundsaggregate.go new file mode 100644 index 0000000000..fa6bf64223 --- /dev/null +++ b/typedapi/types/cartesianboundsaggregate.go @@ -0,0 +1,74 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// CartesianBoundsAggregate type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L330-L333 +type CartesianBoundsAggregate struct { + Bounds *TopLeftBottomRightGeoBounds `json:"bounds,omitempty"` + Meta Metadata `json:"meta,omitempty"` +} + +func (s *CartesianBoundsAggregate) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "bounds": + if err := dec.Decode(&s.Bounds); err != nil { + return fmt.Errorf("%s | %w", "Bounds", err) + } + + case "meta": + if err := dec.Decode(&s.Meta); err != nil { + return fmt.Errorf("%s | %w", "Meta", err) + } + + } + } + return nil +} + +// NewCartesianBoundsAggregate returns a CartesianBoundsAggregate. +func NewCartesianBoundsAggregate() *CartesianBoundsAggregate { + r := &CartesianBoundsAggregate{} + + return r +} diff --git a/typedapi/types/cartesianboundsaggregation.go b/typedapi/types/cartesianboundsaggregation.go new file mode 100644 index 0000000000..1e394c480a --- /dev/null +++ b/typedapi/types/cartesianboundsaggregation.go @@ -0,0 +1,91 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// CartesianBoundsAggregation type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L114-L114 +type CartesianBoundsAggregation struct { + // Field The field on which to run the aggregation. + Field *string `json:"field,omitempty"` + // Missing The value to apply to documents that do not have a value. + // By default, documents without a value are ignored. + Missing Missing `json:"missing,omitempty"` + Script *Script `json:"script,omitempty"` +} + +func (s *CartesianBoundsAggregation) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "field": + if err := dec.Decode(&s.Field); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + + case "missing": + if err := dec.Decode(&s.Missing); err != nil { + return fmt.Errorf("%s | %w", "Missing", err) + } + + case "script": + if err := dec.Decode(&s.Script); err != nil { + return fmt.Errorf("%s | %w", "Script", err) + } + + } + } + return nil +} + +// NewCartesianBoundsAggregation returns a CartesianBoundsAggregation. +func NewCartesianBoundsAggregation() *CartesianBoundsAggregation { + r := &CartesianBoundsAggregation{} + + return r +} + +type CartesianBoundsAggregationVariant interface { + CartesianBoundsAggregationCaster() *CartesianBoundsAggregation +} + +func (s *CartesianBoundsAggregation) CartesianBoundsAggregationCaster() *CartesianBoundsAggregation { + return s +} diff --git a/typedapi/types/cartesiancentroidaggregate.go b/typedapi/types/cartesiancentroidaggregate.go new file mode 100644 index 0000000000..18f945be0e --- /dev/null +++ b/typedapi/types/cartesiancentroidaggregate.go @@ -0,0 +1,91 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CartesianCentroidAggregate type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L335-L339 +type CartesianCentroidAggregate struct { + Count int64 `json:"count"` + Location *CartesianPoint `json:"location,omitempty"` + Meta Metadata `json:"meta,omitempty"` +} + +func (s *CartesianCentroidAggregate) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "count": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "Count", err) + } + s.Count = value + case float64: + f := int64(v) + s.Count = f + } + + case "location": + if err := dec.Decode(&s.Location); err != nil { + return fmt.Errorf("%s | %w", "Location", err) + } + + case "meta": + if err := dec.Decode(&s.Meta); err != nil { + return fmt.Errorf("%s | %w", "Meta", err) + } + + } + } + return nil +} + +// NewCartesianCentroidAggregate returns a CartesianCentroidAggregate. +func NewCartesianCentroidAggregate() *CartesianCentroidAggregate { + r := &CartesianCentroidAggregate{} + + return r +} diff --git a/typedapi/types/cartesiancentroidaggregation.go b/typedapi/types/cartesiancentroidaggregation.go new file mode 100644 index 0000000000..b09c04aef9 --- /dev/null +++ b/typedapi/types/cartesiancentroidaggregation.go @@ -0,0 +1,91 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// CartesianCentroidAggregation type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L116-L116 +type CartesianCentroidAggregation struct { + // Field The field on which to run the aggregation. + Field *string `json:"field,omitempty"` + // Missing The value to apply to documents that do not have a value. + // By default, documents without a value are ignored. + Missing Missing `json:"missing,omitempty"` + Script *Script `json:"script,omitempty"` +} + +func (s *CartesianCentroidAggregation) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "field": + if err := dec.Decode(&s.Field); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + + case "missing": + if err := dec.Decode(&s.Missing); err != nil { + return fmt.Errorf("%s | %w", "Missing", err) + } + + case "script": + if err := dec.Decode(&s.Script); err != nil { + return fmt.Errorf("%s | %w", "Script", err) + } + + } + } + return nil +} + +// NewCartesianCentroidAggregation returns a CartesianCentroidAggregation. +func NewCartesianCentroidAggregation() *CartesianCentroidAggregation { + r := &CartesianCentroidAggregation{} + + return r +} + +type CartesianCentroidAggregationVariant interface { + CartesianCentroidAggregationCaster() *CartesianCentroidAggregation +} + +func (s *CartesianCentroidAggregation) CartesianCentroidAggregationCaster() *CartesianCentroidAggregation { + return s +} diff --git a/typedapi/types/cartesianpoint.go b/typedapi/types/cartesianpoint.go new file mode 100644 index 0000000000..8fa6c46e66 --- /dev/null +++ b/typedapi/types/cartesianpoint.go @@ -0,0 +1,97 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CartesianPoint type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L125-L128 +type CartesianPoint struct { + X Float64 `json:"x"` + Y Float64 `json:"y"` +} + +func (s *CartesianPoint) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "x": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "X", err) + } + f := Float64(value) + s.X = f + case float64: + f := Float64(v) + s.X = f + } + + case "y": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "Y", err) + } + f := Float64(value) + s.Y = f + case float64: + f := Float64(v) + s.Y = f + } + + } + } + return nil +} + +// NewCartesianPoint returns a CartesianPoint. +func NewCartesianPoint() *CartesianPoint { + r := &CartesianPoint{} + + return r +} diff --git a/typedapi/types/catalananalyzer.go b/typedapi/types/catalananalyzer.go index 0cf465bb2e..0f9f544ffd 100644 --- a/typedapi/types/catalananalyzer.go +++ b/typedapi/types/catalananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CatalanAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L113-L118 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L113-L118 type CatalanAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/cataliasescolumns.go b/typedapi/types/cataliasescolumns.go new file mode 100644 index 0000000000..5aa7ef762a --- /dev/null +++ b/typedapi/types/cataliasescolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cataliasescolumn" +) + +// CatAliasesColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2480-L2480 +type CatAliasesColumns []cataliasescolumn.CatAliasesColumn diff --git a/typedapi/types/catallocationcolumns.go b/typedapi/types/catallocationcolumns.go new file mode 100644 index 0000000000..7549216d67 --- /dev/null +++ b/typedapi/types/catallocationcolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catallocationcolumn" +) + +// CatAllocationColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2481-L2481 +type CatAllocationColumns []catallocationcolumn.CatAllocationColumn diff --git a/typedapi/types/catanonalydetectorcolumns.go b/typedapi/types/catanomalydetectorcolumns.go similarity index 73% rename from typedapi/types/catanonalydetectorcolumns.go rename to typedapi/types/catanomalydetectorcolumns.go index e57a9b6800..1d4cbdb5ea 100644 --- a/typedapi/types/catanonalydetectorcolumns.go +++ b/typedapi/types/catanomalydetectorcolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -24,7 +24,7 @@ import ( "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catanomalydetectorcolumn" ) -// CatAnonalyDetectorColumns type alias. +// CatAnomalyDetectorColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L402-L404 -type CatAnonalyDetectorColumns []catanomalydetectorcolumn.CatAnomalyDetectorColumn +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L407-L409 +type CatAnomalyDetectorColumns []catanomalydetectorcolumn.CatAnomalyDetectorColumn diff --git a/typedapi/types/catcomponentcolumns.go b/typedapi/types/catcomponentcolumns.go new file mode 100644 index 0000000000..5f2e8b2208 --- /dev/null +++ b/typedapi/types/catcomponentcolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catcomponentcolumn" +) + +// CatComponentColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2482-L2482 +type CatComponentColumns []catcomponentcolumn.CatComponentColumn diff --git a/typedapi/types/catcomponenttemplate.go b/typedapi/types/catcomponenttemplate.go index 54152babcf..283a2c3e1e 100644 --- a/typedapi/types/catcomponenttemplate.go +++ b/typedapi/types/catcomponenttemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CatComponentTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/component_templates/types.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/component_templates/types.ts#L20-L28 type CatComponentTemplate struct { AliasCount string `json:"alias_count"` IncludedIn string `json:"included_in"` diff --git a/typedapi/types/catcountcolumns.go b/typedapi/types/catcountcolumns.go new file mode 100644 index 0000000000..594bfaeeaf --- /dev/null +++ b/typedapi/types/catcountcolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catcountcolumn" +) + +// CatCountColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2483-L2483 +type CatCountColumns []catcountcolumn.CatCountColumn diff --git a/typedapi/types/catdatafeedcolumns.go b/typedapi/types/catdatafeedcolumns.go index b22d335ba9..ea78277030 100644 --- a/typedapi/types/catdatafeedcolumns.go +++ b/typedapi/types/catdatafeedcolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatDatafeedColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1284-L1284 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2475-L2475 type CatDatafeedColumns []catdatafeedcolumn.CatDatafeedColumn diff --git a/typedapi/types/catdfacolumns.go b/typedapi/types/catdfacolumns.go index b0acc5a862..0d7889923d 100644 --- a/typedapi/types/catdfacolumns.go +++ b/typedapi/types/catdfacolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatDfaColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1283-L1283 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2474-L2474 type CatDfaColumns []catdfacolumn.CatDfaColumn diff --git a/typedapi/types/categorizationanalyzer.go b/typedapi/types/categorizationanalyzer.go index 4d8dd82de6..d21d2f57f2 100644 --- a/typedapi/types/categorizationanalyzer.go +++ b/typedapi/types/categorizationanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // CategorizationAnalyzerDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Analysis.ts#L181-L182 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Analysis.ts#L181-L182 type CategorizationAnalyzer any type CategorizationAnalyzerVariant interface { diff --git a/typedapi/types/categorizationanalyzerdefinition.go b/typedapi/types/categorizationanalyzerdefinition.go index 49ee8cfc0d..47f018c0ef 100644 --- a/typedapi/types/categorizationanalyzerdefinition.go +++ b/typedapi/types/categorizationanalyzerdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // CategorizationAnalyzerDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Analysis.ts#L184-L198 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Analysis.ts#L184-L198 type CategorizationAnalyzerDefinition struct { // CharFilter One or more character filters. In addition to the built-in character filters, // other plugins can provide more character filters. If this property is not diff --git a/typedapi/types/categorizetextaggregation.go b/typedapi/types/categorizetextaggregation.go index d09a8fcc14..a73ccbaab3 100644 --- a/typedapi/types/categorizetextaggregation.go +++ b/typedapi/types/categorizetextaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CategorizeTextAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1117-L1183 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1146-L1212 type CategorizeTextAggregation struct { // CategorizationAnalyzer The categorization analyzer specifies how the text is analyzed and tokenized // before being categorized. diff --git a/typedapi/types/categorizetextanalyzer.go b/typedapi/types/categorizetextanalyzer.go index 83d3808dcc..b636c82ba6 100644 --- a/typedapi/types/categorizetextanalyzer.go +++ b/typedapi/types/categorizetextanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // CustomCategorizeTextAnalyzer // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1185-L1188 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1214-L1217 type CategorizeTextAnalyzer any type CategorizeTextAnalyzerVariant interface { diff --git a/typedapi/types/category.go b/typedapi/types/category.go index dc4e2eddb5..b6e897e12a 100644 --- a/typedapi/types/category.go +++ b/typedapi/types/category.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Category type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Category.ts#L23-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Category.ts#L23-L49 type Category struct { // CategoryId A unique identifier for the category. category_id is unique at the job level, // even when per-partition categorization is enabled. diff --git a/typedapi/types/catfielddatacolumns.go b/typedapi/types/catfielddatacolumns.go new file mode 100644 index 0000000000..0c168d24eb --- /dev/null +++ b/typedapi/types/catfielddatacolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catfielddatacolumn" +) + +// CatFieldDataColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2484-L2484 +type CatFieldDataColumns []catfielddatacolumn.CatFieldDataColumn diff --git a/typedapi/types/cathealthcolumns.go b/typedapi/types/cathealthcolumns.go new file mode 100644 index 0000000000..65484cc341 --- /dev/null +++ b/typedapi/types/cathealthcolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cathealthcolumn" +) + +// CatHealthColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2485-L2485 +type CatHealthColumns []cathealthcolumn.CatHealthColumn diff --git a/typedapi/types/catindicescolumns.go b/typedapi/types/catindicescolumns.go new file mode 100644 index 0000000000..40e5099e71 --- /dev/null +++ b/typedapi/types/catindicescolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catindicescolumn" +) + +// CatIndicesColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2486-L2486 +type CatIndicesColumns []catindicescolumn.CatIndicesColumn diff --git a/typedapi/types/catmastercolumns.go b/typedapi/types/catmastercolumns.go new file mode 100644 index 0000000000..e373effd98 --- /dev/null +++ b/typedapi/types/catmastercolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catmastercolumn" +) + +// CatMasterColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2487-L2487 +type CatMasterColumns []catmastercolumn.CatMasterColumn diff --git a/typedapi/types/catnodeattrscolumns.go b/typedapi/types/catnodeattrscolumns.go new file mode 100644 index 0000000000..13a72476ee --- /dev/null +++ b/typedapi/types/catnodeattrscolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catnodeattrscolumn" +) + +// CatNodeattrsColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2488-L2488 +type CatNodeattrsColumns []catnodeattrscolumn.CatNodeattrsColumn diff --git a/typedapi/types/catnodecolumns.go b/typedapi/types/catnodecolumns.go index 300e39aeb5..6558dfb9f5 100644 --- a/typedapi/types/catnodecolumns.go +++ b/typedapi/types/catnodecolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatNodeColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1285-L1285 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2476-L2476 type CatNodeColumns []catnodecolumn.CatNodeColumn diff --git a/typedapi/types/catpendingtaskscolumns.go b/typedapi/types/catpendingtaskscolumns.go new file mode 100644 index 0000000000..6ae4ffcc30 --- /dev/null +++ b/typedapi/types/catpendingtaskscolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catpendingtaskscolumn" +) + +// CatPendingTasksColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2489-L2491 +type CatPendingTasksColumns []catpendingtaskscolumn.CatPendingTasksColumn diff --git a/typedapi/types/catpluginscolumns.go b/typedapi/types/catpluginscolumns.go new file mode 100644 index 0000000000..5f6a5d19de --- /dev/null +++ b/typedapi/types/catpluginscolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catpluginscolumn" +) + +// CatPluginsColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2492-L2492 +type CatPluginsColumns []catpluginscolumn.CatPluginsColumn diff --git a/typedapi/types/catrecoverycolumns.go b/typedapi/types/catrecoverycolumns.go index 057dac56f5..7191fbb43b 100644 --- a/typedapi/types/catrecoverycolumns.go +++ b/typedapi/types/catrecoverycolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatRecoveryColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1286-L1286 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2477-L2477 type CatRecoveryColumns []catrecoverycolumn.CatRecoveryColumn diff --git a/typedapi/types/catsegmentscolumns.go b/typedapi/types/catsegmentscolumns.go index e1fdb9cbc0..9cb742eb4b 100644 --- a/typedapi/types/catsegmentscolumns.go +++ b/typedapi/types/catsegmentscolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatSegmentsColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1287-L1287 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2478-L2478 type CatSegmentsColumns []catsegmentscolumn.CatSegmentsColumn diff --git a/typedapi/types/catshardcolumns.go b/typedapi/types/catshardcolumns.go index 588b00a7af..6741948636 100644 --- a/typedapi/types/catshardcolumns.go +++ b/typedapi/types/catshardcolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatShardColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1950-L1950 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L3156-L3156 type CatShardColumns []catshardcolumn.CatShardColumn diff --git a/typedapi/types/catsnapshotscolumns.go b/typedapi/types/catsnapshotscolumns.go index 053fe27c87..c585709a65 100644 --- a/typedapi/types/catsnapshotscolumns.go +++ b/typedapi/types/catsnapshotscolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatSnapshotsColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1288-L1288 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2479-L2479 type CatSnapshotsColumns []catsnapshotscolumn.CatSnapshotsColumn diff --git a/typedapi/types/cattaskscolumns.go b/typedapi/types/cattaskscolumns.go new file mode 100644 index 0000000000..9a1649bed9 --- /dev/null +++ b/typedapi/types/cattaskscolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cattaskscolumn" +) + +// CatTasksColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2493-L2493 +type CatTasksColumns []cattaskscolumn.CatTasksColumn diff --git a/typedapi/types/cattemplatescolumns.go b/typedapi/types/cattemplatescolumns.go new file mode 100644 index 0000000000..fe15326264 --- /dev/null +++ b/typedapi/types/cattemplatescolumns.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cattemplatescolumn" +) + +// CatTemplatesColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2494-L2494 +type CatTemplatesColumns []cattemplatescolumn.CatTemplatesColumn diff --git a/typedapi/types/catthreadpoolcolumns.go b/typedapi/types/catthreadpoolcolumns.go index d4d4d20b3c..17eca492bd 100644 --- a/typedapi/types/catthreadpoolcolumns.go +++ b/typedapi/types/catthreadpoolcolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatThreadPoolColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L2053-L2053 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L3259-L3259 type CatThreadPoolColumns []catthreadpoolcolumn.CatThreadPoolColumn diff --git a/typedapi/types/cattrainedmodelscolumns.go b/typedapi/types/cattrainedmodelscolumns.go index 062c2c40a6..372d6fcb31 100644 --- a/typedapi/types/cattrainedmodelscolumns.go +++ b/typedapi/types/cattrainedmodelscolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatTrainedModelsColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1365-L1367 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2571-L2573 type CatTrainedModelsColumns []cattrainedmodelscolumn.CatTrainedModelsColumn diff --git a/typedapi/types/cattransformcolumns.go b/typedapi/types/cattransformcolumns.go index 4f833ba1aa..b700db8d19 100644 --- a/typedapi/types/cattransformcolumns.go +++ b/typedapi/types/cattransformcolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // CatTransformColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1574-L1574 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2780-L2780 type CatTransformColumns []cattransformcolumn.CatTransformColumn diff --git a/typedapi/types/ccr.go b/typedapi/types/ccr.go index b264b840ab..3972eae32f 100644 --- a/typedapi/types/ccr.go +++ b/typedapi/types/ccr.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Ccr type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L344-L347 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L377-L380 type Ccr struct { AutoFollowPatternsCount int `json:"auto_follow_patterns_count"` Available bool `json:"available"` diff --git a/typedapi/types/ccrshardstats.go b/typedapi/types/ccrshardstats.go index 29cd54ae6b..82bd6347f0 100644 --- a/typedapi/types/ccrshardstats.go +++ b/typedapi/types/ccrshardstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CcrShardStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/_types/FollowIndexStats.ts#L37-L109 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/_types/FollowIndexStats.ts#L37-L110 type CcrShardStats struct { // BytesRead The total of transferred bytes read from the leader. // This is only an estimate and does not account for compression if enabled. diff --git a/typedapi/types/ccsstats.go b/typedapi/types/ccsstats.go index a8db810838..18cdbf7b77 100644 --- a/typedapi/types/ccsstats.go +++ b/typedapi/types/ccsstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // CCSStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L769-L784 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L787-L802 type CCSStats struct { // Clusters Contains remote cluster settings and metrics collected from them. // The keys are cluster names, and the values are per-cluster data. diff --git a/typedapi/types/ccsusageclusterstats.go b/typedapi/types/ccsusageclusterstats.go index 1a825f1e42..d8a7372c22 100644 --- a/typedapi/types/ccsusageclusterstats.go +++ b/typedapi/types/ccsusageclusterstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CCSUsageClusterStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L855-L862 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L873-L880 type CCSUsageClusterStats struct { // Skipped The total number of cross-cluster search requests for which this cluster was // skipped. diff --git a/typedapi/types/ccsusagestats.go b/typedapi/types/ccsusagestats.go index 69b0a29976..c14becd14d 100644 --- a/typedapi/types/ccsusagestats.go +++ b/typedapi/types/ccsusagestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CCSUsageStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L819-L844 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L837-L862 type CCSUsageStats struct { // Clients Statistics about the clients that executed cross-cluster search requests. The // keys are the names of the clients, and the values are the number of requests diff --git a/typedapi/types/ccsusagetimevalue.go b/typedapi/types/ccsusagetimevalue.go index f9f8eead46..22b320c855 100644 --- a/typedapi/types/ccsusagetimevalue.go +++ b/typedapi/types/ccsusagetimevalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // CCSUsageTimeValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L846-L853 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L864-L871 type CCSUsageTimeValue struct { // Avg The average time taken to execute a request, in milliseconds. Avg int64 `json:"avg"` diff --git a/typedapi/types/certificateinformation.go b/typedapi/types/certificateinformation.go index 99665f1d89..acd58dc137 100644 --- a/typedapi/types/certificateinformation.go +++ b/typedapi/types/certificateinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CertificateInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ssl/certificates/types.ts#L22-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ssl/certificates/types.ts#L22-L57 type CertificateInformation struct { // Alias If the path refers to a container file (a jks keystore, or a PKCS#12 file), // it is the alias of the certificate. diff --git a/typedapi/types/cgroup.go b/typedapi/types/cgroup.go index b1cfc86379..43b7786a9e 100644 --- a/typedapi/types/cgroup.go +++ b/typedapi/types/cgroup.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Cgroup type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L499-L512 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L499-L512 type Cgroup struct { // Cpu Contains statistics about `cpu` control group for the node. Cpu *CgroupCpu `json:"cpu,omitempty"` diff --git a/typedapi/types/cgroupcpu.go b/typedapi/types/cgroupcpu.go index 0d4b26184f..f350eb8ef8 100644 --- a/typedapi/types/cgroupcpu.go +++ b/typedapi/types/cgroupcpu.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CgroupCpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L525-L542 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L525-L542 type CgroupCpu struct { // CfsPeriodMicros The period of time, in microseconds, for how regularly all tasks in the same // cgroup as the Elasticsearch process should have their access to CPU resources diff --git a/typedapi/types/cgroupcpustat.go b/typedapi/types/cgroupcpustat.go index 685659f759..75abb9e6a9 100644 --- a/typedapi/types/cgroupcpustat.go +++ b/typedapi/types/cgroupcpustat.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CgroupCpuStat type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L544-L557 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L544-L557 type CgroupCpuStat struct { // NumberOfElapsedPeriods The number of reporting periods (as specified by `cfs_period_micros`) that // have elapsed. diff --git a/typedapi/types/cgroupmemory.go b/typedapi/types/cgroupmemory.go index 8595571f99..957d752a5a 100644 --- a/typedapi/types/cgroupmemory.go +++ b/typedapi/types/cgroupmemory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CgroupMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L559-L575 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L559-L575 type CgroupMemory struct { // ControlGroup The `memory` control group to which the Elasticsearch process belongs. ControlGroup *string `json:"control_group,omitempty"` diff --git a/typedapi/types/chaininput.go b/typedapi/types/chaininput.go index 34bd7725ff..0403ac80d5 100644 --- a/typedapi/types/chaininput.go +++ b/typedapi/types/chaininput.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ChainInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L35-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L35-L37 type ChainInput struct { Inputs []map[string]WatcherInput `json:"inputs"` } diff --git a/typedapi/types/changepointaggregate.go b/typedapi/types/changepointaggregate.go new file mode 100644 index 0000000000..0802af24cb --- /dev/null +++ b/typedapi/types/changepointaggregate.go @@ -0,0 +1,80 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ChangePointAggregate type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L388-L392 +type ChangePointAggregate struct { + Bucket *ChangePointBucket `json:"bucket,omitempty"` + Meta Metadata `json:"meta,omitempty"` + Type ChangeType `json:"type"` +} + +func (s *ChangePointAggregate) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "bucket": + if err := dec.Decode(&s.Bucket); err != nil { + return fmt.Errorf("%s | %w", "Bucket", err) + } + + case "meta": + if err := dec.Decode(&s.Meta); err != nil { + return fmt.Errorf("%s | %w", "Meta", err) + } + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + } + } + return nil +} + +// NewChangePointAggregate returns a ChangePointAggregate. +func NewChangePointAggregate() *ChangePointAggregate { + r := &ChangePointAggregate{} + + return r +} diff --git a/typedapi/types/changepointaggregation.go b/typedapi/types/changepointaggregation.go new file mode 100644 index 0000000000..8d50892cb1 --- /dev/null +++ b/typedapi/types/changepointaggregation.go @@ -0,0 +1,103 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/gappolicy" +) + +// ChangePointAggregation type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L206-L206 +type ChangePointAggregation struct { + // BucketsPath Path to the buckets that contain one set of values to correlate. + BucketsPath BucketsPath `json:"buckets_path,omitempty"` + // Format `DecimalFormat` pattern for the output value. + // If specified, the formatted value is returned in the aggregation’s + // `value_as_string` property. + Format *string `json:"format,omitempty"` + // GapPolicy Policy to apply when gaps are found in the data. + GapPolicy *gappolicy.GapPolicy `json:"gap_policy,omitempty"` +} + +func (s *ChangePointAggregation) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "buckets_path": + if err := dec.Decode(&s.BucketsPath); err != nil { + return fmt.Errorf("%s | %w", "BucketsPath", err) + } + + case "format": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Format", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Format = &o + + case "gap_policy": + if err := dec.Decode(&s.GapPolicy); err != nil { + return fmt.Errorf("%s | %w", "GapPolicy", err) + } + + } + } + return nil +} + +// NewChangePointAggregation returns a ChangePointAggregation. +func NewChangePointAggregation() *ChangePointAggregation { + r := &ChangePointAggregation{} + + return r +} + +type ChangePointAggregationVariant interface { + ChangePointAggregationCaster() *ChangePointAggregation +} + +func (s *ChangePointAggregation) ChangePointAggregationCaster() *ChangePointAggregation { + return s +} diff --git a/typedapi/types/changepointbucket.go b/typedapi/types/changepointbucket.go new file mode 100644 index 0000000000..9a2ee0d888 --- /dev/null +++ b/typedapi/types/changepointbucket.go @@ -0,0 +1,659 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + "strings" +) + +// ChangePointBucket type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L394-L396 +type ChangePointBucket struct { + Aggregations map[string]Aggregate `json:"-"` + DocCount int64 `json:"doc_count"` + Key FieldValue `json:"key"` +} + +func (s *ChangePointBucket) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "doc_count": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "DocCount", err) + } + s.DocCount = value + case float64: + f := int64(v) + s.DocCount = f + } + + case "key": + if err := dec.Decode(&s.Key); err != nil { + return fmt.Errorf("%s | %w", "Key", err) + } + + default: + + if value, ok := t.(string); ok { + if strings.Contains(value, "#") { + elems := strings.Split(value, "#") + if len(elems) == 2 { + if s.Aggregations == nil { + s.Aggregations = make(map[string]Aggregate, 0) + } + switch elems[0] { + + case "cardinality": + o := NewCardinalityAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "hdr_percentiles": + o := NewHdrPercentilesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "hdr_percentile_ranks": + o := NewHdrPercentileRanksAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "tdigest_percentiles": + o := NewTDigestPercentilesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "tdigest_percentile_ranks": + o := NewTDigestPercentileRanksAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "percentiles_bucket": + o := NewPercentilesBucketAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "median_absolute_deviation": + o := NewMedianAbsoluteDeviationAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "min": + o := NewMinAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "max": + o := NewMaxAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "sum": + o := NewSumAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "avg": + o := NewAvgAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "weighted_avg": + o := NewWeightedAvgAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "value_count": + o := NewValueCountAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "simple_value": + o := NewSimpleValueAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "derivative": + o := NewDerivativeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "bucket_metric_value": + o := NewBucketMetricValueAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "stats": + o := NewStatsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "stats_bucket": + o := NewStatsBucketAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "extended_stats": + o := NewExtendedStatsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "extended_stats_bucket": + o := NewExtendedStatsBucketAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geo_bounds": + o := NewGeoBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geo_centroid": + o := NewGeoCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "histogram": + o := NewHistogramAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "date_histogram": + o := NewDateHistogramAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "auto_date_histogram": + o := NewAutoDateHistogramAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "variable_width_histogram": + o := NewVariableWidthHistogramAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "sterms": + o := NewStringTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "lterms": + o := NewLongTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "dterms": + o := NewDoubleTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "umterms": + o := NewUnmappedTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "lrareterms": + o := NewLongRareTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "srareterms": + o := NewStringRareTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "umrareterms": + o := NewUnmappedRareTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "multi_terms": + o := NewMultiTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "missing": + o := NewMissingAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "nested": + o := NewNestedAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "reverse_nested": + o := NewReverseNestedAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "global": + o := NewGlobalAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "filter": + o := NewFilterAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "children": + o := NewChildrenAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "parent": + o := NewParentAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "sampler": + o := NewSamplerAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "unmapped_sampler": + o := NewUnmappedSamplerAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geohash_grid": + o := NewGeoHashGridAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geotile_grid": + o := NewGeoTileGridAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geohex_grid": + o := NewGeoHexGridAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "range": + o := NewRangeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "date_range": + o := NewDateRangeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geo_distance": + o := NewGeoDistanceAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "ip_range": + o := NewIpRangeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "ip_prefix": + o := NewIpPrefixAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "filters": + o := NewFiltersAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "adjacency_matrix": + o := NewAdjacencyMatrixAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "siglterms": + o := NewSignificantLongTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "sigsterms": + o := NewSignificantStringTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "umsigterms": + o := NewUnmappedSignificantTermsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "composite": + o := NewCompositeAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "frequent_item_sets": + o := NewFrequentItemSetsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "time_series": + o := NewTimeSeriesAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "scripted_metric": + o := NewScriptedMetricAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "top_hits": + o := NewTopHitsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "inference": + o := NewInferenceAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "string_stats": + o := NewStringStatsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "boxplot": + o := NewBoxPlotAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "top_metrics": + o := NewTopMetricsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "t_test": + o := NewTTestAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "rate": + o := NewRateAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "simple_long_value": + o := NewCumulativeCardinalityAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "matrix_stats": + o := NewMatrixStatsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "geo_line": + o := NewGeoLineAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + default: + o := make(map[string]any, 0) + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + } + } else { + return errors.New("cannot decode JSON for field Aggregations") + } + } else { + o := make(map[string]any, 0) + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[value] = o + } + } + + } + } + return nil +} + +// MarhsalJSON overrides marshalling for types with additional properties +func (s ChangePointBucket) MarshalJSON() ([]byte, error) { + type opt ChangePointBucket + // We transform the struct to a map without the embedded additional properties map + tmp := make(map[string]any, 0) + + data, err := json.Marshal(opt(s)) + if err != nil { + return nil, err + } + err = json.Unmarshal(data, &tmp) + if err != nil { + return nil, err + } + + // We inline the additional fields from the underlying map + for key, value := range s.Aggregations { + tmp[fmt.Sprintf("%s", key)] = value + } + delete(tmp, "Aggregations") + + data, err = json.Marshal(tmp) + if err != nil { + return nil, err + } + + return data, nil +} + +// NewChangePointBucket returns a ChangePointBucket. +func NewChangePointBucket() *ChangePointBucket { + r := &ChangePointBucket{ + Aggregations: make(map[string]Aggregate), + } + + return r +} diff --git a/typedapi/types/changetype.go b/typedapi/types/changetype.go new file mode 100644 index 0000000000..8b7cd9a129 --- /dev/null +++ b/typedapi/types/changetype.go @@ -0,0 +1,42 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// ChangeType type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L398-L410 +type ChangeType struct { + Dip *Dip `json:"dip,omitempty"` + DistributionChange *DistributionChange `json:"distribution_change,omitempty"` + Indeterminable *Indeterminable `json:"indeterminable,omitempty"` + NonStationary *NonStationary `json:"non_stationary,omitempty"` + Spike *Spike `json:"spike,omitempty"` + Stationary *Stationary `json:"stationary,omitempty"` + StepChange *StepChange `json:"step_change,omitempty"` + TrendChange *TrendChange `json:"trend_change,omitempty"` +} + +// NewChangeType returns a ChangeType. +func NewChangeType() *ChangeType { + r := &ChangeType{} + + return r +} diff --git a/typedapi/types/charfilter.go b/typedapi/types/charfilter.go index d31916a7ca..dc8a0fab61 100644 --- a/typedapi/types/charfilter.go +++ b/typedapi/types/charfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // CharFilterDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L28-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/char_filters.ts#L28-L33 type CharFilter any type CharFilterVariant interface { diff --git a/typedapi/types/charfilterdefinition.go b/typedapi/types/charfilterdefinition.go index acbc4bbc52..4146d2c4be 100644 --- a/typedapi/types/charfilterdefinition.go +++ b/typedapi/types/charfilterdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -28,7 +28,7 @@ package types // IcuNormalizationCharFilter // KuromojiIterationMarkCharFilter // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L35-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/char_filters.ts#L35-L44 type CharFilterDefinition any type CharFilterDefinitionVariant interface { diff --git a/typedapi/types/charfilterdetail.go b/typedapi/types/charfilterdetail.go index 843f9f650a..b6395fc9df 100644 --- a/typedapi/types/charfilterdetail.go +++ b/typedapi/types/charfilterdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CharFilterDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/types.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/analyze/types.ts#L46-L49 type CharFilterDetail struct { FilteredText []string `json:"filtered_text"` Name string `json:"name"` diff --git a/typedapi/types/charfiltertypes.go b/typedapi/types/charfiltertypes.go index 1db27d6bc1..f7e88d4de8 100644 --- a/typedapi/types/charfiltertypes.go +++ b/typedapi/types/charfiltertypes.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // CharFilterTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L315-L352 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L333-L370 type CharFilterTypes struct { // AnalyzerTypes Contains statistics about analyzer types used in selected nodes. AnalyzerTypes []FieldTypes `json:"analyzer_types"` diff --git a/typedapi/types/chargrouptokenizer.go b/typedapi/types/chargrouptokenizer.go index 5d5fd9ff0d..c3d81b3be0 100644 --- a/typedapi/types/chargrouptokenizer.go +++ b/typedapi/types/chargrouptokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CharGroupTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L31-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L31-L38 type CharGroupTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` TokenizeOnChars []string `json:"tokenize_on_chars"` diff --git a/typedapi/types/checkpointing.go b/typedapi/types/checkpointing.go index 2210c85bf9..7d1bcc7357 100644 --- a/typedapi/types/checkpointing.go +++ b/typedapi/types/checkpointing.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Checkpointing type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform_stats/types.ts#L102-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform_stats/types.ts#L102-L110 type Checkpointing struct { ChangesLastDetectedAt *int64 `json:"changes_last_detected_at,omitempty"` ChangesLastDetectedAtString DateTime `json:"changes_last_detected_at_string,omitempty"` diff --git a/typedapi/types/checkpointstats.go b/typedapi/types/checkpointstats.go index 380dddc5b3..9b4e3818e1 100644 --- a/typedapi/types/checkpointstats.go +++ b/typedapi/types/checkpointstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CheckpointStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform_stats/types.ts#L93-L100 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform_stats/types.ts#L93-L100 type CheckpointStats struct { Checkpoint int64 `json:"checkpoint"` CheckpointProgress *TransformProgress `json:"checkpoint_progress,omitempty"` diff --git a/typedapi/types/childrenaggregate.go b/typedapi/types/childrenaggregate.go index f9c43770fb..e44798af6f 100644 --- a/typedapi/types/childrenaggregate.go +++ b/typedapi/types/childrenaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // ChildrenAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L890-L894 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L962-L966 type ChildrenAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *ChildrenAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *ChildrenAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/childrenaggregation.go b/typedapi/types/childrenaggregation.go index 23dc8628c1..4848129179 100644 --- a/typedapi/types/childrenaggregation.go +++ b/typedapi/types/childrenaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ChildrenAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L121-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L121-L126 type ChildrenAggregation struct { // Type The child type that should be selected. Type *string `json:"type,omitempty"` diff --git a/typedapi/types/chineseanalyzer.go b/typedapi/types/chineseanalyzer.go index d9485a6c67..c3402cd839 100644 --- a/typedapi/types/chineseanalyzer.go +++ b/typedapi/types/chineseanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ChineseAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L120-L124 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L120-L124 type ChineseAnalyzer struct { Stopwords StopWords `json:"stopwords,omitempty"` StopwordsPath *string `json:"stopwords_path,omitempty"` diff --git a/typedapi/types/chisquareheuristic.go b/typedapi/types/chisquareheuristic.go index 8d412cf0eb..34dd43e95a 100644 --- a/typedapi/types/chisquareheuristic.go +++ b/typedapi/types/chisquareheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ChiSquareHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L782-L791 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L785-L794 type ChiSquareHeuristic struct { // BackgroundIsSuperset Set to `false` if you defined a custom background filter that represents a // different set of documents that you want to compare to. diff --git a/typedapi/types/chunkingconfig.go b/typedapi/types/chunkingconfig.go index fa2caace4c..cff26706cd 100644 --- a/typedapi/types/chunkingconfig.go +++ b/typedapi/types/chunkingconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // ChunkingConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L251-L264 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L255-L268 type ChunkingConfig struct { // Mode If the mode is `auto`, the chunk size is dynamically calculated; // this is the recommended value when the datafeed does not use aggregations. diff --git a/typedapi/types/chunkingsettings.go b/typedapi/types/chunkingsettings.go index 9d552ccec4..b5f4839693 100644 --- a/typedapi/types/chunkingsettings.go +++ b/typedapi/types/chunkingsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,11 +31,12 @@ import ( // ChunkingSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/ChunkingSettings.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/ChunkingSettings.ts#L24-L36 type ChunkingSettings struct { // MaxChunkSize The maximum size of a chunk in words. - // This value cannot be higher than `300` or lower than `20` (for `sentence` - // strategy) or `10` (for `word` strategy). + // This value cannot be lower than `20` (for `sentence` strategy) or `10` (for + // `word` strategy). + // This value should not exceed the window size for the associated model. MaxChunkSize int `json:"max_chunk_size"` // Overlap The number of overlapping words for chunks. // It is applicable only to a `word` chunking strategy. @@ -45,7 +46,35 @@ type ChunkingSettings struct { // It is applicable only for a `sentence` chunking strategy. // It can be either `1` or `0`. SentenceOverlap *int `json:"sentence_overlap,omitempty"` - // Strategy The chunking strategy: `sentence` or `word`. + // SeparatorGroup Only applicable to the `recursive` strategy and required when using it. + // + // Sets a predefined list of separators in the saved chunking settings based on + // the selected text type. + // Values can be `markdown` or `plaintext`. + // + // Using this parameter is an alternative to manually specifying a custom + // `separators` list. + SeparatorGroup *string `json:"separator_group,omitempty"` + // Separators Only applicable to the `recursive` strategy and required when using it. + // + // A list of strings used as possible split points when chunking text. + // + // Each string can be a plain string or a regular expression (regex) pattern. + // The system tries each separator in order to split the text, starting from the + // first item in the list. + // + // After splitting, it attempts to recombine smaller pieces into larger chunks + // that stay within + // the `max_chunk_size` limit, to reduce the total number of chunks generated. + Separators []string `json:"separators,omitempty"` + // Strategy The chunking strategy: `sentence`, `word`, `none` or `recursive`. + // + // - If `strategy` is set to `recursive`, you must also specify: + // + // - `max_chunk_size` + // - either `separators` or`separator_group` + // + // Learn more about different chunking strategies in the linked documentation. Strategy string `json:"strategy"` } @@ -112,6 +141,23 @@ func (s *ChunkingSettings) UnmarshalJSON(data []byte) error { s.SentenceOverlap = &f } + case "separator_group": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "SeparatorGroup", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.SeparatorGroup = &o + + case "separators": + if err := dec.Decode(&s.Separators); err != nil { + return fmt.Errorf("%s | %w", "Separators", err) + } + case "strategy": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/chunkrescorer.go b/typedapi/types/chunkrescorer.go new file mode 100644 index 0000000000..e280747af6 --- /dev/null +++ b/typedapi/types/chunkrescorer.go @@ -0,0 +1,96 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ChunkRescorer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L203-L208 +type ChunkRescorer struct { + // ChunkingSettings Chunking settings to apply + ChunkingSettings *ChunkRescorerChunkingSettings `json:"chunking_settings,omitempty"` + // Size The number of chunks per document to evaluate for reranking. + Size *int `json:"size,omitempty"` +} + +func (s *ChunkRescorer) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "chunking_settings": + if err := dec.Decode(&s.ChunkingSettings); err != nil { + return fmt.Errorf("%s | %w", "ChunkingSettings", err) + } + + case "size": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Size", err) + } + s.Size = &value + case float64: + f := int(v) + s.Size = &f + } + + } + } + return nil +} + +// NewChunkRescorer returns a ChunkRescorer. +func NewChunkRescorer() *ChunkRescorer { + r := &ChunkRescorer{} + + return r +} + +type ChunkRescorerVariant interface { + ChunkRescorerCaster() *ChunkRescorer +} + +func (s *ChunkRescorer) ChunkRescorerCaster() *ChunkRescorer { + return s +} diff --git a/typedapi/types/chunkrescorerchunkingsettings.go b/typedapi/types/chunkrescorerchunkingsettings.go new file mode 100644 index 0000000000..0863c8136e --- /dev/null +++ b/typedapi/types/chunkrescorerchunkingsettings.go @@ -0,0 +1,191 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ChunkRescorerChunkingSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/ChunkingSettings.ts#L38-L52 +type ChunkRescorerChunkingSettings struct { + // MaxChunkSize The maximum size of a chunk in words. + // This value cannot be lower than `20` (for `sentence` strategy) or `10` (for + // `word` strategy). + // This value should not exceed the window size for the associated model. + MaxChunkSize int `json:"max_chunk_size"` + // Overlap The number of overlapping words for chunks. + // It is applicable only to a `word` chunking strategy. + // This value cannot be higher than half the `max_chunk_size` value. + Overlap *int `json:"overlap,omitempty"` + // SentenceOverlap The number of overlapping sentences for chunks. + // It is applicable only for a `sentence` chunking strategy. + // It can be either `1` or `0`. + SentenceOverlap *int `json:"sentence_overlap,omitempty"` + // SeparatorGroup Only applicable to the `recursive` strategy and required when using it. + // + // Sets a predefined list of separators in the saved chunking settings based on + // the selected text type. + // Values can be `markdown` or `plaintext`. + // + // Using this parameter is an alternative to manually specifying a custom + // `separators` list. + SeparatorGroup *string `json:"separator_group,omitempty"` + // Separators Only applicable to the `recursive` strategy and required when using it. + // + // A list of strings used as possible split points when chunking text. + // + // Each string can be a plain string or a regular expression (regex) pattern. + // The system tries each separator in order to split the text, starting from the + // first item in the list. + // + // After splitting, it attempts to recombine smaller pieces into larger chunks + // that stay within + // the `max_chunk_size` limit, to reduce the total number of chunks generated. + Separators []string `json:"separators,omitempty"` + // Strategy The chunking strategy: `sentence`, `word`, `none` or `recursive`. + // + // - If `strategy` is set to `recursive`, you must also specify: + // + // - `max_chunk_size` + // - either `separators` or`separator_group` + // + // Learn more about different chunking strategies in the linked documentation. + Strategy *string `json:"strategy,omitempty"` +} + +func (s *ChunkRescorerChunkingSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "max_chunk_size": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "MaxChunkSize", err) + } + s.MaxChunkSize = value + case float64: + f := int(v) + s.MaxChunkSize = f + } + + case "overlap": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Overlap", err) + } + s.Overlap = &value + case float64: + f := int(v) + s.Overlap = &f + } + + case "sentence_overlap": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "SentenceOverlap", err) + } + s.SentenceOverlap = &value + case float64: + f := int(v) + s.SentenceOverlap = &f + } + + case "separator_group": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "SeparatorGroup", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.SeparatorGroup = &o + + case "separators": + if err := dec.Decode(&s.Separators); err != nil { + return fmt.Errorf("%s | %w", "Separators", err) + } + + case "strategy": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Strategy", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Strategy = &o + + } + } + return nil +} + +// NewChunkRescorerChunkingSettings returns a ChunkRescorerChunkingSettings. +func NewChunkRescorerChunkingSettings() *ChunkRescorerChunkingSettings { + r := &ChunkRescorerChunkingSettings{} + + return r +} + +type ChunkRescorerChunkingSettingsVariant interface { + ChunkRescorerChunkingSettingsCaster() *ChunkRescorerChunkingSettings +} + +func (s *ChunkRescorerChunkingSettings) ChunkRescorerChunkingSettingsCaster() *ChunkRescorerChunkingSettings { + return s +} diff --git a/typedapi/types/circleprocessor.go b/typedapi/types/circleprocessor.go index d7db6dae93..261a3d767b 100644 --- a/typedapi/types/circleprocessor.go +++ b/typedapi/types/circleprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // CircleProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L574-L597 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L578-L601 type CircleProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/cjkanalyzer.go b/typedapi/types/cjkanalyzer.go index adcb95f321..0a1b5cf113 100644 --- a/typedapi/types/cjkanalyzer.go +++ b/typedapi/types/cjkanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CjkAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L126-L130 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L126-L130 type CjkAnalyzer struct { Stopwords StopWords `json:"stopwords,omitempty"` StopwordsPath *string `json:"stopwords_path,omitempty"` diff --git a/typedapi/types/cjkbigramtokenfilter.go b/typedapi/types/cjkbigramtokenfilter.go index fe4a40b1d1..665c1a53a7 100644 --- a/typedapi/types/cjkbigramtokenfilter.go +++ b/typedapi/types/cjkbigramtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // CjkBigramTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L466-L472 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L501-L507 type CjkBigramTokenFilter struct { // IgnoredScripts Array of character scripts for which to disable bigrams. IgnoredScripts []cjkbigramignoredscript.CjkBigramIgnoredScript `json:"ignored_scripts,omitempty"` diff --git a/typedapi/types/cjkwidthtokenfilter.go b/typedapi/types/cjkwidthtokenfilter.go index d5562cb3cf..5823be3db2 100644 --- a/typedapi/types/cjkwidthtokenfilter.go +++ b/typedapi/types/cjkwidthtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // CjkWidthTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L474-L476 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L509-L511 type CjkWidthTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/classictokenfilter.go b/typedapi/types/classictokenfilter.go index 18fb74af60..e87bfa3679 100644 --- a/typedapi/types/classictokenfilter.go +++ b/typedapi/types/classictokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ClassicTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L478-L480 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L513-L515 type ClassicTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/classictokenizer.go b/typedapi/types/classictokenizer.go index 10fc50c9ba..44efc559d3 100644 --- a/typedapi/types/classictokenizer.go +++ b/typedapi/types/classictokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClassicTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L40-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L40-L46 type ClassicTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/classificationinferenceoptions.go b/typedapi/types/classificationinferenceoptions.go index 50e6f716c2..dcccfc0885 100644 --- a/typedapi/types/classificationinferenceoptions.go +++ b/typedapi/types/classificationinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L118-L133 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L118-L133 type ClassificationInferenceOptions struct { // NumTopClasses Specifies the number of top class predictions to return. Defaults to 0. NumTopClasses *int `json:"num_top_classes,omitempty"` diff --git a/typedapi/types/cleanuprepositoryresults.go b/typedapi/types/cleanuprepositoryresults.go index ffa3867234..bc224459e8 100644 --- a/typedapi/types/cleanuprepositoryresults.go +++ b/typedapi/types/cleanuprepositoryresults.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CleanupRepositoryResults type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L37 type CleanupRepositoryResults struct { // DeletedBlobs The number of binary large objects (blobs) removed from the snapshot // repository during cleanup operations. diff --git a/typedapi/types/client.go b/typedapi/types/client.go index 73b61909d2..54e841b92d 100644 --- a/typedapi/types/client.go +++ b/typedapi/types/client.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Client type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L722-L769 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L722-L769 type Client struct { // Agent Reported agent for the HTTP client. // If unavailable, this property is not included in the response. diff --git a/typedapi/types/closeindexresult.go b/typedapi/types/closeindexresult.go index 55a05654c8..f26302b33e 100644 --- a/typedapi/types/closeindexresult.go +++ b/typedapi/types/closeindexresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CloseIndexResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/close/CloseIndexResponse.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/close/CloseIndexResponse.ts#L32-L35 type CloseIndexResult struct { Closed bool `json:"closed"` Shards map[string]CloseShardResult `json:"shards,omitempty"` diff --git a/typedapi/types/closeshardresult.go b/typedapi/types/closeshardresult.go index 11fd137c08..f70ea15fbe 100644 --- a/typedapi/types/closeshardresult.go +++ b/typedapi/types/closeshardresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // CloseShardResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/close/CloseIndexResponse.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/close/CloseIndexResponse.ts#L37-L39 type CloseShardResult struct { Failures []ShardFailure `json:"failures"` } diff --git a/typedapi/types/clusterappliedstats.go b/typedapi/types/clusterappliedstats.go index d0ef457644..f3f8663d2b 100644 --- a/typedapi/types/clusterappliedstats.go +++ b/typedapi/types/clusterappliedstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ClusterAppliedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L223-L225 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L223-L225 type ClusterAppliedStats struct { Recordings []Recording `json:"recordings,omitempty"` } diff --git a/typedapi/types/clustercomponenttemplate.go b/typedapi/types/clustercomponenttemplate.go index 4fffa1379f..2960c2dc4f 100644 --- a/typedapi/types/clustercomponenttemplate.go +++ b/typedapi/types/clustercomponenttemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ClusterComponentTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/_types/ComponentTemplate.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/_types/ComponentTemplate.ts#L29-L32 type ClusterComponentTemplate struct { ComponentTemplate ComponentTemplateNode `json:"component_template"` Name string `json:"name"` diff --git a/typedapi/types/clusterdetails.go b/typedapi/types/clusterdetails.go index 8bfcfe4103..4a92c0ccff 100644 --- a/typedapi/types/clusterdetails.go +++ b/typedapi/types/clusterdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ClusterDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L45-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L45-L52 type ClusterDetails struct { Failures []ShardFailure `json:"failures,omitempty"` Indices string `json:"indices"` diff --git a/typedapi/types/clusterfilesystem.go b/typedapi/types/clusterfilesystem.go index 1cdfcbbacc..766380c7c4 100644 --- a/typedapi/types/clusterfilesystem.go +++ b/typedapi/types/clusterfilesystem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterFileSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L35-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L35-L75 type ClusterFileSystem struct { // Available Total number of bytes available to JVM in file stores across all selected // nodes. diff --git a/typedapi/types/clusterindexingpressure.go b/typedapi/types/clusterindexingpressure.go index f4790da28e..397ff47b9d 100644 --- a/typedapi/types/clusterindexingpressure.go +++ b/typedapi/types/clusterindexingpressure.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ClusterIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L765-L767 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L783-L785 type ClusterIndexingPressure struct { Memory NodesIndexingPressureMemory `json:"memory"` } diff --git a/typedapi/types/clusterindices.go b/typedapi/types/clusterindices.go index 9dd2b63ff9..7a32171abc 100644 --- a/typedapi/types/clusterindices.go +++ b/typedapi/types/clusterindices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterIndices type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L100-L147 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L100-L147 type ClusterIndices struct { // Analysis Contains statistics about analyzers and analyzer components used in selected // nodes. diff --git a/typedapi/types/clusterindicesshards.go b/typedapi/types/clusterindicesshards.go index 1fac4b3bba..dc4ff03efa 100644 --- a/typedapi/types/clusterindicesshards.go +++ b/typedapi/types/clusterindicesshards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterIndicesShards type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L86-L98 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L86-L98 type ClusterIndicesShards struct { // Index Contains statistics about shards assigned to selected nodes. Index *ClusterIndicesShardsIndex `json:"index,omitempty"` diff --git a/typedapi/types/clusterindicesshardsindex.go b/typedapi/types/clusterindicesshardsindex.go index b14b518f66..4d1bb5667b 100644 --- a/typedapi/types/clusterindicesshardsindex.go +++ b/typedapi/types/clusterindicesshardsindex.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ClusterIndicesShardsIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L77-L84 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L77-L84 type ClusterIndicesShardsIndex struct { // Primaries Contains statistics about the number of primary shards assigned to selected // nodes. diff --git a/typedapi/types/clusterinfo.go b/typedapi/types/clusterinfo.go index 25b3f9321a..51261a17b2 100644 --- a/typedapi/types/clusterinfo.go +++ b/typedapi/types/clusterinfo.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L49-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L49-L55 type ClusterInfo struct { Nodes map[string]NodeDiskUsage `json:"nodes"` ReservedSizes []ReservedSize `json:"reserved_sizes"` diff --git a/typedapi/types/clusterinfotargets.go b/typedapi/types/clusterinfotargets.go index 1220a46179..554b12a417 100644 --- a/typedapi/types/clusterinfotargets.go +++ b/typedapi/types/clusterinfotargets.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // ClusterInfoTargets type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L388-L388 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L390-L390 type ClusterInfoTargets []clusterinfotarget.ClusterInfoTarget diff --git a/typedapi/types/clusteringest.go b/typedapi/types/clusteringest.go index 229ea020c8..5efbd64c34 100644 --- a/typedapi/types/clusteringest.go +++ b/typedapi/types/clusteringest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L367-L370 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L385-L388 type ClusterIngest struct { NumberOfPipelines int `json:"number_of_pipelines"` ProcessorStats map[string]ClusterProcessor `json:"processor_stats"` diff --git a/typedapi/types/clusterjvm.go b/typedapi/types/clusterjvm.go index e7a29f3aae..2073fe59ff 100644 --- a/typedapi/types/clusterjvm.go +++ b/typedapi/types/clusterjvm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterJvm type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L372-L393 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L390-L411 type ClusterJvm struct { // MaxUptime Uptime duration since JVM last started. MaxUptime Duration `json:"max_uptime,omitempty"` diff --git a/typedapi/types/clusterjvmmemory.go b/typedapi/types/clusterjvmmemory.go index f3f93937e9..842a0e95b4 100644 --- a/typedapi/types/clusterjvmmemory.go +++ b/typedapi/types/clusterjvmmemory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterJvmMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L395-L412 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L413-L430 type ClusterJvmMemory struct { // HeapMax Maximum amount of memory available for use by the heap across all selected // nodes. diff --git a/typedapi/types/clusterjvmversion.go b/typedapi/types/clusterjvmversion.go index 40c3270f24..2e48c54097 100644 --- a/typedapi/types/clusterjvmversion.go +++ b/typedapi/types/clusterjvmversion.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterJvmVersion type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L414-L444 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L432-L462 type ClusterJvmVersion struct { // BundledJdk Always `true`. All distributions come with a bundled Java Development Kit // (JDK). diff --git a/typedapi/types/clusternetworktypes.go b/typedapi/types/clusternetworktypes.go index 59d19d702b..78d5d1fc6e 100644 --- a/typedapi/types/clusternetworktypes.go +++ b/typedapi/types/clusternetworktypes.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ClusterNetworkTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L446-L455 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L464-L473 type ClusterNetworkTypes struct { // HttpTypes Contains statistics about the HTTP network types used by selected nodes. HttpTypes map[string]int `json:"http_types"` diff --git a/typedapi/types/clusternode.go b/typedapi/types/clusternode.go index 8a4838d190..51da4aef32 100644 --- a/typedapi/types/clusternode.go +++ b/typedapi/types/clusternode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ClusterNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/ClusterNode.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/ClusterNode.ts#L22-L24 type ClusterNode struct { Name string `json:"name"` } diff --git a/typedapi/types/clusternodecount.go b/typedapi/types/clusternodecount.go index 83d0b4651b..a0c2b0c552 100644 --- a/typedapi/types/clusternodecount.go +++ b/typedapi/types/clusternodecount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterNodeCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L457-L478 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L475-L496 type ClusterNodeCount struct { CoordinatingOnly *int `json:"coordinating_only,omitempty"` Data *int `json:"data,omitempty"` diff --git a/typedapi/types/clusternodes.go b/typedapi/types/clusternodes.go index 8181e2a159..ea5af996a8 100644 --- a/typedapi/types/clusternodes.go +++ b/typedapi/types/clusternodes.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ClusterNodes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L480-L513 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L498-L531 type ClusterNodes struct { // Count Contains counts for nodes selected by the request’s node filters. Count ClusterNodeCount `json:"count"` diff --git a/typedapi/types/clusteroperatingsystem.go b/typedapi/types/clusteroperatingsystem.go index d63e75b433..18e9fad6e0 100644 --- a/typedapi/types/clusteroperatingsystem.go +++ b/typedapi/types/clusteroperatingsystem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L526-L553 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L544-L571 type ClusterOperatingSystem struct { // AllocatedProcessors Number of processors used to calculate thread pool size across all selected // nodes. diff --git a/typedapi/types/clusteroperatingsystemarchitecture.go b/typedapi/types/clusteroperatingsystemarchitecture.go index a5e6d9aaea..209c28ee94 100644 --- a/typedapi/types/clusteroperatingsystemarchitecture.go +++ b/typedapi/types/clusteroperatingsystemarchitecture.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemArchitecture type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L515-L524 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L533-L542 type ClusterOperatingSystemArchitecture struct { // Arch Name of an architecture used by one or more selected nodes. Arch string `json:"arch"` diff --git a/typedapi/types/clusteroperatingsystemname.go b/typedapi/types/clusteroperatingsystemname.go index c797e165c8..66321146a7 100644 --- a/typedapi/types/clusteroperatingsystemname.go +++ b/typedapi/types/clusteroperatingsystemname.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemName type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L555-L564 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L573-L582 type ClusterOperatingSystemName struct { // Count Number of selected nodes using the operating system. Count int `json:"count"` diff --git a/typedapi/types/clusteroperatingsystemprettyname.go b/typedapi/types/clusteroperatingsystemprettyname.go index 9c4a50e152..cf1b3b39be 100644 --- a/typedapi/types/clusteroperatingsystemprettyname.go +++ b/typedapi/types/clusteroperatingsystemprettyname.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemPrettyName type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L566-L575 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L584-L593 type ClusterOperatingSystemPrettyName struct { // Count Number of selected nodes using the operating system. Count int `json:"count"` diff --git a/typedapi/types/clusterprocess.go b/typedapi/types/clusterprocess.go index 8c5e033079..8f085029da 100644 --- a/typedapi/types/clusterprocess.go +++ b/typedapi/types/clusterprocess.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ClusterProcess type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L577-L586 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L595-L604 type ClusterProcess struct { // Cpu Contains statistics about CPU used by selected nodes. Cpu ClusterProcessCpu `json:"cpu"` diff --git a/typedapi/types/clusterprocesscpu.go b/typedapi/types/clusterprocesscpu.go index eb7a278668..f105ab2af7 100644 --- a/typedapi/types/clusterprocesscpu.go +++ b/typedapi/types/clusterprocesscpu.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterProcessCpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L588-L594 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L606-L612 type ClusterProcessCpu struct { // Percent Percentage of CPU used across all selected nodes. // Returns `-1` if not supported. diff --git a/typedapi/types/clusterprocessopenfiledescriptors.go b/typedapi/types/clusterprocessopenfiledescriptors.go index 483d1b7f73..9c3635a165 100644 --- a/typedapi/types/clusterprocessopenfiledescriptors.go +++ b/typedapi/types/clusterprocessopenfiledescriptors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterProcessOpenFileDescriptors type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L596-L612 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L614-L630 type ClusterProcessOpenFileDescriptors struct { // Avg Average number of concurrently open file descriptors. // Returns `-1` if not supported. diff --git a/typedapi/types/clusterprocessor.go b/typedapi/types/clusterprocessor.go index 41e42ea13d..5a3f6f43d3 100644 --- a/typedapi/types/clusterprocessor.go +++ b/typedapi/types/clusterprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L614-L620 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L632-L638 type ClusterProcessor struct { Count int64 `json:"count"` Current int64 `json:"current"` diff --git a/typedapi/types/clusterremoteinfo.go b/typedapi/types/clusterremoteinfo.go index 1f7fe86e6a..a199d96547 100644 --- a/typedapi/types/clusterremoteinfo.go +++ b/typedapi/types/clusterremoteinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // ClusterRemoteSniffInfo // ClusterRemoteProxyInfo // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L29-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L29-L30 type ClusterRemoteInfo any diff --git a/typedapi/types/clusterremoteproxyinfo.go b/typedapi/types/clusterremoteproxyinfo.go index 6c232c1261..0690ce66bd 100644 --- a/typedapi/types/clusterremoteproxyinfo.go +++ b/typedapi/types/clusterremoteproxyinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterRemoteProxyInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L58-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L58-L83 type ClusterRemoteProxyInfo struct { // ClusterCredentials This field is present and has a value of `::es_redacted::` only when the // remote cluster is configured with the API key based model. Otherwise, the diff --git a/typedapi/types/clusterremotesniffinfo.go b/typedapi/types/clusterremotesniffinfo.go index 5f23d3798a..7d2aeb864e 100644 --- a/typedapi/types/clusterremotesniffinfo.go +++ b/typedapi/types/clusterremotesniffinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterRemoteSniffInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L32-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L32-L56 type ClusterRemoteSniffInfo struct { // Connected If it is `true`, there is at least one open connection to the remote cluster. // If it is `false`, it means that the cluster no longer has an open connection diff --git a/typedapi/types/clusterruntimefieldtypes.go b/typedapi/types/clusterruntimefieldtypes.go index 03f220d08b..b9c785a4f2 100644 --- a/typedapi/types/clusterruntimefieldtypes.go +++ b/typedapi/types/clusterruntimefieldtypes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterRuntimeFieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L256-L313 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L274-L331 type ClusterRuntimeFieldTypes struct { // CharsMax Maximum number of characters for a single runtime field script. CharsMax int `json:"chars_max"` diff --git a/typedapi/types/clustershardmetrics.go b/typedapi/types/clustershardmetrics.go index 571ca374d9..83f1b39df5 100644 --- a/typedapi/types/clustershardmetrics.go +++ b/typedapi/types/clustershardmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterShardMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L622-L635 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L640-L653 type ClusterShardMetrics struct { // Avg Mean number of shards in an index, counting only shards assigned to selected // nodes. diff --git a/typedapi/types/clustersnapshotstats.go b/typedapi/types/clustersnapshotstats.go index 709db85493..f209ef5e7d 100644 --- a/typedapi/types/clustersnapshotstats.go +++ b/typedapi/types/clustersnapshotstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ClusterSnapshotStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L637-L640 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L655-L658 type ClusterSnapshotStats struct { CurrentCounts SnapshotCurrentCounts `json:"current_counts"` Repositories map[string]PerRepositoryStats `json:"repositories"` diff --git a/typedapi/types/clusterstatemetrics.go b/typedapi/types/clusterstatemetrics.go new file mode 100644 index 0000000000..4c11bbae8d --- /dev/null +++ b/typedapi/types/clusterstatemetrics.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/clusterstatemetric" +) + +// ClusterStateMetrics type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/state/ClusterStateRequest.ts#L106-L106 +type ClusterStateMetrics []clusterstatemetric.ClusterStateMetric diff --git a/typedapi/types/clusterstatequeue.go b/typedapi/types/clusterstatequeue.go index ceb7bb76bb..288e05b9e9 100644 --- a/typedapi/types/clusterstatequeue.go +++ b/typedapi/types/clusterstatequeue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterStateQueue type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L250-L263 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L250-L263 type ClusterStateQueue struct { // Committed Number of committed cluster states in queue. Committed *int64 `json:"committed,omitempty"` diff --git a/typedapi/types/clusterstateupdate.go b/typedapi/types/clusterstateupdate.go index 693c0d9590..7c54b6b05b 100644 --- a/typedapi/types/clusterstateupdate.go +++ b/typedapi/types/clusterstateupdate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterStateUpdate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L280-L345 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L280-L345 type ClusterStateUpdate struct { // CommitTime The cumulative amount of time spent waiting for a successful cluster state // update to commit, which measures the time from the start of each publication diff --git a/typedapi/types/clusterstatistics.go b/typedapi/types/clusterstatistics.go index 6f8d60ac02..9d28b8587a 100644 --- a/typedapi/types/clusterstatistics.go +++ b/typedapi/types/clusterstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ClusterStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L27-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L27-L35 type ClusterStatistics struct { Details map[string]ClusterDetails `json:"details,omitempty"` Failed int `json:"failed"` diff --git a/typedapi/types/cohereservicesettings.go b/typedapi/types/cohereservicesettings.go index 7ce0eacffb..1730961b4a 100644 --- a/typedapi/types/cohereservicesettings.go +++ b/typedapi/types/cohereservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // CohereServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L788-L831 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L834-L875 type CohereServiceSettings struct { // ApiKey A valid API key for your Cohere account. // You can find or create your Cohere API keys on the Cohere API key settings @@ -65,9 +65,7 @@ type CohereServiceSettings struct { // docs](https://docs.cohere.com/reference/rerank-1). // * For the available `text_embedding` models, refer to [Cohere embed // docs](https://docs.cohere.com/reference/embed). - // - // The default value for a text embedding task is `embed-english-v2.0`. - ModelId *string `json:"model_id,omitempty"` + ModelId string `json:"model_id"` // RateLimit This setting helps to minimize the number of rate limit errors returned from // Cohere. // By default, the `cohere` service sets the number of requests allowed per @@ -121,7 +119,7 @@ func (s *CohereServiceSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.ModelId = &o + s.ModelId = o case "rate_limit": if err := dec.Decode(&s.RateLimit); err != nil { diff --git a/typedapi/types/coheretasksettings.go b/typedapi/types/coheretasksettings.go index d274a8efc0..768ebfea98 100644 --- a/typedapi/types/coheretasksettings.go +++ b/typedapi/types/coheretasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // CohereTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L870-L902 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L914-L946 type CohereTaskSettings struct { // InputType For a `text_embedding` task, the type of input passed to the model. // Valid values are: @@ -47,7 +47,7 @@ type CohereTaskSettings struct { // // IMPORTANT: The `input_type` field is required when using embedding models // `v3` and higher. - InputType *cohereinputtype.CohereInputType `json:"input_type,omitempty"` + InputType cohereinputtype.CohereInputType `json:"input_type"` // ReturnDocuments For a `rerank` task, return doc text within the results. ReturnDocuments *bool `json:"return_documents,omitempty"` // TopN For a `rerank` task, the number of most relevant documents to return. diff --git a/typedapi/types/collector.go b/typedapi/types/collector.go index 32b3f55e66..9bb6ccbfbf 100644 --- a/typedapi/types/collector.go +++ b/typedapi/types/collector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Collector type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L94-L99 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L94-L99 type Collector struct { Children []Collector `json:"children,omitempty"` Name string `json:"name"` diff --git a/typedapi/types/column.go b/typedapi/types/column.go index cd707d190f..b29f85f543 100644 --- a/typedapi/types/column.go +++ b/typedapi/types/column.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Column type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/_types/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/_types/types.ts#L23-L26 type Column struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/combinedfieldsquery.go b/typedapi/types/combinedfieldsquery.go index 6b9f1f223e..348a0cde70 100644 --- a/typedapi/types/combinedfieldsquery.go +++ b/typedapi/types/combinedfieldsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // CombinedFieldsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/abstractions.ts#L472-L506 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/abstractions.ts#L472-L506 type CombinedFieldsQuery struct { // AutoGenerateSynonymsPhraseQuery If true, match phrase queries are automatically created for multi-term // synonyms. diff --git a/typedapi/types/command.go b/typedapi/types/command.go index 5bb0083fb1..247bab97db 100644 --- a/typedapi/types/command.go +++ b/typedapi/types/command.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Command type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/types.ts#L22-L43 type Command struct { // AllocateEmptyPrimary Allocate an empty primary shard to a node. Accepts the index and shard for // index name and shard number, and node to allocate the shard to. Using this diff --git a/typedapi/types/commandallocateprimaryaction.go b/typedapi/types/commandallocateprimaryaction.go index 7b284385dc..75e6db22de 100644 --- a/typedapi/types/commandallocateprimaryaction.go +++ b/typedapi/types/commandallocateprimaryaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CommandAllocatePrimaryAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L78-L84 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/types.ts#L78-L84 type CommandAllocatePrimaryAction struct { // AcceptDataLoss If a node which has a copy of the data rejoins the cluster later on, that // data will be deleted. To ensure that these implications are well-understood, diff --git a/typedapi/types/commandallocatereplicaaction.go b/typedapi/types/commandallocatereplicaaction.go index 58c1257014..19744f8cd5 100644 --- a/typedapi/types/commandallocatereplicaaction.go +++ b/typedapi/types/commandallocatereplicaaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CommandAllocateReplicaAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L69-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/types.ts#L69-L76 type CommandAllocateReplicaAction struct { Index string `json:"index"` Node string `json:"node"` diff --git a/typedapi/types/commandcancelaction.go b/typedapi/types/commandcancelaction.go index f44fcd78cd..a7536efbf8 100644 --- a/typedapi/types/commandcancelaction.go +++ b/typedapi/types/commandcancelaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CommandCancelAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/types.ts#L45-L50 type CommandCancelAction struct { AllowPrimary *bool `json:"allow_primary,omitempty"` Index string `json:"index"` diff --git a/typedapi/types/commandmoveaction.go b/typedapi/types/commandmoveaction.go index 3a32525dfa..ba1abf3c1a 100644 --- a/typedapi/types/commandmoveaction.go +++ b/typedapi/types/commandmoveaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CommandMoveAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L60-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/types.ts#L60-L67 type CommandMoveAction struct { // FromNode The node to move the shard from FromNode string `json:"from_node"` diff --git a/typedapi/types/commongramstokenfilter.go b/typedapi/types/commongramstokenfilter.go index ac51ab64ca..828d73fd03 100644 --- a/typedapi/types/commongramstokenfilter.go +++ b/typedapi/types/commongramstokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CommonGramsTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L219-L235 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L230-L252 type CommonGramsTokenFilter struct { // CommonWords A list of tokens. The filter generates bigrams for these tokens. // Either this or the `common_words_path` parameter is required. diff --git a/typedapi/types/commonstatsflags.go b/typedapi/types/commonstatsflags.go new file mode 100644 index 0000000000..1bd97e8cc9 --- /dev/null +++ b/typedapi/types/commonstatsflags.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/commonstatsflag" +) + +// CommonStatsFlags type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L417-L417 +type CommonStatsFlags []commonstatsflag.CommonStatsFlag diff --git a/typedapi/types/commontermsquery.go b/typedapi/types/commontermsquery.go index e06c463616..2b73bba70e 100644 --- a/typedapi/types/commontermsquery.go +++ b/typedapi/types/commontermsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // CommonTermsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L34-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L34-L44 type CommonTermsQuery struct { Analyzer *string `json:"analyzer,omitempty"` // Boost Floating point number used to decrease or increase the relevance scores of diff --git a/typedapi/types/communityidprocessor.go b/typedapi/types/communityidprocessor.go index 9c9fed162d..ac8ce6a9fd 100644 --- a/typedapi/types/communityidprocessor.go +++ b/typedapi/types/communityidprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CommunityIDProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L599-L660 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L603-L664 type CommunityIDProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/compactnodeinfo.go b/typedapi/types/compactnodeinfo.go index 25667e3426..beee3dffaa 100644 --- a/typedapi/types/compactnodeinfo.go +++ b/typedapi/types/compactnodeinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // CompactNodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L33-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L33-L40 type CompactNodeInfo struct { // Name A human-readable name for the node. // You can set this name using the `node.name` property in `elasticsearch.yml`. diff --git a/typedapi/types/completioncontext.go b/typedapi/types/completioncontext.go index fbd42508b6..81a726733f 100644 --- a/typedapi/types/completioncontext.go +++ b/typedapi/types/completioncontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompletionContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L236-L265 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L237-L266 type CompletionContext struct { // Boost The factor by which the score of the suggestion should be boosted. // The score is computed by multiplying the boost with the suggestion weight. diff --git a/typedapi/types/completionproperty.go b/typedapi/types/completionproperty.go index 7506b67eaa..eaa7ea5bd9 100644 --- a/typedapi/types/completionproperty.go +++ b/typedapi/types/completionproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // CompletionProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L33-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L33-L41 type CompletionProperty struct { Analyzer *string `json:"analyzer,omitempty"` Contexts []SuggestContext `json:"contexts,omitempty"` diff --git a/typedapi/types/completionresult.go b/typedapi/types/completionresult.go index 797de8ad6a..6e213b6ded 100644 --- a/typedapi/types/completionresult.go +++ b/typedapi/types/completionresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompletionResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Results.ts#L77-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Results.ts#L77-L82 type CompletionResult struct { Result string `json:"result"` } diff --git a/typedapi/types/completionstats.go b/typedapi/types/completionstats.go index f6d437f144..1820a22cb8 100644 --- a/typedapi/types/completionstats.go +++ b/typedapi/types/completionstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompletionStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L83-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L83-L93 type CompletionStats struct { Fields map[string]FieldSizeUsage `json:"fields,omitempty"` // Size Total amount of memory used for completion across all shards assigned to diff --git a/typedapi/types/completionsuggest.go b/typedapi/types/completionsuggest.go index e342d240a6..bb6f2ac480 100644 --- a/typedapi/types/completionsuggest.go +++ b/typedapi/types/completionsuggest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompletionSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L49-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L49-L56 type CompletionSuggest struct { Length int `json:"length"` Offset int `json:"offset"` diff --git a/typedapi/types/completionsuggester.go b/typedapi/types/completionsuggester.go index f505ff2932..4b76258062 100644 --- a/typedapi/types/completionsuggester.go +++ b/typedapi/types/completionsuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompletionSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L164-L182 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L164-L182 type CompletionSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. diff --git a/typedapi/types/completionsuggestoption.go b/typedapi/types/completionsuggestoption.go index b2aa8f4b44..8e7f8e7268 100644 --- a/typedapi/types/completionsuggestoption.go +++ b/typedapi/types/completionsuggestoption.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,14 +31,14 @@ import ( // CompletionSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L74-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L74-L85 type CompletionSuggestOption struct { CollateMatch *bool `json:"collate_match,omitempty"` Contexts map[string][]Context `json:"contexts,omitempty"` Fields map[string]json.RawMessage `json:"fields,omitempty"` Id_ *string `json:"_id,omitempty"` Index_ *string `json:"_index,omitempty"` - Routing_ *string `json:"_routing,omitempty"` + Routing_ []string `json:"_routing,omitempty"` Score *Float64 `json:"score,omitempty"` Score_ *Float64 `json:"_score,omitempty"` Source_ json.RawMessage `json:"_source,omitempty"` @@ -108,8 +108,19 @@ func (s *CompletionSuggestOption) UnmarshalJSON(data []byte) error { } case "_routing": - if err := dec.Decode(&s.Routing_); err != nil { - return fmt.Errorf("%s | %w", "Routing_", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing_", err) + } + + s.Routing_ = append(s.Routing_, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing_); err != nil { + return fmt.Errorf("%s | %w", "Routing_", err) + } } case "score": diff --git a/typedapi/types/completiontool.go b/typedapi/types/completiontool.go index 1218d1e057..1ffad5284b 100644 --- a/typedapi/types/completiontool.go +++ b/typedapi/types/completiontool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompletionTool type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L278-L290 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L278-L290 type CompletionTool struct { // Function The function definition. Function CompletionToolFunction `json:"function"` diff --git a/typedapi/types/completiontoolchoice.go b/typedapi/types/completiontoolchoice.go index 08faa0aeae..fdc4165665 100644 --- a/typedapi/types/completiontoolchoice.go +++ b/typedapi/types/completiontoolchoice.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompletionToolChoice type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L241-L253 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L241-L253 type CompletionToolChoice struct { // Function The tool choice function. Function CompletionToolChoiceFunction `json:"function"` diff --git a/typedapi/types/completiontoolchoicefunction.go b/typedapi/types/completiontoolchoicefunction.go index eaf31e3453..eff190859c 100644 --- a/typedapi/types/completiontoolchoicefunction.go +++ b/typedapi/types/completiontoolchoicefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompletionToolChoiceFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L230-L239 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L230-L239 type CompletionToolChoiceFunction struct { // Name The name of the function to call. Name string `json:"name"` diff --git a/typedapi/types/completiontoolfunction.go b/typedapi/types/completiontoolfunction.go index 869a60a79f..5effc937a2 100644 --- a/typedapi/types/completiontoolfunction.go +++ b/typedapi/types/completiontoolfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompletionToolFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L255-L276 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L255-L276 type CompletionToolFunction struct { // Description A description of what the function does. // This is used by the model to choose when and how to call the function. diff --git a/typedapi/types/completiontooltype.go b/typedapi/types/completiontooltype.go index f33ff018ad..1d7cbf789f 100644 --- a/typedapi/types/completiontooltype.go +++ b/typedapi/types/completiontooltype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // CompletionToolChoice // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L118-L121 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L118-L121 type CompletionToolType any type CompletionToolTypeVariant interface { diff --git a/typedapi/types/componenttemplatenode.go b/typedapi/types/componenttemplatenode.go index be5868b5b6..baecc4a8b9 100644 --- a/typedapi/types/componenttemplatenode.go +++ b/typedapi/types/componenttemplatenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,12 +31,24 @@ import ( // ComponentTemplateNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/_types/ComponentTemplate.ts#L33-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/_types/ComponentTemplate.ts#L34-L67 type ComponentTemplateNode struct { - Deprecated *bool `json:"deprecated,omitempty"` - Meta_ Metadata `json:"_meta,omitempty"` - Template ComponentTemplateSummary `json:"template"` - Version *int64 `json:"version,omitempty"` + // CreatedDate Date and time when the component template was created. Only returned if the + // `human` query parameter is `true`. + CreatedDate DateTime `json:"created_date,omitempty"` + // CreatedDateMillis Date and time when the component template was created, in milliseconds since + // the epoch. + CreatedDateMillis *int64 `json:"created_date_millis,omitempty"` + Deprecated *bool `json:"deprecated,omitempty"` + Meta_ Metadata `json:"_meta,omitempty"` + // ModifiedDate Date and time when the component template was last modified. Only returned if + // the `human` query parameter is `true`. + ModifiedDate DateTime `json:"modified_date,omitempty"` + // ModifiedDateMillis Date and time when the component template was last modified, in milliseconds + // since the epoch. + ModifiedDateMillis *int64 `json:"modified_date_millis,omitempty"` + Template ComponentTemplateSummary `json:"template"` + Version *int64 `json:"version,omitempty"` } func (s *ComponentTemplateNode) UnmarshalJSON(data []byte) error { @@ -54,6 +66,16 @@ func (s *ComponentTemplateNode) UnmarshalJSON(data []byte) error { switch t { + case "created_date": + if err := dec.Decode(&s.CreatedDate); err != nil { + return fmt.Errorf("%s | %w", "CreatedDate", err) + } + + case "created_date_millis": + if err := dec.Decode(&s.CreatedDateMillis); err != nil { + return fmt.Errorf("%s | %w", "CreatedDateMillis", err) + } + case "deprecated": var tmp any dec.Decode(&tmp) @@ -73,6 +95,16 @@ func (s *ComponentTemplateNode) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Meta_", err) } + case "modified_date": + if err := dec.Decode(&s.ModifiedDate); err != nil { + return fmt.Errorf("%s | %w", "ModifiedDate", err) + } + + case "modified_date_millis": + if err := dec.Decode(&s.ModifiedDateMillis); err != nil { + return fmt.Errorf("%s | %w", "ModifiedDateMillis", err) + } + case "template": if err := dec.Decode(&s.Template); err != nil { return fmt.Errorf("%s | %w", "Template", err) diff --git a/typedapi/types/componenttemplatesummary.go b/typedapi/types/componenttemplatesummary.go index bdb1ff4efc..fd0956ebe6 100644 --- a/typedapi/types/componenttemplatesummary.go +++ b/typedapi/types/componenttemplatesummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ComponentTemplateSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/_types/ComponentTemplate.ts#L44-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/_types/ComponentTemplate.ts#L69-L86 type ComponentTemplateSummary struct { Aliases map[string]AliasDefinition `json:"aliases,omitempty"` DataStreamOptions *DataStreamOptionsTemplate `json:"data_stream_options,omitempty"` diff --git a/typedapi/types/compositeaggregate.go b/typedapi/types/compositeaggregate.go index 09bdaed509..f0207ee3f8 100644 --- a/typedapi/types/compositeaggregate.go +++ b/typedapi/types/compositeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // CompositeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L700-L705 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L772-L777 type CompositeAggregate struct { AfterKey CompositeAggregateKey `json:"after_key,omitempty"` Buckets BucketsCompositeBucket `json:"buckets"` diff --git a/typedapi/types/compositeaggregatekey.go b/typedapi/types/compositeaggregatekey.go index f7b03fd4a2..c30efd2e25 100644 --- a/typedapi/types/compositeaggregatekey.go +++ b/typedapi/types/compositeaggregatekey.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // CompositeAggregateKey type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L128-L128 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L128-L128 type CompositeAggregateKey map[string]FieldValue type CompositeAggregateKeyVariant interface { diff --git a/typedapi/types/compositeaggregation.go b/typedapi/types/compositeaggregation.go index 54465bd2fa..7de38fd858 100644 --- a/typedapi/types/compositeaggregation.go +++ b/typedapi/types/compositeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CompositeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L130-L149 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L130-L149 type CompositeAggregation struct { // After When paginating, use the `after_key` value returned in the previous response // to retrieve the next page. diff --git a/typedapi/types/compositeaggregationsource.go b/typedapi/types/compositeaggregationsource.go index df0970055e..e04788b061 100644 --- a/typedapi/types/compositeaggregationsource.go +++ b/typedapi/types/compositeaggregationsource.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // CompositeAggregationSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L151-L168 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L151-L171 type CompositeAggregationSource struct { // DateHistogram A date histogram aggregation. DateHistogram *CompositeDateHistogramAggregation `json:"date_histogram,omitempty"` diff --git a/typedapi/types/compositebucket.go b/typedapi/types/compositebucket.go index d347bf9b6c..ca0b427c62 100644 --- a/typedapi/types/compositebucket.go +++ b/typedapi/types/compositebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // CompositeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L707-L709 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L779-L781 type CompositeBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *CompositeBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *CompositeBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/compositedatehistogramaggregation.go b/typedapi/types/compositedatehistogramaggregation.go index 58e2b8eaeb..800824ed39 100644 --- a/typedapi/types/compositedatehistogramaggregation.go +++ b/typedapi/types/compositedatehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // CompositeDateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L187-L195 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L190-L198 type CompositeDateHistogramAggregation struct { // CalendarInterval Either `calendar_interval` or `fixed_interval` must be present CalendarInterval *string `json:"calendar_interval,omitempty"` diff --git a/typedapi/types/compositegeotilegridaggregation.go b/typedapi/types/compositegeotilegridaggregation.go index 3b6362de11..3e709ea158 100644 --- a/typedapi/types/compositegeotilegridaggregation.go +++ b/typedapi/types/compositegeotilegridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // CompositeGeoTileGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L197-L200 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L200-L203 type CompositeGeoTileGridAggregation struct { Bounds GeoBounds `json:"bounds,omitempty"` // Field Either `field` or `script` must be present diff --git a/typedapi/types/compositehistogramaggregation.go b/typedapi/types/compositehistogramaggregation.go index 12361e453d..9d31658cc8 100644 --- a/typedapi/types/compositehistogramaggregation.go +++ b/typedapi/types/compositehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // CompositeHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L183-L185 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L186-L188 type CompositeHistogramAggregation struct { // Field Either `field` or `script` must be present Field *string `json:"field,omitempty"` diff --git a/typedapi/types/compositesubfield.go b/typedapi/types/compositesubfield.go index 3525a40039..45e0555551 100644 --- a/typedapi/types/compositesubfield.go +++ b/typedapi/types/compositesubfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // CompositeSubField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/RuntimeFields.ts#L52-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/RuntimeFields.ts#L52-L54 type CompositeSubField struct { Type runtimefieldtype.RuntimeFieldType `json:"type"` } diff --git a/typedapi/types/compositetermsaggregation.go b/typedapi/types/compositetermsaggregation.go index deb51840ae..ff229fd48a 100644 --- a/typedapi/types/compositetermsaggregation.go +++ b/typedapi/types/compositetermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // CompositeTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L181-L181 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L184-L184 type CompositeTermsAggregation struct { // Field Either `field` or `script` must be present Field *string `json:"field,omitempty"` diff --git a/typedapi/types/conditiontokenfilter.go b/typedapi/types/conditiontokenfilter.go index 6d0e87777c..2d8129e54c 100644 --- a/typedapi/types/conditiontokenfilter.go +++ b/typedapi/types/conditiontokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ConditionTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L237-L243 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L254-L260 type ConditionTokenFilter struct { // Filter Array of token filters. If a token matches the predicate script in the // `script` parameter, these filters are applied to the token in the order diff --git a/typedapi/types/configuration.go b/typedapi/types/configuration.go index bc92da8322..1e6d2496f3 100644 --- a/typedapi/types/configuration.go +++ b/typedapi/types/configuration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Configuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/_types/SnapshotLifecycle.ts#L109-L139 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/_types/SnapshotLifecycle.ts#L109-L139 type Configuration struct { // FeatureStates A list of feature states to be included in this snapshot. A list of features // available for inclusion in the snapshot and their descriptions be can be diff --git a/typedapi/types/confusionmatrixitem.go b/typedapi/types/confusionmatrixitem.go index 0fd0b1680f..3eb53c57c6 100644 --- a/typedapi/types/confusionmatrixitem.go +++ b/typedapi/types/confusionmatrixitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L125-L130 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L125-L130 type ConfusionMatrixItem struct { ActualClass string `json:"actual_class"` ActualClassDocCount int `json:"actual_class_doc_count"` diff --git a/typedapi/types/confusionmatrixprediction.go b/typedapi/types/confusionmatrixprediction.go index ab4b7975d9..adae1477e2 100644 --- a/typedapi/types/confusionmatrixprediction.go +++ b/typedapi/types/confusionmatrixprediction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixPrediction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L132-L135 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L132-L135 type ConfusionMatrixPrediction struct { Count int `json:"count"` PredictedClass string `json:"predicted_class"` diff --git a/typedapi/types/confusionmatrixthreshold.go b/typedapi/types/confusionmatrixthreshold.go index c4a830f64a..51baba1fbe 100644 --- a/typedapi/types/confusionmatrixthreshold.go +++ b/typedapi/types/confusionmatrixthreshold.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixThreshold type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L137-L158 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L137-L158 type ConfusionMatrixThreshold struct { // FalseNegative False Negative FalseNegative int `json:"fn"` diff --git a/typedapi/types/connection.go b/typedapi/types/connection.go index ca91ba3385..d8241825e0 100644 --- a/typedapi/types/connection.go +++ b/typedapi/types/connection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Connection type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/_types/Connection.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/graph/_types/Connection.ts#L22-L27 type Connection struct { DocCount int64 `json:"doc_count"` Source int64 `json:"source"` diff --git a/typedapi/types/connector.go b/typedapi/types/connector.go index a837f3aab4..150b276328 100644 --- a/typedapi/types/connector.go +++ b/typedapi/types/connector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // Connector type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L252-L284 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L252-L284 type Connector struct { ApiKeyId *string `json:"api_key_id,omitempty"` ApiKeySecretId *string `json:"api_key_secret_id,omitempty"` diff --git a/typedapi/types/connectorconfigproperties.go b/typedapi/types/connectorconfigproperties.go index a2830cf2b4..32ea499aff 100644 --- a/typedapi/types/connectorconfigproperties.go +++ b/typedapi/types/connectorconfigproperties.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // ConnectorConfigProperties type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L83-L99 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L83-L99 type ConnectorConfigProperties struct { Category *string `json:"category,omitempty"` DefaultValue ScalarValue `json:"default_value"` diff --git a/typedapi/types/connectorconfiguration.go b/typedapi/types/connectorconfiguration.go index cca98d3028..241ca36bee 100644 --- a/typedapi/types/connectorconfiguration.go +++ b/typedapi/types/connectorconfiguration.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ConnectorConfiguration type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L101-L104 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L101-L104 type ConnectorConfiguration map[string]ConnectorConfigProperties type ConnectorConfigurationVariant interface { diff --git a/typedapi/types/connectorcustomscheduling.go b/typedapi/types/connectorcustomscheduling.go index 00633dad94..8ce43822f0 100644 --- a/typedapi/types/connectorcustomscheduling.go +++ b/typedapi/types/connectorcustomscheduling.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ConnectorCustomScheduling type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L128-L128 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L128-L128 type ConnectorCustomScheduling map[string]CustomScheduling diff --git a/typedapi/types/connectorfeatures.go b/typedapi/types/connectorfeatures.go index d39ecbd47d..0fd26fe431 100644 --- a/typedapi/types/connectorfeatures.go +++ b/typedapi/types/connectorfeatures.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ConnectorFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L230-L244 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L230-L244 type ConnectorFeatures struct { // DocumentLevelSecurity Indicates whether document-level security is enabled. DocumentLevelSecurity *FeatureEnabled `json:"document_level_security,omitempty"` diff --git a/typedapi/types/connectorscheduling.go b/typedapi/types/connectorscheduling.go index 6971045979..09fd9e6951 100644 --- a/typedapi/types/connectorscheduling.go +++ b/typedapi/types/connectorscheduling.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ConnectorScheduling type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L106-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L106-L110 type ConnectorScheduling struct { Enabled bool `json:"enabled"` // Interval The interval is expressed using the crontab syntax diff --git a/typedapi/types/connectorsyncjob.go b/typedapi/types/connectorsyncjob.go index a6b111f570..60883118fd 100644 --- a/typedapi/types/connectorsyncjob.go +++ b/typedapi/types/connectorsyncjob.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // ConnectorSyncJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/SyncJob.ts#L53-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/SyncJob.ts#L53-L72 type ConnectorSyncJob struct { CancelationRequestedAt DateTime `json:"cancelation_requested_at,omitempty"` CanceledAt DateTime `json:"canceled_at,omitempty"` diff --git a/typedapi/types/constantkeywordproperty.go b/typedapi/types/constantkeywordproperty.go index 9bad7eadfb..888f062c1b 100644 --- a/typedapi/types/constantkeywordproperty.go +++ b/typedapi/types/constantkeywordproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // ConstantKeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L51-L54 type ConstantKeywordProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/constantscorequery.go b/typedapi/types/constantscorequery.go index 11aabad1b4..eab7e1db2f 100644 --- a/typedapi/types/constantscorequery.go +++ b/typedapi/types/constantscorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ConstantScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L76-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L76-L86 type ConstantScoreQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/contentobject.go b/typedapi/types/contentobject.go index a5dea12d4b..4a8e6f1175 100644 --- a/typedapi/types/contentobject.go +++ b/typedapi/types/contentobject.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ContentObject type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L123-L135 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L123-L135 type ContentObject struct { // Text The text content. Text string `json:"text"` diff --git a/typedapi/types/context.go b/typedapi/types/context.go index 7ee2e9a139..d0d972bc00 100644 --- a/typedapi/types/context.go +++ b/typedapi/types/context.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // GeoLocation // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L229-L234 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L230-L235 type Context any type ContextVariant interface { diff --git a/typedapi/types/contextmethod.go b/typedapi/types/contextmethod.go index 40527f5915..a9bb697343 100644 --- a/typedapi/types/contextmethod.go +++ b/typedapi/types/contextmethod.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ContextMethod type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get_script_context/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get_script_context/types.ts#L27-L31 type ContextMethod struct { Name string `json:"name"` Params []ContextMethodParam `json:"params"` diff --git a/typedapi/types/contextmethodparam.go b/typedapi/types/contextmethodparam.go index 003a975782..ef4368510d 100644 --- a/typedapi/types/contextmethodparam.go +++ b/typedapi/types/contextmethodparam.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ContextMethodParam type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get_script_context/types.ts#L33-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get_script_context/types.ts#L33-L36 type ContextMethodParam struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/contextualaiservicesettings.go b/typedapi/types/contextualaiservicesettings.go new file mode 100644 index 0000000000..372559a80d --- /dev/null +++ b/typedapi/types/contextualaiservicesettings.go @@ -0,0 +1,119 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ContextualAIServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1225-L1248 +type ContextualAIServiceSettings struct { + // ApiKey A valid API key for your Contexutual AI account. + // + // IMPORTANT: You need to provide the API key only once, during the inference + // model creation. + // The get inference endpoint API does not retrieve your API key. + // After creating the inference model, you cannot change the associated API key. + // If you want to use a different API key, delete the inference model and + // recreate it with the same name and the updated API key. + ApiKey string `json:"api_key"` + // ModelId The name of the model to use for the inference task. + // Refer to the Contextual AI documentation for the list of available rerank + // models. + ModelId string `json:"model_id"` + // RateLimit This setting helps to minimize the number of rate limit errors returned from + // Contextual AI. + // The `contextualai` service sets a default number of requests allowed per + // minute depending on the task type. + // For `rerank`, it is set to `1000`. + RateLimit *RateLimitSetting `json:"rate_limit,omitempty"` +} + +func (s *ContextualAIServiceSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "api_key": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ApiKey", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ApiKey = o + + case "model_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ModelId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ModelId = o + + case "rate_limit": + if err := dec.Decode(&s.RateLimit); err != nil { + return fmt.Errorf("%s | %w", "RateLimit", err) + } + + } + } + return nil +} + +// NewContextualAIServiceSettings returns a ContextualAIServiceSettings. +func NewContextualAIServiceSettings() *ContextualAIServiceSettings { + r := &ContextualAIServiceSettings{} + + return r +} + +type ContextualAIServiceSettingsVariant interface { + ContextualAIServiceSettingsCaster() *ContextualAIServiceSettings +} + +func (s *ContextualAIServiceSettings) ContextualAIServiceSettingsCaster() *ContextualAIServiceSettings { + return s +} diff --git a/typedapi/types/contextualaitasksettings.go b/typedapi/types/contextualaitasksettings.go new file mode 100644 index 0000000000..ce386219e4 --- /dev/null +++ b/typedapi/types/contextualaitasksettings.go @@ -0,0 +1,124 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ContextualAITaskSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1250-L1268 +type ContextualAITaskSettings struct { + // Instruction Instructions for the reranking model. Refer to + // + // Only for the `rerank` task type. + Instruction *string `json:"instruction,omitempty"` + // ReturnDocuments Whether to return the source documents in the response. + // Only for the `rerank` task type. + ReturnDocuments *bool `json:"return_documents,omitempty"` + // TopK The number of most relevant documents to return. + // If not specified, the reranking results of all documents will be returned. + // Only for the `rerank` task type. + TopK *int `json:"top_k,omitempty"` +} + +func (s *ContextualAITaskSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "instruction": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Instruction", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Instruction = &o + + case "return_documents": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "ReturnDocuments", err) + } + s.ReturnDocuments = &value + case bool: + s.ReturnDocuments = &v + } + + case "top_k": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "TopK", err) + } + s.TopK = &value + case float64: + f := int(v) + s.TopK = &f + } + + } + } + return nil +} + +// NewContextualAITaskSettings returns a ContextualAITaskSettings. +func NewContextualAITaskSettings() *ContextualAITaskSettings { + r := &ContextualAITaskSettings{} + + return r +} + +type ContextualAITaskSettingsVariant interface { + ContextualAITaskSettingsCaster() *ContextualAITaskSettings +} + +func (s *ContextualAITaskSettings) ContextualAITaskSettingsCaster() *ContextualAITaskSettings { + return s +} diff --git a/typedapi/types/convertprocessor.go b/typedapi/types/convertprocessor.go index 9056bcbc26..39a7d68a8b 100644 --- a/typedapi/types/convertprocessor.go +++ b/typedapi/types/convertprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ConvertProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L673-L693 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L677-L697 type ConvertProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/coordinatorstats.go b/typedapi/types/coordinatorstats.go index 4ef7d3ca8b..9ffcccadac 100644 --- a/typedapi/types/coordinatorstats.go +++ b/typedapi/types/coordinatorstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CoordinatorStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/stats/types.ts#L30-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/stats/types.ts#L30-L36 type CoordinatorStats struct { ExecutedSearchesTotal int64 `json:"executed_searches_total"` NodeId string `json:"node_id"` diff --git a/typedapi/types/coordsgeobounds.go b/typedapi/types/coordsgeobounds.go index 4342bed2fd..4e5c6c381c 100644 --- a/typedapi/types/coordsgeobounds.go +++ b/typedapi/types/coordsgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CoordsGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L154-L159 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L153-L158 type CoordsGeoBounds struct { Bottom Float64 `json:"bottom"` Left Float64 `json:"left"` diff --git a/typedapi/types/countedkeywordproperty.go b/typedapi/types/countedkeywordproperty.go index f33ff14b66..eafe2d0f69 100644 --- a/typedapi/types/countedkeywordproperty.go +++ b/typedapi/types/countedkeywordproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // CountedKeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L55-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L56-L63 type CountedKeywordProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/counter.go b/typedapi/types/counter.go index e2c409a78d..eb19b64500 100644 --- a/typedapi/types/counter.go +++ b/typedapi/types/counter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Counter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L32-L35 type Counter struct { Active int64 `json:"active"` Total int64 `json:"total"` diff --git a/typedapi/types/countrecord.go b/typedapi/types/countrecord.go index b03a8840b0..4ce8e3ab1c 100644 --- a/typedapi/types/countrecord.go +++ b/typedapi/types/countrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CountRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/count/types.ts#L23-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/count/types.ts#L23-L39 type CountRecord struct { // Count the document count Count *string `json:"count,omitempty"` diff --git a/typedapi/types/cpu.go b/typedapi/types/cpu.go index 5746cf560a..49721c9c4f 100644 --- a/typedapi/types/cpu.go +++ b/typedapi/types/cpu.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Cpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L577-L586 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L577-L586 type Cpu struct { LoadAverage map[string]Float64 `json:"load_average,omitempty"` Percent *int `json:"percent,omitempty"` diff --git a/typedapi/types/cpuacct.go b/typedapi/types/cpuacct.go index 33858a0ff6..fc1c5df988 100644 --- a/typedapi/types/cpuacct.go +++ b/typedapi/types/cpuacct.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CpuAcct type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L514-L523 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L514-L523 type CpuAcct struct { // ControlGroup The `cpuacct` control group to which the Elasticsearch process belongs. ControlGroup *string `json:"control_group,omitempty"` diff --git a/typedapi/types/createdstatus.go b/typedapi/types/createdstatus.go index f31b360210..54d2d4c727 100644 --- a/typedapi/types/createdstatus.go +++ b/typedapi/types/createdstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CreatedStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/CreatedStatus.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/CreatedStatus.ts#L20-L22 type CreatedStatus struct { Created bool `json:"created"` } diff --git a/typedapi/types/createfrom.go b/typedapi/types/createfrom.go index fe6f7ccf32..67cf11e9f4 100644 --- a/typedapi/types/createfrom.go +++ b/typedapi/types/createfrom.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CreateFrom type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/create_from/MigrateCreateFromRequest.ts#L46-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/create_from/MigrateCreateFromRequest.ts#L52-L66 type CreateFrom struct { // MappingsOverride Mappings overrides to be applied to the destination index (optional) MappingsOverride *TypeMapping `json:"mappings_override,omitempty"` diff --git a/typedapi/types/createoperation.go b/typedapi/types/createoperation.go index ff24127529..1356df8660 100644 --- a/typedapi/types/createoperation.go +++ b/typedapi/types/createoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // CreateOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L140-L140 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/types.ts#L140-L140 type CreateOperation struct { // DynamicTemplates A map from the full name of fields to the name of dynamic templates. // It defaults to an empty map. @@ -57,7 +57,7 @@ type CreateOperation struct { // RequireAlias If `true`, the request's actions must target an index alias. RequireAlias *bool `json:"require_alias,omitempty"` // Routing A custom value used to route operations to a specific shard. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` Version *int64 `json:"version,omitempty"` VersionType *versiontype.VersionType `json:"version_type,omitempty"` } @@ -142,8 +142,19 @@ func (s *CreateOperation) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "version": diff --git a/typedapi/types/csvprocessor.go b/typedapi/types/csvprocessor.go index 982d95e922..55b9a47d45 100644 --- a/typedapi/types/csvprocessor.go +++ b/typedapi/types/csvprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CsvProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L695-L728 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L699-L732 type CsvProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/cumulativecardinalityaggregate.go b/typedapi/types/cumulativecardinalityaggregate.go index c27b1a99ae..4cc44b8ada 100644 --- a/typedapi/types/cumulativecardinalityaggregate.go +++ b/typedapi/types/cumulativecardinalityaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CumulativeCardinalityAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L858-L866 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L930-L938 type CumulativeCardinalityAggregate struct { Meta Metadata `json:"meta,omitempty"` Value int64 `json:"value"` diff --git a/typedapi/types/cumulativecardinalityaggregation.go b/typedapi/types/cumulativecardinalityaggregation.go index 37a4e2b499..415a5777b8 100644 --- a/typedapi/types/cumulativecardinalityaggregation.go +++ b/typedapi/types/cumulativecardinalityaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // CumulativeCardinalityAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L206-L209 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L208-L211 type CumulativeCardinalityAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/cumulativesumaggregation.go b/typedapi/types/cumulativesumaggregation.go index 36045fa128..d2328a8a6b 100644 --- a/typedapi/types/cumulativesumaggregation.go +++ b/typedapi/types/cumulativesumaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // CumulativeSumAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L211-L214 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L213-L216 type CumulativeSumAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/currentnode.go b/typedapi/types/currentnode.go index dc792dc60b..168054550d 100644 --- a/typedapi/types/currentnode.go +++ b/typedapi/types/currentnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // CurrentNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L79-L90 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L79-L90 type CurrentNode struct { Attributes map[string]string `json:"attributes"` Id string `json:"id"` diff --git a/typedapi/types/customanalyzer.go b/typedapi/types/customanalyzer.go index 356f068908..4763d66ece 100644 --- a/typedapi/types/customanalyzer.go +++ b/typedapi/types/customanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CustomAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L28-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L28-L35 type CustomAnalyzer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` diff --git a/typedapi/types/customcategorizetextanalyzer.go b/typedapi/types/customcategorizetextanalyzer.go index 182e8eb792..2c2f5fb442 100644 --- a/typedapi/types/customcategorizetextanalyzer.go +++ b/typedapi/types/customcategorizetextanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CustomCategorizeTextAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1190-L1194 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1219-L1223 type CustomCategorizeTextAnalyzer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` diff --git a/typedapi/types/customnormalizer.go b/typedapi/types/customnormalizer.go index d835d44ebb..a573b77b72 100644 --- a/typedapi/types/customnormalizer.go +++ b/typedapi/types/customnormalizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // CustomNormalizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/normalizers.ts#L30-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/normalizers.ts#L30-L34 type CustomNormalizer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` diff --git a/typedapi/types/customrequestparams.go b/typedapi/types/customrequestparams.go index 02b2ccfb43..23846e6912 100644 --- a/typedapi/types/customrequestparams.go +++ b/typedapi/types/customrequestparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CustomRequestParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L974-L985 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1025-L1036 type CustomRequestParams struct { // Content The body structure of the request. It requires passing in the string-escaped // result of the JSON format HTTP request body. diff --git a/typedapi/types/customresponseparams.go b/typedapi/types/customresponseparams.go index 8a95e52a68..c5168ce3ec 100644 --- a/typedapi/types/customresponseparams.go +++ b/typedapi/types/customresponseparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // CustomResponseParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L987-L1125 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1038-L1192 type CustomResponseParams struct { // JsonParser Specifies the JSON parser that is used to parse the response from the custom // service. @@ -63,6 +63,23 @@ type CustomResponseParams struct { // } // } // + // # Elasticsearch supports the following embedding types: + // * float + // * byte + // * bit (or binary) + // + // To specify the embedding type for the response, the `embedding_type` + // field should be added in the `json_parser` object. Here's an example: + // + // "response":{ + // "json_parser":{ + // "text_embeddings":"$.data[*].embedding[*]", + // "embedding_type":"bit" + // } + // } + // + // If `embedding_type` is not specified, it defaults to `float`. + // // # sparse_embedding // # For a response like this: // diff --git a/typedapi/types/customscheduling.go b/typedapi/types/customscheduling.go index d5c2f617e2..e7b34897ea 100644 --- a/typedapi/types/customscheduling.go +++ b/typedapi/types/customscheduling.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CustomScheduling type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L120-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L120-L126 type CustomScheduling struct { ConfigurationOverrides CustomSchedulingConfigurationOverrides `json:"configuration_overrides"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/customschedulingconfigurationoverrides.go b/typedapi/types/customschedulingconfigurationoverrides.go index c2ef549955..a1025710ba 100644 --- a/typedapi/types/customschedulingconfigurationoverrides.go +++ b/typedapi/types/customschedulingconfigurationoverrides.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CustomSchedulingConfigurationOverrides type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L112-L118 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L112-L118 type CustomSchedulingConfigurationOverrides struct { DomainAllowlist []string `json:"domain_allowlist,omitempty"` MaxCrawlDepth *int `json:"max_crawl_depth,omitempty"` diff --git a/typedapi/types/customservicesettings.go b/typedapi/types/customservicesettings.go index bdaff22da8..2feed21278 100644 --- a/typedapi/types/customservicesettings.go +++ b/typedapi/types/customservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,10 +31,17 @@ import ( // CustomServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L904-L972 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L948-L1023 type CustomServiceSettings struct { - // Headers Specifies the HTTPS header parameters – such as `Authentication` or - // `Contet-Type` – that are required to access the custom service. + // BatchSize Specifies the batch size used for the semantic_text field. If the field is + // not provided, the default is 10. + // The batch size is the maximum number of inputs in a single request to the + // upstream service. + // The chunk within the batch are controlled by the selected chunking strategy + // for the semantic_text field. + BatchSize *int `json:"batch_size,omitempty"` + // Headers Specifies the HTTP header parameters – such as `Authentication` or + // `Content-Type` – that are required to access the custom service. // For example: // ``` // @@ -119,6 +126,22 @@ func (s *CustomServiceSettings) UnmarshalJSON(data []byte) error { switch t { + case "batch_size": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "BatchSize", err) + } + s.BatchSize = &value + case float64: + f := int(v) + s.BatchSize = &f + } + case "headers": if err := dec.Decode(&s.Headers); err != nil { return fmt.Errorf("%s | %w", "Headers", err) diff --git a/typedapi/types/customtasksettings.go b/typedapi/types/customtasksettings.go index 9413e1c706..6b82934b45 100644 --- a/typedapi/types/customtasksettings.go +++ b/typedapi/types/customtasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // CustomTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1138-L1152 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1205-L1219 type CustomTaskSettings struct { // Parameters Specifies parameters that are required to run the custom service. The // parameters depend on the model your custom service uses. diff --git a/typedapi/types/czechanalyzer.go b/typedapi/types/czechanalyzer.go index 7281038c26..2dca93aa4a 100644 --- a/typedapi/types/czechanalyzer.go +++ b/typedapi/types/czechanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // CzechAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L132-L137 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L132-L137 type CzechAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/czechstemtokenfilter.go b/typedapi/types/czechstemtokenfilter.go index 296ac8e79f..9f8ea0d555 100644 --- a/typedapi/types/czechstemtokenfilter.go +++ b/typedapi/types/czechstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // CzechStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L551-L553 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L588-L590 type CzechStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/dailyschedule.go b/typedapi/types/dailyschedule.go index 770eef6198..562dd21d73 100644 --- a/typedapi/types/dailyschedule.go +++ b/typedapi/types/dailyschedule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DailySchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L33-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L33-L35 type DailySchedule struct { At []ScheduleTimeOfDay `json:"at"` } diff --git a/typedapi/types/danglingindex.go b/typedapi/types/danglingindex.go index 29ca10b939..4950e558ae 100644 --- a/typedapi/types/danglingindex.go +++ b/typedapi/types/danglingindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DanglingIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L29-L34 type DanglingIndex struct { CreationDateMillis int64 `json:"creation_date_millis"` IndexName string `json:"index_name"` diff --git a/typedapi/types/danishanalyzer.go b/typedapi/types/danishanalyzer.go index dbe99dbf8e..d169857147 100644 --- a/typedapi/types/danishanalyzer.go +++ b/typedapi/types/danishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DanishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L139-L143 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L139-L143 type DanishAnalyzer struct { Stopwords StopWords `json:"stopwords,omitempty"` StopwordsPath *string `json:"stopwords_path,omitempty"` diff --git a/typedapi/types/databaseconfiguration.go b/typedapi/types/databaseconfiguration.go index e885d0601a..f60ea4fd1b 100644 --- a/typedapi/types/databaseconfiguration.go +++ b/typedapi/types/databaseconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,11 +30,10 @@ import ( // DatabaseConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Database.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Database.ts#L22-L37 type DatabaseConfiguration struct { - AdditionalDatabaseConfigurationProperty map[string]json.RawMessage `json:"-"` - Ipinfo *Ipinfo `json:"ipinfo,omitempty"` - Maxmind *Maxmind `json:"maxmind,omitempty"` + Ipinfo *Ipinfo `json:"ipinfo,omitempty"` + Maxmind *Maxmind `json:"maxmind,omitempty"` // Name The provider-assigned name of the IP geolocation database to download. Name string `json:"name"` } @@ -69,58 +68,14 @@ func (s *DatabaseConfiguration) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Name", err) } - default: - - if key, ok := t.(string); ok { - if s.AdditionalDatabaseConfigurationProperty == nil { - s.AdditionalDatabaseConfigurationProperty = make(map[string]json.RawMessage, 0) - } - raw := new(json.RawMessage) - if err := dec.Decode(&raw); err != nil { - return fmt.Errorf("%s | %w", "AdditionalDatabaseConfigurationProperty", err) - } - s.AdditionalDatabaseConfigurationProperty[key] = *raw - } - } } return nil } -// MarhsalJSON overrides marshalling for types with additional properties -func (s DatabaseConfiguration) MarshalJSON() ([]byte, error) { - type opt DatabaseConfiguration - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalDatabaseConfigurationProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalDatabaseConfigurationProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewDatabaseConfiguration returns a DatabaseConfiguration. func NewDatabaseConfiguration() *DatabaseConfiguration { - r := &DatabaseConfiguration{ - AdditionalDatabaseConfigurationProperty: make(map[string]json.RawMessage), - } + r := &DatabaseConfiguration{} return r } diff --git a/typedapi/types/databaseconfigurationfull.go b/typedapi/types/databaseconfigurationfull.go index 9452e1deac..458cea1971 100644 --- a/typedapi/types/databaseconfigurationfull.go +++ b/typedapi/types/databaseconfigurationfull.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,12 +30,11 @@ import ( // DatabaseConfigurationFull type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Database.ts#L39-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Database.ts#L39-L53 type DatabaseConfigurationFull struct { - AdditionalDatabaseConfigurationFullProperty map[string]json.RawMessage `json:"-"` - Ipinfo *Ipinfo `json:"ipinfo,omitempty"` - Local *Local `json:"local,omitempty"` - Maxmind *Maxmind `json:"maxmind,omitempty"` + Ipinfo *Ipinfo `json:"ipinfo,omitempty"` + Local *Local `json:"local,omitempty"` + Maxmind *Maxmind `json:"maxmind,omitempty"` // Name The provider-assigned name of the IP geolocation database to download. Name string `json:"name"` Web *Web `json:"web,omitempty"` @@ -81,58 +80,14 @@ func (s *DatabaseConfigurationFull) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Web", err) } - default: - - if key, ok := t.(string); ok { - if s.AdditionalDatabaseConfigurationFullProperty == nil { - s.AdditionalDatabaseConfigurationFullProperty = make(map[string]json.RawMessage, 0) - } - raw := new(json.RawMessage) - if err := dec.Decode(&raw); err != nil { - return fmt.Errorf("%s | %w", "AdditionalDatabaseConfigurationFullProperty", err) - } - s.AdditionalDatabaseConfigurationFullProperty[key] = *raw - } - } } return nil } -// MarhsalJSON overrides marshalling for types with additional properties -func (s DatabaseConfigurationFull) MarshalJSON() ([]byte, error) { - type opt DatabaseConfigurationFull - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalDatabaseConfigurationFullProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalDatabaseConfigurationFullProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewDatabaseConfigurationFull returns a DatabaseConfigurationFull. func NewDatabaseConfigurationFull() *DatabaseConfigurationFull { - r := &DatabaseConfigurationFull{ - AdditionalDatabaseConfigurationFullProperty: make(map[string]json.RawMessage), - } + r := &DatabaseConfigurationFull{} return r } diff --git a/typedapi/types/datacounts.go b/typedapi/types/datacounts.go index f9439171ae..a4932d4f8d 100644 --- a/typedapi/types/datacounts.go +++ b/typedapi/types/datacounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L352-L372 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L354-L374 type DataCounts struct { BucketCount int64 `json:"bucket_count"` EarliestRecordTimestamp *int64 `json:"earliest_record_timestamp,omitempty"` diff --git a/typedapi/types/datadescription.go b/typedapi/types/datadescription.go index aa3255972a..469026c33e 100644 --- a/typedapi/types/datadescription.go +++ b/typedapi/types/datadescription.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataDescription type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L374-L390 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L376-L392 type DataDescription struct { FieldDelimiter *string `json:"field_delimiter,omitempty"` // Format Only JSON format is supported at this time. diff --git a/typedapi/types/dataemailattachment.go b/typedapi/types/dataemailattachment.go index b81f3cd172..858cf9fd11 100644 --- a/typedapi/types/dataemailattachment.go +++ b/typedapi/types/dataemailattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // DataEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L234-L236 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L234-L236 type DataEmailAttachment struct { Format *dataattachmentformat.DataAttachmentFormat `json:"format,omitempty"` } diff --git a/typedapi/types/datafeedauthorization.go b/typedapi/types/datafeedauthorization.go index 280d936cad..d8a07220c9 100644 --- a/typedapi/types/datafeedauthorization.go +++ b/typedapi/types/datafeedauthorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DatafeedAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Authorization.ts#L31-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Authorization.ts#L31-L44 type DatafeedAuthorization struct { // ApiKey If an API key was used for the most recent update to the datafeed, its name // and identifier are listed in the response. diff --git a/typedapi/types/datafeedconfig.go b/typedapi/types/datafeedconfig.go index ee694b8700..03ce51c422 100644 --- a/typedapi/types/datafeedconfig.go +++ b/typedapi/types/datafeedconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DatafeedConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L63-L120 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L66-L124 type DatafeedConfig struct { // Aggregations If set, the datafeed performs aggregation searches. Support for aggregations // is limited and should be used only with low cardinality data. diff --git a/typedapi/types/datafeedrunningstate.go b/typedapi/types/datafeedrunningstate.go index 7782286e27..6eaff85196 100644 --- a/typedapi/types/datafeedrunningstate.go +++ b/typedapi/types/datafeedrunningstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DatafeedRunningState type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L210-L224 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L214-L228 type DatafeedRunningState struct { // RealTimeConfigured Indicates if the datafeed is "real-time"; meaning that the datafeed has no // configured `end` time. diff --git a/typedapi/types/datafeeds.go b/typedapi/types/datafeeds.go index 37d05c9a47..576ad808da 100644 --- a/typedapi/types/datafeeds.go +++ b/typedapi/types/datafeeds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Datafeeds type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/info/types.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/info/types.ts#L42-L44 type Datafeeds struct { ScrollSize int `json:"scroll_size"` } diff --git a/typedapi/types/datafeedsrecord.go b/typedapi/types/datafeedsrecord.go index 61fadb5899..a8f0839544 100644 --- a/typedapi/types/datafeedsrecord.go +++ b/typedapi/types/datafeedsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DatafeedsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_datafeeds/types.ts#L22-L87 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/ml_datafeeds/types.ts#L22-L87 type DatafeedsRecord struct { // AssignmentExplanation For started datafeeds only, contains messages relating to the selection of a // node. diff --git a/typedapi/types/datafeedstats.go b/typedapi/types/datafeedstats.go index cec150a282..c5e1af69f8 100644 --- a/typedapi/types/datafeedstats.go +++ b/typedapi/types/datafeedstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DatafeedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L143-L172 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L147-L176 type DatafeedStats struct { // AssignmentExplanation For started datafeeds only, contains messages relating to the selection of a // node. diff --git a/typedapi/types/datafeedtimingstats.go b/typedapi/types/datafeedtimingstats.go index b20515fe3b..5cd207c29d 100644 --- a/typedapi/types/datafeedtimingstats.go +++ b/typedapi/types/datafeedtimingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DatafeedTimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L174-L202 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L178-L206 type DatafeedTimingStats struct { // AverageSearchTimePerBucketMs The average search time per bucket, in milliseconds. AverageSearchTimePerBucketMs Float64 `json:"average_search_time_per_bucket_ms,omitempty"` diff --git a/typedapi/types/dataframeanalysisanalyzedfields.go b/typedapi/types/dataframeanalysisanalyzedfields.go index d885c24505..61af7c7658 100644 --- a/typedapi/types/dataframeanalysisanalyzedfields.go +++ b/typedapi/types/dataframeanalysisanalyzedfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataframeAnalysisAnalyzedFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L238-L244 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L238-L244 type DataframeAnalysisAnalyzedFields struct { // Excludes An array of strings that defines the fields that will be included in the // analysis. diff --git a/typedapi/types/dataframeanalysisclassification.go b/typedapi/types/dataframeanalysisclassification.go index fb3a76f901..a2a43ae50e 100644 --- a/typedapi/types/dataframeanalysisclassification.go +++ b/typedapi/types/dataframeanalysisclassification.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L227-L236 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L227-L236 type DataframeAnalysisClassification struct { // Alpha Advanced configuration option. Machine learning uses loss guided tree // growing, which means that the decision trees grow where the regularized loss diff --git a/typedapi/types/dataframeanalysiscontainer.go b/typedapi/types/dataframeanalysiscontainer.go index 3541a1a748..c123c09d98 100644 --- a/typedapi/types/dataframeanalysiscontainer.go +++ b/typedapi/types/dataframeanalysiscontainer.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // DataframeAnalysisContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L84-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L84-L101 type DataframeAnalysisContainer struct { - AdditionalDataframeAnalysisContainerProperty map[string]json.RawMessage `json:"-"` // Classification The configuration information necessary to perform classification. Classification *DataframeAnalysisClassification `json:"classification,omitempty"` // OutlierDetection The configuration information necessary to perform outlier detection. NOTE: @@ -46,40 +40,9 @@ type DataframeAnalysisContainer struct { Regression *DataframeAnalysisRegression `json:"regression,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s DataframeAnalysisContainer) MarshalJSON() ([]byte, error) { - type opt DataframeAnalysisContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalDataframeAnalysisContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalDataframeAnalysisContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewDataframeAnalysisContainer returns a DataframeAnalysisContainer. func NewDataframeAnalysisContainer() *DataframeAnalysisContainer { - r := &DataframeAnalysisContainer{ - AdditionalDataframeAnalysisContainerProperty: make(map[string]json.RawMessage), - } + r := &DataframeAnalysisContainer{} return r } diff --git a/typedapi/types/dataframeanalysisfeatureprocessor.go b/typedapi/types/dataframeanalysisfeatureprocessor.go index e00d32531d..8238768fae 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessor.go +++ b/typedapi/types/dataframeanalysisfeatureprocessor.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // DataframeAnalysisFeatureProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L246-L258 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L246-L258 type DataframeAnalysisFeatureProcessor struct { - AdditionalDataframeAnalysisFeatureProcessorProperty map[string]json.RawMessage `json:"-"` // FrequencyEncoding The configuration information necessary to perform frequency encoding. FrequencyEncoding *DataframeAnalysisFeatureProcessorFrequencyEncoding `json:"frequency_encoding,omitempty"` // MultiEncoding The configuration information necessary to perform multi encoding. It allows @@ -47,40 +41,9 @@ type DataframeAnalysisFeatureProcessor struct { TargetMeanEncoding *DataframeAnalysisFeatureProcessorTargetMeanEncoding `json:"target_mean_encoding,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s DataframeAnalysisFeatureProcessor) MarshalJSON() ([]byte, error) { - type opt DataframeAnalysisFeatureProcessor - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalDataframeAnalysisFeatureProcessorProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalDataframeAnalysisFeatureProcessorProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewDataframeAnalysisFeatureProcessor returns a DataframeAnalysisFeatureProcessor. func NewDataframeAnalysisFeatureProcessor() *DataframeAnalysisFeatureProcessor { - r := &DataframeAnalysisFeatureProcessor{ - AdditionalDataframeAnalysisFeatureProcessorProperty: make(map[string]json.RawMessage), - } + r := &DataframeAnalysisFeatureProcessor{} return r } diff --git a/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go b/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go index 8f028793e5..9068cb1a35 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataframeAnalysisFeatureProcessorFrequencyEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L260-L267 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L260-L267 type DataframeAnalysisFeatureProcessorFrequencyEncoding struct { // FeatureName The resulting feature name. FeatureName string `json:"feature_name"` diff --git a/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go b/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go index d4f816e83a..fe572b5a1d 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DataframeAnalysisFeatureProcessorMultiEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L269-L272 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L269-L272 type DataframeAnalysisFeatureProcessorMultiEncoding struct { // Processors The ordered array of custom processors to execute. Must be more than 1. Processors []int `json:"processors"` diff --git a/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go b/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go index efce01ea6b..6fd71f9a31 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorNGramEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L274-L286 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L274-L286 type DataframeAnalysisFeatureProcessorNGramEncoding struct { Custom *bool `json:"custom,omitempty"` // FeaturePrefix The feature name prefix. Defaults to ngram__. diff --git a/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go b/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go index b93fc8f8d8..1df496ae1d 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorOneHotEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L288-L293 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L288-L293 type DataframeAnalysisFeatureProcessorOneHotEncoding struct { // Field The name of the field to encode. Field string `json:"field"` diff --git a/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go b/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go index 8ec95f2158..aa10b39792 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorTargetMeanEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L295-L304 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L295-L304 type DataframeAnalysisFeatureProcessorTargetMeanEncoding struct { // DefaultValue The default value if field value is not found in the target_map. DefaultValue int `json:"default_value"` diff --git a/typedapi/types/dataframeanalysisoutlierdetection.go b/typedapi/types/dataframeanalysisoutlierdetection.go index f5781b0f22..849448fd1e 100644 --- a/typedapi/types/dataframeanalysisoutlierdetection.go +++ b/typedapi/types/dataframeanalysisoutlierdetection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L103-L132 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L103-L132 type DataframeAnalysisOutlierDetection struct { // ComputeFeatureInfluence Specifies whether the feature influence calculation is enabled. ComputeFeatureInfluence *bool `json:"compute_feature_influence,omitempty"` diff --git a/typedapi/types/dataframeanalysisregression.go b/typedapi/types/dataframeanalysisregression.go index b4fe1ea5f4..6c320be1c9 100644 --- a/typedapi/types/dataframeanalysisregression.go +++ b/typedapi/types/dataframeanalysisregression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L215-L225 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L215-L225 type DataframeAnalysisRegression struct { // Alpha Advanced configuration option. Machine learning uses loss guided tree // growing, which means that the decision trees grow where the regularized loss diff --git a/typedapi/types/dataframeanalytics.go b/typedapi/types/dataframeanalytics.go index 8665a37bf6..34c7ebbddf 100644 --- a/typedapi/types/dataframeanalytics.go +++ b/typedapi/types/dataframeanalytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DataframeAnalytics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L325-L345 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L325-L345 type DataframeAnalytics struct { // AnalysisStats An object containing information about the analysis job. AnalysisStats *DataframeAnalyticsStatsContainer `json:"analysis_stats,omitempty"` diff --git a/typedapi/types/dataframeanalyticsauthorization.go b/typedapi/types/dataframeanalyticsauthorization.go index 58ec74315a..43e6a26a02 100644 --- a/typedapi/types/dataframeanalyticsauthorization.go +++ b/typedapi/types/dataframeanalyticsauthorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Authorization.ts#L45-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Authorization.ts#L46-L59 type DataframeAnalyticsAuthorization struct { // ApiKey If an API key was used for the most recent update to the job, its name and // identifier are listed in the response. diff --git a/typedapi/types/dataframeanalyticsdestination.go b/typedapi/types/dataframeanalyticsdestination.go index 0bef3db463..111402841c 100644 --- a/typedapi/types/dataframeanalyticsdestination.go +++ b/typedapi/types/dataframeanalyticsdestination.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L77-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L77-L82 type DataframeAnalyticsDestination struct { // Index Defines the destination index to store the results of the data frame // analytics job. diff --git a/typedapi/types/dataframeanalyticsfieldselection.go b/typedapi/types/dataframeanalyticsfieldselection.go index 47fb05d8df..ee64c5d1c7 100644 --- a/typedapi/types/dataframeanalyticsfieldselection.go +++ b/typedapi/types/dataframeanalyticsfieldselection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsFieldSelection type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L55-L68 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L55-L68 type DataframeAnalyticsFieldSelection struct { // FeatureType The feature type of this field for the analysis. May be categorical or // numerical. diff --git a/typedapi/types/dataframeanalyticsmemoryestimation.go b/typedapi/types/dataframeanalyticsmemoryestimation.go index 6a2bd4f966..e3afb9530b 100644 --- a/typedapi/types/dataframeanalyticsmemoryestimation.go +++ b/typedapi/types/dataframeanalyticsmemoryestimation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsMemoryEstimation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L70-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L70-L75 type DataframeAnalyticsMemoryEstimation struct { // ExpectedMemoryWithDisk Estimated memory usage under the assumption that overflowing to disk is // allowed during data frame analytics. expected_memory_with_disk is usually diff --git a/typedapi/types/dataframeanalyticsrecord.go b/typedapi/types/dataframeanalyticsrecord.go index d744775e00..1e9c185e48 100644 --- a/typedapi/types/dataframeanalyticsrecord.go +++ b/typedapi/types/dataframeanalyticsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataFrameAnalyticsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_data_frame_analytics/types.ts#L22-L102 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/ml_data_frame_analytics/types.ts#L22-L102 type DataFrameAnalyticsRecord struct { // AssignmentExplanation Messages related to the selection of a node. AssignmentExplanation *string `json:"assignment_explanation,omitempty"` diff --git a/typedapi/types/dataframeanalyticssource.go b/typedapi/types/dataframeanalyticssource.go index 10910dcb6c..14c2adc026 100644 --- a/typedapi/types/dataframeanalyticssource.go +++ b/typedapi/types/dataframeanalyticssource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L39-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L39-L53 type DataframeAnalyticsSource struct { // Index Index or indices on which to perform the analysis. It can be a single index // or index pattern as well as an array of indices or patterns. NOTE: If your diff --git a/typedapi/types/dataframeanalyticsstatscontainer.go b/typedapi/types/dataframeanalyticsstatscontainer.go index 7573696f62..d69b1f789f 100644 --- a/typedapi/types/dataframeanalyticsstatscontainer.go +++ b/typedapi/types/dataframeanalyticsstatscontainer.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // DataframeAnalyticsStatsContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L374-L382 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L374-L382 type DataframeAnalyticsStatsContainer struct { - AdditionalDataframeAnalyticsStatsContainerProperty map[string]json.RawMessage `json:"-"` // ClassificationStats An object containing information about the classification analysis job. ClassificationStats *DataframeAnalyticsStatsHyperparameters `json:"classification_stats,omitempty"` // OutlierDetectionStats An object containing information about the outlier detection job. @@ -38,40 +32,9 @@ type DataframeAnalyticsStatsContainer struct { RegressionStats *DataframeAnalyticsStatsHyperparameters `json:"regression_stats,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s DataframeAnalyticsStatsContainer) MarshalJSON() ([]byte, error) { - type opt DataframeAnalyticsStatsContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalDataframeAnalyticsStatsContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalDataframeAnalyticsStatsContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewDataframeAnalyticsStatsContainer returns a DataframeAnalyticsStatsContainer. func NewDataframeAnalyticsStatsContainer() *DataframeAnalyticsStatsContainer { - r := &DataframeAnalyticsStatsContainer{ - AdditionalDataframeAnalyticsStatsContainerProperty: make(map[string]json.RawMessage), - } + r := &DataframeAnalyticsStatsContainer{} return r } diff --git a/typedapi/types/dataframeanalyticsstatsdatacounts.go b/typedapi/types/dataframeanalyticsstatsdatacounts.go index 82f1183274..4ca073fed4 100644 --- a/typedapi/types/dataframeanalyticsstatsdatacounts.go +++ b/typedapi/types/dataframeanalyticsstatsdatacounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsDataCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L365-L372 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L365-L372 type DataframeAnalyticsStatsDataCounts struct { // SkippedDocsCount The number of documents that are skipped during the analysis because they // contained values that are not supported by the analysis. For example, outlier diff --git a/typedapi/types/dataframeanalyticsstatshyperparameters.go b/typedapi/types/dataframeanalyticsstatshyperparameters.go index 5e37d4a1c5..c5549ec6ac 100644 --- a/typedapi/types/dataframeanalyticsstatshyperparameters.go +++ b/typedapi/types/dataframeanalyticsstatshyperparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsHyperparameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L384-L403 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L384-L403 type DataframeAnalyticsStatsHyperparameters struct { // Hyperparameters An object containing the parameters of the classification analysis job. Hyperparameters Hyperparameters `json:"hyperparameters"` diff --git a/typedapi/types/dataframeanalyticsstatsmemoryusage.go b/typedapi/types/dataframeanalyticsstatsmemoryusage.go index 86e78f7569..78c557acc9 100644 --- a/typedapi/types/dataframeanalyticsstatsmemoryusage.go +++ b/typedapi/types/dataframeanalyticsstatsmemoryusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsMemoryUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L354-L363 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L354-L363 type DataframeAnalyticsStatsMemoryUsage struct { // MemoryReestimateBytes This value is present when the status is hard_limit and it is a new estimate // of how much memory the job needs. diff --git a/typedapi/types/dataframeanalyticsstatsoutlierdetection.go b/typedapi/types/dataframeanalyticsstatsoutlierdetection.go index 5e75dedd40..9e9e08f1c4 100644 --- a/typedapi/types/dataframeanalyticsstatsoutlierdetection.go +++ b/typedapi/types/dataframeanalyticsstatsoutlierdetection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsStatsOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L405-L418 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L405-L418 type DataframeAnalyticsStatsOutlierDetection struct { // Parameters The list of job parameters specified by the user or determined by algorithmic // heuristics. diff --git a/typedapi/types/dataframeanalyticsstatsprogress.go b/typedapi/types/dataframeanalyticsstatsprogress.go index 1051e04986..3d6209783e 100644 --- a/typedapi/types/dataframeanalyticsstatsprogress.go +++ b/typedapi/types/dataframeanalyticsstatsprogress.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L347-L352 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L347-L352 type DataframeAnalyticsStatsProgress struct { // Phase Defines the phase of the data frame analytics job. Phase string `json:"phase"` diff --git a/typedapi/types/dataframeanalyticssummary.go b/typedapi/types/dataframeanalyticssummary.go index 56fbeb6216..858ed512b1 100644 --- a/typedapi/types/dataframeanalyticssummary.go +++ b/typedapi/types/dataframeanalyticssummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L306-L323 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L306-L323 type DataframeAnalyticsSummary struct { AllowLazyStart *bool `json:"allow_lazy_start,omitempty"` Analysis DataframeAnalysisContainer `json:"analysis"` diff --git a/typedapi/types/dataframeclassificationsummary.go b/typedapi/types/dataframeclassificationsummary.go index 590e051bb0..bddc0b0dfd 100644 --- a/typedapi/types/dataframeclassificationsummary.go +++ b/typedapi/types/dataframeclassificationsummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DataframeClassificationSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L44-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L44-L66 type DataframeClassificationSummary struct { // Accuracy Accuracy of predictions (per-class and overall). Accuracy *DataframeClassificationSummaryAccuracy `json:"accuracy,omitempty"` diff --git a/typedapi/types/dataframeclassificationsummaryaccuracy.go b/typedapi/types/dataframeclassificationsummaryaccuracy.go index bba5a1b461..19f26db33e 100644 --- a/typedapi/types/dataframeclassificationsummaryaccuracy.go +++ b/typedapi/types/dataframeclassificationsummaryaccuracy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryAccuracy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L111-L114 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L111-L114 type DataframeClassificationSummaryAccuracy struct { Classes []DataframeEvaluationClass `json:"classes"` OverallAccuracy Float64 `json:"overall_accuracy"` diff --git a/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go b/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go index 88fc2362fa..2303f7da8e 100644 --- a/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go +++ b/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryMulticlassConfusionMatrix type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L120-L123 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L120-L123 type DataframeClassificationSummaryMulticlassConfusionMatrix struct { ConfusionMatrix []ConfusionMatrixItem `json:"confusion_matrix"` OtherActualClassCount int `json:"other_actual_class_count"` diff --git a/typedapi/types/dataframeclassificationsummaryprecision.go b/typedapi/types/dataframeclassificationsummaryprecision.go index cba3cece4d..8032ba1db1 100644 --- a/typedapi/types/dataframeclassificationsummaryprecision.go +++ b/typedapi/types/dataframeclassificationsummaryprecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryPrecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L101-L104 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L101-L104 type DataframeClassificationSummaryPrecision struct { AvgPrecision Float64 `json:"avg_precision"` Classes []DataframeEvaluationClass `json:"classes"` diff --git a/typedapi/types/dataframeclassificationsummaryrecall.go b/typedapi/types/dataframeclassificationsummaryrecall.go index 6251846d64..4d0e815e41 100644 --- a/typedapi/types/dataframeclassificationsummaryrecall.go +++ b/typedapi/types/dataframeclassificationsummaryrecall.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryRecall type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L106-L109 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L106-L109 type DataframeClassificationSummaryRecall struct { AvgRecall Float64 `json:"avg_recall"` Classes []DataframeEvaluationClass `json:"classes"` diff --git a/typedapi/types/dataframeevaluationclass.go b/typedapi/types/dataframeevaluationclass.go index f8c5be79f7..748eab8c2e 100644 --- a/typedapi/types/dataframeevaluationclass.go +++ b/typedapi/types/dataframeevaluationclass.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationClass type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L116-L118 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L116-L118 type DataframeEvaluationClass struct { ClassName string `json:"class_name"` Value Float64 `json:"value"` diff --git a/typedapi/types/dataframeevaluationclassification.go b/typedapi/types/dataframeevaluationclassification.go index 4e6340d23e..77179d1b2a 100644 --- a/typedapi/types/dataframeevaluationclassification.go +++ b/typedapi/types/dataframeevaluationclassification.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L35-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L35-L44 type DataframeEvaluationClassification struct { // ActualField The field of the index which contains the ground truth. The data type of this // field can be boolean or integer. If the data type is integer, the value has diff --git a/typedapi/types/dataframeevaluationclassificationmetrics.go b/typedapi/types/dataframeevaluationclassificationmetrics.go index b6cc07f3a6..8fe429a8f2 100644 --- a/typedapi/types/dataframeevaluationclassificationmetrics.go +++ b/typedapi/types/dataframeevaluationclassificationmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationClassificationMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L73-L78 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L73-L78 type DataframeEvaluationClassificationMetrics struct { // Accuracy Accuracy of predictions (per-class and overall). Accuracy map[string]json.RawMessage `json:"accuracy,omitempty"` diff --git a/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go b/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go index 2ffbc4108b..181e796fc5 100644 --- a/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go +++ b/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationClassificationMetricsAucRoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L85-L90 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L85-L90 type DataframeEvaluationClassificationMetricsAucRoc struct { // ClassName Name of the only class that is treated as positive during AUC ROC // calculation. Other classes are treated as negative ("one-vs-all" strategy). diff --git a/typedapi/types/dataframeevaluationcontainer.go b/typedapi/types/dataframeevaluationcontainer.go index 6aff3a78a9..add1587ac1 100644 --- a/typedapi/types/dataframeevaluationcontainer.go +++ b/typedapi/types/dataframeevaluationcontainer.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // DataframeEvaluationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L25-L33 type DataframeEvaluationContainer struct { - AdditionalDataframeEvaluationContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification evaluation evaluates the results of a classification analysis // which outputs a prediction that identifies to which of the classes each // document belongs. @@ -42,40 +36,9 @@ type DataframeEvaluationContainer struct { Regression *DataframeEvaluationRegression `json:"regression,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s DataframeEvaluationContainer) MarshalJSON() ([]byte, error) { - type opt DataframeEvaluationContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalDataframeEvaluationContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalDataframeEvaluationContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewDataframeEvaluationContainer returns a DataframeEvaluationContainer. func NewDataframeEvaluationContainer() *DataframeEvaluationContainer { - r := &DataframeEvaluationContainer{ - AdditionalDataframeEvaluationContainerProperty: make(map[string]json.RawMessage), - } + r := &DataframeEvaluationContainer{} return r } diff --git a/typedapi/types/dataframeevaluationoutlierdetection.go b/typedapi/types/dataframeevaluationoutlierdetection.go index 8417cbdf68..b2807e5e8e 100644 --- a/typedapi/types/dataframeevaluationoutlierdetection.go +++ b/typedapi/types/dataframeevaluationoutlierdetection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L46-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L46-L53 type DataframeEvaluationOutlierDetection struct { // ActualField The field of the index which contains the ground truth. The data type of this // field can be boolean or integer. If the data type is integer, the value has diff --git a/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go b/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go index d6f24ad373..669ba35c1a 100644 --- a/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go +++ b/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationOutlierDetectionMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L80-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L80-L83 type DataframeEvaluationOutlierDetectionMetrics struct { // AucRoc The AUC ROC (area under the curve of the receiver operating characteristic) // score and optionally the curve. It is calculated for a specific class diff --git a/typedapi/types/dataframeevaluationregression.go b/typedapi/types/dataframeevaluationregression.go index fa48f50a1d..f6930754b6 100644 --- a/typedapi/types/dataframeevaluationregression.go +++ b/typedapi/types/dataframeevaluationregression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L55-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L55-L62 type DataframeEvaluationRegression struct { // ActualField The field of the index which contains the ground truth. The data type of this // field must be numerical. diff --git a/typedapi/types/dataframeevaluationregressionmetrics.go b/typedapi/types/dataframeevaluationregressionmetrics.go index 98674875fe..16e7a74fd6 100644 --- a/typedapi/types/dataframeevaluationregressionmetrics.go +++ b/typedapi/types/dataframeevaluationregressionmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationRegressionMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L92-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L92-L110 type DataframeEvaluationRegressionMetrics struct { // Huber Pseudo Huber loss function. Huber *DataframeEvaluationRegressionMetricsHuber `json:"huber,omitempty"` diff --git a/typedapi/types/dataframeevaluationregressionmetricshuber.go b/typedapi/types/dataframeevaluationregressionmetricshuber.go index 4f9ca803c0..17e1c38b3e 100644 --- a/typedapi/types/dataframeevaluationregressionmetricshuber.go +++ b/typedapi/types/dataframeevaluationregressionmetricshuber.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationRegressionMetricsHuber type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L117-L120 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L117-L120 type DataframeEvaluationRegressionMetricsHuber struct { // Delta Approximates 1/2 (prediction - actual)2 for values much less than delta and // approximates a straight line with slope delta for values much larger than diff --git a/typedapi/types/dataframeevaluationregressionmetricsmsle.go b/typedapi/types/dataframeevaluationregressionmetricsmsle.go index 07af8d1b1a..830a4a6097 100644 --- a/typedapi/types/dataframeevaluationregressionmetricsmsle.go +++ b/typedapi/types/dataframeevaluationregressionmetricsmsle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationRegressionMetricsMsle type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L112-L115 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeEvaluation.ts#L112-L115 type DataframeEvaluationRegressionMetricsMsle struct { // Offset Defines the transition point at which you switch from minimizing quadratic // error to minimizing quadratic log error. Defaults to 1. diff --git a/typedapi/types/dataframeevaluationsummaryaucroc.go b/typedapi/types/dataframeevaluationsummaryaucroc.go index 3309816113..a0a82bc545 100644 --- a/typedapi/types/dataframeevaluationsummaryaucroc.go +++ b/typedapi/types/dataframeevaluationsummaryaucroc.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationSummaryAucRoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L91-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L91-L93 type DataframeEvaluationSummaryAucRoc struct { Curve []DataframeEvaluationSummaryAucRocCurveItem `json:"curve,omitempty"` Value Float64 `json:"value"` diff --git a/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go b/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go index 24cd2724f4..da0799ac8d 100644 --- a/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go +++ b/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationSummaryAucRocCurveItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L95-L99 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L95-L99 type DataframeEvaluationSummaryAucRocCurveItem struct { Fpr Float64 `json:"fpr"` Threshold Float64 `json:"threshold"` diff --git a/typedapi/types/dataframeevaluationvalue.go b/typedapi/types/dataframeevaluationvalue.go index df0818bc18..b20206e8df 100644 --- a/typedapi/types/dataframeevaluationvalue.go +++ b/typedapi/types/dataframeevaluationvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L87-L89 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L87-L89 type DataframeEvaluationValue struct { Value Float64 `json:"value"` } diff --git a/typedapi/types/dataframeoutlierdetectionsummary.go b/typedapi/types/dataframeoutlierdetectionsummary.go index f92de2958f..a564b14cc2 100644 --- a/typedapi/types/dataframeoutlierdetectionsummary.go +++ b/typedapi/types/dataframeoutlierdetectionsummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DataframeOutlierDetectionSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L24-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L24-L42 type DataframeOutlierDetectionSummary struct { // AucRoc The AUC ROC (area under the curve of the receiver operating characteristic) // score and optionally the curve. diff --git a/typedapi/types/dataframepreviewconfig.go b/typedapi/types/dataframepreviewconfig.go index 30d69359eb..492666c4ef 100644 --- a/typedapi/types/dataframepreviewconfig.go +++ b/typedapi/types/dataframepreviewconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataframePreviewConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/preview_data_frame_analytics/types.ts#L27-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/preview_data_frame_analytics/types.ts#L27-L33 type DataframePreviewConfig struct { Analysis DataframeAnalysisContainer `json:"analysis"` AnalyzedFields *DataframeAnalysisAnalyzedFields `json:"analyzed_fields,omitempty"` diff --git a/typedapi/types/dataframeregressionsummary.go b/typedapi/types/dataframeregressionsummary.go index 3bffd8edc3..f2e73ec234 100644 --- a/typedapi/types/dataframeregressionsummary.go +++ b/typedapi/types/dataframeregressionsummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DataframeRegressionSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/evaluate_data_frame/types.ts#L68-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/evaluate_data_frame/types.ts#L68-L85 type DataframeRegressionSummary struct { // Huber Pseudo Huber loss function. Huber *DataframeEvaluationValue `json:"huber,omitempty"` diff --git a/typedapi/types/datapathstats.go b/typedapi/types/datapathstats.go index 23ce741c5b..1037d5ab58 100644 --- a/typedapi/types/datapathstats.go +++ b/typedapi/types/datapathstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataPathStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L588-L632 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L588-L632 type DataPathStats struct { // Available Total amount of disk space available to this Java virtual machine on this // file store. diff --git a/typedapi/types/datastream.go b/typedapi/types/datastream.go index 22680ebfe3..839acc5931 100644 --- a/typedapi/types/datastream.go +++ b/typedapi/types/datastream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // DataStream type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L54-L145 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStream.ts#L55-L151 type DataStream struct { // AllowCustomRouting If `true`, the data stream allows custom routing on write request. AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` @@ -65,6 +65,10 @@ type DataStream struct { Indices []DataStreamIndex `json:"indices"` // Lifecycle Contains the configuration for the data stream lifecycle of this data stream. Lifecycle *DataStreamLifecycleWithRollover `json:"lifecycle,omitempty"` + // Mappings The mappings specific to this data stream that will take precedence over the + // mappings in the matching index + // template. + Mappings *TypeMapping `json:"mappings,omitempty"` // Meta_ Custom metadata for the stream, copied from the `_meta` object of the // stream’s matching index template. // If empty, the response omits this property. @@ -187,6 +191,11 @@ func (s *DataStream) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Lifecycle", err) } + case "mappings": + if err := dec.Decode(&s.Mappings); err != nil { + return fmt.Errorf("%s | %w", "Mappings", err) + } + case "_meta": if err := dec.Decode(&s.Meta_); err != nil { return fmt.Errorf("%s | %w", "Meta_", err) diff --git a/typedapi/types/datastreamfailurestore.go b/typedapi/types/datastreamfailurestore.go index 02f73f903e..e5626a53fb 100644 --- a/typedapi/types/datastreamfailurestore.go +++ b/typedapi/types/datastreamfailurestore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamFailureStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamFailureStore.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamFailureStore.ts#L22-L37 type DataStreamFailureStore struct { // Enabled If defined, it turns the failure store on/off (`true`/`false`) for this data // stream. A data stream failure store diff --git a/typedapi/types/datastreamfailurestoretemplate.go b/typedapi/types/datastreamfailurestoretemplate.go index 63ac6bd23f..e04a367465 100644 --- a/typedapi/types/datastreamfailurestoretemplate.go +++ b/typedapi/types/datastreamfailurestoretemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataStreamFailureStoreTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamFailureStore.ts#L39-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamFailureStore.ts#L39-L54 type DataStreamFailureStoreTemplate struct { // Enabled If defined, it turns the failure store on/off (`true`/`false`) for this data // stream. A data stream failure store diff --git a/typedapi/types/datastreamindex.go b/typedapi/types/datastreamindex.go index 9d58fe00e8..5350327c62 100644 --- a/typedapi/types/datastreamindex.go +++ b/typedapi/types/datastreamindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // DataStreamIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L154-L179 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStream.ts#L160-L185 type DataStreamIndex struct { // IlmPolicy Name of the current ILM lifecycle policy configured for this backing index. IlmPolicy *string `json:"ilm_policy,omitempty"` diff --git a/typedapi/types/datastreamlifecycle.go b/typedapi/types/datastreamlifecycle.go index 509cd434e1..61ceec92d5 100644 --- a/typedapi/types/datastreamlifecycle.go +++ b/typedapi/types/datastreamlifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamLifecycle.ts#L25-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamLifecycle.ts#L25-L45 type DataStreamLifecycle struct { // DataRetention If defined, every document added to this data stream will be stored at least // for this time frame. diff --git a/typedapi/types/datastreamlifecycledetails.go b/typedapi/types/datastreamlifecycledetails.go index e706ad48c8..3c7ac44196 100644 --- a/typedapi/types/datastreamlifecycledetails.go +++ b/typedapi/types/datastreamlifecycledetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L154-L158 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L154-L158 type DataStreamLifecycleDetails struct { StagnatingBackingIndices []StagnatingBackingIndices `json:"stagnating_backing_indices,omitempty"` StagnatingBackingIndicesCount int `json:"stagnating_backing_indices_count"` diff --git a/typedapi/types/datastreamlifecycledownsampling.go b/typedapi/types/datastreamlifecycledownsampling.go index 158b2774c6..1cc1a0c05d 100644 --- a/typedapi/types/datastreamlifecycledownsampling.go +++ b/typedapi/types/datastreamlifecycledownsampling.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DataStreamLifecycleDownsampling type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27 type DataStreamLifecycleDownsampling struct { // Rounds The list of downsampling rounds to execute as part of this downsampling // configuration diff --git a/typedapi/types/datastreamlifecycleexplain.go b/typedapi/types/datastreamlifecycleexplain.go index e9a55bd0fa..b3857f4a7d 100644 --- a/typedapi/types/datastreamlifecycleexplain.go +++ b/typedapi/types/datastreamlifecycleexplain.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleExplain type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41 type DataStreamLifecycleExplain struct { Error *string `json:"error,omitempty"` GenerationTime Duration `json:"generation_time,omitempty"` diff --git a/typedapi/types/datastreamlifecycleindicator.go b/typedapi/types/datastreamlifecycleindicator.go index 11182d937b..5a65d396ab 100644 --- a/typedapi/types/datastreamlifecycleindicator.go +++ b/typedapi/types/datastreamlifecycleindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DataStreamLifecycleIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L149-L153 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L149-L153 type DataStreamLifecycleIndicator struct { Details *DataStreamLifecycleDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/datastreamlifecyclerolloverconditions.go b/typedapi/types/datastreamlifecyclerolloverconditions.go index 532505cd9f..a2981f44c2 100644 --- a/typedapi/types/datastreamlifecyclerolloverconditions.go +++ b/typedapi/types/datastreamlifecyclerolloverconditions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleRolloverConditions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamLifecycle.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamLifecycle.ts#L60-L72 type DataStreamLifecycleRolloverConditions struct { MaxAge *string `json:"max_age,omitempty"` MaxDocs *int64 `json:"max_docs,omitempty"` diff --git a/typedapi/types/datastreamlifecyclewithrollover.go b/typedapi/types/datastreamlifecyclewithrollover.go index 1deab391d8..5ee9ea6afc 100644 --- a/typedapi/types/datastreamlifecyclewithrollover.go +++ b/typedapi/types/datastreamlifecyclewithrollover.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleWithRollover type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamLifecycle.ts#L47-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamLifecycle.ts#L47-L58 type DataStreamLifecycleWithRollover struct { // DataRetention If defined, every document added to this data stream will be stored at least // for this time frame. diff --git a/typedapi/types/datastreammappings.go b/typedapi/types/datastreammappings.go new file mode 100644 index 0000000000..844244e342 --- /dev/null +++ b/typedapi/types/datastreammappings.go @@ -0,0 +1,94 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DataStreamMappings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_stream_mappings/IndicesGetDataStreamMappingsResponse.ts#L29-L39 +type DataStreamMappings struct { + // EffectiveMappings The settings specific to this data stream merged with the settings from its + // template. These `effective_settings` + // are the settings that will be used when a new index is created for this data + // stream. + EffectiveMappings TypeMapping `json:"effective_mappings"` + // Mappings The settings specific to this data stream + Mappings TypeMapping `json:"mappings"` + // Name The name of the data stream. + Name string `json:"name"` +} + +func (s *DataStreamMappings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "effective_mappings": + if err := dec.Decode(&s.EffectiveMappings); err != nil { + return fmt.Errorf("%s | %w", "EffectiveMappings", err) + } + + case "mappings": + if err := dec.Decode(&s.Mappings); err != nil { + return fmt.Errorf("%s | %w", "Mappings", err) + } + + case "name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Name = o + + } + } + return nil +} + +// NewDataStreamMappings returns a DataStreamMappings. +func NewDataStreamMappings() *DataStreamMappings { + r := &DataStreamMappings{} + + return r +} diff --git a/typedapi/types/datastreamnames.go b/typedapi/types/datastreamnames.go index d9475bd05c..55eaef4770 100644 --- a/typedapi/types/datastreamnames.go +++ b/typedapi/types/datastreamnames.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DataStreamNames type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L88-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L87-L87 type DataStreamNames []string diff --git a/typedapi/types/datastreamoptions.go b/typedapi/types/datastreamoptions.go index af45ac46c6..277f1656a6 100644 --- a/typedapi/types/datastreamoptions.go +++ b/typedapi/types/datastreamoptions.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DataStreamOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamOptions.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamOptions.ts#L25-L34 type DataStreamOptions struct { // FailureStore If defined, it specifies configuration for the failure store of this data // stream. diff --git a/typedapi/types/datastreamoptionstemplate.go b/typedapi/types/datastreamoptionstemplate.go index c48763f9df..14426d0c8c 100644 --- a/typedapi/types/datastreamoptionstemplate.go +++ b/typedapi/types/datastreamoptionstemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataStreamOptionsTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamOptions.ts#L36-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamOptions.ts#L36-L41 type DataStreamOptionsTemplate struct { FailureStore *DataStreamFailureStoreTemplate `json:"failure_store,omitempty"` } diff --git a/typedapi/types/datastreams.go b/typedapi/types/datastreams.go index 815c6d69fb..9a88a5dcbe 100644 --- a/typedapi/types/datastreams.go +++ b/typedapi/types/datastreams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreams type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L78-L81 type DataStreams struct { Available bool `json:"available"` DataStreams int64 `json:"data_streams"` diff --git a/typedapi/types/datastreamsettings.go b/typedapi/types/datastreamsettings.go index b8eaf950e3..07590eb77b 100644 --- a/typedapi/types/datastreamsettings.go +++ b/typedapi/types/datastreamsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L29-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L29-L39 type DataStreamSettings struct { // EffectiveSettings The settings specific to this data stream merged with the settings from its // template. These `effective_settings` diff --git a/typedapi/types/datastreamsettingserror.go b/typedapi/types/datastreamsettingserror.go index e6d58893a1..adc76b88b4 100644 --- a/typedapi/types/datastreamsettingserror.go +++ b/typedapi/types/datastreamsettingserror.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamSettingsError type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L71-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L71-L77 type DataStreamSettingsError struct { // Error A message explaining why the settings could not be applied to specific // indices. diff --git a/typedapi/types/datastreamsstatsitem.go b/typedapi/types/datastreamsstatsitem.go index eab9d90771..4bafb0353f 100644 --- a/typedapi/types/datastreamsstatsitem.go +++ b/typedapi/types/datastreamsstatsitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamsStatsItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L45-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L45-L65 type DataStreamsStatsItem struct { // BackingIndices Current number of backing indices for the data stream. BackingIndices int `json:"backing_indices"` diff --git a/typedapi/types/datastreamstats.go b/typedapi/types/datastreamstats.go index d4301f1f97..367c2ea3dd 100644 --- a/typedapi/types/datastreamstats.go +++ b/typedapi/types/datastreamstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L46-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L46-L59 type DataStreamStats struct { // BackingIndicesInError The count of the backing indices for the data stream. BackingIndicesInError int `json:"backing_indices_in_error"` diff --git a/typedapi/types/datastreamtimestamp.go b/typedapi/types/datastreamtimestamp.go index ba734fde5e..675e958a88 100644 --- a/typedapi/types/datastreamtimestamp.go +++ b/typedapi/types/datastreamtimestamp.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamTimestamp type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/TypeMapping.ts#L59-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/TypeMapping.ts#L59-L61 type DataStreamTimestamp struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/datastreamtimestampfield.go b/typedapi/types/datastreamtimestampfield.go index d361209076..1afae2425d 100644 --- a/typedapi/types/datastreamtimestampfield.go +++ b/typedapi/types/datastreamtimestampfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataStreamTimestampField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L147-L152 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStream.ts#L153-L158 type DataStreamTimestampField struct { // Name Name of the timestamp field for the data stream, which must be `@timestamp`. // The `@timestamp` field must be included in every document indexed to the data diff --git a/typedapi/types/datastreamvisibility.go b/typedapi/types/datastreamvisibility.go index aa3fb5ada5..11651100f0 100644 --- a/typedapi/types/datastreamvisibility.go +++ b/typedapi/types/datastreamvisibility.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataStreamVisibility type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L181-L184 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStream.ts#L187-L190 type DataStreamVisibility struct { AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` Hidden *bool `json:"hidden,omitempty"` diff --git a/typedapi/types/datastreamwithlifecycle.go b/typedapi/types/datastreamwithlifecycle.go index 16e9d02f0d..73a5fead24 100644 --- a/typedapi/types/datastreamwithlifecycle.go +++ b/typedapi/types/datastreamwithlifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataStreamWithLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30 type DataStreamWithLifecycle struct { Lifecycle *DataStreamLifecycleWithRollover `json:"lifecycle,omitempty"` Name string `json:"name"` diff --git a/typedapi/types/datastreamwithoptions.go b/typedapi/types/datastreamwithoptions.go index a84ea6d0ce..2700a039a8 100644 --- a/typedapi/types/datastreamwithoptions.go +++ b/typedapi/types/datastreamwithoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DataStreamWithOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L27-L30 type DataStreamWithOptions struct { Name string `json:"name"` Options *DataStreamOptions `json:"options,omitempty"` diff --git a/typedapi/types/datatierphasestatistics.go b/typedapi/types/datatierphasestatistics.go index cd62b1def0..9fd8136cc2 100644 --- a/typedapi/types/datatierphasestatistics.go +++ b/typedapi/types/datatierphasestatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataTierPhaseStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L83-L94 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L83-L94 type DataTierPhaseStatistics struct { DocCount int64 `json:"doc_count"` IndexCount int64 `json:"index_count"` diff --git a/typedapi/types/datatiers.go b/typedapi/types/datatiers.go index f4dad3eef5..804cde3301 100644 --- a/typedapi/types/datatiers.go +++ b/typedapi/types/datatiers.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DataTiers type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L349-L359 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L382-L392 type DataTiers struct { Available bool `json:"available"` DataCold DataTierPhaseStatistics `json:"data_cold"` diff --git a/typedapi/types/datedecayfunction.go b/typedapi/types/datedecayfunction.go index 0d26b98c7e..2d66bdc36b 100644 --- a/typedapi/types/datedecayfunction.go +++ b/typedapi/types/datedecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -29,7 +29,7 @@ import ( // DateDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L209-L209 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L211-L211 type DateDecayFunction struct { DecayFunctionBaseDateMathDuration map[string]DecayPlacementDateMathDuration `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the diff --git a/typedapi/types/datedistancefeaturequery.go b/typedapi/types/datedistancefeaturequery.go index 082270e65a..5ff950fc65 100644 --- a/typedapi/types/datedistancefeaturequery.go +++ b/typedapi/types/datedistancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DateDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L71-L74 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L71-L74 type DateDistanceFeatureQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/datehistogramaggregate.go b/typedapi/types/datehistogramaggregate.go index 03128e208c..7be9b69fef 100644 --- a/typedapi/types/datehistogramaggregate.go +++ b/typedapi/types/datehistogramaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DateHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L383-L386 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L454-L458 type DateHistogramAggregate struct { Buckets BucketsDateHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/datehistogramaggregation.go b/typedapi/types/datehistogramaggregation.go index 052435a4f0..b222793b64 100644 --- a/typedapi/types/datehistogramaggregation.go +++ b/typedapi/types/datehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // DateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L202-L260 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L205-L263 type DateHistogramAggregation struct { // CalendarInterval Calendar-aware interval. // Can be specified using the unit name, such as `month`, or as a single unit diff --git a/typedapi/types/datehistogrambucket.go b/typedapi/types/datehistogrambucket.go index 4579bcefa8..8334f05a9a 100644 --- a/typedapi/types/datehistogrambucket.go +++ b/typedapi/types/datehistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // DateHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L388-L391 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L460-L463 type DateHistogramBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -210,6 +210,13 @@ func (s *DateHistogramBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -238,6 +245,20 @@ func (s *DateHistogramBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/datehistogramgrouping.go b/typedapi/types/datehistogramgrouping.go index 70528e4dc7..cba3ebbb60 100644 --- a/typedapi/types/datehistogramgrouping.go +++ b/typedapi/types/datehistogramgrouping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DateHistogramGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/_types/Groupings.ts#L42-L73 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/_types/Groupings.ts#L42-L73 type DateHistogramGrouping struct { // CalendarInterval The interval of time buckets to be generated when rolling up. CalendarInterval Duration `json:"calendar_interval,omitempty"` diff --git a/typedapi/types/dateindexnameprocessor.go b/typedapi/types/dateindexnameprocessor.go index 915ad50d5d..3f6ced0b68 100644 --- a/typedapi/types/dateindexnameprocessor.go +++ b/typedapi/types/dateindexnameprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DateIndexNameProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L730-L768 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L734-L772 type DateIndexNameProcessor struct { // DateFormats An array of the expected date formats for parsing dates / timestamps in the // document being preprocessed. diff --git a/typedapi/types/datenanosproperty.go b/typedapi/types/datenanosproperty.go index d1df55a8b5..a98572c1fd 100644 --- a/typedapi/types/datenanosproperty.go +++ b/typedapi/types/datenanosproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // DateNanosProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L91-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L92-L102 type DateNanosProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/dateprocessor.go b/typedapi/types/dateprocessor.go index c95c81bb5b..214c03d048 100644 --- a/typedapi/types/dateprocessor.go +++ b/typedapi/types/dateprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DateProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L770-L803 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L774-L807 type DateProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/dateproperty.go b/typedapi/types/dateproperty.go index 8864c0b709..3f313a1f7f 100644 --- a/typedapi/types/dateproperty.go +++ b/typedapi/types/dateproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // DateProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L77-L89 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L78-L90 type DateProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/daterangeaggregate.go b/typedapi/types/daterangeaggregate.go index ed67fc310e..1f58b7528c 100644 --- a/typedapi/types/daterangeaggregate.go +++ b/typedapi/types/daterangeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DateRangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L609-L615 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L681-L687 type DateRangeAggregate struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/daterangeaggregation.go b/typedapi/types/daterangeaggregation.go index 5562e980a1..85a1ca5cba 100644 --- a/typedapi/types/daterangeaggregation.go +++ b/typedapi/types/daterangeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DateRangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L281-L307 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L284-L310 type DateRangeAggregation struct { // Field The date field whose values are use to build ranges. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/daterangeexpression.go b/typedapi/types/daterangeexpression.go index 73b44605bf..f02470766b 100644 --- a/typedapi/types/daterangeexpression.go +++ b/typedapi/types/daterangeexpression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DateRangeExpression type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L318-L331 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L321-L334 type DateRangeExpression struct { // From Start of the range (inclusive). From FieldDateMath `json:"from,omitempty"` diff --git a/typedapi/types/daterangeproperty.go b/typedapi/types/daterangeproperty.go index ec01ca0414..41755870bb 100644 --- a/typedapi/types/daterangeproperty.go +++ b/typedapi/types/daterangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // DateRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/range.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/range.ts#L29-L32 type DateRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/daterangequery.go b/typedapi/types/daterangequery.go index 90a4dcc763..618fdfd340 100644 --- a/typedapi/types/daterangequery.go +++ b/typedapi/types/daterangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DateRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L157-L166 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L158-L167 type DateRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/datetime.go b/typedapi/types/datetime.go index 5efd4b3d41..c2a3f1f33d 100644 --- a/typedapi/types/datetime.go +++ b/typedapi/types/datetime.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // int64 // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Time.ts#L22-L27 type DateTime any type DateTimeVariant interface { diff --git a/typedapi/types/decayfunction.go b/typedapi/types/decayfunction.go index f24b42f0d2..42967f2597 100644 --- a/typedapi/types/decayfunction.go +++ b/typedapi/types/decayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -27,7 +27,7 @@ package types // NumericDecayFunction // GeoDecayFunction // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L215-L224 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L217-L226 type DecayFunction any type DecayFunctionVariant interface { diff --git a/typedapi/types/decayplacement.go b/typedapi/types/decayplacement.go index 7cf9a9f8fa..d9f4fbfa9f 100644 --- a/typedapi/types/decayplacement.go +++ b/typedapi/types/decayplacement.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DecayPlacement type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L172-L191 type DecayPlacement struct { // Decay Defines how documents are scored at the distance given at scale. Decay *Float64 `json:"decay,omitempty"` diff --git a/typedapi/types/decayplacementdatemathduration.go b/typedapi/types/decayplacementdatemathduration.go index 79f54d1aa6..19711be589 100644 --- a/typedapi/types/decayplacementdatemathduration.go +++ b/typedapi/types/decayplacementdatemathduration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DecayPlacementDateMathDuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L172-L191 type DecayPlacementDateMathDuration struct { // Decay Defines how documents are scored at the distance given at scale. Decay *Float64 `json:"decay,omitempty"` diff --git a/typedapi/types/decayplacementdoubledouble.go b/typedapi/types/decayplacementdoubledouble.go index 8e89f22006..7e85377f94 100644 --- a/typedapi/types/decayplacementdoubledouble.go +++ b/typedapi/types/decayplacementdoubledouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DecayPlacementdoubledouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L172-L191 type DecayPlacementdoubledouble struct { // Decay Defines how documents are scored at the distance given at scale. Decay *Float64 `json:"decay,omitempty"` diff --git a/typedapi/types/decayplacementgeolocationdistance.go b/typedapi/types/decayplacementgeolocationdistance.go index 39ac3178f3..02620112f0 100644 --- a/typedapi/types/decayplacementgeolocationdistance.go +++ b/typedapi/types/decayplacementgeolocationdistance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DecayPlacementGeoLocationDistance type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L172-L191 type DecayPlacementGeoLocationDistance struct { // Decay Defines how documents are scored at the distance given at scale. Decay *Float64 `json:"decay,omitempty"` diff --git a/typedapi/types/decimaldigittokenfilter.go b/typedapi/types/decimaldigittokenfilter.go index f2dc3840e1..e1565a6a49 100644 --- a/typedapi/types/decimaldigittokenfilter.go +++ b/typedapi/types/decimaldigittokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DecimalDigitTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L482-L484 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L517-L519 type DecimalDigitTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/deepseekservicesettings.go b/typedapi/types/deepseekservicesettings.go index b0724b8caa..75bbd480bc 100644 --- a/typedapi/types/deepseekservicesettings.go +++ b/typedapi/types/deepseekservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DeepSeekServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1166-L1188 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1270-L1292 type DeepSeekServiceSettings struct { // ApiKey A valid API key for your DeepSeek account. // You can find or create your DeepSeek API keys on the DeepSeek API key page. diff --git a/typedapi/types/defaults.go b/typedapi/types/defaults.go index b416948263..23354a2e05 100644 --- a/typedapi/types/defaults.go +++ b/typedapi/types/defaults.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Defaults type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/info/types.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/info/types.ts#L24-L27 type Defaults struct { AnomalyDetectors AnomalyDetectors `json:"anomaly_detectors"` Datafeeds Datafeeds `json:"datafeeds"` diff --git a/typedapi/types/definition.go b/typedapi/types/definition.go index a8d8b5d751..820bc483f4 100644 --- a/typedapi/types/definition.go +++ b/typedapi/types/definition.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Definition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L24-L29 type Definition struct { // Preprocessors Collection of preprocessors Preprocessors []Preprocessor `json:"preprocessors,omitempty"` diff --git a/typedapi/types/delayeddatacheckconfig.go b/typedapi/types/delayeddatacheckconfig.go index 99af0e5b59..9a221802e8 100644 --- a/typedapi/types/delayeddatacheckconfig.go +++ b/typedapi/types/delayeddatacheckconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DelayedDataCheckConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L122-L133 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L126-L137 type DelayedDataCheckConfig struct { // CheckWindow The window of time that is searched for late data. This window of time ends // with the latest finalized bucket. diff --git a/typedapi/types/deleteaction.go b/typedapi/types/deleteaction.go index 1c47353429..f3f0a007d8 100644 --- a/typedapi/types/deleteaction.go +++ b/typedapi/types/deleteaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DeleteAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L149-L151 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L152-L154 type DeleteAction struct { DeleteSearchableSnapshot *bool `json:"delete_searchable_snapshot,omitempty"` } diff --git a/typedapi/types/deleteoperation.go b/typedapi/types/deleteoperation.go index 1a9eec12f2..7b8c3acf2f 100644 --- a/typedapi/types/deleteoperation.go +++ b/typedapi/types/deleteoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DeleteOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L144-L144 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/types.ts#L144-L144 type DeleteOperation struct { // Id_ The document ID. Id_ *string `json:"_id,omitempty"` @@ -42,7 +42,7 @@ type DeleteOperation struct { // Index_ The name of the index or index alias to perform the action on. Index_ *string `json:"_index,omitempty"` // Routing A custom value used to route operations to a specific shard. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` Version *int64 `json:"version,omitempty"` VersionType *versiontype.VersionType `json:"version_type,omitempty"` } @@ -93,8 +93,19 @@ func (s *DeleteOperation) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "version": diff --git a/typedapi/types/delimitedpayloadtokenfilter.go b/typedapi/types/delimitedpayloadtokenfilter.go index 90effd7227..4f2f33b03f 100644 --- a/typedapi/types/delimitedpayloadtokenfilter.go +++ b/typedapi/types/delimitedpayloadtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DelimitedPayloadTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L84-L90 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L90-L96 type DelimitedPayloadTokenFilter struct { // Delimiter Character used to separate tokens from payloads. Defaults to `|`. Delimiter *string `json:"delimiter,omitempty"` diff --git a/typedapi/types/densevectorindexoptions.go b/typedapi/types/densevectorindexoptions.go index fa08c6616d..96a01381fb 100644 --- a/typedapi/types/densevectorindexoptions.go +++ b/typedapi/types/densevectorindexoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DenseVectorIndexOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/DenseVectorProperty.ts#L129-L166 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/DenseVectorProperty.ts#L134-L179 type DenseVectorIndexOptions struct { // ConfidenceInterval The confidence interval to use when quantizing the vectors. Can be any value // between and including `0.90` and @@ -64,9 +64,13 @@ type DenseVectorIndexOptions struct { // Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index // types. M *int `json:"m,omitempty"` - // RescoreVector The rescore vector options. This is only applicable to `bbq_hnsw`, - // `int4_hnsw`, `int8_hnsw`, `bbq_flat`, `int4_flat`, and `int8_flat` index - // types. + // OnDiskRescore `true` if vector rescoring should be done on-disk + // + // Only applicable to `bbq_disk`, `bbq_hnsw`, `int4_hnsw`, `int8_hnsw` + OnDiskRescore *bool `json:"on_disk_rescore,omitempty"` + // RescoreVector The rescore vector options. This is only applicable to `bbq_disk`, + // `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`, `bbq_flat`, `int4_flat`, and + // `int8_flat` index types. RescoreVector *DenseVectorIndexOptionsRescoreVector `json:"rescore_vector,omitempty"` // Type The type of kNN algorithm to use. Type densevectorindexoptionstype.DenseVectorIndexOptionsType `json:"type"` @@ -135,6 +139,20 @@ func (s *DenseVectorIndexOptions) UnmarshalJSON(data []byte) error { s.M = &f } + case "on_disk_rescore": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "OnDiskRescore", err) + } + s.OnDiskRescore = &value + case bool: + s.OnDiskRescore = &v + } + case "rescore_vector": if err := dec.Decode(&s.RescoreVector); err != nil { return fmt.Errorf("%s | %w", "RescoreVector", err) diff --git a/typedapi/types/densevectorindexoptionsrescorevector.go b/typedapi/types/densevectorindexoptionsrescorevector.go index 534c63fde4..5e875cd155 100644 --- a/typedapi/types/densevectorindexoptionsrescorevector.go +++ b/typedapi/types/densevectorindexoptionsrescorevector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DenseVectorIndexOptionsRescoreVector type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/DenseVectorProperty.ts#L215-L223 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/DenseVectorProperty.ts#L237-L245 type DenseVectorIndexOptionsRescoreVector struct { // Oversample The oversampling factor to use when searching for the nearest neighbor. This // is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`. diff --git a/typedapi/types/densevectoroffheapstats.go b/typedapi/types/densevectoroffheapstats.go index e0d33afa61..5876c9c891 100644 --- a/typedapi/types/densevectoroffheapstats.go +++ b/typedapi/types/densevectoroffheapstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,19 +31,23 @@ import ( // DenseVectorOffHeapStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L166-L178 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L180-L196 type DenseVectorOffHeapStats struct { - Fielddata map[string]map[string]int64 `json:"fielddata,omitempty"` - TotalSize ByteSize `json:"total_size,omitempty"` - TotalSizeBytes int64 `json:"total_size_bytes"` - TotalVebSize ByteSize `json:"total_veb_size,omitempty"` - TotalVebSizeBytes int64 `json:"total_veb_size_bytes"` - TotalVecSize ByteSize `json:"total_vec_size,omitempty"` - TotalVecSizeBytes int64 `json:"total_vec_size_bytes"` - TotalVeqSize ByteSize `json:"total_veq_size,omitempty"` - TotalVeqSizeBytes int64 `json:"total_veq_size_bytes"` - TotalVexSize ByteSize `json:"total_vex_size,omitempty"` - TotalVexSizeBytes int64 `json:"total_vex_size_bytes"` + Fielddata map[string]map[string]int64 `json:"fielddata,omitempty"` + TotalCenifSize ByteSize `json:"total_cenif_size,omitempty"` + TotalCenifSizeBytes int64 `json:"total_cenif_size_bytes"` + TotalClivfSize ByteSize `json:"total_clivf_size,omitempty"` + TotalClivfSizeBytes int64 `json:"total_clivf_size_bytes"` + TotalSize ByteSize `json:"total_size,omitempty"` + TotalSizeBytes int64 `json:"total_size_bytes"` + TotalVebSize ByteSize `json:"total_veb_size,omitempty"` + TotalVebSizeBytes int64 `json:"total_veb_size_bytes"` + TotalVecSize ByteSize `json:"total_vec_size,omitempty"` + TotalVecSizeBytes int64 `json:"total_vec_size_bytes"` + TotalVeqSize ByteSize `json:"total_veq_size,omitempty"` + TotalVeqSizeBytes int64 `json:"total_veq_size_bytes"` + TotalVexSize ByteSize `json:"total_vex_size,omitempty"` + TotalVexSizeBytes int64 `json:"total_vex_size_bytes"` } func (s *DenseVectorOffHeapStats) UnmarshalJSON(data []byte) error { @@ -69,6 +73,46 @@ func (s *DenseVectorOffHeapStats) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Fielddata", err) } + case "total_cenif_size": + if err := dec.Decode(&s.TotalCenifSize); err != nil { + return fmt.Errorf("%s | %w", "TotalCenifSize", err) + } + + case "total_cenif_size_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "TotalCenifSizeBytes", err) + } + s.TotalCenifSizeBytes = value + case float64: + f := int64(v) + s.TotalCenifSizeBytes = f + } + + case "total_clivf_size": + if err := dec.Decode(&s.TotalClivfSize); err != nil { + return fmt.Errorf("%s | %w", "TotalClivfSize", err) + } + + case "total_clivf_size_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "TotalClivfSizeBytes", err) + } + s.TotalClivfSizeBytes = value + case float64: + f := int64(v) + s.TotalClivfSizeBytes = f + } + case "total_size": if err := dec.Decode(&s.TotalSize); err != nil { return fmt.Errorf("%s | %w", "TotalSize", err) diff --git a/typedapi/types/densevectorproperty.go b/typedapi/types/densevectorproperty.go index 9e2cf9a7e7..4e825635a8 100644 --- a/typedapi/types/densevectorproperty.go +++ b/typedapi/types/densevectorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // DenseVectorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/DenseVectorProperty.ts#L23-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/DenseVectorProperty.ts#L23-L62 type DenseVectorProperty struct { // Dims Number of vector dimensions. Can't exceed `4096`. If `dims` is not specified, // it will be set to the length of diff --git a/typedapi/types/densevectorstats.go b/typedapi/types/densevectorstats.go index df5dbdd389..71c5216f66 100644 --- a/typedapi/types/densevectorstats.go +++ b/typedapi/types/densevectorstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DenseVectorStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L157-L160 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L171-L174 type DenseVectorStats struct { OffHeap *DenseVectorOffHeapStats `json:"off_heap,omitempty"` ValueCount int64 `json:"value_count"` diff --git a/typedapi/types/dependency.go b/typedapi/types/dependency.go index 73cb171c0d..9c485c0e57 100644 --- a/typedapi/types/dependency.go +++ b/typedapi/types/dependency.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Dependency type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L30-L33 type Dependency struct { Field string `json:"field"` Value ScalarValue `json:"value"` diff --git a/typedapi/types/deprecation.go b/typedapi/types/deprecation.go index acacb02b0a..8c35c55af1 100644 --- a/typedapi/types/deprecation.go +++ b/typedapi/types/deprecation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // Deprecation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/migration/deprecations/types.ts#L32-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/migration/deprecations/types.ts#L32-L47 type Deprecation struct { // Details Optional details about the deprecation warning. Details *string `json:"details,omitempty"` diff --git a/typedapi/types/deprecationindexing.go b/typedapi/types/deprecationindexing.go index 7a76f6a455..6c179175b0 100644 --- a/typedapi/types/deprecationindexing.go +++ b/typedapi/types/deprecationindexing.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DeprecationIndexing type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L154-L156 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L154-L157 type DeprecationIndexing struct { Enabled string `json:"enabled"` } diff --git a/typedapi/types/derivativeaggregate.go b/typedapi/types/derivativeaggregate.go index 8c8f8a3b9a..41a0a5803c 100644 --- a/typedapi/types/derivativeaggregate.go +++ b/typedapi/types/derivativeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DerivativeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L241-L248 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L246-L253 type DerivativeAggregate struct { Meta Metadata `json:"meta,omitempty"` NormalizedValue *Float64 `json:"normalized_value,omitempty"` diff --git a/typedapi/types/derivativeaggregation.go b/typedapi/types/derivativeaggregation.go index 5677794a9f..68d796351a 100644 --- a/typedapi/types/derivativeaggregation.go +++ b/typedapi/types/derivativeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DerivativeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L216-L216 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L218-L218 type DerivativeAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/detailsinfo.go b/typedapi/types/detailsinfo.go index c144765bd1..5cdb27387f 100644 --- a/typedapi/types/detailsinfo.go +++ b/typedapi/types/detailsinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DetailsInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L286-L321 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L286-L321 type DetailsInfo struct { // Blob A description of the blob that was written and read. Blob BlobDetails `json:"blob"` diff --git a/typedapi/types/detectionrule.go b/typedapi/types/detectionrule.go index f0af8f23d3..6b89d3b327 100644 --- a/typedapi/types/detectionrule.go +++ b/typedapi/types/detectionrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // DetectionRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Rule.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Rule.ts#L25-L39 type DetectionRule struct { // Actions The set of actions to be triggered when the rule applies. If more than one // action is specified the effects of all actions are combined. diff --git a/typedapi/types/detector.go b/typedapi/types/detector.go index 1e47b0bdab..ef5b580a00 100644 --- a/typedapi/types/detector.go +++ b/typedapi/types/detector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // Detector type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Detector.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Detector.ts#L25-L67 type Detector struct { // ByFieldName The field used to split the data. In particular, this property is used for // analyzing the splits with respect to their own history. It is used for diff --git a/typedapi/types/detectorread.go b/typedapi/types/detectorread.go index 0dfa65755b..fb0053457f 100644 --- a/typedapi/types/detectorread.go +++ b/typedapi/types/detectorread.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DetectorRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Detector.ts#L69-L125 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Detector.ts#L69-L125 type DetectorRead struct { // ByFieldName The field used to split the data. // In particular, this property is used for analyzing the splits with respect to diff --git a/typedapi/types/detectorupdate.go b/typedapi/types/detectorupdate.go index 3c323206e6..75ce6f3f44 100644 --- a/typedapi/types/detectorupdate.go +++ b/typedapi/types/detectorupdate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DetectorUpdate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Detector.ts#L127-L143 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Detector.ts#L127-L143 type DetectorUpdate struct { // CustomRules An array of custom rule objects, which enable you to customize the way // detectors operate. diff --git a/typedapi/types/dfsknnprofile.go b/typedapi/types/dfsknnprofile.go index a2cc548136..ff9e83a515 100644 --- a/typedapi/types/dfsknnprofile.go +++ b/typedapi/types/dfsknnprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DfsKnnProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L181-L186 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L181-L186 type DfsKnnProfile struct { Collector []KnnCollectorResult `json:"collector"` Query []KnnQueryProfileResult `json:"query"` diff --git a/typedapi/types/dfsprofile.go b/typedapi/types/dfsprofile.go index 170bc0ccb7..84d01fb1f6 100644 --- a/typedapi/types/dfsprofile.go +++ b/typedapi/types/dfsprofile.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DfsProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L154-L157 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L154-L157 type DfsProfile struct { Knn []DfsKnnProfile `json:"knn,omitempty"` Statistics *DfsStatisticsProfile `json:"statistics,omitempty"` diff --git a/typedapi/types/dfsstatisticsbreakdown.go b/typedapi/types/dfsstatisticsbreakdown.go index cd0bc1f299..91dc479c88 100644 --- a/typedapi/types/dfsstatisticsbreakdown.go +++ b/typedapi/types/dfsstatisticsbreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DfsStatisticsBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L170-L179 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L170-L179 type DfsStatisticsBreakdown struct { CollectionStatistics int64 `json:"collection_statistics"` CollectionStatisticsCount int64 `json:"collection_statistics_count"` diff --git a/typedapi/types/dfsstatisticsprofile.go b/typedapi/types/dfsstatisticsprofile.go index 4e4b30a90a..56b565523c 100644 --- a/typedapi/types/dfsstatisticsprofile.go +++ b/typedapi/types/dfsstatisticsprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DfsStatisticsProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L159-L167 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L159-L167 type DfsStatisticsProfile struct { Breakdown DfsStatisticsBreakdown `json:"breakdown"` Children []DfsStatisticsProfile `json:"children,omitempty"` diff --git a/typedapi/types/diagnosis.go b/typedapi/types/diagnosis.go index 35ed78f399..bcc41f3991 100644 --- a/typedapi/types/diagnosis.go +++ b/typedapi/types/diagnosis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Diagnosis type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L52-L58 type Diagnosis struct { Action string `json:"action"` AffectedResources DiagnosisAffectedResources `json:"affected_resources"` diff --git a/typedapi/types/diagnosisaffectedresources.go b/typedapi/types/diagnosisaffectedresources.go index aa28c340f0..e4f0f8af3e 100644 --- a/typedapi/types/diagnosisaffectedresources.go +++ b/typedapi/types/diagnosisaffectedresources.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DiagnosisAffectedResources type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L60-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L60-L66 type DiagnosisAffectedResources struct { FeatureStates []string `json:"feature_states,omitempty"` Indices []string `json:"indices,omitempty"` diff --git a/typedapi/types/dictionarydecompoundertokenfilter.go b/typedapi/types/dictionarydecompoundertokenfilter.go index 153f2d96f1..5992b914dc 100644 --- a/typedapi/types/dictionarydecompoundertokenfilter.go +++ b/typedapi/types/dictionarydecompoundertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DictionaryDecompounderTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L63-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L67-L69 type DictionaryDecompounderTokenFilter struct { // MaxSubwordSize Maximum subword character length. Longer subword tokens are excluded from the // output. Defaults to `15`. diff --git a/typedapi/types/dip.go b/typedapi/types/dip.go new file mode 100644 index 0000000000..503179df87 --- /dev/null +++ b/typedapi/types/dip.go @@ -0,0 +1,97 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// Dip type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L417-L417 +type Dip struct { + ChangePoint int `json:"change_point"` + PValue Float64 `json:"p_value"` +} + +func (s *Dip) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "change_point": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ChangePoint", err) + } + s.ChangePoint = value + case float64: + f := int(v) + s.ChangePoint = f + } + + case "p_value": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "PValue", err) + } + f := Float64(value) + s.PValue = f + case float64: + f := Float64(v) + s.PValue = f + } + + } + } + return nil +} + +// NewDip returns a Dip. +func NewDip() *Dip { + r := &Dip{} + + return r +} diff --git a/typedapi/types/directgenerator.go b/typedapi/types/directgenerator.go index 3eb245d4fc..de0bac2f4b 100644 --- a/typedapi/types/directgenerator.go +++ b/typedapi/types/directgenerator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DirectGenerator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L269-L332 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L270-L333 type DirectGenerator struct { // Field The field to fetch the candidate suggestions from. // Needs to be set globally or per suggestion. diff --git a/typedapi/types/discovery.go b/typedapi/types/discovery.go index 18df3c229f..c86c25c1d3 100644 --- a/typedapi/types/discovery.go +++ b/typedapi/types/discovery.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Discovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L203-L221 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L203-L221 type Discovery struct { ClusterApplierStats *ClusterAppliedStats `json:"cluster_applier_stats,omitempty"` // ClusterStateQueue Contains statistics for the cluster state queue of the node. diff --git a/typedapi/types/discoverynode.go b/typedapi/types/discoverynode.go index 749f47b9fd..b55dd4ccc2 100644 --- a/typedapi/types/discoverynode.go +++ b/typedapi/types/discoverynode.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DiscoveryNode type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DiscoveryNode.ts#L25-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DiscoveryNode.ts#L25-L25 type DiscoveryNode map[string]DiscoveryNodeContent diff --git a/typedapi/types/discoverynodecompact.go b/typedapi/types/discoverynodecompact.go index d2c79241b0..a266be4e0f 100644 --- a/typedapi/types/discoverynodecompact.go +++ b/typedapi/types/discoverynodecompact.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DiscoveryNodeCompact type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DiscoveryNode.ts#L39-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DiscoveryNode.ts#L39-L48 type DiscoveryNodeCompact struct { Attributes map[string]string `json:"attributes"` EphemeralId string `json:"ephemeral_id"` diff --git a/typedapi/types/discoverynodecontent.go b/typedapi/types/discoverynodecontent.go index b1277c0ea3..12fb45efb7 100644 --- a/typedapi/types/discoverynodecontent.go +++ b/typedapi/types/discoverynodecontent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DiscoveryNodeContent type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DiscoveryNode.ts#L27-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DiscoveryNode.ts#L27-L37 type DiscoveryNodeContent struct { Attributes map[string]string `json:"attributes"` EphemeralId string `json:"ephemeral_id"` diff --git a/typedapi/types/diskindicator.go b/typedapi/types/diskindicator.go index 5ee18df410..a6d979ba55 100644 --- a/typedapi/types/diskindicator.go +++ b/typedapi/types/diskindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DiskIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L125-L129 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L125-L129 type DiskIndicator struct { Details *DiskIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/diskindicatordetails.go b/typedapi/types/diskindicatordetails.go index 3ff0b40906..7aadd77f49 100644 --- a/typedapi/types/diskindicatordetails.go +++ b/typedapi/types/diskindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DiskIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L130-L136 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L130-L136 type DiskIndicatorDetails struct { IndicesWithReadonlyBlock int64 `json:"indices_with_readonly_block"` NodesOverFloodStageWatermark int64 `json:"nodes_over_flood_stage_watermark"` diff --git a/typedapi/types/diskusage.go b/typedapi/types/diskusage.go index 877e5ff301..bd01893166 100644 --- a/typedapi/types/diskusage.go +++ b/typedapi/types/diskusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DiskUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L63-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L63-L70 type DiskUsage struct { FreeBytes int64 `json:"free_bytes"` FreeDiskPercent Float64 `json:"free_disk_percent"` diff --git a/typedapi/types/dismaxquery.go b/typedapi/types/dismaxquery.go index 4af8f31cf9..3707b5fd99 100644 --- a/typedapi/types/dismaxquery.go +++ b/typedapi/types/dismaxquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DisMaxQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L88-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L88-L103 type DisMaxQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/dissectprocessor.go b/typedapi/types/dissectprocessor.go index 2ae6b89935..a2b9123a0f 100644 --- a/typedapi/types/dissectprocessor.go +++ b/typedapi/types/dissectprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DissectProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L805-L824 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L809-L828 type DissectProcessor struct { // AppendSeparator The character(s) that separate the appended fields. AppendSeparator *string `json:"append_separator,omitempty"` diff --git a/typedapi/types/distancefeaturequery.go b/typedapi/types/distancefeaturequery.go index 7b1a18ed5c..8c9a11b169 100644 --- a/typedapi/types/distancefeaturequery.go +++ b/typedapi/types/distancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ package types // GeoDistanceFeatureQuery // DateDistanceFeatureQuery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L76-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L76-L85 type DistanceFeatureQuery any type DistanceFeatureQueryVariant interface { diff --git a/typedapi/types/distributionchange.go b/typedapi/types/distributionchange.go new file mode 100644 index 0000000000..59548ff812 --- /dev/null +++ b/typedapi/types/distributionchange.go @@ -0,0 +1,97 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DistributionChange type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L419-L419 +type DistributionChange struct { + ChangePoint int `json:"change_point"` + PValue Float64 `json:"p_value"` +} + +func (s *DistributionChange) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "change_point": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ChangePoint", err) + } + s.ChangePoint = value + case float64: + f := int(v) + s.ChangePoint = f + } + + case "p_value": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "PValue", err) + } + f := Float64(value) + s.PValue = f + case float64: + f := Float64(v) + s.PValue = f + } + + } + } + return nil +} + +// NewDistributionChange returns a DistributionChange. +func NewDistributionChange() *DistributionChange { + r := &DistributionChange{} + + return r +} diff --git a/typedapi/types/diversifiedsampleraggregation.go b/typedapi/types/diversifiedsampleraggregation.go index 14db04c39b..6dd4599326 100644 --- a/typedapi/types/diversifiedsampleraggregation.go +++ b/typedapi/types/diversifiedsampleraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DiversifiedSamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L333-L357 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L336-L360 type DiversifiedSamplerAggregation struct { // ExecutionHint The type of value used for de-duplication. ExecutionHint *sampleraggregationexecutionhint.SamplerAggregationExecutionHint `json:"execution_hint,omitempty"` diff --git a/typedapi/types/docstats.go b/typedapi/types/docstats.go index 6463ec5e35..4dd7b4b82a 100644 --- a/typedapi/types/docstats.go +++ b/typedapi/types/docstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DocStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L100-L121 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L100-L121 type DocStats struct { // Count Total number of non-deleted documents across all primary shards assigned to // selected nodes. diff --git a/typedapi/types/document.go b/typedapi/types/document.go index 7291180c9b..2b68557f32 100644 --- a/typedapi/types/document.go +++ b/typedapi/types/document.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Document type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Simulation.ts#L69-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Simulation.ts#L69-L83 type Document struct { // Id_ Unique identifier for the document. // This ID must be unique within the `_index`. diff --git a/typedapi/types/documentrating.go b/typedapi/types/documentrating.go index f78e8e686c..d691ace734 100644 --- a/typedapi/types/documentrating.go +++ b/typedapi/types/documentrating.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DocumentRating type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L119-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L119-L126 type DocumentRating struct { // Id_ The document ID. Id_ string `json:"_id"` diff --git a/typedapi/types/documentsimulation.go b/typedapi/types/documentsimulation.go index b8e27228e2..eb24da64d3 100644 --- a/typedapi/types/documentsimulation.go +++ b/typedapi/types/documentsimulation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // DocumentSimulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Simulation.ts#L85-L115 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Simulation.ts#L85-L115 type DocumentSimulation struct { DocumentSimulation map[string]string `json:"-"` // Id_ Unique identifier for the document. This ID must be unique within the diff --git a/typedapi/types/dotexpanderprocessor.go b/typedapi/types/dotexpanderprocessor.go index d47e655ab1..e77144123c 100644 --- a/typedapi/types/dotexpanderprocessor.go +++ b/typedapi/types/dotexpanderprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DotExpanderProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L826-L844 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L830-L848 type DotExpanderProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/doublenumberproperty.go b/typedapi/types/doublenumberproperty.go index 463be2e484..8342fb5720 100644 --- a/typedapi/types/doublenumberproperty.go +++ b/typedapi/types/doublenumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // DoubleNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L167-L170 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L168-L171 type DoubleNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/doublerangeproperty.go b/typedapi/types/doublerangeproperty.go index 7404baa4bf..39ec6da1b5 100644 --- a/typedapi/types/doublerangeproperty.go +++ b/typedapi/types/doublerangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // DoubleRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/range.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/range.ts#L34-L36 type DoubleRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/doubletermsaggregate.go b/typedapi/types/doubletermsaggregate.go index fa6d5715c1..5f2ba19ebb 100644 --- a/typedapi/types/doubletermsaggregate.go +++ b/typedapi/types/doubletermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DoubleTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L451-L456 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L523-L528 type DoubleTermsAggregate struct { Buckets BucketsDoubleTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/doubletermsbucket.go b/typedapi/types/doubletermsbucket.go index 9f231d5123..18f07022a1 100644 --- a/typedapi/types/doubletermsbucket.go +++ b/typedapi/types/doubletermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // DoubleTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L458-L461 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L530-L533 type DoubleTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -237,6 +237,13 @@ func (s *DoubleTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -265,6 +272,20 @@ func (s *DoubleTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/downsampleaction.go b/typedapi/types/downsampleaction.go index 5f653c3a82..5c90aeb2f6 100644 --- a/typedapi/types/downsampleaction.go +++ b/typedapi/types/downsampleaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DownsampleAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L112-L115 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L115-L118 type DownsampleAction struct { FixedInterval string `json:"fixed_interval"` WaitTimeout Duration `json:"wait_timeout,omitempty"` diff --git a/typedapi/types/downsampleconfig.go b/typedapi/types/downsampleconfig.go index 12148a01ec..3e93b6825f 100644 --- a/typedapi/types/downsampleconfig.go +++ b/typedapi/types/downsampleconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,14 +26,19 @@ import ( "errors" "fmt" "io" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/samplingmethod" ) // DownsampleConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/Downsample.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/Downsample.ts#L22-L31 type DownsampleConfig struct { // FixedInterval The interval at which to aggregate the original time series index. FixedInterval string `json:"fixed_interval"` + // SamplingMethod The sampling method used to reduce the documents; it can be either + // `aggregate` or `last_value`. Defaults to `aggregate`. + SamplingMethod *samplingmethod.SamplingMethod `json:"sampling_method,omitempty"` } func (s *DownsampleConfig) UnmarshalJSON(data []byte) error { @@ -56,6 +61,11 @@ func (s *DownsampleConfig) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "FixedInterval", err) } + case "sampling_method": + if err := dec.Decode(&s.SamplingMethod); err != nil { + return fmt.Errorf("%s | %w", "SamplingMethod", err) + } + } } return nil diff --git a/typedapi/types/downsamplinground.go b/typedapi/types/downsamplinground.go index 562fffb859..09c167219e 100644 --- a/typedapi/types/downsamplinground.go +++ b/typedapi/types/downsamplinground.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,12 +30,12 @@ import ( // DownsamplingRound type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DownsamplingRound.ts#L23-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DownsamplingRound.ts#L22-L31 type DownsamplingRound struct { // After The duration since rollover when this downsampling round should execute After Duration `json:"after"` - // Config The downsample configuration to execute. - Config DownsampleConfig `json:"config"` + // FixedInterval The downsample interval. + FixedInterval string `json:"fixed_interval"` } func (s *DownsamplingRound) UnmarshalJSON(data []byte) error { @@ -58,9 +58,9 @@ func (s *DownsamplingRound) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "After", err) } - case "config": - if err := dec.Decode(&s.Config); err != nil { - return fmt.Errorf("%s | %w", "Config", err) + case "fixed_interval": + if err := dec.Decode(&s.FixedInterval); err != nil { + return fmt.Errorf("%s | %w", "FixedInterval", err) } } diff --git a/typedapi/types/dropprocessor.go b/typedapi/types/dropprocessor.go index 5aa519ede3..a13ebda745 100644 --- a/typedapi/types/dropprocessor.go +++ b/typedapi/types/dropprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DropProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L846-L846 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L850-L850 type DropProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/duration.go b/typedapi/types/duration.go index 123080c23a..9347195866 100644 --- a/typedapi/types/duration.go +++ b/typedapi/types/duration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -24,7 +24,7 @@ package types // // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Time.ts#L52-L59 type Duration any type DurationVariant interface { diff --git a/typedapi/types/durationvalueunitfloatmillis.go b/typedapi/types/durationvalueunitfloatmillis.go index 1343045791..56314cb532 100644 --- a/typedapi/types/durationvalueunitfloatmillis.go +++ b/typedapi/types/durationvalueunitfloatmillis.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DurationValueUnitFloatMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Time.ts#L68-L68 type DurationValueUnitFloatMillis Float64 diff --git a/typedapi/types/durationvalueunitmillis.go b/typedapi/types/durationvalueunitmillis.go index 08cf00e365..6c57ec7888 100644 --- a/typedapi/types/durationvalueunitmillis.go +++ b/typedapi/types/durationvalueunitmillis.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DurationValueUnitMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Time.ts#L68-L68 type DurationValueUnitMillis int64 type DurationValueUnitMillisVariant interface { diff --git a/typedapi/types/durationvalueunitnanos.go b/typedapi/types/durationvalueunitnanos.go index aee73de883..0212151997 100644 --- a/typedapi/types/durationvalueunitnanos.go +++ b/typedapi/types/durationvalueunitnanos.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DurationValueUnitNanos type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Time.ts#L68-L68 type DurationValueUnitNanos int64 diff --git a/typedapi/types/durationvalueunitseconds.go b/typedapi/types/durationvalueunitseconds.go index 45bc05691f..f13272b476 100644 --- a/typedapi/types/durationvalueunitseconds.go +++ b/typedapi/types/durationvalueunitseconds.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // DurationValueUnitSeconds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Time.ts#L68-L68 type DurationValueUnitSeconds int64 diff --git a/typedapi/types/dutchanalyzer.go b/typedapi/types/dutchanalyzer.go index 059ad7677d..25c0d71105 100644 --- a/typedapi/types/dutchanalyzer.go +++ b/typedapi/types/dutchanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // DutchAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L145-L150 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L145-L150 type DutchAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/dutchstemtokenfilter.go b/typedapi/types/dutchstemtokenfilter.go index ab5529248a..2cfd057b29 100644 --- a/typedapi/types/dutchstemtokenfilter.go +++ b/typedapi/types/dutchstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // DutchStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L559-L561 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L596-L598 type DutchStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/dynamicproperty.go b/typedapi/types/dynamicproperty.go index ef551e6713..c179419817 100644 --- a/typedapi/types/dynamicproperty.go +++ b/typedapi/types/dynamicproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -38,7 +38,7 @@ import ( // DynamicProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L353-L384 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L366-L397 type DynamicProperty struct { Analyzer *string `json:"analyzer,omitempty"` Boost *Float64 `json:"boost,omitempty"` diff --git a/typedapi/types/dynamictemplate.go b/typedapi/types/dynamictemplate.go index b9b27d9a18..3f1cc2e44b 100644 --- a/typedapi/types/dynamictemplate.go +++ b/typedapi/types/dynamictemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,18 +32,17 @@ import ( // DynamicTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/dynamic-template.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/dynamic-template.ts#L23-L43 type DynamicTemplate struct { - AdditionalDynamicTemplateProperty map[string]json.RawMessage `json:"-"` - Mapping Property `json:"mapping,omitempty"` - Match []string `json:"match,omitempty"` - MatchMappingType []string `json:"match_mapping_type,omitempty"` - MatchPattern *matchtype.MatchType `json:"match_pattern,omitempty"` - PathMatch []string `json:"path_match,omitempty"` - PathUnmatch []string `json:"path_unmatch,omitempty"` - Runtime *RuntimeField `json:"runtime,omitempty"` - Unmatch []string `json:"unmatch,omitempty"` - UnmatchMappingType []string `json:"unmatch_mapping_type,omitempty"` + Mapping Property `json:"mapping,omitempty"` + Match []string `json:"match,omitempty"` + MatchMappingType []string `json:"match_mapping_type,omitempty"` + MatchPattern *matchtype.MatchType `json:"match_pattern,omitempty"` + PathMatch []string `json:"path_match,omitempty"` + PathUnmatch []string `json:"path_unmatch,omitempty"` + Runtime *RuntimeField `json:"runtime,omitempty"` + Unmatch []string `json:"unmatch,omitempty"` + UnmatchMappingType []string `json:"unmatch_mapping_type,omitempty"` } func (s *DynamicTemplate) UnmarshalJSON(data []byte) error { @@ -499,58 +498,14 @@ func (s *DynamicTemplate) UnmarshalJSON(data []byte) error { } } - default: - - if key, ok := t.(string); ok { - if s.AdditionalDynamicTemplateProperty == nil { - s.AdditionalDynamicTemplateProperty = make(map[string]json.RawMessage, 0) - } - raw := new(json.RawMessage) - if err := dec.Decode(&raw); err != nil { - return fmt.Errorf("%s | %w", "AdditionalDynamicTemplateProperty", err) - } - s.AdditionalDynamicTemplateProperty[key] = *raw - } - } } return nil } -// MarhsalJSON overrides marshalling for types with additional properties -func (s DynamicTemplate) MarshalJSON() ([]byte, error) { - type opt DynamicTemplate - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalDynamicTemplateProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalDynamicTemplateProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewDynamicTemplate returns a DynamicTemplate. func NewDynamicTemplate() *DynamicTemplate { - r := &DynamicTemplate{ - AdditionalDynamicTemplateProperty: make(map[string]json.RawMessage), - } + r := &DynamicTemplate{} return r } diff --git a/typedapi/types/edgengramtokenfilter.go b/typedapi/types/edgengramtokenfilter.go index 73ad4966eb..a44542c436 100644 --- a/typedapi/types/edgengramtokenfilter.go +++ b/typedapi/types/edgengramtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // EdgeNGramTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L97-L107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L103-L113 type EdgeNGramTokenFilter struct { // MaxGram Maximum character length of a gram. For custom token filters, defaults to // `2`. For the built-in edge_ngram filter, defaults to `1`. diff --git a/typedapi/types/edgengramtokenizer.go b/typedapi/types/edgengramtokenizer.go index c218eb5b5c..5bdb9c9192 100644 --- a/typedapi/types/edgengramtokenizer.go +++ b/typedapi/types/edgengramtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // EdgeNGramTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L48-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L48-L58 type EdgeNGramTokenizer struct { CustomTokenChars *string `json:"custom_token_chars,omitempty"` MaxGram *int `json:"max_gram,omitempty"` diff --git a/typedapi/types/elasticsearchservicesettings.go b/typedapi/types/elasticsearchservicesettings.go index 7b7353d7c2..640fe4d57a 100644 --- a/typedapi/types/elasticsearchservicesettings.go +++ b/typedapi/types/elasticsearchservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ElasticsearchServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1215-L1249 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1298-L1354 type ElasticsearchServiceSettings struct { // AdaptiveAllocations Adaptive allocations configuration details. // If `enabled` is true, the number of allocations of the model is set based on @@ -45,6 +45,23 @@ type ElasticsearchServiceSettings struct { // DeploymentId The deployment identifier for a trained model deployment. // When `deployment_id` is used the `model_id` is optional. DeploymentId *string `json:"deployment_id,omitempty"` + // LongDocumentStrategy Available only for the `rerank` task type using the Elastic reranker model. + // Controls the strategy used for processing long documents during inference. + // + // Possible values: + // - `truncate` (default): Processes only the beginning of each document. + // - `chunk`: Splits long documents into smaller parts (chunks) before + // inference. + // + // When `long_document_strategy` is set to `chunk`, Elasticsearch splits each + // document into smaller parts but still returns a single score per document. + // That score reflects the highest relevance score among all chunks. + LongDocumentStrategy *string `json:"long_document_strategy,omitempty"` + // MaxChunksPerDoc Only for the `rerank` task type. + // Limits the number of chunks per document that are sent for inference when + // chunking is enabled. + // If not set, all chunks generated for the document are processed. + MaxChunksPerDoc *int `json:"max_chunks_per_doc,omitempty"` // ModelId The name of the model to use for the inference task. // It can be the ID of a built-in model (for example, `.multilingual-e5-small` // for E5) or a text embedding model that was uploaded by using the Eland @@ -97,6 +114,34 @@ func (s *ElasticsearchServiceSettings) UnmarshalJSON(data []byte) error { } s.DeploymentId = &o + case "long_document_strategy": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "LongDocumentStrategy", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.LongDocumentStrategy = &o + + case "max_chunks_per_doc": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "MaxChunksPerDoc", err) + } + s.MaxChunksPerDoc = &value + case float64: + f := int(v) + s.MaxChunksPerDoc = &f + } + case "model_id": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/elasticsearchtasksettings.go b/typedapi/types/elasticsearchtasksettings.go index ebb7c9c57a..0ac1017135 100644 --- a/typedapi/types/elasticsearchtasksettings.go +++ b/typedapi/types/elasticsearchtasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ElasticsearchTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1251-L1257 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1356-L1362 type ElasticsearchTaskSettings struct { // ReturnDocuments For a `rerank` task, return the document instead of only the index. ReturnDocuments *bool `json:"return_documents,omitempty"` diff --git a/typedapi/types/elasticsearchversioninfo.go b/typedapi/types/elasticsearchversioninfo.go index 8266d097a7..1eca8dd339 100644 --- a/typedapi/types/elasticsearchversioninfo.go +++ b/typedapi/types/elasticsearchversioninfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ElasticsearchVersionInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Base.ts#L76-L118 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Base.ts#L81-L123 type ElasticsearchVersionInfo struct { // BuildDate The Elasticsearch Git commit's date. BuildDate DateTime `json:"build_date"` diff --git a/typedapi/types/elasticsearchversionmininfo.go b/typedapi/types/elasticsearchversionmininfo.go index b7f9a666a3..a28942e425 100644 --- a/typedapi/types/elasticsearchversionmininfo.go +++ b/typedapi/types/elasticsearchversionmininfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ElasticsearchVersionMinInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Base.ts#L120-L128 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Base.ts#L125-L133 type ElasticsearchVersionMinInfo struct { BuildFlavor string `json:"build_flavor"` Int string `json:"number"` diff --git a/typedapi/types/elisiontokenfilter.go b/typedapi/types/elisiontokenfilter.go index ddbc139628..da3ea51b01 100644 --- a/typedapi/types/elisiontokenfilter.go +++ b/typedapi/types/elisiontokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ElisionTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L245-L258 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L262-L279 type ElisionTokenFilter struct { // Articles List of elisions to remove. // To be removed, the elision must be at the beginning of a token and be diff --git a/typedapi/types/elserservicesettings.go b/typedapi/types/elserservicesettings.go index 3a55756568..61193d881b 100644 --- a/typedapi/types/elserservicesettings.go +++ b/typedapi/types/elserservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ElserServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1269-L1295 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1374-L1400 type ElserServiceSettings struct { // AdaptiveAllocations Adaptive allocations configuration details. // If `enabled` is true, the number of allocations of the model is set based on diff --git a/typedapi/types/email.go b/typedapi/types/email.go index 9fc58f6e8f..29d0149d80 100644 --- a/typedapi/types/email.go +++ b/typedapi/types/email.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // Email type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L238-L250 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L238-L250 type Email struct { Attachments map[string]EmailAttachmentContainer `json:"attachments,omitempty"` Bcc []string `json:"bcc,omitempty"` diff --git a/typedapi/types/emailaction.go b/typedapi/types/emailaction.go index 0178033abf..ad1d983fb4 100644 --- a/typedapi/types/emailaction.go +++ b/typedapi/types/emailaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // EmailAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L252-L252 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L252-L252 type EmailAction struct { Attachments map[string]EmailAttachmentContainer `json:"attachments,omitempty"` Bcc []string `json:"bcc,omitempty"` diff --git a/typedapi/types/emailattachmentcontainer.go b/typedapi/types/emailattachmentcontainer.go index bc9abb892e..0acb6880a5 100644 --- a/typedapi/types/emailattachmentcontainer.go +++ b/typedapi/types/emailattachmentcontainer.go @@ -16,59 +16,22 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // EmailAttachmentContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L211-L216 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L211-L216 type EmailAttachmentContainer struct { - AdditionalEmailAttachmentContainerProperty map[string]json.RawMessage `json:"-"` - Data *DataEmailAttachment `json:"data,omitempty"` - Http *HttpEmailAttachment `json:"http,omitempty"` - Reporting *ReportingEmailAttachment `json:"reporting,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s EmailAttachmentContainer) MarshalJSON() ([]byte, error) { - type opt EmailAttachmentContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalEmailAttachmentContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalEmailAttachmentContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + Data *DataEmailAttachment `json:"data,omitempty"` + Http *HttpEmailAttachment `json:"http,omitempty"` + Reporting *ReportingEmailAttachment `json:"reporting,omitempty"` } // NewEmailAttachmentContainer returns a EmailAttachmentContainer. func NewEmailAttachmentContainer() *EmailAttachmentContainer { - r := &EmailAttachmentContainer{ - AdditionalEmailAttachmentContainerProperty: make(map[string]json.RawMessage), - } + r := &EmailAttachmentContainer{} return r } diff --git a/typedapi/types/emailbody.go b/typedapi/types/emailbody.go index e7670671a3..bc08f74ed4 100644 --- a/typedapi/types/emailbody.go +++ b/typedapi/types/emailbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EmailBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L192-L195 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L192-L195 type EmailBody struct { Html *string `json:"html,omitempty"` Text *string `json:"text,omitempty"` diff --git a/typedapi/types/emailresult.go b/typedapi/types/emailresult.go index d077cb4ff2..fba49f3db5 100644 --- a/typedapi/types/emailresult.go +++ b/typedapi/types/emailresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EmailResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L205-L209 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L205-L209 type EmailResult struct { Account *string `json:"account,omitempty"` Message Email `json:"message"` diff --git a/typedapi/types/emptyobject.go b/typedapi/types/emptyobject.go index 92695d678a..c51ee0e96c 100644 --- a/typedapi/types/emptyobject.go +++ b/typedapi/types/emptyobject.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // EmptyObject type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L157-L158 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L152-L153 type EmptyObject struct { } diff --git a/typedapi/types/englishanalyzer.go b/typedapi/types/englishanalyzer.go index 57758592c8..8b23747726 100644 --- a/typedapi/types/englishanalyzer.go +++ b/typedapi/types/englishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EnglishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L152-L157 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L152-L157 type EnglishAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/enrichpolicy.go b/typedapi/types/enrichpolicy.go index d56a81daa1..f59450c009 100644 --- a/typedapi/types/enrichpolicy.go +++ b/typedapi/types/enrichpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EnrichPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/_types/Policy.ts#L34-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/_types/Policy.ts#L34-L41 type EnrichPolicy struct { ElasticsearchVersion *string `json:"elasticsearch_version,omitempty"` EnrichFields []string `json:"enrich_fields"` diff --git a/typedapi/types/enrichprocessor.go b/typedapi/types/enrichprocessor.go index 70050ef559..279417f0a1 100644 --- a/typedapi/types/enrichprocessor.go +++ b/typedapi/types/enrichprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // EnrichProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L848-L887 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L852-L891 type EnrichProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/ensemble.go b/typedapi/types/ensemble.go index b9e88b1ed6..d3de1e415c 100644 --- a/typedapi/types/ensemble.go +++ b/typedapi/types/ensemble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Ensemble type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L93-L99 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L93-L99 type Ensemble struct { AggregateOutput *AggregateOutput `json:"aggregate_output,omitempty"` ClassificationLabels []string `json:"classification_labels,omitempty"` diff --git a/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go b/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go index fe9bf99834..526baad57b 100644 --- a/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go +++ b/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package accesstokengranttype package accesstokengranttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_token/types.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_token/types.ts#L23-L48 type AccessTokenGrantType struct { Name string } diff --git a/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go b/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go index cfb5ab4077..c950062708 100644 --- a/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go +++ b/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package acknowledgementoptions package acknowledgementoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L103-L107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L103-L107 type AcknowledgementOptions struct { Name string } diff --git a/typedapi/types/enums/actionexecutionmode/actionexecutionmode.go b/typedapi/types/enums/actionexecutionmode/actionexecutionmode.go index a51dd87754..9f3dd694fd 100644 --- a/typedapi/types/enums/actionexecutionmode/actionexecutionmode.go +++ b/typedapi/types/enums/actionexecutionmode/actionexecutionmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package actionexecutionmode package actionexecutionmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L67-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L67-L88 type ActionExecutionMode struct { Name string } diff --git a/typedapi/types/enums/actionstatusoptions/actionstatusoptions.go b/typedapi/types/enums/actionstatusoptions/actionstatusoptions.go index f41d4ab0af..e28345faea 100644 --- a/typedapi/types/enums/actionstatusoptions/actionstatusoptions.go +++ b/typedapi/types/enums/actionstatusoptions/actionstatusoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package actionstatusoptions package actionstatusoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L96-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L96-L101 type ActionStatusOptions struct { Name string } diff --git a/typedapi/types/enums/actiontype/actiontype.go b/typedapi/types/enums/actiontype/actiontype.go index b288d64453..f69a8b3aab 100644 --- a/typedapi/types/enums/actiontype/actiontype.go +++ b/typedapi/types/enums/actiontype/actiontype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package actiontype package actiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L58-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L58-L65 type ActionType struct { Name string } diff --git a/typedapi/types/enums/ai21servicetype/ai21servicetype.go b/typedapi/types/enums/ai21servicetype/ai21servicetype.go new file mode 100644 index 0000000000..b2f700585c --- /dev/null +++ b/typedapi/types/enums/ai21servicetype/ai21servicetype.go @@ -0,0 +1,53 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package ai21servicetype +package ai21servicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L324-L326 +type Ai21ServiceType struct { + Name string +} + +var ( + Ai21 = Ai21ServiceType{"ai21"} +) + +func (a Ai21ServiceType) MarshalText() (text []byte, err error) { + return []byte(a.String()), nil +} + +func (a *Ai21ServiceType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "ai21": + *a = Ai21 + default: + *a = Ai21ServiceType{string(text)} + } + + return nil +} + +func (a Ai21ServiceType) String() string { + return a.Name +} diff --git a/typedapi/types/enums/ai21tasktype/ai21tasktype.go b/typedapi/types/enums/ai21tasktype/ai21tasktype.go new file mode 100644 index 0000000000..373bf2df1f --- /dev/null +++ b/typedapi/types/enums/ai21tasktype/ai21tasktype.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package ai21tasktype +package ai21tasktype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L319-L322 +type Ai21TaskType struct { + Name string +} + +var ( + Completion = Ai21TaskType{"completion"} + + Chatcompletion = Ai21TaskType{"chat_completion"} +) + +func (a Ai21TaskType) MarshalText() (text []byte, err error) { + return []byte(a.String()), nil +} + +func (a *Ai21TaskType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "completion": + *a = Completion + case "chat_completion": + *a = Chatcompletion + default: + *a = Ai21TaskType{string(text)} + } + + return nil +} + +func (a Ai21TaskType) String() string { + return a.Name +} diff --git a/typedapi/types/enums/alibabacloudservicetype/alibabacloudservicetype.go b/typedapi/types/enums/alibabacloudservicetype/alibabacloudservicetype.go index a29611f514..d3ac1c7aba 100644 --- a/typedapi/types/enums/alibabacloudservicetype/alibabacloudservicetype.go +++ b/typedapi/types/enums/alibabacloudservicetype/alibabacloudservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package alibabacloudservicetype package alibabacloudservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L362-L364 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L398-L400 type AlibabaCloudServiceType struct { Name string } diff --git a/typedapi/types/enums/alibabacloudtasktype/alibabacloudtasktype.go b/typedapi/types/enums/alibabacloudtasktype/alibabacloudtasktype.go index 21fca0b7a2..624f68264c 100644 --- a/typedapi/types/enums/alibabacloudtasktype/alibabacloudtasktype.go +++ b/typedapi/types/enums/alibabacloudtasktype/alibabacloudtasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package alibabacloudtasktype package alibabacloudtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L355-L360 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L391-L396 type AlibabaCloudTaskType struct { Name string } @@ -33,7 +33,7 @@ var ( Rerank = AlibabaCloudTaskType{"rerank"} - Spaceembedding = AlibabaCloudTaskType{"space_embedding"} + Sparseembedding = AlibabaCloudTaskType{"sparse_embedding"} Textembedding = AlibabaCloudTaskType{"text_embedding"} ) @@ -49,8 +49,8 @@ func (a *AlibabaCloudTaskType) UnmarshalText(text []byte) error { *a = Completion case "rerank": *a = Rerank - case "space_embedding": - *a = Spaceembedding + case "sparse_embedding": + *a = Sparseembedding case "text_embedding": *a = Textembedding default: diff --git a/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go b/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go index 998fb01fad..201e5911e0 100644 --- a/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go +++ b/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package allocationexplaindecision package allocationexplaindecision import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L33-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L33-L38 type AllocationExplainDecision struct { Name string } diff --git a/typedapi/types/enums/amazonbedrockservicetype/amazonbedrockservicetype.go b/typedapi/types/enums/amazonbedrockservicetype/amazonbedrockservicetype.go index 2bb7d2191e..da8f1f89d2 100644 --- a/typedapi/types/enums/amazonbedrockservicetype/amazonbedrockservicetype.go +++ b/typedapi/types/enums/amazonbedrockservicetype/amazonbedrockservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package amazonbedrockservicetype package amazonbedrockservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L441-L443 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L477-L479 type AmazonBedrockServiceType struct { Name string } diff --git a/typedapi/types/enums/amazonbedrocktasktype/amazonbedrocktasktype.go b/typedapi/types/enums/amazonbedrocktasktype/amazonbedrocktasktype.go index 5915d1c90d..603aacd98e 100644 --- a/typedapi/types/enums/amazonbedrocktasktype/amazonbedrocktasktype.go +++ b/typedapi/types/enums/amazonbedrocktasktype/amazonbedrocktasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package amazonbedrocktasktype package amazonbedrocktasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L436-L439 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L472-L475 type AmazonBedrockTaskType struct { Name string } diff --git a/typedapi/types/enums/amazonsagemakerapi/amazonsagemakerapi.go b/typedapi/types/enums/amazonsagemakerapi/amazonsagemakerapi.go index 9c2b6f3c67..7c78232313 100644 --- a/typedapi/types/enums/amazonsagemakerapi/amazonsagemakerapi.go +++ b/typedapi/types/enums/amazonsagemakerapi/amazonsagemakerapi.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package amazonsagemakerapi package amazonsagemakerapi import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L501-L504 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L537-L540 type AmazonSageMakerApi struct { Name string } diff --git a/typedapi/types/enums/amazonsagemakerservicetype/amazonsagemakerservicetype.go b/typedapi/types/enums/amazonsagemakerservicetype/amazonsagemakerservicetype.go index 573fa6db29..d6a7c2b4b6 100644 --- a/typedapi/types/enums/amazonsagemakerservicetype/amazonsagemakerservicetype.go +++ b/typedapi/types/enums/amazonsagemakerservicetype/amazonsagemakerservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package amazonsagemakerservicetype package amazonsagemakerservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L584-L586 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L620-L622 type AmazonSageMakerServiceType struct { Name string } diff --git a/typedapi/types/enums/anthropicservicetype/anthropicservicetype.go b/typedapi/types/enums/anthropicservicetype/anthropicservicetype.go index 4e29fb1796..8d14bc9daa 100644 --- a/typedapi/types/enums/anthropicservicetype/anthropicservicetype.go +++ b/typedapi/types/enums/anthropicservicetype/anthropicservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package anthropicservicetype package anthropicservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L637-L639 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L673-L675 type AnthropicServiceType struct { Name string } diff --git a/typedapi/types/enums/anthropictasktype/anthropictasktype.go b/typedapi/types/enums/anthropictasktype/anthropictasktype.go index 567fe533e5..172039b5f4 100644 --- a/typedapi/types/enums/anthropictasktype/anthropictasktype.go +++ b/typedapi/types/enums/anthropictasktype/anthropictasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package anthropictasktype package anthropictasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L633-L635 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L669-L671 type AnthropicTaskType struct { Name string } diff --git a/typedapi/types/enums/apikeygranttype/apikeygranttype.go b/typedapi/types/enums/apikeygranttype/apikeygranttype.go index cd45582fdd..198497f57b 100644 --- a/typedapi/types/enums/apikeygranttype/apikeygranttype.go +++ b/typedapi/types/enums/apikeygranttype/apikeygranttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package apikeygranttype package apikeygranttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/grant_api_key/types.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/grant_api_key/types.ts#L47-L50 type ApiKeyGrantType struct { Name string } diff --git a/typedapi/types/enums/apikeymanagedby/apikeymanagedby.go b/typedapi/types/enums/apikeymanagedby/apikeymanagedby.go new file mode 100644 index 0000000000..f2efaa93dc --- /dev/null +++ b/typedapi/types/enums/apikeymanagedby/apikeymanagedby.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package apikeymanagedby +package apikeymanagedby + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/ApiKey.ts#L127-L130 +type ApiKeyManagedBy struct { + Name string +} + +var ( + Cloud = ApiKeyManagedBy{"cloud"} + + Elasticsearch = ApiKeyManagedBy{"elasticsearch"} +) + +func (a ApiKeyManagedBy) MarshalText() (text []byte, err error) { + return []byte(a.String()), nil +} + +func (a *ApiKeyManagedBy) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "cloud": + *a = Cloud + case "elasticsearch": + *a = Elasticsearch + default: + *a = ApiKeyManagedBy{string(text)} + } + + return nil +} + +func (a ApiKeyManagedBy) String() string { + return a.Name +} diff --git a/typedapi/types/enums/apikeytype/apikeytype.go b/typedapi/types/enums/apikeytype/apikeytype.go index 855a7dfcb2..ef2c7cebdf 100644 --- a/typedapi/types/enums/apikeytype/apikeytype.go +++ b/typedapi/types/enums/apikeytype/apikeytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package apikeytype package apikeytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/ApiKey.ts#L115-L118 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/ApiKey.ts#L122-L125 type ApiKeyType struct { Name string } diff --git a/typedapi/types/enums/appliesto/appliesto.go b/typedapi/types/enums/appliesto/appliesto.go index 86d24a7413..1f52b3b6be 100644 --- a/typedapi/types/enums/appliesto/appliesto.go +++ b/typedapi/types/enums/appliesto/appliesto.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package appliesto package appliesto import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Rule.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Rule.ts#L67-L72 type AppliesTo struct { Name string } diff --git a/typedapi/types/enums/azureaistudioservicetype/azureaistudioservicetype.go b/typedapi/types/enums/azureaistudioservicetype/azureaistudioservicetype.go index 0be69aedf5..baef96c2de 100644 --- a/typedapi/types/enums/azureaistudioservicetype/azureaistudioservicetype.go +++ b/typedapi/types/enums/azureaistudioservicetype/azureaistudioservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package azureaistudioservicetype package azureaistudioservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L720-L722 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L766-L768 type AzureAiStudioServiceType struct { Name string } diff --git a/typedapi/types/enums/azureaistudiotasktype/azureaistudiotasktype.go b/typedapi/types/enums/azureaistudiotasktype/azureaistudiotasktype.go index 01d1baf715..4a849f9d8a 100644 --- a/typedapi/types/enums/azureaistudiotasktype/azureaistudiotasktype.go +++ b/typedapi/types/enums/azureaistudiotasktype/azureaistudiotasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package azureaistudiotasktype package azureaistudiotasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L715-L718 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L760-L764 type AzureAiStudioTaskType struct { Name string } @@ -31,6 +31,8 @@ type AzureAiStudioTaskType struct { var ( Completion = AzureAiStudioTaskType{"completion"} + Rerank = AzureAiStudioTaskType{"rerank"} + Textembedding = AzureAiStudioTaskType{"text_embedding"} ) @@ -43,6 +45,8 @@ func (a *AzureAiStudioTaskType) UnmarshalText(text []byte) error { case "completion": *a = Completion + case "rerank": + *a = Rerank case "text_embedding": *a = Textembedding default: diff --git a/typedapi/types/enums/azureopenaiservicetype/azureopenaiservicetype.go b/typedapi/types/enums/azureopenaiservicetype/azureopenaiservicetype.go index 49c6d134f9..bf99eec052 100644 --- a/typedapi/types/enums/azureopenaiservicetype/azureopenaiservicetype.go +++ b/typedapi/types/enums/azureopenaiservicetype/azureopenaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package azureopenaiservicetype package azureopenaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L784-L786 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L830-L832 type AzureOpenAIServiceType struct { Name string } diff --git a/typedapi/types/enums/azureopenaitasktype/azureopenaitasktype.go b/typedapi/types/enums/azureopenaitasktype/azureopenaitasktype.go index dbe7339ad8..805153a131 100644 --- a/typedapi/types/enums/azureopenaitasktype/azureopenaitasktype.go +++ b/typedapi/types/enums/azureopenaitasktype/azureopenaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package azureopenaitasktype package azureopenaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L779-L782 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L825-L828 type AzureOpenAITaskType struct { Name string } diff --git a/typedapi/types/enums/boundaryscanner/boundaryscanner.go b/typedapi/types/enums/boundaryscanner/boundaryscanner.go index a01808f5fe..65d43732e3 100644 --- a/typedapi/types/enums/boundaryscanner/boundaryscanner.go +++ b/typedapi/types/enums/boundaryscanner/boundaryscanner.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package boundaryscanner package boundaryscanner import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/highlighting.ts#L26-L45 type BoundaryScanner struct { Name string } diff --git a/typedapi/types/enums/bytes/bytes.go b/typedapi/types/enums/bytes/bytes.go index fbf2a7dc40..c1b28cf0fd 100644 --- a/typedapi/types/enums/bytes/bytes.go +++ b/typedapi/types/enums/bytes/bytes.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package bytes package bytes import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L166-L178 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L161-L173 type Bytes struct { Name string } diff --git a/typedapi/types/enums/calendarinterval/calendarinterval.go b/typedapi/types/enums/calendarinterval/calendarinterval.go index 5e28386de1..4d94da160a 100644 --- a/typedapi/types/enums/calendarinterval/calendarinterval.go +++ b/typedapi/types/enums/calendarinterval/calendarinterval.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package calendarinterval package calendarinterval import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L262-L279 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L265-L282 type CalendarInterval struct { Name string } diff --git a/typedapi/types/enums/cardinalityexecutionmode/cardinalityexecutionmode.go b/typedapi/types/enums/cardinalityexecutionmode/cardinalityexecutionmode.go index 5ea53cd780..56405f6079 100644 --- a/typedapi/types/enums/cardinalityexecutionmode/cardinalityexecutionmode.go +++ b/typedapi/types/enums/cardinalityexecutionmode/cardinalityexecutionmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package cardinalityexecutionmode package cardinalityexecutionmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L70-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L70-L91 type CardinalityExecutionMode struct { Name string } diff --git a/typedapi/types/enums/cataliasescolumn/cataliasescolumn.go b/typedapi/types/enums/cataliasescolumn/cataliasescolumn.go new file mode 100644 index 0000000000..7c515f4a6e --- /dev/null +++ b/typedapi/types/enums/cataliasescolumn/cataliasescolumn.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package cataliasescolumn +package cataliasescolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L1162-L1194 +type CatAliasesColumn struct { + Name string +} + +var ( + Alias = CatAliasesColumn{"alias"} + + Index = CatAliasesColumn{"index"} + + Filter = CatAliasesColumn{"filter"} + + Routingindex = CatAliasesColumn{"routing.index"} + + Routingsearch = CatAliasesColumn{"routing.search"} + + Iswriteindex = CatAliasesColumn{"is_write_index"} +) + +func (c CatAliasesColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatAliasesColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "alias": + *c = Alias + case "index": + *c = Index + case "filter": + *c = Filter + case "routing.index": + *c = Routingindex + case "routing.search": + *c = Routingsearch + case "is_write_index": + *c = Iswriteindex + default: + *c = CatAliasesColumn{string(text)} + } + + return nil +} + +func (c CatAliasesColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catallocationcolumn/catallocationcolumn.go b/typedapi/types/enums/catallocationcolumn/catallocationcolumn.go new file mode 100644 index 0000000000..7d55ce6147 --- /dev/null +++ b/typedapi/types/enums/catallocationcolumn/catallocationcolumn.go @@ -0,0 +1,101 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package catallocationcolumn +package catallocationcolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L1196-L1261 +type CatAllocationColumn struct { + Name string +} + +var ( + Shards = CatAllocationColumn{"shards"} + + Shardsundesired = CatAllocationColumn{"shards.undesired"} + + Writeloadforecast = CatAllocationColumn{"write_load.forecast"} + + Diskindicesforecast = CatAllocationColumn{"disk.indices.forecast"} + + Diskindices = CatAllocationColumn{"disk.indices"} + + Diskused = CatAllocationColumn{"disk.used"} + + Diskavail = CatAllocationColumn{"disk.avail"} + + Disktotal = CatAllocationColumn{"disk.total"} + + Diskpercent = CatAllocationColumn{"disk.percent"} + + Host = CatAllocationColumn{"host"} + + Ip = CatAllocationColumn{"ip"} + + Node = CatAllocationColumn{"node"} + + Noderole = CatAllocationColumn{"node.role"} +) + +func (c CatAllocationColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatAllocationColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "shards": + *c = Shards + case "shards.undesired": + *c = Shardsundesired + case "write_load.forecast": + *c = Writeloadforecast + case "disk.indices.forecast": + *c = Diskindicesforecast + case "disk.indices": + *c = Diskindices + case "disk.used": + *c = Diskused + case "disk.avail": + *c = Diskavail + case "disk.total": + *c = Disktotal + case "disk.percent": + *c = Diskpercent + case "host": + *c = Host + case "ip": + *c = Ip + case "node": + *c = Node + case "node.role": + *c = Noderole + default: + *c = CatAllocationColumn{string(text)} + } + + return nil +} + +func (c CatAllocationColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go b/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go index 4c73a31040..8b012584a7 100644 --- a/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go +++ b/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package catanomalydetectorcolumn package catanomalydetectorcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L32-L401 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L32-L406 type CatAnomalyDetectorColumn struct { Name string } diff --git a/typedapi/types/enums/catcomponentcolumn/catcomponentcolumn.go b/typedapi/types/enums/catcomponentcolumn/catcomponentcolumn.go new file mode 100644 index 0000000000..49ad661d8a --- /dev/null +++ b/typedapi/types/enums/catcomponentcolumn/catcomponentcolumn.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package catcomponentcolumn +package catcomponentcolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L1263-L1300 +type CatComponentColumn struct { + Name string +} + +var ( + Name = CatComponentColumn{"name"} + + Version = CatComponentColumn{"version"} + + Aliascount = CatComponentColumn{"alias_count"} + + Mappingcount = CatComponentColumn{"mapping_count"} + + Settingscount = CatComponentColumn{"settings_count"} + + Metadatacount = CatComponentColumn{"metadata_count"} + + Includedin = CatComponentColumn{"included_in"} +) + +func (c CatComponentColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatComponentColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "name": + *c = Name + case "version": + *c = Version + case "alias_count": + *c = Aliascount + case "mapping_count": + *c = Mappingcount + case "settings_count": + *c = Settingscount + case "metadata_count": + *c = Metadatacount + case "included_in": + *c = Includedin + default: + *c = CatComponentColumn{string(text)} + } + + return nil +} + +func (c CatComponentColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catcountcolumn/catcountcolumn.go b/typedapi/types/enums/catcountcolumn/catcountcolumn.go new file mode 100644 index 0000000000..df974b4e91 --- /dev/null +++ b/typedapi/types/enums/catcountcolumn/catcountcolumn.go @@ -0,0 +1,61 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package catcountcolumn +package catcountcolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L1302-L1319 +type CatCountColumn struct { + Name string +} + +var ( + Epoch = CatCountColumn{"epoch"} + + Timestamp = CatCountColumn{"timestamp"} + + Count = CatCountColumn{"count"} +) + +func (c CatCountColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatCountColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "epoch": + *c = Epoch + case "timestamp": + *c = Timestamp + case "count": + *c = Count + default: + *c = CatCountColumn{string(text)} + } + + return nil +} + +func (c CatCountColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catdatafeedcolumn/catdatafeedcolumn.go b/typedapi/types/enums/catdatafeedcolumn/catdatafeedcolumn.go index 7573760c4f..98d69d15f4 100644 --- a/typedapi/types/enums/catdatafeedcolumn/catdatafeedcolumn.go +++ b/typedapi/types/enums/catdatafeedcolumn/catdatafeedcolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package catdatafeedcolumn package catdatafeedcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L405-L471 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L410-L478 type CatDatafeedColumn struct { Name string } diff --git a/typedapi/types/enums/catdfacolumn/catdfacolumn.go b/typedapi/types/enums/catdfacolumn/catdfacolumn.go index 17a40669db..eba36ff6cd 100644 --- a/typedapi/types/enums/catdfacolumn/catdfacolumn.go +++ b/typedapi/types/enums/catdfacolumn/catdfacolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package catdfacolumn package catdfacolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L473-L558 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L480-L565 type CatDfaColumn struct { Name string } diff --git a/typedapi/types/enums/categorizationstatus/categorizationstatus.go b/typedapi/types/enums/categorizationstatus/categorizationstatus.go index e6be89abec..055da66dec 100644 --- a/typedapi/types/enums/categorizationstatus/categorizationstatus.go +++ b/typedapi/types/enums/categorizationstatus/categorizationstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package categorizationstatus package categorizationstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Model.ts#L84-L87 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Model.ts#L84-L87 type CategorizationStatus struct { Name string } diff --git a/typedapi/types/enums/catfielddatacolumn/catfielddatacolumn.go b/typedapi/types/enums/catfielddatacolumn/catfielddatacolumn.go new file mode 100644 index 0000000000..6adb3fc95d --- /dev/null +++ b/typedapi/types/enums/catfielddatacolumn/catfielddatacolumn.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package catfielddatacolumn +package catfielddatacolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L1321-L1351 +type CatFieldDataColumn struct { + Name string +} + +var ( + Id = CatFieldDataColumn{"id"} + + Host = CatFieldDataColumn{"host"} + + Ip = CatFieldDataColumn{"ip"} + + Node = CatFieldDataColumn{"node"} + + Field = CatFieldDataColumn{"field"} + + Size = CatFieldDataColumn{"size"} +) + +func (c CatFieldDataColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatFieldDataColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "id": + *c = Id + case "host": + *c = Host + case "ip": + *c = Ip + case "node": + *c = Node + case "field": + *c = Field + case "size": + *c = Size + default: + *c = CatFieldDataColumn{string(text)} + } + + return nil +} + +func (c CatFieldDataColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/cathealthcolumn/cathealthcolumn.go b/typedapi/types/enums/cathealthcolumn/cathealthcolumn.go new file mode 100644 index 0000000000..fbeb63eb16 --- /dev/null +++ b/typedapi/types/enums/cathealthcolumn/cathealthcolumn.go @@ -0,0 +1,109 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package cathealthcolumn +package cathealthcolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L1353-L1430 +type CatHealthColumn struct { + Name string +} + +var ( + Epoch = CatHealthColumn{"epoch"} + + Timestamp = CatHealthColumn{"timestamp"} + + Cluster = CatHealthColumn{"cluster"} + + Status = CatHealthColumn{"status"} + + Nodetotal = CatHealthColumn{"node.total"} + + Nodedata = CatHealthColumn{"node.data"} + + Shards = CatHealthColumn{"shards"} + + Pri = CatHealthColumn{"pri"} + + Relo = CatHealthColumn{"relo"} + + Init = CatHealthColumn{"init"} + + Unassign = CatHealthColumn{"unassign"} + + Unassignpri = CatHealthColumn{"unassign.pri"} + + Pendingtasks = CatHealthColumn{"pending_tasks"} + + Maxtaskwaittime = CatHealthColumn{"max_task_wait_time"} + + Activeshardspercent = CatHealthColumn{"active_shards_percent"} +) + +func (c CatHealthColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatHealthColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "epoch": + *c = Epoch + case "timestamp": + *c = Timestamp + case "cluster": + *c = Cluster + case "status": + *c = Status + case "node.total": + *c = Nodetotal + case "node.data": + *c = Nodedata + case "shards": + *c = Shards + case "pri": + *c = Pri + case "relo": + *c = Relo + case "init": + *c = Init + case "unassign": + *c = Unassign + case "unassign.pri": + *c = Unassignpri + case "pending_tasks": + *c = Pendingtasks + case "max_task_wait_time": + *c = Maxtaskwaittime + case "active_shards_percent": + *c = Activeshardspercent + default: + *c = CatHealthColumn{string(text)} + } + + return nil +} + +func (c CatHealthColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catindicescolumn/catindicescolumn.go b/typedapi/types/enums/catindicescolumn/catindicescolumn.go new file mode 100644 index 0000000000..f6a66844bf --- /dev/null +++ b/typedapi/types/enums/catindicescolumn/catindicescolumn.go @@ -0,0 +1,637 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package catindicescolumn +package catindicescolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L1432-L2100 +type CatIndicesColumn struct { + Name string +} + +var ( + Health = CatIndicesColumn{"health"} + + Status = CatIndicesColumn{"status"} + + Index = CatIndicesColumn{"index"} + + Uuid = CatIndicesColumn{"uuid"} + + Pri = CatIndicesColumn{"pri"} + + Rep = CatIndicesColumn{"rep"} + + Docscount = CatIndicesColumn{"docs.count"} + + Docsdeleted = CatIndicesColumn{"docs.deleted"} + + Creationdate = CatIndicesColumn{"creation.date"} + + Creationdatestring = CatIndicesColumn{"creation.date.string"} + + Storesize = CatIndicesColumn{"store.size"} + + Pristoresize = CatIndicesColumn{"pri.store.size"} + + Datasetsize = CatIndicesColumn{"dataset.size"} + + Completionsize = CatIndicesColumn{"completion.size"} + + Pricompletionsize = CatIndicesColumn{"pri.completion.size"} + + Fielddatamemorysize = CatIndicesColumn{"fielddata.memory_size"} + + Prifielddatamemorysize = CatIndicesColumn{"pri.fielddata.memory_size"} + + Fielddataevictions = CatIndicesColumn{"fielddata.evictions"} + + Prifielddataevictions = CatIndicesColumn{"pri.fielddata.evictions"} + + Querycachememorysize = CatIndicesColumn{"query_cache.memory_size"} + + Priquerycachememorysize = CatIndicesColumn{"pri.query_cache.memory_size"} + + Querycacheevictions = CatIndicesColumn{"query_cache.evictions"} + + Priquerycacheevictions = CatIndicesColumn{"pri.query_cache.evictions"} + + Requestcachememorysize = CatIndicesColumn{"request_cache.memory_size"} + + Prirequestcachememorysize = CatIndicesColumn{"pri.request_cache.memory_size"} + + Requestcacheevictions = CatIndicesColumn{"request_cache.evictions"} + + Prirequestcacheevictions = CatIndicesColumn{"pri.request_cache.evictions"} + + Requestcachehitcount = CatIndicesColumn{"request_cache.hit_count"} + + Prirequestcachehitcount = CatIndicesColumn{"pri.request_cache.hit_count"} + + Requestcachemisscount = CatIndicesColumn{"request_cache.miss_count"} + + Prirequestcachemisscount = CatIndicesColumn{"pri.request_cache.miss_count"} + + Flushtotal = CatIndicesColumn{"flush.total"} + + Priflushtotal = CatIndicesColumn{"pri.flush.total"} + + Flushtotaltime = CatIndicesColumn{"flush.total_time"} + + Priflushtotaltime = CatIndicesColumn{"pri.flush.total_time"} + + Getcurrent = CatIndicesColumn{"get.current"} + + Prigetcurrent = CatIndicesColumn{"pri.get.current"} + + Gettime = CatIndicesColumn{"get.time"} + + Prigettime = CatIndicesColumn{"pri.get.time"} + + Gettotal = CatIndicesColumn{"get.total"} + + Prigettotal = CatIndicesColumn{"pri.get.total"} + + Getexiststime = CatIndicesColumn{"get.exists_time"} + + Prigetexiststime = CatIndicesColumn{"pri.get.exists_time"} + + Getexiststotal = CatIndicesColumn{"get.exists_total"} + + Prigetexiststotal = CatIndicesColumn{"pri.get.exists_total"} + + Getmissingtime = CatIndicesColumn{"get.missing_time"} + + Prigetmissingtime = CatIndicesColumn{"pri.get.missing_time"} + + Getmissingtotal = CatIndicesColumn{"get.missing_total"} + + Prigetmissingtotal = CatIndicesColumn{"pri.get.missing_total"} + + Indexingdeletecurrent = CatIndicesColumn{"indexing.delete_current"} + + Priindexingdeletecurrent = CatIndicesColumn{"pri.indexing.delete_current"} + + Indexingdeletetime = CatIndicesColumn{"indexing.delete_time"} + + Priindexingdeletetime = CatIndicesColumn{"pri.indexing.delete_time"} + + Indexingdeletetotal = CatIndicesColumn{"indexing.delete_total"} + + Priindexingdeletetotal = CatIndicesColumn{"pri.indexing.delete_total"} + + Indexingindexcurrent = CatIndicesColumn{"indexing.index_current"} + + Priindexingindexcurrent = CatIndicesColumn{"pri.indexing.index_current"} + + Indexingindextime = CatIndicesColumn{"indexing.index_time"} + + Priindexingindextime = CatIndicesColumn{"pri.indexing.index_time"} + + Indexingindextotal = CatIndicesColumn{"indexing.index_total"} + + Priindexingindextotal = CatIndicesColumn{"pri.indexing.index_total"} + + Indexingindexfailed = CatIndicesColumn{"indexing.index_failed"} + + Priindexingindexfailed = CatIndicesColumn{"pri.indexing.index_failed"} + + Indexingindexfailedduetoversionconflict = CatIndicesColumn{"indexing.index_failed_due_to_version_conflict"} + + Priindexingindexfailedduetoversionconflict = CatIndicesColumn{"pri.indexing.index_failed_due_to_version_conflict"} + + Mergescurrent = CatIndicesColumn{"merges.current"} + + Primergescurrent = CatIndicesColumn{"pri.merges.current"} + + Mergescurrentdocs = CatIndicesColumn{"merges.current_docs"} + + Primergescurrentdocs = CatIndicesColumn{"pri.merges.current_docs"} + + Mergescurrentsize = CatIndicesColumn{"merges.current_size"} + + Primergescurrentsize = CatIndicesColumn{"pri.merges.current_size"} + + Mergestotal = CatIndicesColumn{"merges.total"} + + Primergestotal = CatIndicesColumn{"pri.merges.total"} + + Mergestotaldocs = CatIndicesColumn{"merges.total_docs"} + + Primergestotaldocs = CatIndicesColumn{"pri.merges.total_docs"} + + Mergestotalsize = CatIndicesColumn{"merges.total_size"} + + Primergestotalsize = CatIndicesColumn{"pri.merges.total_size"} + + Mergestotaltime = CatIndicesColumn{"merges.total_time"} + + Primergestotaltime = CatIndicesColumn{"pri.merges.total_time"} + + Refreshtotal = CatIndicesColumn{"refresh.total"} + + Prirefreshtotal = CatIndicesColumn{"pri.refresh.total"} + + Refreshtime = CatIndicesColumn{"refresh.time"} + + Prirefreshtime = CatIndicesColumn{"pri.refresh.time"} + + Refreshexternaltotal = CatIndicesColumn{"refresh.external_total"} + + Prirefreshexternaltotal = CatIndicesColumn{"pri.refresh.external_total"} + + Refreshexternaltime = CatIndicesColumn{"refresh.external_time"} + + Prirefreshexternaltime = CatIndicesColumn{"pri.refresh.external_time"} + + Refreshlisteners = CatIndicesColumn{"refresh.listeners"} + + Prirefreshlisteners = CatIndicesColumn{"pri.refresh.listeners"} + + Searchfetchcurrent = CatIndicesColumn{"search.fetch_current"} + + Prisearchfetchcurrent = CatIndicesColumn{"pri.search.fetch_current"} + + Searchfetchtime = CatIndicesColumn{"search.fetch_time"} + + Prisearchfetchtime = CatIndicesColumn{"pri.search.fetch_time"} + + Searchfetchtotal = CatIndicesColumn{"search.fetch_total"} + + Prisearchfetchtotal = CatIndicesColumn{"pri.search.fetch_total"} + + Searchopencontexts = CatIndicesColumn{"search.open_contexts"} + + Prisearchopencontexts = CatIndicesColumn{"pri.search.open_contexts"} + + Searchquerycurrent = CatIndicesColumn{"search.query_current"} + + Prisearchquerycurrent = CatIndicesColumn{"pri.search.query_current"} + + Searchquerytime = CatIndicesColumn{"search.query_time"} + + Prisearchquerytime = CatIndicesColumn{"pri.search.query_time"} + + Searchquerytotal = CatIndicesColumn{"search.query_total"} + + Prisearchquerytotal = CatIndicesColumn{"pri.search.query_total"} + + Searchscrollcurrent = CatIndicesColumn{"search.scroll_current"} + + Prisearchscrollcurrent = CatIndicesColumn{"pri.search.scroll_current"} + + Searchscrolltime = CatIndicesColumn{"search.scroll_time"} + + Prisearchscrolltime = CatIndicesColumn{"pri.search.scroll_time"} + + Searchscrolltotal = CatIndicesColumn{"search.scroll_total"} + + Prisearchscrolltotal = CatIndicesColumn{"pri.search.scroll_total"} + + Segmentscount = CatIndicesColumn{"segments.count"} + + Prisegmentscount = CatIndicesColumn{"pri.segments.count"} + + Segmentsmemory = CatIndicesColumn{"segments.memory"} + + Prisegmentsmemory = CatIndicesColumn{"pri.segments.memory"} + + Segmentsindexwritermemory = CatIndicesColumn{"segments.index_writer_memory"} + + Prisegmentsindexwritermemory = CatIndicesColumn{"pri.segments.index_writer_memory"} + + Segmentsversionmapmemory = CatIndicesColumn{"segments.version_map_memory"} + + Prisegmentsversionmapmemory = CatIndicesColumn{"pri.segments.version_map_memory"} + + Segmentsfixedbitsetmemory = CatIndicesColumn{"segments.fixed_bitset_memory"} + + Prisegmentsfixedbitsetmemory = CatIndicesColumn{"pri.segments.fixed_bitset_memory"} + + Warmercurrent = CatIndicesColumn{"warmer.current"} + + Priwarmercurrent = CatIndicesColumn{"pri.warmer.current"} + + Warmertotal = CatIndicesColumn{"warmer.total"} + + Priwarmertotal = CatIndicesColumn{"pri.warmer.total"} + + Warmertotaltime = CatIndicesColumn{"warmer.total_time"} + + Priwarmertotaltime = CatIndicesColumn{"pri.warmer.total_time"} + + Suggestcurrent = CatIndicesColumn{"suggest.current"} + + Prisuggestcurrent = CatIndicesColumn{"pri.suggest.current"} + + Suggesttime = CatIndicesColumn{"suggest.time"} + + Prisuggesttime = CatIndicesColumn{"pri.suggest.time"} + + Suggesttotal = CatIndicesColumn{"suggest.total"} + + Prisuggesttotal = CatIndicesColumn{"pri.suggest.total"} + + Memorytotal = CatIndicesColumn{"memory.total"} + + Primemorytotal = CatIndicesColumn{"pri.memory.total"} + + Bulktotaloperations = CatIndicesColumn{"bulk.total_operations"} + + Pribulktotaloperations = CatIndicesColumn{"pri.bulk.total_operations"} + + Bulktotaltime = CatIndicesColumn{"bulk.total_time"} + + Pribulktotaltime = CatIndicesColumn{"pri.bulk.total_time"} + + Bulktotalsizeinbytes = CatIndicesColumn{"bulk.total_size_in_bytes"} + + Pribulktotalsizeinbytes = CatIndicesColumn{"pri.bulk.total_size_in_bytes"} + + Bulkavgtime = CatIndicesColumn{"bulk.avg_time"} + + Pribulkavgtime = CatIndicesColumn{"pri.bulk.avg_time"} + + Bulkavgsizeinbytes = CatIndicesColumn{"bulk.avg_size_in_bytes"} + + Pribulkavgsizeinbytes = CatIndicesColumn{"pri.bulk.avg_size_in_bytes"} + + Densevectorvaluecount = CatIndicesColumn{"dense_vector.value_count"} + + Pridensevectorvaluecount = CatIndicesColumn{"pri.dense_vector.value_count"} + + Sparsevectorvaluecount = CatIndicesColumn{"sparse_vector.value_count"} + + Prisparsevectorvaluecount = CatIndicesColumn{"pri.sparse_vector.value_count"} +) + +func (c CatIndicesColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatIndicesColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "health": + *c = Health + case "status": + *c = Status + case "index": + *c = Index + case "uuid": + *c = Uuid + case "pri": + *c = Pri + case "rep": + *c = Rep + case "docs.count": + *c = Docscount + case "docs.deleted": + *c = Docsdeleted + case "creation.date": + *c = Creationdate + case "creation.date.string": + *c = Creationdatestring + case "store.size": + *c = Storesize + case "pri.store.size": + *c = Pristoresize + case "dataset.size": + *c = Datasetsize + case "completion.size": + *c = Completionsize + case "pri.completion.size": + *c = Pricompletionsize + case "fielddata.memory_size": + *c = Fielddatamemorysize + case "pri.fielddata.memory_size": + *c = Prifielddatamemorysize + case "fielddata.evictions": + *c = Fielddataevictions + case "pri.fielddata.evictions": + *c = Prifielddataevictions + case "query_cache.memory_size": + *c = Querycachememorysize + case "pri.query_cache.memory_size": + *c = Priquerycachememorysize + case "query_cache.evictions": + *c = Querycacheevictions + case "pri.query_cache.evictions": + *c = Priquerycacheevictions + case "request_cache.memory_size": + *c = Requestcachememorysize + case "pri.request_cache.memory_size": + *c = Prirequestcachememorysize + case "request_cache.evictions": + *c = Requestcacheevictions + case "pri.request_cache.evictions": + *c = Prirequestcacheevictions + case "request_cache.hit_count": + *c = Requestcachehitcount + case "pri.request_cache.hit_count": + *c = Prirequestcachehitcount + case "request_cache.miss_count": + *c = Requestcachemisscount + case "pri.request_cache.miss_count": + *c = Prirequestcachemisscount + case "flush.total": + *c = Flushtotal + case "pri.flush.total": + *c = Priflushtotal + case "flush.total_time": + *c = Flushtotaltime + case "pri.flush.total_time": + *c = Priflushtotaltime + case "get.current": + *c = Getcurrent + case "pri.get.current": + *c = Prigetcurrent + case "get.time": + *c = Gettime + case "pri.get.time": + *c = Prigettime + case "get.total": + *c = Gettotal + case "pri.get.total": + *c = Prigettotal + case "get.exists_time": + *c = Getexiststime + case "pri.get.exists_time": + *c = Prigetexiststime + case "get.exists_total": + *c = Getexiststotal + case "pri.get.exists_total": + *c = Prigetexiststotal + case "get.missing_time": + *c = Getmissingtime + case "pri.get.missing_time": + *c = Prigetmissingtime + case "get.missing_total": + *c = Getmissingtotal + case "pri.get.missing_total": + *c = Prigetmissingtotal + case "indexing.delete_current": + *c = Indexingdeletecurrent + case "pri.indexing.delete_current": + *c = Priindexingdeletecurrent + case "indexing.delete_time": + *c = Indexingdeletetime + case "pri.indexing.delete_time": + *c = Priindexingdeletetime + case "indexing.delete_total": + *c = Indexingdeletetotal + case "pri.indexing.delete_total": + *c = Priindexingdeletetotal + case "indexing.index_current": + *c = Indexingindexcurrent + case "pri.indexing.index_current": + *c = Priindexingindexcurrent + case "indexing.index_time": + *c = Indexingindextime + case "pri.indexing.index_time": + *c = Priindexingindextime + case "indexing.index_total": + *c = Indexingindextotal + case "pri.indexing.index_total": + *c = Priindexingindextotal + case "indexing.index_failed": + *c = Indexingindexfailed + case "pri.indexing.index_failed": + *c = Priindexingindexfailed + case "indexing.index_failed_due_to_version_conflict": + *c = Indexingindexfailedduetoversionconflict + case "pri.indexing.index_failed_due_to_version_conflict": + *c = Priindexingindexfailedduetoversionconflict + case "merges.current": + *c = Mergescurrent + case "pri.merges.current": + *c = Primergescurrent + case "merges.current_docs": + *c = Mergescurrentdocs + case "pri.merges.current_docs": + *c = Primergescurrentdocs + case "merges.current_size": + *c = Mergescurrentsize + case "pri.merges.current_size": + *c = Primergescurrentsize + case "merges.total": + *c = Mergestotal + case "pri.merges.total": + *c = Primergestotal + case "merges.total_docs": + *c = Mergestotaldocs + case "pri.merges.total_docs": + *c = Primergestotaldocs + case "merges.total_size": + *c = Mergestotalsize + case "pri.merges.total_size": + *c = Primergestotalsize + case "merges.total_time": + *c = Mergestotaltime + case "pri.merges.total_time": + *c = Primergestotaltime + case "refresh.total": + *c = Refreshtotal + case "pri.refresh.total": + *c = Prirefreshtotal + case "refresh.time": + *c = Refreshtime + case "pri.refresh.time": + *c = Prirefreshtime + case "refresh.external_total": + *c = Refreshexternaltotal + case "pri.refresh.external_total": + *c = Prirefreshexternaltotal + case "refresh.external_time": + *c = Refreshexternaltime + case "pri.refresh.external_time": + *c = Prirefreshexternaltime + case "refresh.listeners": + *c = Refreshlisteners + case "pri.refresh.listeners": + *c = Prirefreshlisteners + case "search.fetch_current": + *c = Searchfetchcurrent + case "pri.search.fetch_current": + *c = Prisearchfetchcurrent + case "search.fetch_time": + *c = Searchfetchtime + case "pri.search.fetch_time": + *c = Prisearchfetchtime + case "search.fetch_total": + *c = Searchfetchtotal + case "pri.search.fetch_total": + *c = Prisearchfetchtotal + case "search.open_contexts": + *c = Searchopencontexts + case "pri.search.open_contexts": + *c = Prisearchopencontexts + case "search.query_current": + *c = Searchquerycurrent + case "pri.search.query_current": + *c = Prisearchquerycurrent + case "search.query_time": + *c = Searchquerytime + case "pri.search.query_time": + *c = Prisearchquerytime + case "search.query_total": + *c = Searchquerytotal + case "pri.search.query_total": + *c = Prisearchquerytotal + case "search.scroll_current": + *c = Searchscrollcurrent + case "pri.search.scroll_current": + *c = Prisearchscrollcurrent + case "search.scroll_time": + *c = Searchscrolltime + case "pri.search.scroll_time": + *c = Prisearchscrolltime + case "search.scroll_total": + *c = Searchscrolltotal + case "pri.search.scroll_total": + *c = Prisearchscrolltotal + case "segments.count": + *c = Segmentscount + case "pri.segments.count": + *c = Prisegmentscount + case "segments.memory": + *c = Segmentsmemory + case "pri.segments.memory": + *c = Prisegmentsmemory + case "segments.index_writer_memory": + *c = Segmentsindexwritermemory + case "pri.segments.index_writer_memory": + *c = Prisegmentsindexwritermemory + case "segments.version_map_memory": + *c = Segmentsversionmapmemory + case "pri.segments.version_map_memory": + *c = Prisegmentsversionmapmemory + case "segments.fixed_bitset_memory": + *c = Segmentsfixedbitsetmemory + case "pri.segments.fixed_bitset_memory": + *c = Prisegmentsfixedbitsetmemory + case "warmer.current": + *c = Warmercurrent + case "pri.warmer.current": + *c = Priwarmercurrent + case "warmer.total": + *c = Warmertotal + case "pri.warmer.total": + *c = Priwarmertotal + case "warmer.total_time": + *c = Warmertotaltime + case "pri.warmer.total_time": + *c = Priwarmertotaltime + case "suggest.current": + *c = Suggestcurrent + case "pri.suggest.current": + *c = Prisuggestcurrent + case "suggest.time": + *c = Suggesttime + case "pri.suggest.time": + *c = Prisuggesttime + case "suggest.total": + *c = Suggesttotal + case "pri.suggest.total": + *c = Prisuggesttotal + case "memory.total": + *c = Memorytotal + case "pri.memory.total": + *c = Primemorytotal + case "bulk.total_operations": + *c = Bulktotaloperations + case "pri.bulk.total_operations": + *c = Pribulktotaloperations + case "bulk.total_time": + *c = Bulktotaltime + case "pri.bulk.total_time": + *c = Pribulktotaltime + case "bulk.total_size_in_bytes": + *c = Bulktotalsizeinbytes + case "pri.bulk.total_size_in_bytes": + *c = Pribulktotalsizeinbytes + case "bulk.avg_time": + *c = Bulkavgtime + case "pri.bulk.avg_time": + *c = Pribulkavgtime + case "bulk.avg_size_in_bytes": + *c = Bulkavgsizeinbytes + case "pri.bulk.avg_size_in_bytes": + *c = Pribulkavgsizeinbytes + case "dense_vector.value_count": + *c = Densevectorvaluecount + case "pri.dense_vector.value_count": + *c = Pridensevectorvaluecount + case "sparse_vector.value_count": + *c = Sparsevectorvaluecount + case "pri.sparse_vector.value_count": + *c = Prisparsevectorvaluecount + default: + *c = CatIndicesColumn{string(text)} + } + + return nil +} + +func (c CatIndicesColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catmastercolumn/catmastercolumn.go b/typedapi/types/enums/catmastercolumn/catmastercolumn.go new file mode 100644 index 0000000000..8b18ecc9aa --- /dev/null +++ b/typedapi/types/enums/catmastercolumn/catmastercolumn.go @@ -0,0 +1,65 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package catmastercolumn +package catmastercolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2102-L2122 +type CatMasterColumn struct { + Name string +} + +var ( + Id = CatMasterColumn{"id"} + + Host = CatMasterColumn{"host"} + + Ip = CatMasterColumn{"ip"} + + Node = CatMasterColumn{"node"} +) + +func (c CatMasterColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatMasterColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "id": + *c = Id + case "host": + *c = Host + case "ip": + *c = Ip + case "node": + *c = Node + default: + *c = CatMasterColumn{string(text)} + } + + return nil +} + +func (c CatMasterColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catnodeattrscolumn/catnodeattrscolumn.go b/typedapi/types/enums/catnodeattrscolumn/catnodeattrscolumn.go new file mode 100644 index 0000000000..38c02642fb --- /dev/null +++ b/typedapi/types/enums/catnodeattrscolumn/catnodeattrscolumn.go @@ -0,0 +1,81 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package catnodeattrscolumn +package catnodeattrscolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2124-L2165 +type CatNodeattrsColumn struct { + Name string +} + +var ( + Node = CatNodeattrsColumn{"node"} + + Id = CatNodeattrsColumn{"id"} + + Pid = CatNodeattrsColumn{"pid"} + + Host = CatNodeattrsColumn{"host"} + + Ip = CatNodeattrsColumn{"ip"} + + Port = CatNodeattrsColumn{"port"} + + Attr = CatNodeattrsColumn{"attr"} + + Value = CatNodeattrsColumn{"value"} +) + +func (c CatNodeattrsColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatNodeattrsColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "node": + *c = Node + case "id": + *c = Id + case "pid": + *c = Pid + case "host": + *c = Host + case "ip": + *c = Ip + case "port": + *c = Port + case "attr": + *c = Attr + case "value": + *c = Value + default: + *c = CatNodeattrsColumn{string(text)} + } + + return nil +} + +func (c CatNodeattrsColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catnodecolumn/catnodecolumn.go b/typedapi/types/enums/catnodecolumn/catnodecolumn.go index 702b76c351..8cbfcb4512 100644 --- a/typedapi/types/enums/catnodecolumn/catnodecolumn.go +++ b/typedapi/types/enums/catnodecolumn/catnodecolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package catnodecolumn package catnodecolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L560-L1012 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L567-L1024 type CatNodeColumn struct { Name string } @@ -107,6 +107,8 @@ var ( Load15m = CatNodeColumn{"load_15m"} + Availableprocessors = CatNodeColumn{"available_processors"} + Mappingstotalcount = CatNodeColumn{"mappings.total_count"} Mappingstotalestimatedoverheadinbytes = CatNodeColumn{"mappings.total_estimated_overhead_in_bytes"} @@ -293,6 +295,8 @@ func (c *CatNodeColumn) UnmarshalText(text []byte) error { *c = Load5m case "load_15m": *c = Load15m + case "available_processors": + *c = Availableprocessors case "mappings.total_count": *c = Mappingstotalcount case "mappings.total_estimated_overhead_in_bytes": diff --git a/typedapi/types/enums/catpendingtaskscolumn/catpendingtaskscolumn.go b/typedapi/types/enums/catpendingtaskscolumn/catpendingtaskscolumn.go new file mode 100644 index 0000000000..4327a9429f --- /dev/null +++ b/typedapi/types/enums/catpendingtaskscolumn/catpendingtaskscolumn.go @@ -0,0 +1,65 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package catpendingtaskscolumn +package catpendingtaskscolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2450-L2472 +type CatPendingTasksColumn struct { + Name string +} + +var ( + InsertOrder = CatPendingTasksColumn{"insertOrder"} + + TimeInQueue = CatPendingTasksColumn{"timeInQueue"} + + Priority = CatPendingTasksColumn{"priority"} + + Source = CatPendingTasksColumn{"source"} +) + +func (c CatPendingTasksColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatPendingTasksColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "insertorder": + *c = InsertOrder + case "timeinqueue": + *c = TimeInQueue + case "priority": + *c = Priority + case "source": + *c = Source + default: + *c = CatPendingTasksColumn{string(text)} + } + + return nil +} + +func (c CatPendingTasksColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catpluginscolumn/catpluginscolumn.go b/typedapi/types/enums/catpluginscolumn/catpluginscolumn.go new file mode 100644 index 0000000000..bd7d101c0e --- /dev/null +++ b/typedapi/types/enums/catpluginscolumn/catpluginscolumn.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package catpluginscolumn +package catpluginscolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2245-L2271 +type CatPluginsColumn struct { + Name string +} + +var ( + Id = CatPluginsColumn{"id"} + + Name = CatPluginsColumn{"name"} + + Component = CatPluginsColumn{"component"} + + Version = CatPluginsColumn{"version"} + + Description = CatPluginsColumn{"description"} +) + +func (c CatPluginsColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatPluginsColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "id": + *c = Id + case "name": + *c = Name + case "component": + *c = Component + case "version": + *c = Version + case "description": + *c = Description + default: + *c = CatPluginsColumn{string(text)} + } + + return nil +} + +func (c CatPluginsColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catrecoverycolumn/catrecoverycolumn.go b/typedapi/types/enums/catrecoverycolumn/catrecoverycolumn.go index 422f8edef2..2dfa4b4d83 100644 --- a/typedapi/types/enums/catrecoverycolumn/catrecoverycolumn.go +++ b/typedapi/types/enums/catrecoverycolumn/catrecoverycolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package catrecoverycolumn package catrecoverycolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1014-L1145 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2273-L2405 type CatRecoveryColumn struct { Name string } @@ -33,6 +33,14 @@ var ( Shard = CatRecoveryColumn{"shard"} + Starttime = CatRecoveryColumn{"start_time"} + + Starttimemillis = CatRecoveryColumn{"start_time_millis"} + + Stoptime = CatRecoveryColumn{"stop_time"} + + Stoptimemillis = CatRecoveryColumn{"stop_time_millis"} + Time = CatRecoveryColumn{"time"} Type = CatRecoveryColumn{"type"} @@ -72,14 +80,6 @@ var ( Translogopsrecovered = CatRecoveryColumn{"translog_ops_recovered"} Translogopspercent = CatRecoveryColumn{"translog_ops_percent"} - - Starttime = CatRecoveryColumn{"start_time"} - - Starttimemillis = CatRecoveryColumn{"start_time_millis"} - - Stoptime = CatRecoveryColumn{"stop_time"} - - Stoptimemillis = CatRecoveryColumn{"stop_time_millis"} ) func (c CatRecoveryColumn) MarshalText() (text []byte, err error) { @@ -93,6 +93,14 @@ func (c *CatRecoveryColumn) UnmarshalText(text []byte) error { *c = Index case "shard": *c = Shard + case "start_time": + *c = Starttime + case "start_time_millis": + *c = Starttimemillis + case "stop_time": + *c = Stoptime + case "stop_time_millis": + *c = Stoptimemillis case "time": *c = Time case "type": @@ -133,14 +141,6 @@ func (c *CatRecoveryColumn) UnmarshalText(text []byte) error { *c = Translogopsrecovered case "translog_ops_percent": *c = Translogopspercent - case "start_time": - *c = Starttime - case "start_time_millis": - *c = Starttimemillis - case "stop_time": - *c = Stoptime - case "stop_time_millis": - *c = Stoptimemillis default: *c = CatRecoveryColumn{string(text)} } diff --git a/typedapi/types/enums/catsegmentscolumn/catsegmentscolumn.go b/typedapi/types/enums/catsegmentscolumn/catsegmentscolumn.go index 964317f702..5f8267ba0d 100644 --- a/typedapi/types/enums/catsegmentscolumn/catsegmentscolumn.go +++ b/typedapi/types/enums/catsegmentscolumn/catsegmentscolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package catsegmentscolumn package catsegmentscolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1147-L1212 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L1026-L1091 type CatSegmentsColumn struct { Name string } diff --git a/typedapi/types/enums/catshardcolumn/catshardcolumn.go b/typedapi/types/enums/catshardcolumn/catshardcolumn.go index 00527a45a8..2a117b1361 100644 --- a/typedapi/types/enums/catshardcolumn/catshardcolumn.go +++ b/typedapi/types/enums/catshardcolumn/catshardcolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package catshardcolumn package catshardcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1576-L1949 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2782-L3155 type CatShardColumn struct { Name string } diff --git a/typedapi/types/enums/catsnapshotscolumn/catsnapshotscolumn.go b/typedapi/types/enums/catsnapshotscolumn/catsnapshotscolumn.go index 2deaca9ad9..97a0e7b62d 100644 --- a/typedapi/types/enums/catsnapshotscolumn/catsnapshotscolumn.go +++ b/typedapi/types/enums/catsnapshotscolumn/catsnapshotscolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package catsnapshotscolumn package catsnapshotscolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1214-L1281 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L1093-L1160 type CatSnapshotsColumn struct { Name string } diff --git a/typedapi/types/enums/cattaskscolumn/cattaskscolumn.go b/typedapi/types/enums/cattaskscolumn/cattaskscolumn.go new file mode 100644 index 0000000000..0e4df66132 --- /dev/null +++ b/typedapi/types/enums/cattaskscolumn/cattaskscolumn.go @@ -0,0 +1,109 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package cattaskscolumn +package cattaskscolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2167-L2243 +type CatTasksColumn struct { + Name string +} + +var ( + Id = CatTasksColumn{"id"} + + Action = CatTasksColumn{"action"} + + Taskid = CatTasksColumn{"task_id"} + + Parenttaskid = CatTasksColumn{"parent_task_id"} + + Type = CatTasksColumn{"type"} + + Starttime = CatTasksColumn{"start_time"} + + Timestamp = CatTasksColumn{"timestamp"} + + Runningtimens = CatTasksColumn{"running_time_ns"} + + Runningtime = CatTasksColumn{"running_time"} + + Nodeid = CatTasksColumn{"node_id"} + + Ip = CatTasksColumn{"ip"} + + Port = CatTasksColumn{"port"} + + Node = CatTasksColumn{"node"} + + Version = CatTasksColumn{"version"} + + Xopaqueid = CatTasksColumn{"x_opaque_id"} +) + +func (c CatTasksColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatTasksColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "id": + *c = Id + case "action": + *c = Action + case "task_id": + *c = Taskid + case "parent_task_id": + *c = Parenttaskid + case "type": + *c = Type + case "start_time": + *c = Starttime + case "timestamp": + *c = Timestamp + case "running_time_ns": + *c = Runningtimens + case "running_time": + *c = Runningtime + case "node_id": + *c = Nodeid + case "ip": + *c = Ip + case "port": + *c = Port + case "node": + *c = Node + case "version": + *c = Version + case "x_opaque_id": + *c = Xopaqueid + default: + *c = CatTasksColumn{string(text)} + } + + return nil +} + +func (c CatTasksColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/cattemplatescolumn/cattemplatescolumn.go b/typedapi/types/enums/cattemplatescolumn/cattemplatescolumn.go new file mode 100644 index 0000000000..65fbedae0a --- /dev/null +++ b/typedapi/types/enums/cattemplatescolumn/cattemplatescolumn.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package cattemplatescolumn +package cattemplatescolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2421-L2448 +type CatTemplatesColumn struct { + Name string +} + +var ( + Name = CatTemplatesColumn{"name"} + + Indexpatterns = CatTemplatesColumn{"index_patterns"} + + Order = CatTemplatesColumn{"order"} + + Version = CatTemplatesColumn{"version"} + + Composedof = CatTemplatesColumn{"composed_of"} +) + +func (c CatTemplatesColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatTemplatesColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "name": + *c = Name + case "index_patterns": + *c = Indexpatterns + case "order": + *c = Order + case "version": + *c = Version + case "composed_of": + *c = Composedof + default: + *c = CatTemplatesColumn{string(text)} + } + + return nil +} + +func (c CatTemplatesColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catthreadpoolcolumn/catthreadpoolcolumn.go b/typedapi/types/enums/catthreadpoolcolumn/catthreadpoolcolumn.go index ac0ebe1f05..49d3382b1a 100644 --- a/typedapi/types/enums/catthreadpoolcolumn/catthreadpoolcolumn.go +++ b/typedapi/types/enums/catthreadpoolcolumn/catthreadpoolcolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package catthreadpoolcolumn package catthreadpoolcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1952-L2052 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L3158-L3258 type CatThreadPoolColumn struct { Name string } diff --git a/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go b/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go index 565a159e98..be326eec24 100644 --- a/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go +++ b/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package cattrainedmodelscolumn package cattrainedmodelscolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1290-L1364 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2496-L2570 type CatTrainedModelsColumn struct { Name string } diff --git a/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go b/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go index 12707528cd..ae501c99bf 100644 --- a/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go +++ b/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package cattransformcolumn package cattransformcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1369-L1573 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/_types/CatBase.ts#L2575-L2779 type CatTransformColumn struct { Name string } diff --git a/typedapi/types/enums/childscoremode/childscoremode.go b/typedapi/types/enums/childscoremode/childscoremode.go index 0eae5c5f49..0f0f8dc61d 100644 --- a/typedapi/types/enums/childscoremode/childscoremode.go +++ b/typedapi/types/enums/childscoremode/childscoremode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package childscoremode package childscoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/joining.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/joining.ts#L25-L39 type ChildScoreMode struct { Name string } diff --git a/typedapi/types/enums/chunkingmode/chunkingmode.go b/typedapi/types/enums/chunkingmode/chunkingmode.go index 60154f4685..e6a74aaaac 100644 --- a/typedapi/types/enums/chunkingmode/chunkingmode.go +++ b/typedapi/types/enums/chunkingmode/chunkingmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package chunkingmode package chunkingmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L245-L249 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L249-L253 type ChunkingMode struct { Name string } diff --git a/typedapi/types/enums/cjkbigramignoredscript/cjkbigramignoredscript.go b/typedapi/types/enums/cjkbigramignoredscript/cjkbigramignoredscript.go index 93c3866fab..165626ac3c 100644 --- a/typedapi/types/enums/cjkbigramignoredscript/cjkbigramignoredscript.go +++ b/typedapi/types/enums/cjkbigramignoredscript/cjkbigramignoredscript.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package cjkbigramignoredscript package cjkbigramignoredscript import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L459-L464 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L494-L499 type CjkBigramIgnoredScript struct { Name string } diff --git a/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go b/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go index f1e2c8f381..55be8f1ceb 100644 --- a/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go +++ b/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package clusterinfotarget package clusterinfotarget import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L380-L386 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L382-L388 type ClusterInfoTarget struct { Name string } diff --git a/typedapi/types/enums/clusterprivilege/clusterprivilege.go b/typedapi/types/enums/clusterprivilege/clusterprivilege.go index e62f5109e0..df99c051dc 100644 --- a/typedapi/types/enums/clusterprivilege/clusterprivilege.go +++ b/typedapi/types/enums/clusterprivilege/clusterprivilege.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package clusterprivilege package clusterprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L42-L201 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L42-L201 type ClusterPrivilege struct { Name string } diff --git a/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go b/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go index 1933e22efc..c06a05c996 100644 --- a/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go +++ b/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package clustersearchstatus package clustersearchstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L37-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L37-L43 type ClusterSearchStatus struct { Name string } diff --git a/typedapi/types/enums/clusterstatemetric/clusterstatemetric.go b/typedapi/types/enums/clusterstatemetric/clusterstatemetric.go new file mode 100644 index 0000000000..201c772bc2 --- /dev/null +++ b/typedapi/types/enums/clusterstatemetric/clusterstatemetric.go @@ -0,0 +1,85 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package clusterstatemetric +package clusterstatemetric + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/state/ClusterStateRequest.ts#L94-L104 +type ClusterStateMetric struct { + Name string +} + +var ( + All = ClusterStateMetric{"_all"} + + Version = ClusterStateMetric{"version"} + + Masternode = ClusterStateMetric{"master_node"} + + Blocks = ClusterStateMetric{"blocks"} + + Nodes = ClusterStateMetric{"nodes"} + + Metadata = ClusterStateMetric{"metadata"} + + Routingtable = ClusterStateMetric{"routing_table"} + + Routingnodes = ClusterStateMetric{"routing_nodes"} + + Customs = ClusterStateMetric{"customs"} +) + +func (c ClusterStateMetric) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *ClusterStateMetric) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "_all": + *c = All + case "version": + *c = Version + case "master_node": + *c = Masternode + case "blocks": + *c = Blocks + case "nodes": + *c = Nodes + case "metadata": + *c = Metadata + case "routing_table": + *c = Routingtable + case "routing_nodes": + *c = Routingnodes + case "customs": + *c = Customs + default: + *c = ClusterStateMetric{string(text)} + } + + return nil +} + +func (c ClusterStateMetric) String() string { + return c.Name +} diff --git a/typedapi/types/enums/cohereembeddingtype/cohereembeddingtype.go b/typedapi/types/enums/cohereembeddingtype/cohereembeddingtype.go index 0e91e5ce9e..2245822df4 100644 --- a/typedapi/types/enums/cohereembeddingtype/cohereembeddingtype.go +++ b/typedapi/types/enums/cohereembeddingtype/cohereembeddingtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package cohereembeddingtype package cohereembeddingtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L843-L849 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L887-L893 type CohereEmbeddingType struct { Name string } diff --git a/typedapi/types/enums/cohereinputtype/cohereinputtype.go b/typedapi/types/enums/cohereinputtype/cohereinputtype.go index 555faaac05..a5b78ee590 100644 --- a/typedapi/types/enums/cohereinputtype/cohereinputtype.go +++ b/typedapi/types/enums/cohereinputtype/cohereinputtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package cohereinputtype package cohereinputtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L851-L856 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L895-L900 type CohereInputType struct { Name string } diff --git a/typedapi/types/enums/cohereservicetype/cohereservicetype.go b/typedapi/types/enums/cohereservicetype/cohereservicetype.go index c170c00438..06831fa1fc 100644 --- a/typedapi/types/enums/cohereservicetype/cohereservicetype.go +++ b/typedapi/types/enums/cohereservicetype/cohereservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package cohereservicetype package cohereservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L839-L841 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L883-L885 type CohereServiceType struct { Name string } diff --git a/typedapi/types/enums/coheresimilaritytype/coheresimilaritytype.go b/typedapi/types/enums/coheresimilaritytype/coheresimilaritytype.go index 0d37e4d057..d2126676be 100644 --- a/typedapi/types/enums/coheresimilaritytype/coheresimilaritytype.go +++ b/typedapi/types/enums/coheresimilaritytype/coheresimilaritytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package coheresimilaritytype package coheresimilaritytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L858-L862 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L902-L906 type CohereSimilarityType struct { Name string } diff --git a/typedapi/types/enums/coheretasktype/coheretasktype.go b/typedapi/types/enums/coheretasktype/coheretasktype.go index 3be60a564d..796e2bdc9c 100644 --- a/typedapi/types/enums/coheretasktype/coheretasktype.go +++ b/typedapi/types/enums/coheretasktype/coheretasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package coheretasktype package coheretasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L833-L837 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L877-L881 type CohereTaskType struct { Name string } diff --git a/typedapi/types/enums/coheretruncatetype/coheretruncatetype.go b/typedapi/types/enums/coheretruncatetype/coheretruncatetype.go index c53da789fc..e0c0866fa0 100644 --- a/typedapi/types/enums/coheretruncatetype/coheretruncatetype.go +++ b/typedapi/types/enums/coheretruncatetype/coheretruncatetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package coheretruncatetype package coheretruncatetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L864-L868 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L908-L912 type CohereTruncateType struct { Name string } diff --git a/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go b/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go index ef4eb0275a..ea9a5d086a 100644 --- a/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go +++ b/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package combinedfieldsoperator package combinedfieldsoperator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/abstractions.ts#L519-L522 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/abstractions.ts#L519-L522 type CombinedFieldsOperator struct { Name string } diff --git a/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go b/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go index e6dd68066c..6379cc7641 100644 --- a/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go +++ b/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package combinedfieldszeroterms package combinedfieldszeroterms import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/abstractions.ts#L524-L533 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/abstractions.ts#L524-L533 type CombinedFieldsZeroTerms struct { Name string } diff --git a/typedapi/types/enums/commonstatsflag/commonstatsflag.go b/typedapi/types/enums/commonstatsflag/commonstatsflag.go new file mode 100644 index 0000000000..f0813f169d --- /dev/null +++ b/typedapi/types/enums/commonstatsflag/commonstatsflag.go @@ -0,0 +1,137 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package commonstatsflag +package commonstatsflag + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L392-L415 +type CommonStatsFlag struct { + Name string +} + +var ( + All = CommonStatsFlag{"_all"} + + Store = CommonStatsFlag{"store"} + + Indexing = CommonStatsFlag{"indexing"} + + Get = CommonStatsFlag{"get"} + + Search = CommonStatsFlag{"search"} + + Merge = CommonStatsFlag{"merge"} + + Flush = CommonStatsFlag{"flush"} + + Refresh = CommonStatsFlag{"refresh"} + + Querycache = CommonStatsFlag{"query_cache"} + + Fielddata = CommonStatsFlag{"fielddata"} + + Docs = CommonStatsFlag{"docs"} + + Warmer = CommonStatsFlag{"warmer"} + + Completion = CommonStatsFlag{"completion"} + + Segments = CommonStatsFlag{"segments"} + + Translog = CommonStatsFlag{"translog"} + + Requestcache = CommonStatsFlag{"request_cache"} + + Recovery = CommonStatsFlag{"recovery"} + + Bulk = CommonStatsFlag{"bulk"} + + Shardstats = CommonStatsFlag{"shard_stats"} + + Mappings = CommonStatsFlag{"mappings"} + + Densevector = CommonStatsFlag{"dense_vector"} + + Sparsevector = CommonStatsFlag{"sparse_vector"} +) + +func (c CommonStatsFlag) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CommonStatsFlag) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "_all": + *c = All + case "store": + *c = Store + case "indexing": + *c = Indexing + case "get": + *c = Get + case "search": + *c = Search + case "merge": + *c = Merge + case "flush": + *c = Flush + case "refresh": + *c = Refresh + case "query_cache": + *c = Querycache + case "fielddata": + *c = Fielddata + case "docs": + *c = Docs + case "warmer": + *c = Warmer + case "completion": + *c = Completion + case "segments": + *c = Segments + case "translog": + *c = Translog + case "request_cache": + *c = Requestcache + case "recovery": + *c = Recovery + case "bulk": + *c = Bulk + case "shard_stats": + *c = Shardstats + case "mappings": + *c = Mappings + case "dense_vector": + *c = Densevector + case "sparse_vector": + *c = Sparsevector + default: + *c = CommonStatsFlag{string(text)} + } + + return nil +} + +func (c CommonStatsFlag) String() string { + return c.Name +} diff --git a/typedapi/types/enums/conditionop/conditionop.go b/typedapi/types/enums/conditionop/conditionop.go index e7f3360327..4c9c5c2b5c 100644 --- a/typedapi/types/enums/conditionop/conditionop.go +++ b/typedapi/types/enums/conditionop/conditionop.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package conditionop package conditionop import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L42-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Conditions.ts#L42-L49 type ConditionOp struct { Name string } diff --git a/typedapi/types/enums/conditionoperator/conditionoperator.go b/typedapi/types/enums/conditionoperator/conditionoperator.go index d402d0405a..804fd5d58a 100644 --- a/typedapi/types/enums/conditionoperator/conditionoperator.go +++ b/typedapi/types/enums/conditionoperator/conditionoperator.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package conditionoperator package conditionoperator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Rule.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Rule.ts#L74-L79 type ConditionOperator struct { Name string } diff --git a/typedapi/types/enums/conditiontype/conditiontype.go b/typedapi/types/enums/conditiontype/conditiontype.go index 42910f2105..11ae53464d 100644 --- a/typedapi/types/enums/conditiontype/conditiontype.go +++ b/typedapi/types/enums/conditiontype/conditiontype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package conditiontype package conditiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L65-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Conditions.ts#L65-L71 type ConditionType struct { Name string } diff --git a/typedapi/types/enums/conflicts/conflicts.go b/typedapi/types/enums/conflicts/conflicts.go index 56fd051fca..92120039f7 100644 --- a/typedapi/types/enums/conflicts/conflicts.go +++ b/typedapi/types/enums/conflicts/conflicts.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package conflicts package conflicts import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L180-L189 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L175-L184 type Conflicts struct { Name string } diff --git a/typedapi/types/enums/connectionscheme/connectionscheme.go b/typedapi/types/enums/connectionscheme/connectionscheme.go index cf9c1f8f2a..41680d2802 100644 --- a/typedapi/types/enums/connectionscheme/connectionscheme.go +++ b/typedapi/types/enums/connectionscheme/connectionscheme.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package connectionscheme package connectionscheme import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L39-L42 type ConnectionScheme struct { Name string } diff --git a/typedapi/types/enums/connectorfieldtype/connectorfieldtype.go b/typedapi/types/enums/connectorfieldtype/connectorfieldtype.go index 6c76dd3b06..083528b2ff 100644 --- a/typedapi/types/enums/connectorfieldtype/connectorfieldtype.go +++ b/typedapi/types/enums/connectorfieldtype/connectorfieldtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package connectorfieldtype package connectorfieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L43-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L43-L48 type ConnectorFieldType struct { Name string } diff --git a/typedapi/types/enums/connectorstatus/connectorstatus.go b/typedapi/types/enums/connectorstatus/connectorstatus.go index b706c66dd8..cfdac9cdc6 100644 --- a/typedapi/types/enums/connectorstatus/connectorstatus.go +++ b/typedapi/types/enums/connectorstatus/connectorstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package connectorstatus package connectorstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L130-L136 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L130-L136 type ConnectorStatus struct { Name string } diff --git a/typedapi/types/enums/contextualaiservicetype/contextualaiservicetype.go b/typedapi/types/enums/contextualaiservicetype/contextualaiservicetype.go new file mode 100644 index 0000000000..7e17ecde0e --- /dev/null +++ b/typedapi/types/enums/contextualaiservicetype/contextualaiservicetype.go @@ -0,0 +1,53 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package contextualaiservicetype +package contextualaiservicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1221-L1223 +type ContextualAIServiceType struct { + Name string +} + +var ( + Contextualai = ContextualAIServiceType{"contextualai"} +) + +func (c ContextualAIServiceType) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *ContextualAIServiceType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "contextualai": + *c = Contextualai + default: + *c = ContextualAIServiceType{string(text)} + } + + return nil +} + +func (c ContextualAIServiceType) String() string { + return c.Name +} diff --git a/typedapi/types/enums/converttype/converttype.go b/typedapi/types/enums/converttype/converttype.go index 8b7fe375ef..a2d09a7cda 100644 --- a/typedapi/types/enums/converttype/converttype.go +++ b/typedapi/types/enums/converttype/converttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package converttype package converttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L662-L671 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L666-L675 type ConvertType struct { Name string } diff --git a/typedapi/types/enums/customservicetype/customservicetype.go b/typedapi/types/enums/customservicetype/customservicetype.go index 2ed6c730d1..ecae5402ef 100644 --- a/typedapi/types/enums/customservicetype/customservicetype.go +++ b/typedapi/types/enums/customservicetype/customservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package customservicetype package customservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1134-L1136 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1201-L1203 type CustomServiceType struct { Name string } diff --git a/typedapi/types/enums/customtasktype/customtasktype.go b/typedapi/types/enums/customtasktype/customtasktype.go index 511f2ea5b5..8c7e998f72 100644 --- a/typedapi/types/enums/customtasktype/customtasktype.go +++ b/typedapi/types/enums/customtasktype/customtasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package customtasktype package customtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1127-L1132 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1194-L1199 type CustomTaskType struct { Name string } diff --git a/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go b/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go index 295774bda0..33f93d4c64 100644 --- a/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go +++ b/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package dataattachmentformat package dataattachmentformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L187-L190 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L187-L190 type DataAttachmentFormat struct { Name string } diff --git a/typedapi/types/enums/datafeedstate/datafeedstate.go b/typedapi/types/enums/datafeedstate/datafeedstate.go index ad25520cb9..a76837bf8e 100644 --- a/typedapi/types/enums/datafeedstate/datafeedstate.go +++ b/typedapi/types/enums/datafeedstate/datafeedstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package datafeedstate package datafeedstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L136-L141 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L140-L145 type DatafeedState struct { Name string } diff --git a/typedapi/types/enums/dataframestate/dataframestate.go b/typedapi/types/enums/dataframestate/dataframestate.go index 8613ed6f93..8bf964061c 100644 --- a/typedapi/types/enums/dataframestate/dataframestate.go +++ b/typedapi/types/enums/dataframestate/dataframestate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package dataframestate package dataframestate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Dataframe.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Dataframe.ts#L20-L26 type DataframeState struct { Name string } diff --git a/typedapi/types/enums/day/day.go b/typedapi/types/enums/day/day.go index c95d9e0baa..af68678ee4 100644 --- a/typedapi/types/enums/day/day.go +++ b/typedapi/types/enums/day/day.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package day package day import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L37-L45 type Day struct { Name string } diff --git a/typedapi/types/enums/decision/decision.go b/typedapi/types/enums/decision/decision.go index d7b5eb2c6d..adc4fc654a 100644 --- a/typedapi/types/enums/decision/decision.go +++ b/typedapi/types/enums/decision/decision.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package decision package decision import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L92-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L92-L101 type Decision struct { Name string } diff --git a/typedapi/types/enums/deepseekservicetype/deepseekservicetype.go b/typedapi/types/enums/deepseekservicetype/deepseekservicetype.go index 47ca3e771b..2ac3686a27 100644 --- a/typedapi/types/enums/deepseekservicetype/deepseekservicetype.go +++ b/typedapi/types/enums/deepseekservicetype/deepseekservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package deepseekservicetype package deepseekservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1190-L1192 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1294-L1296 type DeepSeekServiceType struct { Name string } diff --git a/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go b/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go index 749eac0ad5..7e18baaf39 100644 --- a/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go +++ b/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package delimitedpayloadencoding package delimitedpayloadencoding import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L78-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L84-L88 type DelimitedPayloadEncoding struct { Name string } diff --git a/typedapi/types/enums/densevectorelementtype/densevectorelementtype.go b/typedapi/types/enums/densevectorelementtype/densevectorelementtype.go index d85cd4eb78..6a71c92404 100644 --- a/typedapi/types/enums/densevectorelementtype/densevectorelementtype.go +++ b/typedapi/types/enums/densevectorelementtype/densevectorelementtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package densevectorelementtype package densevectorelementtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/DenseVectorProperty.ts#L64-L80 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/DenseVectorProperty.ts#L64-L85 type DenseVectorElementType struct { Name string } @@ -34,6 +34,8 @@ var ( Byte = DenseVectorElementType{"byte"} Float = DenseVectorElementType{"float"} + + Bfloat16 = DenseVectorElementType{"bfloat16"} ) func (d DenseVectorElementType) MarshalText() (text []byte, err error) { @@ -49,6 +51,8 @@ func (d *DenseVectorElementType) UnmarshalText(text []byte) error { *d = Byte case "float": *d = Float + case "bfloat16": + *d = Bfloat16 default: *d = DenseVectorElementType{string(text)} } diff --git a/typedapi/types/enums/densevectorindexoptionstype/densevectorindexoptionstype.go b/typedapi/types/enums/densevectorindexoptionstype/densevectorindexoptionstype.go index 3dfa7ba2e4..a33508f56a 100644 --- a/typedapi/types/enums/densevectorindexoptionstype/densevectorindexoptionstype.go +++ b/typedapi/types/enums/densevectorindexoptionstype/densevectorindexoptionstype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package densevectorindexoptionstype package densevectorindexoptionstype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/DenseVectorProperty.ts#L168-L213 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/DenseVectorProperty.ts#L181-L235 type DenseVectorIndexOptionsType struct { Name string } @@ -33,6 +33,8 @@ var ( Bbqhnsw = DenseVectorIndexOptionsType{"bbq_hnsw"} + Bbqdisk = DenseVectorIndexOptionsType{"bbq_disk"} + Flat = DenseVectorIndexOptionsType{"flat"} Hnsw = DenseVectorIndexOptionsType{"hnsw"} @@ -57,6 +59,8 @@ func (d *DenseVectorIndexOptionsType) UnmarshalText(text []byte) error { *d = Bbqflat case "bbq_hnsw": *d = Bbqhnsw + case "bbq_disk": + *d = Bbqdisk case "flat": *d = Flat case "hnsw": diff --git a/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go b/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go index 250c89b85f..8a0ec9a115 100644 --- a/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go +++ b/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package densevectorsimilarity package densevectorsimilarity import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/DenseVectorProperty.ts#L82-L127 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/DenseVectorProperty.ts#L87-L132 type DenseVectorSimilarity struct { Name string } diff --git a/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go b/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go index 4d2878a9f5..b5cc0b407f 100644 --- a/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go +++ b/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package deploymentallocationstate package deploymentallocationstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L331-L344 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L332-L345 type DeploymentAllocationState struct { Name string } diff --git a/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go b/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go index a121d04740..5338727cf0 100644 --- a/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go +++ b/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package deploymentassignmentstate package deploymentassignmentstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L346-L363 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L347-L364 type DeploymentAssignmentState struct { Name string } diff --git a/typedapi/types/enums/deprecationlevel/deprecationlevel.go b/typedapi/types/enums/deprecationlevel/deprecationlevel.go index cc7c365f06..a845d74bbc 100644 --- a/typedapi/types/enums/deprecationlevel/deprecationlevel.go +++ b/typedapi/types/enums/deprecationlevel/deprecationlevel.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package deprecationlevel package deprecationlevel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/migration/deprecations/types.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/migration/deprecations/types.ts#L23-L30 type DeprecationLevel struct { Name string } diff --git a/typedapi/types/enums/dfiindependencemeasure/dfiindependencemeasure.go b/typedapi/types/enums/dfiindependencemeasure/dfiindependencemeasure.go index 69095efc3f..5a63db9c1d 100644 --- a/typedapi/types/enums/dfiindependencemeasure/dfiindependencemeasure.go +++ b/typedapi/types/enums/dfiindependencemeasure/dfiindependencemeasure.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package dfiindependencemeasure package dfiindependencemeasure import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Similarity.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Similarity.ts#L20-L24 type DFIIndependenceMeasure struct { Name string } diff --git a/typedapi/types/enums/dfraftereffect/dfraftereffect.go b/typedapi/types/enums/dfraftereffect/dfraftereffect.go index 493646f67b..99cfc4a731 100644 --- a/typedapi/types/enums/dfraftereffect/dfraftereffect.go +++ b/typedapi/types/enums/dfraftereffect/dfraftereffect.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package dfraftereffect package dfraftereffect import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Similarity.ts#L26-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Similarity.ts#L26-L30 type DFRAfterEffect struct { Name string } diff --git a/typedapi/types/enums/dfrbasicmodel/dfrbasicmodel.go b/typedapi/types/enums/dfrbasicmodel/dfrbasicmodel.go index 37190fa412..19f13128cd 100644 --- a/typedapi/types/enums/dfrbasicmodel/dfrbasicmodel.go +++ b/typedapi/types/enums/dfrbasicmodel/dfrbasicmodel.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package dfrbasicmodel package dfrbasicmodel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Similarity.ts#L32-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Similarity.ts#L32-L40 type DFRBasicModel struct { Name string } diff --git a/typedapi/types/enums/displaytype/displaytype.go b/typedapi/types/enums/displaytype/displaytype.go index f03b2644c3..5f6786f65e 100644 --- a/typedapi/types/enums/displaytype/displaytype.go +++ b/typedapi/types/enums/displaytype/displaytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package displaytype package displaytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L35-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L35-L41 type DisplayType struct { Name string } diff --git a/typedapi/types/enums/distanceunit/distanceunit.go b/typedapi/types/enums/distanceunit/distanceunit.go index 68307ce1d3..d17222e002 100644 --- a/typedapi/types/enums/distanceunit/distanceunit.go +++ b/typedapi/types/enums/distanceunit/distanceunit.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package distanceunit package distanceunit import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L30-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L30-L40 type DistanceUnit struct { Name string } diff --git a/typedapi/types/enums/dynamicmapping/dynamicmapping.go b/typedapi/types/enums/dynamicmapping/dynamicmapping.go index 58d358640c..074bd39d46 100644 --- a/typedapi/types/enums/dynamicmapping/dynamicmapping.go +++ b/typedapi/types/enums/dynamicmapping/dynamicmapping.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package dynamicmapping package dynamicmapping import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/dynamic-template.ts#L50-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/dynamic-template.ts#L50-L59 type DynamicMapping struct { Name string } diff --git a/typedapi/types/enums/ecscompatibilitytype/ecscompatibilitytype.go b/typedapi/types/enums/ecscompatibilitytype/ecscompatibilitytype.go index f92d1d0def..cfad6f2284 100644 --- a/typedapi/types/enums/ecscompatibilitytype/ecscompatibilitytype.go +++ b/typedapi/types/enums/ecscompatibilitytype/ecscompatibilitytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package ecscompatibilitytype package ecscompatibilitytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/_types/Structure.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/_types/Structure.ts#L40-L43 type EcsCompatibilityType struct { Name string } diff --git a/typedapi/types/enums/edgengramside/edgengramside.go b/typedapi/types/enums/edgengramside/edgengramside.go index 7bdc00f6b2..4f572c29c9 100644 --- a/typedapi/types/enums/edgengramside/edgengramside.go +++ b/typedapi/types/enums/edgengramside/edgengramside.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package edgengramside package edgengramside import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L92-L95 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L98-L101 type EdgeNGramSide struct { Name string } diff --git a/typedapi/types/enums/elasticsearchservicetype/elasticsearchservicetype.go b/typedapi/types/enums/elasticsearchservicetype/elasticsearchservicetype.go index c4320fa738..0720a50841 100644 --- a/typedapi/types/enums/elasticsearchservicetype/elasticsearchservicetype.go +++ b/typedapi/types/enums/elasticsearchservicetype/elasticsearchservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package elasticsearchservicetype package elasticsearchservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1265-L1267 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1370-L1372 type ElasticsearchServiceType struct { Name string } diff --git a/typedapi/types/enums/elasticsearchtasktype/elasticsearchtasktype.go b/typedapi/types/enums/elasticsearchtasktype/elasticsearchtasktype.go index 6ecd0415a2..d281024d8f 100644 --- a/typedapi/types/enums/elasticsearchtasktype/elasticsearchtasktype.go +++ b/typedapi/types/enums/elasticsearchtasktype/elasticsearchtasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package elasticsearchtasktype package elasticsearchtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1259-L1263 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1364-L1368 type ElasticsearchTaskType struct { Name string } diff --git a/typedapi/types/enums/elserservicetype/elserservicetype.go b/typedapi/types/enums/elserservicetype/elserservicetype.go index 8d8c3a11cd..cc405c90d3 100644 --- a/typedapi/types/enums/elserservicetype/elserservicetype.go +++ b/typedapi/types/enums/elserservicetype/elserservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package elserservicetype package elserservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1301-L1303 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1406-L1408 type ElserServiceType struct { Name string } diff --git a/typedapi/types/enums/elsertasktype/elsertasktype.go b/typedapi/types/enums/elsertasktype/elsertasktype.go index f279b8baf8..9a6530b81c 100644 --- a/typedapi/types/enums/elsertasktype/elsertasktype.go +++ b/typedapi/types/enums/elsertasktype/elsertasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package elsertasktype package elsertasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1297-L1299 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1402-L1404 type ElserTaskType struct { Name string } diff --git a/typedapi/types/enums/emailpriority/emailpriority.go b/typedapi/types/enums/emailpriority/emailpriority.go index 90800904c6..aa5fa99d8d 100644 --- a/typedapi/types/enums/emailpriority/emailpriority.go +++ b/typedapi/types/enums/emailpriority/emailpriority.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package emailpriority package emailpriority import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L197-L203 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L197-L203 type EmailPriority struct { Name string } diff --git a/typedapi/types/enums/enrichpolicyphase/enrichpolicyphase.go b/typedapi/types/enums/enrichpolicyphase/enrichpolicyphase.go index 24de6cf248..6a9977b71f 100644 --- a/typedapi/types/enums/enrichpolicyphase/enrichpolicyphase.go +++ b/typedapi/types/enums/enrichpolicyphase/enrichpolicyphase.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package enrichpolicyphase package enrichpolicyphase import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/execute_policy/types.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/execute_policy/types.ts#L25-L31 type EnrichPolicyPhase struct { Name string } diff --git a/typedapi/types/enums/esqlclusterstatus/esqlclusterstatus.go b/typedapi/types/enums/esqlclusterstatus/esqlclusterstatus.go index 63613af9ed..2e2d97e525 100644 --- a/typedapi/types/enums/esqlclusterstatus/esqlclusterstatus.go +++ b/typedapi/types/enums/esqlclusterstatus/esqlclusterstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package esqlclusterstatus package esqlclusterstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L83-L89 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/EsqlResult.ts#L83-L89 type EsqlClusterStatus struct { Name string } diff --git a/typedapi/types/enums/esqlformat/esqlformat.go b/typedapi/types/enums/esqlformat/esqlformat.go index 5948dd0d9f..b0ceb738cf 100644 --- a/typedapi/types/enums/esqlformat/esqlformat.go +++ b/typedapi/types/enums/esqlformat/esqlformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package esqlformat package esqlformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/QueryParameters.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/QueryParameters.ts#L20-L29 type EsqlFormat struct { Name string } diff --git a/typedapi/types/enums/eventtype/eventtype.go b/typedapi/types/enums/eventtype/eventtype.go index 967a7dd7cc..ce8dcc96e0 100644 --- a/typedapi/types/enums/eventtype/eventtype.go +++ b/typedapi/types/enums/eventtype/eventtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package eventtype package eventtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/_types/AnalyticsEvent.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/_types/AnalyticsEvent.ts#L22-L26 type EventType struct { Name string } diff --git a/typedapi/types/enums/excludefrequent/excludefrequent.go b/typedapi/types/enums/excludefrequent/excludefrequent.go index 172a8bf2cd..cdbe74b699 100644 --- a/typedapi/types/enums/excludefrequent/excludefrequent.go +++ b/typedapi/types/enums/excludefrequent/excludefrequent.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package excludefrequent package excludefrequent import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Detector.ts#L145-L150 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Detector.ts#L145-L150 type ExcludeFrequent struct { Name string } diff --git a/typedapi/types/enums/executionphase/executionphase.go b/typedapi/types/enums/executionphase/executionphase.go index e98477af6a..be0fbbdbab 100644 --- a/typedapi/types/enums/executionphase/executionphase.go +++ b/typedapi/types/enums/executionphase/executionphase.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package executionphase package executionphase import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Execution.ts#L49-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Execution.ts#L49-L58 type ExecutionPhase struct { Name string } diff --git a/typedapi/types/enums/executionstatus/executionstatus.go b/typedapi/types/enums/executionstatus/executionstatus.go index d8b4977930..bad1ad0d1c 100644 --- a/typedapi/types/enums/executionstatus/executionstatus.go +++ b/typedapi/types/enums/executionstatus/executionstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package executionstatus package executionstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Execution.ts#L38-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Execution.ts#L38-L47 type ExecutionStatus struct { Name string } diff --git a/typedapi/types/enums/expandwildcard/expandwildcard.go b/typedapi/types/enums/expandwildcard/expandwildcard.go index 661fc67308..a94c0af5d6 100644 --- a/typedapi/types/enums/expandwildcard/expandwildcard.go +++ b/typedapi/types/enums/expandwildcard/expandwildcard.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package expandwildcard package expandwildcard import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L198-L212 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L193-L207 type ExpandWildcard struct { Name string } diff --git a/typedapi/types/enums/failurestorestatus/failurestorestatus.go b/typedapi/types/enums/failurestorestatus/failurestorestatus.go index c92c2fbdfb..a5ed9a4183 100644 --- a/typedapi/types/enums/failurestorestatus/failurestorestatus.go +++ b/typedapi/types/enums/failurestorestatus/failurestorestatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package failurestorestatus package failurestorestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/types.ts#L86-L91 type FailureStoreStatus struct { Name string } diff --git a/typedapi/types/enums/feature/feature.go b/typedapi/types/enums/feature/feature.go index 6546c9ba6a..d9547af531 100644 --- a/typedapi/types/enums/feature/feature.go +++ b/typedapi/types/enums/feature/feature.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package feature package feature import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get/IndicesGetRequest.ts#L98-L102 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get/IndicesGetRequest.ts#L99-L103 type Feature struct { Name string } diff --git a/typedapi/types/enums/fieldaccesspattern/fieldaccesspattern.go b/typedapi/types/enums/fieldaccesspattern/fieldaccesspattern.go new file mode 100644 index 0000000000..66d0ca427d --- /dev/null +++ b/typedapi/types/enums/fieldaccesspattern/fieldaccesspattern.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package fieldaccesspattern +package fieldaccesspattern + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Pipeline.ts#L115-L118 +type FieldAccessPattern struct { + Name string +} + +var ( + Classic = FieldAccessPattern{"classic"} + + Flexible = FieldAccessPattern{"flexible"} +) + +func (f FieldAccessPattern) MarshalText() (text []byte, err error) { + return []byte(f.String()), nil +} + +func (f *FieldAccessPattern) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "classic": + *f = Classic + case "flexible": + *f = Flexible + default: + *f = FieldAccessPattern{string(text)} + } + + return nil +} + +func (f FieldAccessPattern) String() string { + return f.Name +} diff --git a/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go b/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go index 3094e1c0a7..1ec11de17d 100644 --- a/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go +++ b/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package fieldsortnumerictype package fieldsortnumerictype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L36-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L36-L41 type FieldSortNumericType struct { Name string } diff --git a/typedapi/types/enums/fieldtype/fieldtype.go b/typedapi/types/enums/fieldtype/fieldtype.go index 4b1b4a7c77..bbbf55fbe6 100644 --- a/typedapi/types/enums/fieldtype/fieldtype.go +++ b/typedapi/types/enums/fieldtype/fieldtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package fieldtype package fieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/Property.ts#L193-L242 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/Property.ts#L193-L242 type FieldType struct { Name string } diff --git a/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go b/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go index 41116b2df3..4a45d97f58 100644 --- a/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go +++ b/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package fieldvaluefactormodifier package fieldvaluefactormodifier import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L323-L366 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L325-L368 type FieldValueFactorModifier struct { Name string } diff --git a/typedapi/types/enums/filteringpolicy/filteringpolicy.go b/typedapi/types/enums/filteringpolicy/filteringpolicy.go index 26b3f525a1..2d210ecc79 100644 --- a/typedapi/types/enums/filteringpolicy/filteringpolicy.go +++ b/typedapi/types/enums/filteringpolicy/filteringpolicy.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package filteringpolicy package filteringpolicy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L155-L158 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L155-L158 type FilteringPolicy struct { Name string } diff --git a/typedapi/types/enums/filteringrulerule/filteringrulerule.go b/typedapi/types/enums/filteringrulerule/filteringrulerule.go index 93afaef22d..eb4d0ebe94 100644 --- a/typedapi/types/enums/filteringrulerule/filteringrulerule.go +++ b/typedapi/types/enums/filteringrulerule/filteringrulerule.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package filteringrulerule package filteringrulerule import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L160-L168 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L160-L168 type FilteringRuleRule struct { Name string } diff --git a/typedapi/types/enums/filteringvalidationstate/filteringvalidationstate.go b/typedapi/types/enums/filteringvalidationstate/filteringvalidationstate.go index 1d0245e397..f32a504b77 100644 --- a/typedapi/types/enums/filteringvalidationstate/filteringvalidationstate.go +++ b/typedapi/types/enums/filteringvalidationstate/filteringvalidationstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package filteringvalidationstate package filteringvalidationstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L186-L190 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L186-L190 type FilteringValidationState struct { Name string } diff --git a/typedapi/types/enums/filtertype/filtertype.go b/typedapi/types/enums/filtertype/filtertype.go index 0a1effb8db..82d629ac3e 100644 --- a/typedapi/types/enums/filtertype/filtertype.go +++ b/typedapi/types/enums/filtertype/filtertype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package filtertype package filtertype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Filter.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Filter.ts#L43-L46 type FilterType struct { Name string } diff --git a/typedapi/types/enums/findstructureformat/findstructureformat.go b/typedapi/types/enums/findstructureformat/findstructureformat.go new file mode 100644 index 0000000000..dfcc0a064d --- /dev/null +++ b/typedapi/types/enums/findstructureformat/findstructureformat.go @@ -0,0 +1,65 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package findstructureformat +package findstructureformat + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/find_structure/FindStructureRequest.ts#L211-L216 +type FindStructureFormat struct { + Name string +} + +var ( + Ndjson = FindStructureFormat{"ndjson"} + + Xml = FindStructureFormat{"xml"} + + Delimited = FindStructureFormat{"delimited"} + + Semistructuredtext = FindStructureFormat{"semi_structured_text"} +) + +func (f FindStructureFormat) MarshalText() (text []byte, err error) { + return []byte(f.String()), nil +} + +func (f *FindStructureFormat) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "ndjson": + *f = Ndjson + case "xml": + *f = Xml + case "delimited": + *f = Delimited + case "semi_structured_text": + *f = Semistructuredtext + default: + *f = FindStructureFormat{string(text)} + } + + return nil +} + +func (f FindStructureFormat) String() string { + return f.Name +} diff --git a/typedapi/types/enums/fingerprintdigest/fingerprintdigest.go b/typedapi/types/enums/fingerprintdigest/fingerprintdigest.go index b7d71a7bc8..bf5da60b6c 100644 --- a/typedapi/types/enums/fingerprintdigest/fingerprintdigest.go +++ b/typedapi/types/enums/fingerprintdigest/fingerprintdigest.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package fingerprintdigest package fingerprintdigest import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L897-L903 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L901-L907 type FingerprintDigest struct { Name string } diff --git a/typedapi/types/enums/followerindexstatus/followerindexstatus.go b/typedapi/types/enums/followerindexstatus/followerindexstatus.go index 2e14148a47..870c33fb0a 100644 --- a/typedapi/types/enums/followerindexstatus/followerindexstatus.go +++ b/typedapi/types/enums/followerindexstatus/followerindexstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package followerindexstatus package followerindexstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/follow_info/types.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/follow_info/types.ts#L37-L40 type FollowerIndexStatus struct { Name string } diff --git a/typedapi/types/enums/formattype/formattype.go b/typedapi/types/enums/formattype/formattype.go index 7da8a36bf3..744323c640 100644 --- a/typedapi/types/enums/formattype/formattype.go +++ b/typedapi/types/enums/formattype/formattype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package formattype package formattype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/_types/Structure.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/_types/Structure.ts#L45-L50 type FormatType struct { Name string } diff --git a/typedapi/types/enums/functionboostmode/functionboostmode.go b/typedapi/types/enums/functionboostmode/functionboostmode.go index 847c8698cb..aecaca1215 100644 --- a/typedapi/types/enums/functionboostmode/functionboostmode.go +++ b/typedapi/types/enums/functionboostmode/functionboostmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package functionboostmode package functionboostmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L295-L321 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L297-L323 type FunctionBoostMode struct { Name string } diff --git a/typedapi/types/enums/functionscoremode/functionscoremode.go b/typedapi/types/enums/functionscoremode/functionscoremode.go index 8303d55223..fae2003704 100644 --- a/typedapi/types/enums/functionscoremode/functionscoremode.go +++ b/typedapi/types/enums/functionscoremode/functionscoremode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package functionscoremode package functionscoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L268-L293 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L270-L295 type FunctionScoreMode struct { Name string } diff --git a/typedapi/types/enums/gappolicy/gappolicy.go b/typedapi/types/enums/gappolicy/gappolicy.go index 2db74665c5..542543d9ef 100644 --- a/typedapi/types/enums/gappolicy/gappolicy.go +++ b/typedapi/types/enums/gappolicy/gappolicy.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package gappolicy package gappolicy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L61-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L61-L76 type GapPolicy struct { Name string } diff --git a/typedapi/types/enums/geodistancetype/geodistancetype.go b/typedapi/types/enums/geodistancetype/geodistancetype.go index d48b1a74d6..b8a6b0e32a 100644 --- a/typedapi/types/enums/geodistancetype/geodistancetype.go +++ b/typedapi/types/enums/geodistancetype/geodistancetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package geodistancetype package geodistancetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L42-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L42-L51 type GeoDistanceType struct { Name string } diff --git a/typedapi/types/enums/geoexecution/geoexecution.go b/typedapi/types/enums/geoexecution/geoexecution.go index 44f681e519..2eec868204 100644 --- a/typedapi/types/enums/geoexecution/geoexecution.go +++ b/typedapi/types/enums/geoexecution/geoexecution.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package geoexecution package geoexecution import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/geo.ts#L59-L62 type GeoExecution struct { Name string } diff --git a/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go b/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go index 422858012f..466c7b5dc1 100644 --- a/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go +++ b/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package geogridtargetformat package geogridtargetformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L438-L441 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L442-L445 type GeoGridTargetFormat struct { Name string } diff --git a/typedapi/types/enums/geogridtiletype/geogridtiletype.go b/typedapi/types/enums/geogridtiletype/geogridtiletype.go index bbf96ef6de..4e05729f6e 100644 --- a/typedapi/types/enums/geogridtiletype/geogridtiletype.go +++ b/typedapi/types/enums/geogridtiletype/geogridtiletype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package geogridtiletype package geogridtiletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L432-L436 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L436-L440 type GeoGridTileType struct { Name string } diff --git a/typedapi/types/enums/geoorientation/geoorientation.go b/typedapi/types/enums/geoorientation/geoorientation.go index d80acb07d0..322efa498a 100644 --- a/typedapi/types/enums/geoorientation/geoorientation.go +++ b/typedapi/types/enums/geoorientation/geoorientation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package geoorientation package geoorientation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/geo.ts#L41-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/geo.ts#L41-L46 type GeoOrientation struct { Name string } diff --git a/typedapi/types/enums/geopointmetrictype/geopointmetrictype.go b/typedapi/types/enums/geopointmetrictype/geopointmetrictype.go index 0988ce3d9b..6790eacf25 100644 --- a/typedapi/types/enums/geopointmetrictype/geopointmetrictype.go +++ b/typedapi/types/enums/geopointmetrictype/geopointmetrictype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package geopointmetrictype package geopointmetrictype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/geo.ts#L35-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/geo.ts#L35-L39 type GeoPointMetricType struct { Name string } diff --git a/typedapi/types/enums/geoshaperelation/geoshaperelation.go b/typedapi/types/enums/geoshaperelation/geoshaperelation.go index 192fbd4a7c..201586144f 100644 --- a/typedapi/types/enums/geoshaperelation/geoshaperelation.go +++ b/typedapi/types/enums/geoshaperelation/geoshaperelation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package geoshaperelation package geoshaperelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L64-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L64-L82 type GeoShapeRelation struct { Name string } diff --git a/typedapi/types/enums/geostrategy/geostrategy.go b/typedapi/types/enums/geostrategy/geostrategy.go index a0d71b3893..83d2e592d2 100644 --- a/typedapi/types/enums/geostrategy/geostrategy.go +++ b/typedapi/types/enums/geostrategy/geostrategy.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package geostrategy package geostrategy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/geo.ts#L64-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/geo.ts#L64-L67 type GeoStrategy struct { Name string } diff --git a/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go b/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go index 26aaa052f4..6489e77d57 100644 --- a/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go +++ b/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package geovalidationmethod package geovalidationmethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L173-L183 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/geo.ts#L173-L183 type GeoValidationMethod struct { Name string } diff --git a/typedapi/types/enums/googleaiservicetype/googleaiservicetype.go b/typedapi/types/enums/googleaiservicetype/googleaiservicetype.go index f929024561..0f13e97ac5 100644 --- a/typedapi/types/enums/googleaiservicetype/googleaiservicetype.go +++ b/typedapi/types/enums/googleaiservicetype/googleaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package googleaiservicetype package googleaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1328-L1330 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1433-L1435 type GoogleAiServiceType struct { Name string } diff --git a/typedapi/types/enums/googleaistudiotasktype/googleaistudiotasktype.go b/typedapi/types/enums/googleaistudiotasktype/googleaistudiotasktype.go index 2b2da58bc9..7a7259048b 100644 --- a/typedapi/types/enums/googleaistudiotasktype/googleaistudiotasktype.go +++ b/typedapi/types/enums/googleaistudiotasktype/googleaistudiotasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package googleaistudiotasktype package googleaistudiotasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1323-L1326 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1428-L1431 type GoogleAiStudioTaskType struct { Name string } diff --git a/typedapi/types/enums/googlemodelgardenprovider/googlemodelgardenprovider.go b/typedapi/types/enums/googlemodelgardenprovider/googlemodelgardenprovider.go new file mode 100644 index 0000000000..269ec3f3cc --- /dev/null +++ b/typedapi/types/enums/googlemodelgardenprovider/googlemodelgardenprovider.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package googlemodelgardenprovider +package googlemodelgardenprovider + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1506-L1513 +type GoogleModelGardenProvider struct { + Name string +} + +var ( + Google = GoogleModelGardenProvider{"google"} + + Anthropic = GoogleModelGardenProvider{"anthropic"} + + Meta = GoogleModelGardenProvider{"meta"} + + Huggingface = GoogleModelGardenProvider{"hugging_face"} + + Mistral = GoogleModelGardenProvider{"mistral"} + + Ai21 = GoogleModelGardenProvider{"ai21"} +) + +func (g GoogleModelGardenProvider) MarshalText() (text []byte, err error) { + return []byte(g.String()), nil +} + +func (g *GoogleModelGardenProvider) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "google": + *g = Google + case "anthropic": + *g = Anthropic + case "meta": + *g = Meta + case "hugging_face": + *g = Huggingface + case "mistral": + *g = Mistral + case "ai21": + *g = Ai21 + default: + *g = GoogleModelGardenProvider{string(text)} + } + + return nil +} + +func (g GoogleModelGardenProvider) String() string { + return g.Name +} diff --git a/typedapi/types/enums/googlevertexaiservicetype/googlevertexaiservicetype.go b/typedapi/types/enums/googlevertexaiservicetype/googlevertexaiservicetype.go index e54c1b506c..f4baf3be20 100644 --- a/typedapi/types/enums/googlevertexaiservicetype/googlevertexaiservicetype.go +++ b/typedapi/types/enums/googlevertexaiservicetype/googlevertexaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package googlevertexaiservicetype package googlevertexaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1378-L1380 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1554-L1556 type GoogleVertexAIServiceType struct { Name string } diff --git a/typedapi/types/enums/googlevertexaitasktype/googlevertexaitasktype.go b/typedapi/types/enums/googlevertexaitasktype/googlevertexaitasktype.go index 47fae42977..877be3e0d7 100644 --- a/typedapi/types/enums/googlevertexaitasktype/googlevertexaitasktype.go +++ b/typedapi/types/enums/googlevertexaitasktype/googlevertexaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package googlevertexaitasktype package googlevertexaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1371-L1376 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1547-L1552 type GoogleVertexAITaskType struct { Name string } diff --git a/typedapi/types/enums/granttype/granttype.go b/typedapi/types/enums/granttype/granttype.go index 4bbf9c1ced..be4d150a02 100644 --- a/typedapi/types/enums/granttype/granttype.go +++ b/typedapi/types/enums/granttype/granttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package granttype package granttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/GrantType.ts#L20-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/GrantType.ts#L20-L30 type GrantType struct { Name string } diff --git a/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go b/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go index 18f876462d..94a8ca559a 100644 --- a/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go +++ b/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package gridaggregationtype package gridaggregationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_mvt/_types/GridType.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search_mvt/_types/GridType.ts#L30-L33 type GridAggregationType struct { Name string } diff --git a/typedapi/types/enums/gridtype/gridtype.go b/typedapi/types/enums/gridtype/gridtype.go index 5a31f7c46d..6d50d549fe 100644 --- a/typedapi/types/enums/gridtype/gridtype.go +++ b/typedapi/types/enums/gridtype/gridtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package gridtype package gridtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_mvt/_types/GridType.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search_mvt/_types/GridType.ts#L20-L28 type GridType struct { Name string } diff --git a/typedapi/types/enums/groupby/groupby.go b/typedapi/types/enums/groupby/groupby.go index a162ab6201..877a9207ed 100644 --- a/typedapi/types/enums/groupby/groupby.go +++ b/typedapi/types/enums/groupby/groupby.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package groupby package groupby import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/_types/GroupBy.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/tasks/_types/GroupBy.ts#L20-L27 type GroupBy struct { Name string } diff --git a/typedapi/types/enums/healthstatus/healthstatus.go b/typedapi/types/enums/healthstatus/healthstatus.go index 6e590ba7ca..0f47684c3d 100644 --- a/typedapi/types/enums/healthstatus/healthstatus.go +++ b/typedapi/types/enums/healthstatus/healthstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package healthstatus package healthstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L216-L238 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L211-L233 type HealthStatus struct { Name string } diff --git a/typedapi/types/enums/highlighterencoder/highlighterencoder.go b/typedapi/types/enums/highlighterencoder/highlighterencoder.go index 4e3e6c1ebe..75c9541db0 100644 --- a/typedapi/types/enums/highlighterencoder/highlighterencoder.go +++ b/typedapi/types/enums/highlighterencoder/highlighterencoder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package highlighterencoder package highlighterencoder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L159-L162 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/highlighting.ts#L159-L162 type HighlighterEncoder struct { Name string } diff --git a/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go b/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go index 7f5a698d35..84cba6440f 100644 --- a/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go +++ b/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package highlighterfragmenter package highlighterfragmenter import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L164-L167 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/highlighting.ts#L164-L167 type HighlighterFragmenter struct { Name string } diff --git a/typedapi/types/enums/highlighterorder/highlighterorder.go b/typedapi/types/enums/highlighterorder/highlighterorder.go index 6f89cc1f01..3d072a55aa 100644 --- a/typedapi/types/enums/highlighterorder/highlighterorder.go +++ b/typedapi/types/enums/highlighterorder/highlighterorder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package highlighterorder package highlighterorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L169-L171 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/highlighting.ts#L169-L171 type HighlighterOrder struct { Name string } diff --git a/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go b/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go index 1fb473020c..220e016271 100644 --- a/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go +++ b/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package highlightertagsschema package highlightertagsschema import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L173-L175 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/highlighting.ts#L173-L175 type HighlighterTagsSchema struct { Name string } diff --git a/typedapi/types/enums/highlightertype/highlightertype.go b/typedapi/types/enums/highlightertype/highlightertype.go index bf46da7afc..ac39ae8cec 100644 --- a/typedapi/types/enums/highlightertype/highlightertype.go +++ b/typedapi/types/enums/highlightertype/highlightertype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package highlightertype package highlightertype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L177-L192 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/highlighting.ts#L177-L192 type HighlighterType struct { Name string } diff --git a/typedapi/types/enums/holtwinterstype/holtwinterstype.go b/typedapi/types/enums/holtwinterstype/holtwinterstype.go index 0fc773d11a..22501490cc 100644 --- a/typedapi/types/enums/holtwinterstype/holtwinterstype.go +++ b/typedapi/types/enums/holtwinterstype/holtwinterstype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package holtwinterstype package holtwinterstype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L309-L312 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L311-L314 type HoltWintersType struct { Name string } diff --git a/typedapi/types/enums/httpinputmethod/httpinputmethod.go b/typedapi/types/enums/httpinputmethod/httpinputmethod.go index c3d78b3a94..933830c8ba 100644 --- a/typedapi/types/enums/httpinputmethod/httpinputmethod.go +++ b/typedapi/types/enums/httpinputmethod/httpinputmethod.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package httpinputmethod package httpinputmethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L59-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L59-L65 type HttpInputMethod struct { Name string } diff --git a/typedapi/types/enums/huggingfaceservicetype/huggingfaceservicetype.go b/typedapi/types/enums/huggingfaceservicetype/huggingfaceservicetype.go index a40f5dea28..a9201266ab 100644 --- a/typedapi/types/enums/huggingfaceservicetype/huggingfaceservicetype.go +++ b/typedapi/types/enums/huggingfaceservicetype/huggingfaceservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package huggingfaceservicetype package huggingfaceservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1435-L1437 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1611-L1613 type HuggingFaceServiceType struct { Name string } diff --git a/typedapi/types/enums/huggingfacetasktype/huggingfacetasktype.go b/typedapi/types/enums/huggingfacetasktype/huggingfacetasktype.go index 77db31e0ba..1d28824f91 100644 --- a/typedapi/types/enums/huggingfacetasktype/huggingfacetasktype.go +++ b/typedapi/types/enums/huggingfacetasktype/huggingfacetasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package huggingfacetasktype package huggingfacetasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1428-L1433 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1604-L1609 type HuggingFaceTaskType struct { Name string } diff --git a/typedapi/types/enums/ibdistribution/ibdistribution.go b/typedapi/types/enums/ibdistribution/ibdistribution.go index 35f6c1b00c..7849979e0c 100644 --- a/typedapi/types/enums/ibdistribution/ibdistribution.go +++ b/typedapi/types/enums/ibdistribution/ibdistribution.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package ibdistribution package ibdistribution import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Similarity.ts#L42-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Similarity.ts#L42-L45 type IBDistribution struct { Name string } diff --git a/typedapi/types/enums/iblambda/iblambda.go b/typedapi/types/enums/iblambda/iblambda.go index 802b8cf215..e9a2e5acc6 100644 --- a/typedapi/types/enums/iblambda/iblambda.go +++ b/typedapi/types/enums/iblambda/iblambda.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package iblambda package iblambda import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Similarity.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Similarity.ts#L47-L50 type IBLambda struct { Name string } diff --git a/typedapi/types/enums/icucollationalternate/icucollationalternate.go b/typedapi/types/enums/icucollationalternate/icucollationalternate.go index 3c65f362b4..d93caf3e5b 100644 --- a/typedapi/types/enums/icucollationalternate/icucollationalternate.go +++ b/typedapi/types/enums/icucollationalternate/icucollationalternate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package icucollationalternate package icucollationalternate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L90-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L90-L93 type IcuCollationAlternate struct { Name string } diff --git a/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go b/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go index 132b82bc84..6f7dae8822 100644 --- a/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go +++ b/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package icucollationcasefirst package icucollationcasefirst import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L95-L98 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L95-L98 type IcuCollationCaseFirst struct { Name string } diff --git a/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go b/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go index d671bbfed5..d2d26ac661 100644 --- a/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go +++ b/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package icucollationdecomposition package icucollationdecomposition import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L100-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L100-L103 type IcuCollationDecomposition struct { Name string } diff --git a/typedapi/types/enums/icucollationstrength/icucollationstrength.go b/typedapi/types/enums/icucollationstrength/icucollationstrength.go index dfc900d7fa..08b5422af0 100644 --- a/typedapi/types/enums/icucollationstrength/icucollationstrength.go +++ b/typedapi/types/enums/icucollationstrength/icucollationstrength.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package icucollationstrength package icucollationstrength import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L105-L111 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L105-L111 type IcuCollationStrength struct { Name string } diff --git a/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go b/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go index 14f1f36aa9..e62d01bc89 100644 --- a/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go +++ b/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package icunormalizationmode package icunormalizationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L79-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L79-L82 type IcuNormalizationMode struct { Name string } diff --git a/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go b/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go index d98db7fca8..65277166d9 100644 --- a/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go +++ b/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package icunormalizationtype package icunormalizationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L84-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L84-L88 type IcuNormalizationType struct { Name string } diff --git a/typedapi/types/enums/icutransformdirection/icutransformdirection.go b/typedapi/types/enums/icutransformdirection/icutransformdirection.go index 1a33854b64..bdd0605c21 100644 --- a/typedapi/types/enums/icutransformdirection/icutransformdirection.go +++ b/typedapi/types/enums/icutransformdirection/icutransformdirection.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package icutransformdirection package icutransformdirection import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L74-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L74-L77 type IcuTransformDirection struct { Name string } diff --git a/typedapi/types/enums/impactarea/impactarea.go b/typedapi/types/enums/impactarea/impactarea.go index 3b62f1e4e0..6716783dc0 100644 --- a/typedapi/types/enums/impactarea/impactarea.go +++ b/typedapi/types/enums/impactarea/impactarea.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package impactarea package impactarea import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L75-L80 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L75-L80 type ImpactArea struct { Name string } diff --git a/typedapi/types/enums/include/include.go b/typedapi/types/enums/include/include.go index 58df05437b..6451eded15 100644 --- a/typedapi/types/enums/include/include.go +++ b/typedapi/types/enums/include/include.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package include package include import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Include.ts#L20-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Include.ts#L20-L47 type Include struct { Name string } diff --git a/typedapi/types/enums/indexcheckonstartup/indexcheckonstartup.go b/typedapi/types/enums/indexcheckonstartup/indexcheckonstartup.go index 8643d516c7..7284dbb696 100644 --- a/typedapi/types/enums/indexcheckonstartup/indexcheckonstartup.go +++ b/typedapi/types/enums/indexcheckonstartup/indexcheckonstartup.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indexcheckonstartup package indexcheckonstartup import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L283-L290 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L289-L296 type IndexCheckOnStartup struct { Name string } diff --git a/typedapi/types/enums/indexingjobstate/indexingjobstate.go b/typedapi/types/enums/indexingjobstate/indexingjobstate.go index 19c0244e2a..9977053fcb 100644 --- a/typedapi/types/enums/indexingjobstate/indexingjobstate.go +++ b/typedapi/types/enums/indexingjobstate/indexingjobstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indexingjobstate package indexingjobstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_jobs/types.ts#L77-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_jobs/types.ts#L77-L83 type IndexingJobState struct { Name string } diff --git a/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go b/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go index 322ea13c57..d008ad9631 100644 --- a/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go +++ b/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indexmetadatastate package indexmetadatastate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L225-L232 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L225-L232 type IndexMetadataState struct { Name string } diff --git a/typedapi/types/enums/indexmode/indexmode.go b/typedapi/types/enums/indexmode/indexmode.go index 219eca1fbb..f736842968 100644 --- a/typedapi/types/enums/indexmode/indexmode.go +++ b/typedapi/types/enums/indexmode/indexmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indexmode package indexmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L41-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStream.ts#L42-L47 type IndexMode struct { Name string } diff --git a/typedapi/types/enums/indexoptions/indexoptions.go b/typedapi/types/enums/indexoptions/indexoptions.go index 0d7f51827c..66970a3bf7 100644 --- a/typedapi/types/enums/indexoptions/indexoptions.go +++ b/typedapi/types/enums/indexoptions/indexoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indexoptions package indexoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L309-L314 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L322-L327 type IndexOptions struct { Name string } diff --git a/typedapi/types/enums/indexprivilege/indexprivilege.go b/typedapi/types/enums/indexprivilege/indexprivilege.go index 28a5924c35..09f8fbeb83 100644 --- a/typedapi/types/enums/indexprivilege/indexprivilege.go +++ b/typedapi/types/enums/indexprivilege/indexprivilege.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indexprivilege package indexprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L388-L430 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L388-L430 type IndexPrivilege struct { Name string } diff --git a/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go b/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go index c8d3290959..8f6ad65f9e 100644 --- a/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go +++ b/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indexroutingallocationoptions package indexroutingallocationoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L38-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexRouting.ts#L38-L43 type IndexRoutingAllocationOptions struct { Name string } diff --git a/typedapi/types/enums/indexroutingrebalanceoptions/indexroutingrebalanceoptions.go b/typedapi/types/enums/indexroutingrebalanceoptions/indexroutingrebalanceoptions.go index e997f99384..90ab797e66 100644 --- a/typedapi/types/enums/indexroutingrebalanceoptions/indexroutingrebalanceoptions.go +++ b/typedapi/types/enums/indexroutingrebalanceoptions/indexroutingrebalanceoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indexroutingrebalanceoptions package indexroutingrebalanceoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexRouting.ts#L45-L50 type IndexRoutingRebalanceOptions struct { Name string } diff --git a/typedapi/types/enums/indicatorhealthstatus/indicatorhealthstatus.go b/typedapi/types/enums/indicatorhealthstatus/indicatorhealthstatus.go index bf2ef62938..f5bf721d82 100644 --- a/typedapi/types/enums/indicatorhealthstatus/indicatorhealthstatus.go +++ b/typedapi/types/enums/indicatorhealthstatus/indicatorhealthstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indicatorhealthstatus package indicatorhealthstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L25-L31 type IndicatorHealthStatus struct { Name string } diff --git a/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go b/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go index 8aca525bf9..e17c688183 100644 --- a/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go +++ b/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package indicesblockoptions package indicesblockoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L272-L281 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L278-L287 type IndicesBlockOptions struct { Name string } diff --git a/typedapi/types/enums/inputtype/inputtype.go b/typedapi/types/enums/inputtype/inputtype.go index 548f090c3c..604fa39b1c 100644 --- a/typedapi/types/enums/inputtype/inputtype.go +++ b/typedapi/types/enums/inputtype/inputtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package inputtype package inputtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L97-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L97-L101 type InputType struct { Name string } diff --git a/typedapi/types/enums/jinaaiservicetype/jinaaiservicetype.go b/typedapi/types/enums/jinaaiservicetype/jinaaiservicetype.go index 6c0ce80515..b0a4ff945a 100644 --- a/typedapi/types/enums/jinaaiservicetype/jinaaiservicetype.go +++ b/typedapi/types/enums/jinaaiservicetype/jinaaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package jinaaiservicetype package jinaaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1498-L1500 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1674-L1676 type JinaAIServiceType struct { Name string } diff --git a/typedapi/types/enums/jinaaisimilaritytype/jinaaisimilaritytype.go b/typedapi/types/enums/jinaaisimilaritytype/jinaaisimilaritytype.go index 9b57eb7612..a734d7bb2a 100644 --- a/typedapi/types/enums/jinaaisimilaritytype/jinaaisimilaritytype.go +++ b/typedapi/types/enums/jinaaisimilaritytype/jinaaisimilaritytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package jinaaisimilaritytype package jinaaisimilaritytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1502-L1506 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1678-L1682 type JinaAISimilarityType struct { Name string } diff --git a/typedapi/types/enums/jinaaitasktype/jinaaitasktype.go b/typedapi/types/enums/jinaaitasktype/jinaaitasktype.go index 5f95253f3f..fe4ba9e6c9 100644 --- a/typedapi/types/enums/jinaaitasktype/jinaaitasktype.go +++ b/typedapi/types/enums/jinaaitasktype/jinaaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package jinaaitasktype package jinaaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1493-L1496 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1669-L1672 type JinaAITaskType struct { Name string } diff --git a/typedapi/types/enums/jinaaitextembeddingtask/jinaaitextembeddingtask.go b/typedapi/types/enums/jinaaitextembeddingtask/jinaaitextembeddingtask.go index 070828bf64..8b6216a1e3 100644 --- a/typedapi/types/enums/jinaaitextembeddingtask/jinaaitextembeddingtask.go +++ b/typedapi/types/enums/jinaaitextembeddingtask/jinaaitextembeddingtask.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package jinaaitextembeddingtask package jinaaitextembeddingtask import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1508-L1513 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1684-L1689 type JinaAITextEmbeddingTask struct { Name string } diff --git a/typedapi/types/enums/jobblockedreason/jobblockedreason.go b/typedapi/types/enums/jobblockedreason/jobblockedreason.go index 222c153fe8..e4b594370a 100644 --- a/typedapi/types/enums/jobblockedreason/jobblockedreason.go +++ b/typedapi/types/enums/jobblockedreason/jobblockedreason.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package jobblockedreason package jobblockedreason import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L397-L401 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L399-L403 type JobBlockedReason struct { Name string } diff --git a/typedapi/types/enums/jobstate/jobstate.go b/typedapi/types/enums/jobstate/jobstate.go index 1120d42c95..8ae0c070d1 100644 --- a/typedapi/types/enums/jobstate/jobstate.go +++ b/typedapi/types/enums/jobstate/jobstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package jobstate package jobstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L36-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L36-L52 type JobState struct { Name string } diff --git a/typedapi/types/enums/jsonprocessorconflictstrategy/jsonprocessorconflictstrategy.go b/typedapi/types/enums/jsonprocessorconflictstrategy/jsonprocessorconflictstrategy.go index 94dceb6319..805526564b 100644 --- a/typedapi/types/enums/jsonprocessorconflictstrategy/jsonprocessorconflictstrategy.go +++ b/typedapi/types/enums/jsonprocessorconflictstrategy/jsonprocessorconflictstrategy.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package jsonprocessorconflictstrategy package jsonprocessorconflictstrategy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1170-L1175 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1174-L1179 type JsonProcessorConflictStrategy struct { Name string } diff --git a/typedapi/types/enums/keeptypesmode/keeptypesmode.go b/typedapi/types/enums/keeptypesmode/keeptypesmode.go index 53a9d97036..74701249d3 100644 --- a/typedapi/types/enums/keeptypesmode/keeptypesmode.go +++ b/typedapi/types/enums/keeptypesmode/keeptypesmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package keeptypesmode package keeptypesmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L282-L285 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L307-L310 type KeepTypesMode struct { Name string } diff --git a/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go b/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go index ab76e5d7ae..599a2f2af4 100644 --- a/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go +++ b/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package kuromojitokenizationmode package kuromojitokenizationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L58-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/kuromoji-plugin.ts#L58-L62 type KuromojiTokenizationMode struct { Name string } diff --git a/typedapi/types/enums/level/level.go b/typedapi/types/enums/level/level.go index 64e303476c..0dd7c42aae 100644 --- a/typedapi/types/enums/level/level.go +++ b/typedapi/types/enums/level/level.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package level package level import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L248-L252 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L244-L248 type Level struct { Name string } diff --git a/typedapi/types/enums/licensestatus/licensestatus.go b/typedapi/types/enums/licensestatus/licensestatus.go index b74beddedb..69ea4f5ac5 100644 --- a/typedapi/types/enums/licensestatus/licensestatus.go +++ b/typedapi/types/enums/licensestatus/licensestatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package licensestatus package licensestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/_types/License.ts#L35-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/_types/License.ts#L35-L40 type LicenseStatus struct { Name string } diff --git a/typedapi/types/enums/licensetype/licensetype.go b/typedapi/types/enums/licensetype/licensetype.go index f079fceee2..ba7da3b04c 100644 --- a/typedapi/types/enums/licensetype/licensetype.go +++ b/typedapi/types/enums/licensetype/licensetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package licensetype package licensetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/_types/License.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/_types/License.ts#L23-L33 type LicenseType struct { Name string } diff --git a/typedapi/types/enums/lifecycleoperationmode/lifecycleoperationmode.go b/typedapi/types/enums/lifecycleoperationmode/lifecycleoperationmode.go index 43bd3658b8..8017f86b88 100644 --- a/typedapi/types/enums/lifecycleoperationmode/lifecycleoperationmode.go +++ b/typedapi/types/enums/lifecycleoperationmode/lifecycleoperationmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package lifecycleoperationmode package lifecycleoperationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Lifecycle.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Lifecycle.ts#L20-L24 type LifecycleOperationMode struct { Name string } diff --git a/typedapi/types/enums/llamaservicetype/llamaservicetype.go b/typedapi/types/enums/llamaservicetype/llamaservicetype.go new file mode 100644 index 0000000000..e17fbcfdf4 --- /dev/null +++ b/typedapi/types/enums/llamaservicetype/llamaservicetype.go @@ -0,0 +1,53 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package llamaservicetype +package llamaservicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1729-L1731 +type LlamaServiceType struct { + Name string +} + +var ( + Llama = LlamaServiceType{"llama"} +) + +func (l LlamaServiceType) MarshalText() (text []byte, err error) { + return []byte(l.String()), nil +} + +func (l *LlamaServiceType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "llama": + *l = Llama + default: + *l = LlamaServiceType{string(text)} + } + + return nil +} + +func (l LlamaServiceType) String() string { + return l.Name +} diff --git a/typedapi/types/enums/llamasimilaritytype/llamasimilaritytype.go b/typedapi/types/enums/llamasimilaritytype/llamasimilaritytype.go new file mode 100644 index 0000000000..92d59bba25 --- /dev/null +++ b/typedapi/types/enums/llamasimilaritytype/llamasimilaritytype.go @@ -0,0 +1,61 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package llamasimilaritytype +package llamasimilaritytype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1733-L1737 +type LlamaSimilarityType struct { + Name string +} + +var ( + Cosine = LlamaSimilarityType{"cosine"} + + Dotproduct = LlamaSimilarityType{"dot_product"} + + L2norm = LlamaSimilarityType{"l2_norm"} +) + +func (l LlamaSimilarityType) MarshalText() (text []byte, err error) { + return []byte(l.String()), nil +} + +func (l *LlamaSimilarityType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "cosine": + *l = Cosine + case "dot_product": + *l = Dotproduct + case "l2_norm": + *l = L2norm + default: + *l = LlamaSimilarityType{string(text)} + } + + return nil +} + +func (l LlamaSimilarityType) String() string { + return l.Name +} diff --git a/typedapi/types/enums/llamatasktype/llamatasktype.go b/typedapi/types/enums/llamatasktype/llamatasktype.go new file mode 100644 index 0000000000..ee962f56ef --- /dev/null +++ b/typedapi/types/enums/llamatasktype/llamatasktype.go @@ -0,0 +1,61 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package llamatasktype +package llamatasktype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1723-L1727 +type LlamaTaskType struct { + Name string +} + +var ( + Textembedding = LlamaTaskType{"text_embedding"} + + Completion = LlamaTaskType{"completion"} + + Chatcompletion = LlamaTaskType{"chat_completion"} +) + +func (l LlamaTaskType) MarshalText() (text []byte, err error) { + return []byte(l.String()), nil +} + +func (l *LlamaTaskType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *l = Textembedding + case "completion": + *l = Completion + case "chat_completion": + *l = Chatcompletion + default: + *l = LlamaTaskType{string(text)} + } + + return nil +} + +func (l LlamaTaskType) String() string { + return l.Name +} diff --git a/typedapi/types/enums/lowercasetokenfilterlanguages/lowercasetokenfilterlanguages.go b/typedapi/types/enums/lowercasetokenfilterlanguages/lowercasetokenfilterlanguages.go index 1e981c1b58..0f17dec3e6 100644 --- a/typedapi/types/enums/lowercasetokenfilterlanguages/lowercasetokenfilterlanguages.go +++ b/typedapi/types/enums/lowercasetokenfilterlanguages/lowercasetokenfilterlanguages.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package lowercasetokenfilterlanguages package lowercasetokenfilterlanguages import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L344-L348 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L379-L383 type LowercaseTokenFilterLanguages struct { Name string } diff --git a/typedapi/types/enums/managedby/managedby.go b/typedapi/types/enums/managedby/managedby.go index 45a0a31587..430ab1c411 100644 --- a/typedapi/types/enums/managedby/managedby.go +++ b/typedapi/types/enums/managedby/managedby.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package managedby package managedby import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L33-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStream.ts#L34-L39 type ManagedBy struct { Name string } diff --git a/typedapi/types/enums/matchtype/matchtype.go b/typedapi/types/enums/matchtype/matchtype.go index ca26d7b3c8..b1ad0a0ef7 100644 --- a/typedapi/types/enums/matchtype/matchtype.go +++ b/typedapi/types/enums/matchtype/matchtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package matchtype package matchtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/dynamic-template.ts#L45-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/dynamic-template.ts#L45-L48 type MatchType struct { Name string } diff --git a/typedapi/types/enums/memorystatus/memorystatus.go b/typedapi/types/enums/memorystatus/memorystatus.go index b255caed0e..063a3e3fb8 100644 --- a/typedapi/types/enums/memorystatus/memorystatus.go +++ b/typedapi/types/enums/memorystatus/memorystatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package memorystatus package memorystatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Model.ts#L89-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Model.ts#L89-L93 type MemoryStatus struct { Name string } diff --git a/typedapi/types/enums/mergetype/mergetype.go b/typedapi/types/enums/mergetype/mergetype.go new file mode 100644 index 0000000000..abf9bd629c --- /dev/null +++ b/typedapi/types/enums/mergetype/mergetype.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package mergetype +package mergetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/simulate/ingest/SimulateIngestRequest.ts#L111-L114 +type MergeType struct { + Name string +} + +var ( + Index = MergeType{"index"} + + Template = MergeType{"template"} +) + +func (m MergeType) MarshalText() (text []byte, err error) { + return []byte(m.String()), nil +} + +func (m *MergeType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "index": + *m = Index + case "template": + *m = Template + default: + *m = MergeType{string(text)} + } + + return nil +} + +func (m MergeType) String() string { + return m.Name +} diff --git a/typedapi/types/enums/metric/metric.go b/typedapi/types/enums/metric/metric.go index 743bddb095..40e7ce9910 100644 --- a/typedapi/types/enums/metric/metric.go +++ b/typedapi/types/enums/metric/metric.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package metric package metric import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/_types/Metric.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/_types/Metric.ts#L22-L28 type Metric struct { Name string } diff --git a/typedapi/types/enums/migrationstatus/migrationstatus.go b/typedapi/types/enums/migrationstatus/migrationstatus.go index b1e296dc2b..572d22e41f 100644 --- a/typedapi/types/enums/migrationstatus/migrationstatus.go +++ b/typedapi/types/enums/migrationstatus/migrationstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package migrationstatus package migrationstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L30-L35 type MigrationStatus struct { Name string } diff --git a/typedapi/types/enums/minimuminterval/minimuminterval.go b/typedapi/types/enums/minimuminterval/minimuminterval.go index 42ee4e422a..c94723d95a 100644 --- a/typedapi/types/enums/minimuminterval/minimuminterval.go +++ b/typedapi/types/enums/minimuminterval/minimuminterval.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package minimuminterval package minimuminterval import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L112-L119 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L112-L119 type MinimumInterval struct { Name string } diff --git a/typedapi/types/enums/missingorder/missingorder.go b/typedapi/types/enums/missingorder/missingorder.go index e8a97e4127..ff69c55c29 100644 --- a/typedapi/types/enums/missingorder/missingorder.go +++ b/typedapi/types/enums/missingorder/missingorder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package missingorder package missingorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/AggregationContainer.ts#L536-L540 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/AggregationContainer.ts#L558-L562 type MissingOrder struct { Name string } diff --git a/typedapi/types/enums/mistralservicetype/mistralservicetype.go b/typedapi/types/enums/mistralservicetype/mistralservicetype.go index 6870487d95..254309f506 100644 --- a/typedapi/types/enums/mistralservicetype/mistralservicetype.go +++ b/typedapi/types/enums/mistralservicetype/mistralservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package mistralservicetype package mistralservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1550-L1552 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1774-L1776 type MistralServiceType struct { Name string } diff --git a/typedapi/types/enums/mistraltasktype/mistraltasktype.go b/typedapi/types/enums/mistraltasktype/mistraltasktype.go index 8b04a494e1..1233e08dd6 100644 --- a/typedapi/types/enums/mistraltasktype/mistraltasktype.go +++ b/typedapi/types/enums/mistraltasktype/mistraltasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package mistraltasktype package mistraltasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1544-L1548 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1768-L1772 type MistralTaskType struct { Name string } diff --git a/typedapi/types/enums/modeenum/modeenum.go b/typedapi/types/enums/modeenum/modeenum.go index 0207d01c5b..383ac86ed0 100644 --- a/typedapi/types/enums/modeenum/modeenum.go +++ b/typedapi/types/enums/modeenum/modeenum.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package modeenum package modeenum import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L60-L62 type ModeEnum struct { Name string } diff --git a/typedapi/types/enums/month/month.go b/typedapi/types/enums/month/month.go index 25e7d08c5f..644e1287e5 100644 --- a/typedapi/types/enums/month/month.go +++ b/typedapi/types/enums/month/month.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package month package month import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L65-L78 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L65-L78 type Month struct { Name string } diff --git a/typedapi/types/enums/multivaluemode/multivaluemode.go b/typedapi/types/enums/multivaluemode/multivaluemode.go index 651cf04ec4..98121d31f1 100644 --- a/typedapi/types/enums/multivaluemode/multivaluemode.go +++ b/typedapi/types/enums/multivaluemode/multivaluemode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package multivaluemode package multivaluemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L368-L385 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L370-L387 type MultiValueMode struct { Name string } diff --git a/typedapi/types/enums/noderole/noderole.go b/typedapi/types/enums/noderole/noderole.go index 50c6429f2f..521948bb88 100644 --- a/typedapi/types/enums/noderole/noderole.go +++ b/typedapi/types/enums/noderole/noderole.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package noderole package noderole import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Node.ts#L71-L89 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Node.ts#L71-L89 type NodeRole struct { Name string } diff --git a/typedapi/types/enums/nodesinfometric/nodesinfometric.go b/typedapi/types/enums/nodesinfometric/nodesinfometric.go new file mode 100644 index 0000000000..a082837cc8 --- /dev/null +++ b/typedapi/types/enums/nodesinfometric/nodesinfometric.go @@ -0,0 +1,105 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package nodesinfometric +package nodesinfometric + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/NodesInfoRequest.ts#L73-L88 +type NodesInfoMetric struct { + Name string +} + +var ( + All = NodesInfoMetric{"_all"} + + None = NodesInfoMetric{"_none"} + + Settings = NodesInfoMetric{"settings"} + + Os = NodesInfoMetric{"os"} + + Process = NodesInfoMetric{"process"} + + Jvm = NodesInfoMetric{"jvm"} + + Threadpool = NodesInfoMetric{"thread_pool"} + + Transport = NodesInfoMetric{"transport"} + + Http = NodesInfoMetric{"http"} + + Remoteclusterserver = NodesInfoMetric{"remote_cluster_server"} + + Plugins = NodesInfoMetric{"plugins"} + + Ingest = NodesInfoMetric{"ingest"} + + Aggregations = NodesInfoMetric{"aggregations"} + + Indices = NodesInfoMetric{"indices"} +) + +func (n NodesInfoMetric) MarshalText() (text []byte, err error) { + return []byte(n.String()), nil +} + +func (n *NodesInfoMetric) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "_all": + *n = All + case "_none": + *n = None + case "settings": + *n = Settings + case "os": + *n = Os + case "process": + *n = Process + case "jvm": + *n = Jvm + case "thread_pool": + *n = Threadpool + case "transport": + *n = Transport + case "http": + *n = Http + case "remote_cluster_server": + *n = Remoteclusterserver + case "plugins": + *n = Plugins + case "ingest": + *n = Ingest + case "aggregations": + *n = Aggregations + case "indices": + *n = Indices + default: + *n = NodesInfoMetric{string(text)} + } + + return nil +} + +func (n NodesInfoMetric) String() string { + return n.Name +} diff --git a/typedapi/types/enums/nodestatslevel/nodestatslevel.go b/typedapi/types/enums/nodestatslevel/nodestatslevel.go new file mode 100644 index 0000000000..7c68e86f66 --- /dev/null +++ b/typedapi/types/enums/nodestatslevel/nodestatslevel.go @@ -0,0 +1,61 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package nodestatslevel +package nodestatslevel + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L250-L254 +type NodeStatsLevel struct { + Name string +} + +var ( + Node = NodeStatsLevel{"node"} + + Indices = NodeStatsLevel{"indices"} + + Shards = NodeStatsLevel{"shards"} +) + +func (n NodeStatsLevel) MarshalText() (text []byte, err error) { + return []byte(n.String()), nil +} + +func (n *NodeStatsLevel) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "node": + *n = Node + case "indices": + *n = Indices + case "shards": + *n = Shards + default: + *n = NodeStatsLevel{string(text)} + } + + return nil +} + +func (n NodeStatsLevel) String() string { + return n.Name +} diff --git a/typedapi/types/enums/nodestatsmetric/nodestatsmetric.go b/typedapi/types/enums/nodestatsmetric/nodestatsmetric.go new file mode 100644 index 0000000000..1fb826aeb2 --- /dev/null +++ b/typedapi/types/enums/nodestatsmetric/nodestatsmetric.go @@ -0,0 +1,125 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package nodestatsmetric +package nodestatsmetric + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/stats/NodesStatsRequest.ts#L110-L131 +type NodeStatsMetric struct { + Name string +} + +var ( + All = NodeStatsMetric{"_all"} + + None = NodeStatsMetric{"_none"} + + Indices = NodeStatsMetric{"indices"} + + Os = NodeStatsMetric{"os"} + + Process = NodeStatsMetric{"process"} + + Jvm = NodeStatsMetric{"jvm"} + + Threadpool = NodeStatsMetric{"thread_pool"} + + Fs = NodeStatsMetric{"fs"} + + Transport = NodeStatsMetric{"transport"} + + Http = NodeStatsMetric{"http"} + + Breaker = NodeStatsMetric{"breaker"} + + Script = NodeStatsMetric{"script"} + + Discovery = NodeStatsMetric{"discovery"} + + Ingest = NodeStatsMetric{"ingest"} + + Adaptiveselection = NodeStatsMetric{"adaptive_selection"} + + Scriptcache = NodeStatsMetric{"script_cache"} + + Indexingpressure = NodeStatsMetric{"indexing_pressure"} + + Repositories = NodeStatsMetric{"repositories"} + + Allocations = NodeStatsMetric{"allocations"} +) + +func (n NodeStatsMetric) MarshalText() (text []byte, err error) { + return []byte(n.String()), nil +} + +func (n *NodeStatsMetric) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "_all": + *n = All + case "_none": + *n = None + case "indices": + *n = Indices + case "os": + *n = Os + case "process": + *n = Process + case "jvm": + *n = Jvm + case "thread_pool": + *n = Threadpool + case "fs": + *n = Fs + case "transport": + *n = Transport + case "http": + *n = Http + case "breaker": + *n = Breaker + case "script": + *n = Script + case "discovery": + *n = Discovery + case "ingest": + *n = Ingest + case "adaptive_selection": + *n = Adaptiveselection + case "script_cache": + *n = Scriptcache + case "indexing_pressure": + *n = Indexingpressure + case "repositories": + *n = Repositories + case "allocations": + *n = Allocations + default: + *n = NodeStatsMetric{string(text)} + } + + return nil +} + +func (n NodeStatsMetric) String() string { + return n.Name +} diff --git a/typedapi/types/enums/nodesusagemetric/nodesusagemetric.go b/typedapi/types/enums/nodesusagemetric/nodesusagemetric.go new file mode 100644 index 0000000000..8dbbe0e52f --- /dev/null +++ b/typedapi/types/enums/nodesusagemetric/nodesusagemetric.go @@ -0,0 +1,61 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package nodesusagemetric +package nodesusagemetric + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/usage/NodesUsageRequest.ts#L71-L75 +type NodesUsageMetric struct { + Name string +} + +var ( + All = NodesUsageMetric{"_all"} + + Restactions = NodesUsageMetric{"rest_actions"} + + Aggregations = NodesUsageMetric{"aggregations"} +) + +func (n NodesUsageMetric) MarshalText() (text []byte, err error) { + return []byte(n.String()), nil +} + +func (n *NodesUsageMetric) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "_all": + *n = All + case "rest_actions": + *n = Restactions + case "aggregations": + *n = Aggregations + default: + *n = NodesUsageMetric{string(text)} + } + + return nil +} + +func (n NodesUsageMetric) String() string { + return n.Name +} diff --git a/typedapi/types/enums/noridecompoundmode/noridecompoundmode.go b/typedapi/types/enums/noridecompoundmode/noridecompoundmode.go index 9d2d41f890..fc5e7a2b81 100644 --- a/typedapi/types/enums/noridecompoundmode/noridecompoundmode.go +++ b/typedapi/types/enums/noridecompoundmode/noridecompoundmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package noridecompoundmode package noridecompoundmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/nori-plugin.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/nori-plugin.ts#L23-L27 type NoriDecompoundMode struct { Name string } diff --git a/typedapi/types/enums/normalization/normalization.go b/typedapi/types/enums/normalization/normalization.go index bab33ebda8..82ce793807 100644 --- a/typedapi/types/enums/normalization/normalization.go +++ b/typedapi/types/enums/normalization/normalization.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package normalization package normalization import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Similarity.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Similarity.ts#L52-L58 type Normalization struct { Name string } diff --git a/typedapi/types/enums/normalizemethod/normalizemethod.go b/typedapi/types/enums/normalizemethod/normalizemethod.go index 6e5e3450d4..40355f272c 100644 --- a/typedapi/types/enums/normalizemethod/normalizemethod.go +++ b/typedapi/types/enums/normalizemethod/normalizemethod.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package normalizemethod package normalizemethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L361-L387 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L363-L389 type NormalizeMethod struct { Name string } diff --git a/typedapi/types/enums/numericfielddataformat/numericfielddataformat.go b/typedapi/types/enums/numericfielddataformat/numericfielddataformat.go index 10733e969f..8308195f7e 100644 --- a/typedapi/types/enums/numericfielddataformat/numericfielddataformat.go +++ b/typedapi/types/enums/numericfielddataformat/numericfielddataformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package numericfielddataformat package numericfielddataformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/NumericFielddataFormat.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/NumericFielddataFormat.ts#L20-L23 type NumericFielddataFormat struct { Name string } diff --git a/typedapi/types/enums/onscripterror/onscripterror.go b/typedapi/types/enums/onscripterror/onscripterror.go index 13a66aaadb..36d8a0a513 100644 --- a/typedapi/types/enums/onscripterror/onscripterror.go +++ b/typedapi/types/enums/onscripterror/onscripterror.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package onscripterror package onscripterror import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L152-L155 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L153-L156 type OnScriptError struct { Name string } diff --git a/typedapi/types/enums/openaiservicetype/openaiservicetype.go b/typedapi/types/enums/openaiservicetype/openaiservicetype.go index 308927ad24..5dde98dfe8 100644 --- a/typedapi/types/enums/openaiservicetype/openaiservicetype.go +++ b/typedapi/types/enums/openaiservicetype/openaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package openaiservicetype package openaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1612-L1614 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1847-L1849 type OpenAIServiceType struct { Name string } diff --git a/typedapi/types/enums/openaitasktype/openaitasktype.go b/typedapi/types/enums/openaitasktype/openaitasktype.go index 51c0e304db..940a223208 100644 --- a/typedapi/types/enums/openaitasktype/openaitasktype.go +++ b/typedapi/types/enums/openaitasktype/openaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package openaitasktype package openaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1606-L1610 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1841-L1845 type OpenAITaskType struct { Name string } diff --git a/typedapi/types/enums/openshiftaiservicetype/openshiftaiservicetype.go b/typedapi/types/enums/openshiftaiservicetype/openshiftaiservicetype.go new file mode 100644 index 0000000000..0b29e46f48 --- /dev/null +++ b/typedapi/types/enums/openshiftaiservicetype/openshiftaiservicetype.go @@ -0,0 +1,53 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package openshiftaiservicetype +package openshiftaiservicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1892-L1894 +type OpenShiftAiServiceType struct { + Name string +} + +var ( + Openshiftai = OpenShiftAiServiceType{"openshift_ai"} +) + +func (o OpenShiftAiServiceType) MarshalText() (text []byte, err error) { + return []byte(o.String()), nil +} + +func (o *OpenShiftAiServiceType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "openshift_ai": + *o = Openshiftai + default: + *o = OpenShiftAiServiceType{string(text)} + } + + return nil +} + +func (o OpenShiftAiServiceType) String() string { + return o.Name +} diff --git a/typedapi/types/enums/openshiftaisimilaritytype/openshiftaisimilaritytype.go b/typedapi/types/enums/openshiftaisimilaritytype/openshiftaisimilaritytype.go new file mode 100644 index 0000000000..117949c1f4 --- /dev/null +++ b/typedapi/types/enums/openshiftaisimilaritytype/openshiftaisimilaritytype.go @@ -0,0 +1,61 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package openshiftaisimilaritytype +package openshiftaisimilaritytype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1896-L1900 +type OpenShiftAiSimilarityType struct { + Name string +} + +var ( + Cosine = OpenShiftAiSimilarityType{"cosine"} + + Dotproduct = OpenShiftAiSimilarityType{"dot_product"} + + L2norm = OpenShiftAiSimilarityType{"l2_norm"} +) + +func (o OpenShiftAiSimilarityType) MarshalText() (text []byte, err error) { + return []byte(o.String()), nil +} + +func (o *OpenShiftAiSimilarityType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "cosine": + *o = Cosine + case "dot_product": + *o = Dotproduct + case "l2_norm": + *o = L2norm + default: + *o = OpenShiftAiSimilarityType{string(text)} + } + + return nil +} + +func (o OpenShiftAiSimilarityType) String() string { + return o.Name +} diff --git a/typedapi/types/enums/openshiftaitasktype/openshiftaitasktype.go b/typedapi/types/enums/openshiftaitasktype/openshiftaitasktype.go new file mode 100644 index 0000000000..fe9409dd2e --- /dev/null +++ b/typedapi/types/enums/openshiftaitasktype/openshiftaitasktype.go @@ -0,0 +1,65 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package openshiftaitasktype +package openshiftaitasktype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1885-L1890 +type OpenShiftAiTaskType struct { + Name string +} + +var ( + Textembedding = OpenShiftAiTaskType{"text_embedding"} + + Completion = OpenShiftAiTaskType{"completion"} + + Chatcompletion = OpenShiftAiTaskType{"chat_completion"} + + Rerank = OpenShiftAiTaskType{"rerank"} +) + +func (o OpenShiftAiTaskType) MarshalText() (text []byte, err error) { + return []byte(o.String()), nil +} + +func (o *OpenShiftAiTaskType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *o = Textembedding + case "completion": + *o = Completion + case "chat_completion": + *o = Chatcompletion + case "rerank": + *o = Rerank + default: + *o = OpenShiftAiTaskType{string(text)} + } + + return nil +} + +func (o OpenShiftAiTaskType) String() string { + return o.Name +} diff --git a/typedapi/types/enums/operationtype/operationtype.go b/typedapi/types/enums/operationtype/operationtype.go index fb71041410..28d1465ebf 100644 --- a/typedapi/types/enums/operationtype/operationtype.go +++ b/typedapi/types/enums/operationtype/operationtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package operationtype package operationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L93-L98 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/types.ts#L93-L98 type OperationType struct { Name string } diff --git a/typedapi/types/enums/operator/operator.go b/typedapi/types/enums/operator/operator.go index dc52047e7f..066849825b 100644 --- a/typedapi/types/enums/operator/operator.go +++ b/typedapi/types/enums/operator/operator.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package operator package operator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/Operator.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/Operator.ts#L22-L27 type Operator struct { Name string } diff --git a/typedapi/types/enums/optype/optype.go b/typedapi/types/enums/optype/optype.go index 60b622ac39..db5e16eb7d 100644 --- a/typedapi/types/enums/optype/optype.go +++ b/typedapi/types/enums/optype/optype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package optype package optype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L254-L263 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L256-L265 type OpType struct { Name string } diff --git a/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go b/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go index 57f81ce250..3d16c729ac 100644 --- a/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go +++ b/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package pagerdutycontexttype package pagerdutycontexttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L67-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L67-L70 type PagerDutyContextType struct { Name string } diff --git a/typedapi/types/enums/pagerdutyeventtype/pagerdutyeventtype.go b/typedapi/types/enums/pagerdutyeventtype/pagerdutyeventtype.go index 4a1aa8097b..a3c7678463 100644 --- a/typedapi/types/enums/pagerdutyeventtype/pagerdutyeventtype.go +++ b/typedapi/types/enums/pagerdutyeventtype/pagerdutyeventtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package pagerdutyeventtype package pagerdutyeventtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L72-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L72-L76 type PagerDutyEventType struct { Name string } diff --git a/typedapi/types/enums/painlesscontext/painlesscontext.go b/typedapi/types/enums/painlesscontext/painlesscontext.go index 91a22d3075..2b66e93ad7 100644 --- a/typedapi/types/enums/painlesscontext/painlesscontext.go +++ b/typedapi/types/enums/painlesscontext/painlesscontext.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package painlesscontext package painlesscontext import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/scripts_painless_execute/types.ts#L57-L80 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/scripts_painless_execute/types.ts#L57-L80 type PainlessContext struct { Name string } diff --git a/typedapi/types/enums/phoneticencoder/phoneticencoder.go b/typedapi/types/enums/phoneticencoder/phoneticencoder.go index e974eb327c..b7bbad9020 100644 --- a/typedapi/types/enums/phoneticencoder/phoneticencoder.go +++ b/typedapi/types/enums/phoneticencoder/phoneticencoder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package phoneticencoder package phoneticencoder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/phonetic-plugin.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/phonetic-plugin.ts#L23-L36 type PhoneticEncoder struct { Name string } diff --git a/typedapi/types/enums/phoneticlanguage/phoneticlanguage.go b/typedapi/types/enums/phoneticlanguage/phoneticlanguage.go index d8bbd9a512..cc6ab1cc36 100644 --- a/typedapi/types/enums/phoneticlanguage/phoneticlanguage.go +++ b/typedapi/types/enums/phoneticlanguage/phoneticlanguage.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package phoneticlanguage package phoneticlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/phonetic-plugin.ts#L38-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/phonetic-plugin.ts#L38-L51 type PhoneticLanguage struct { Name string } diff --git a/typedapi/types/enums/phoneticnametype/phoneticnametype.go b/typedapi/types/enums/phoneticnametype/phoneticnametype.go index 0a8e3eed8d..871bee15ac 100644 --- a/typedapi/types/enums/phoneticnametype/phoneticnametype.go +++ b/typedapi/types/enums/phoneticnametype/phoneticnametype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package phoneticnametype package phoneticnametype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/phonetic-plugin.ts#L53-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/phonetic-plugin.ts#L53-L57 type PhoneticNameType struct { Name string } diff --git a/typedapi/types/enums/phoneticruletype/phoneticruletype.go b/typedapi/types/enums/phoneticruletype/phoneticruletype.go index 9e8d68e2b7..7dba927fe7 100644 --- a/typedapi/types/enums/phoneticruletype/phoneticruletype.go +++ b/typedapi/types/enums/phoneticruletype/phoneticruletype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package phoneticruletype package phoneticruletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/phonetic-plugin.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/phonetic-plugin.ts#L59-L62 type PhoneticRuleType struct { Name string } diff --git a/typedapi/types/enums/pipelinesimulationstatusoptions/pipelinesimulationstatusoptions.go b/typedapi/types/enums/pipelinesimulationstatusoptions/pipelinesimulationstatusoptions.go index a418aabe70..b1736f220b 100644 --- a/typedapi/types/enums/pipelinesimulationstatusoptions/pipelinesimulationstatusoptions.go +++ b/typedapi/types/enums/pipelinesimulationstatusoptions/pipelinesimulationstatusoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package pipelinesimulationstatusoptions package pipelinesimulationstatusoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Simulation.ts#L51-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Simulation.ts#L51-L57 type PipelineSimulationStatusOptions struct { Name string } diff --git a/typedapi/types/enums/policytype/policytype.go b/typedapi/types/enums/policytype/policytype.go index 75ac0c2272..ed9840c500 100644 --- a/typedapi/types/enums/policytype/policytype.go +++ b/typedapi/types/enums/policytype/policytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package policytype package policytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/_types/Policy.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/_types/Policy.ts#L28-L32 type PolicyType struct { Name string } diff --git a/typedapi/types/enums/profilingoperationmode/profilingoperationmode.go b/typedapi/types/enums/profilingoperationmode/profilingoperationmode.go new file mode 100644 index 0000000000..6dcce633d2 --- /dev/null +++ b/typedapi/types/enums/profilingoperationmode/profilingoperationmode.go @@ -0,0 +1,61 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package profilingoperationmode +package profilingoperationmode + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/profiling/status/types.ts#L20-L24 +type ProfilingOperationMode struct { + Name string +} + +var ( + RUNNING = ProfilingOperationMode{"RUNNING"} + + STOPPING = ProfilingOperationMode{"STOPPING"} + + STOPPED = ProfilingOperationMode{"STOPPED"} +) + +func (p ProfilingOperationMode) MarshalText() (text []byte, err error) { + return []byte(p.String()), nil +} + +func (p *ProfilingOperationMode) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "running": + *p = RUNNING + case "stopping": + *p = STOPPING + case "stopped": + *p = STOPPED + default: + *p = ProfilingOperationMode{string(text)} + } + + return nil +} + +func (p ProfilingOperationMode) String() string { + return p.Name +} diff --git a/typedapi/types/enums/quantifier/quantifier.go b/typedapi/types/enums/quantifier/quantifier.go index 9e1de8bd1c..39e0ed0da1 100644 --- a/typedapi/types/enums/quantifier/quantifier.go +++ b/typedapi/types/enums/quantifier/quantifier.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package quantifier package quantifier import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L75-L78 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Conditions.ts#L75-L78 type Quantifier struct { Name string } diff --git a/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go b/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go index bf684d4901..3fa02b8260 100644 --- a/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go +++ b/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package queryrulecriteriatype package queryrulecriteriatype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/_types/QueryRuleset.ts#L95-L108 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/_types/QueryRuleset.ts#L95-L108 type QueryRuleCriteriaType struct { Name string } diff --git a/typedapi/types/enums/queryruletype/queryruletype.go b/typedapi/types/enums/queryruletype/queryruletype.go index bcdc9ee8ca..8f7de4c0cb 100644 --- a/typedapi/types/enums/queryruletype/queryruletype.go +++ b/typedapi/types/enums/queryruletype/queryruletype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package queryruletype package queryruletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/_types/QueryRuleset.ts#L60-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/_types/QueryRuleset.ts#L60-L63 type QueryRuleType struct { Name string } diff --git a/typedapi/types/enums/rangerelation/rangerelation.go b/typedapi/types/enums/rangerelation/rangerelation.go index bbf25c8215..3d0304f7d7 100644 --- a/typedapi/types/enums/rangerelation/rangerelation.go +++ b/typedapi/types/enums/rangerelation/rangerelation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package rangerelation package rangerelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L184-L197 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L185-L198 type RangeRelation struct { Name string } diff --git a/typedapi/types/enums/rankvectorelementtype/rankvectorelementtype.go b/typedapi/types/enums/rankvectorelementtype/rankvectorelementtype.go index 7749a1880b..b7a1bed789 100644 --- a/typedapi/types/enums/rankvectorelementtype/rankvectorelementtype.go +++ b/typedapi/types/enums/rankvectorelementtype/rankvectorelementtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package rankvectorelementtype package rankvectorelementtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L386-L390 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L399-L403 type RankVectorElementType struct { Name string } diff --git a/typedapi/types/enums/ratemode/ratemode.go b/typedapi/types/enums/ratemode/ratemode.go index f861de1eb9..c8256a7116 100644 --- a/typedapi/types/enums/ratemode/ratemode.go +++ b/typedapi/types/enums/ratemode/ratemode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package ratemode package ratemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L275-L284 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L279-L288 type RateMode struct { Name string } diff --git a/typedapi/types/enums/refresh/refresh.go b/typedapi/types/enums/refresh/refresh.go index a580817b39..502ba7bc7c 100644 --- a/typedapi/types/enums/refresh/refresh.go +++ b/typedapi/types/enums/refresh/refresh.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package refresh package refresh import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L265-L272 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L267-L274 type Refresh struct { Name string } diff --git a/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go b/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go index fedefee1b8..2ffb74f492 100644 --- a/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go +++ b/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package remoteclusterprivilege package remoteclusterprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L203-L215 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L203-L215 type RemoteClusterPrivilege struct { Name string } diff --git a/typedapi/types/enums/responsecontenttype/responsecontenttype.go b/typedapi/types/enums/responsecontenttype/responsecontenttype.go index 9530c57909..d173be2450 100644 --- a/typedapi/types/enums/responsecontenttype/responsecontenttype.go +++ b/typedapi/types/enums/responsecontenttype/responsecontenttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package responsecontenttype package responsecontenttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L103-L107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L103-L107 type ResponseContentType struct { Name string } diff --git a/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go b/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go index 4c2c5c9284..56097dd5af 100644 --- a/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go +++ b/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package restrictionworkflow package restrictionworkflow import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleDescriptor.ts#L143-L146 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/RoleDescriptor.ts#L143-L146 type RestrictionWorkflow struct { Name string } diff --git a/typedapi/types/enums/result/result.go b/typedapi/types/enums/result/result.go index f4a371324b..c10073c24d 100644 --- a/typedapi/types/enums/result/result.go +++ b/typedapi/types/enums/result/result.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package result package result import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Result.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Result.ts#L20-L26 type Result struct { Name string } diff --git a/typedapi/types/enums/resultposition/resultposition.go b/typedapi/types/enums/resultposition/resultposition.go index e188de5e58..59f16a6e4d 100644 --- a/typedapi/types/enums/resultposition/resultposition.go +++ b/typedapi/types/enums/resultposition/resultposition.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package resultposition package resultposition import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/search/types.ts#L20-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/eql/search/types.ts#L20-L32 type ResultPosition struct { Name string } diff --git a/typedapi/types/enums/routingstate/routingstate.go b/typedapi/types/enums/routingstate/routingstate.go index 926ed0ebd2..13786e1c9a 100644 --- a/typedapi/types/enums/routingstate/routingstate.go +++ b/typedapi/types/enums/routingstate/routingstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package routingstate package routingstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L408-L429 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L409-L430 type RoutingState struct { Name string } diff --git a/typedapi/types/enums/ruleaction/ruleaction.go b/typedapi/types/enums/ruleaction/ruleaction.go index 900cf17a9d..7066cc3724 100644 --- a/typedapi/types/enums/ruleaction/ruleaction.go +++ b/typedapi/types/enums/ruleaction/ruleaction.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package ruleaction package ruleaction import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Rule.ts#L41-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Rule.ts#L41-L50 type RuleAction struct { Name string } diff --git a/typedapi/types/enums/runtimefieldtype/runtimefieldtype.go b/typedapi/types/enums/runtimefieldtype/runtimefieldtype.go index 8a43688824..997deab5a1 100644 --- a/typedapi/types/enums/runtimefieldtype/runtimefieldtype.go +++ b/typedapi/types/enums/runtimefieldtype/runtimefieldtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package runtimefieldtype package runtimefieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/RuntimeFields.ts#L62-L73 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/RuntimeFields.ts#L62-L73 type RuntimeFieldType struct { Name string } diff --git a/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go b/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go index ee0b1aad58..ceacb1d9a2 100644 --- a/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go +++ b/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package sampleraggregationexecutionhint package sampleraggregationexecutionhint import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L359-L372 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L362-L375 type SamplerAggregationExecutionHint struct { Name string } diff --git a/typedapi/types/enums/samplingmethod/samplingmethod.go b/typedapi/types/enums/samplingmethod/samplingmethod.go new file mode 100644 index 0000000000..79002d06c7 --- /dev/null +++ b/typedapi/types/enums/samplingmethod/samplingmethod.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package samplingmethod +package samplingmethod + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/Downsample.ts#L33-L36 +type SamplingMethod struct { + Name string +} + +var ( + Aggregate = SamplingMethod{"aggregate"} + + Lastvalue = SamplingMethod{"last_value"} +) + +func (s SamplingMethod) MarshalText() (text []byte, err error) { + return []byte(s.String()), nil +} + +func (s *SamplingMethod) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "aggregate": + *s = Aggregate + case "last_value": + *s = Lastvalue + default: + *s = SamplingMethod{string(text)} + } + + return nil +} + +func (s SamplingMethod) String() string { + return s.Name +} diff --git a/typedapi/types/enums/scoremode/scoremode.go b/typedapi/types/enums/scoremode/scoremode.go index dbcfd2b597..65f100cdc4 100644 --- a/typedapi/types/enums/scoremode/scoremode.go +++ b/typedapi/types/enums/scoremode/scoremode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package scoremode package scoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/rescoring.ts#L64-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/rescoring.ts#L67-L89 type ScoreMode struct { Name string } diff --git a/typedapi/types/enums/scorenormalizer/scorenormalizer.go b/typedapi/types/enums/scorenormalizer/scorenormalizer.go index 796f7ed4a0..803745c663 100644 --- a/typedapi/types/enums/scorenormalizer/scorenormalizer.go +++ b/typedapi/types/enums/scorenormalizer/scorenormalizer.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package scorenormalizer package scorenormalizer import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L91-L95 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L92-L96 type ScoreNormalizer struct { Name string } diff --git a/typedapi/types/enums/scriptlanguage/scriptlanguage.go b/typedapi/types/enums/scriptlanguage/scriptlanguage.go index d5e6327931..65d70c7819 100644 --- a/typedapi/types/enums/scriptlanguage/scriptlanguage.go +++ b/typedapi/types/enums/scriptlanguage/scriptlanguage.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package scriptlanguage package scriptlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L25-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Scripting.ts#L25-L46 type ScriptLanguage struct { Name string } diff --git a/typedapi/types/enums/scriptsorttype/scriptsorttype.go b/typedapi/types/enums/scriptsorttype/scriptsorttype.go index 1535ec0a22..82b535c484 100644 --- a/typedapi/types/enums/scriptsorttype/scriptsorttype.go +++ b/typedapi/types/enums/scriptsorttype/scriptsorttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package scriptsorttype package scriptsorttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L80-L84 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L80-L84 type ScriptSortType struct { Name string } diff --git a/typedapi/types/enums/searchtype/searchtype.go b/typedapi/types/enums/searchtype/searchtype.go index 97d2d7ddd3..3cdcd437dc 100644 --- a/typedapi/types/enums/searchtype/searchtype.go +++ b/typedapi/types/enums/searchtype/searchtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package searchtype package searchtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L274-L279 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L276-L281 type SearchType struct { Name string } diff --git a/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go b/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go index 3935279f16..225956039b 100644 --- a/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go +++ b/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package segmentsortmissing package segmentsortmissing import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSegmentSort.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSegmentSort.ts#L43-L46 type SegmentSortMissing struct { Name string } diff --git a/typedapi/types/enums/segmentsortmode/segmentsortmode.go b/typedapi/types/enums/segmentsortmode/segmentsortmode.go index 4cda7d77af..448d530a1d 100644 --- a/typedapi/types/enums/segmentsortmode/segmentsortmode.go +++ b/typedapi/types/enums/segmentsortmode/segmentsortmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package segmentsortmode package segmentsortmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSegmentSort.ts#L36-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSegmentSort.ts#L36-L41 type SegmentSortMode struct { Name string } diff --git a/typedapi/types/enums/segmentsortorder/segmentsortorder.go b/typedapi/types/enums/segmentsortorder/segmentsortorder.go index d03d7d1b99..656cee977f 100644 --- a/typedapi/types/enums/segmentsortorder/segmentsortorder.go +++ b/typedapi/types/enums/segmentsortorder/segmentsortorder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package segmentsortorder package segmentsortorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSegmentSort.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSegmentSort.ts#L29-L34 type SegmentSortOrder struct { Name string } diff --git a/typedapi/types/enums/shapetype/shapetype.go b/typedapi/types/enums/shapetype/shapetype.go index c1775db194..e4b0d07261 100644 --- a/typedapi/types/enums/shapetype/shapetype.go +++ b/typedapi/types/enums/shapetype/shapetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package shapetype package shapetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1492-L1495 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1496-L1499 type ShapeType struct { Name string } diff --git a/typedapi/types/enums/shardroutingstate/shardroutingstate.go b/typedapi/types/enums/shardroutingstate/shardroutingstate.go index 1b77580266..e7217d043c 100644 --- a/typedapi/types/enums/shardroutingstate/shardroutingstate.go +++ b/typedapi/types/enums/shardroutingstate/shardroutingstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package shardroutingstate package shardroutingstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L169-L174 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L169-L174 type ShardRoutingState struct { Name string } diff --git a/typedapi/types/enums/shardsstatsstage/shardsstatsstage.go b/typedapi/types/enums/shardsstatsstage/shardsstatsstage.go index fc78fc0546..cdd1f60412 100644 --- a/typedapi/types/enums/shardsstatsstage/shardsstatsstage.go +++ b/typedapi/types/enums/shardsstatsstage/shardsstatsstage.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package shardsstatsstage package shardsstatsstage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotShardsStatsStage.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotShardsStatsStage.ts#L20-L31 type ShardsStatsStage struct { Name string } diff --git a/typedapi/types/enums/shardstate/shardstate.go b/typedapi/types/enums/shardstate/shardstate.go index 31b044e9b9..aa2cfe87a8 100644 --- a/typedapi/types/enums/shardstate/shardstate.go +++ b/typedapi/types/enums/shardstate/shardstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package shardstate package shardstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L689-L698 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L707-L716 type ShardState struct { Name string } diff --git a/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go b/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go index f4c43cd762..e7953e0e1e 100644 --- a/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go +++ b/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package shardstoreallocation package shardstoreallocation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shard_stores/types.ts#L47-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shard_stores/types.ts#L47-L51 type ShardStoreAllocation struct { Name string } diff --git a/typedapi/types/enums/shardstorestatus/shardstorestatus.go b/typedapi/types/enums/shardstorestatus/shardstorestatus.go index 6dfffea91e..ffb4eb7daf 100644 --- a/typedapi/types/enums/shardstorestatus/shardstorestatus.go +++ b/typedapi/types/enums/shardstorestatus/shardstorestatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package shardstorestatus package shardstorestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shard_stores/types.ts#L62-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shard_stores/types.ts#L62-L71 type ShardStoreStatus struct { Name string } diff --git a/typedapi/types/enums/shutdownstatus/shutdownstatus.go b/typedapi/types/enums/shutdownstatus/shutdownstatus.go index 691b4a61ed..52ddd94786 100644 --- a/typedapi/types/enums/shutdownstatus/shutdownstatus.go +++ b/typedapi/types/enums/shutdownstatus/shutdownstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package shutdownstatus package shutdownstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L45-L50 type ShutdownStatus struct { Name string } diff --git a/typedapi/types/enums/shutdowntype/shutdowntype.go b/typedapi/types/enums/shutdowntype/shutdowntype.go index 389f3cca2f..b87c4b1ccc 100644 --- a/typedapi/types/enums/shutdowntype/shutdowntype.go +++ b/typedapi/types/enums/shutdowntype/shutdowntype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package shutdowntype package shutdowntype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L40-L43 type ShutdownType struct { Name string } diff --git a/typedapi/types/enums/simplequerystringflag/simplequerystringflag.go b/typedapi/types/enums/simplequerystringflag/simplequerystringflag.go index 85a9fa442c..c28efe5286 100644 --- a/typedapi/types/enums/simplequerystringflag/simplequerystringflag.go +++ b/typedapi/types/enums/simplequerystringflag/simplequerystringflag.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package simplequerystringflag package simplequerystringflag import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L780-L835 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L781-L836 type SimpleQueryStringFlag struct { Name string } diff --git a/typedapi/types/enums/slicescalculation/slicescalculation.go b/typedapi/types/enums/slicescalculation/slicescalculation.go index 8729b1fbb5..6eaec91d5d 100644 --- a/typedapi/types/enums/slicescalculation/slicescalculation.go +++ b/typedapi/types/enums/slicescalculation/slicescalculation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package slicescalculation package slicescalculation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L370-L378 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L372-L380 type SlicesCalculation struct { Name string } diff --git a/typedapi/types/enums/snapshotsort/snapshotsort.go b/typedapi/types/enums/snapshotsort/snapshotsort.go index 9043b64b30..1dd3fb268a 100644 --- a/typedapi/types/enums/snapshotsort/snapshotsort.go +++ b/typedapi/types/enums/snapshotsort/snapshotsort.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package snapshotsort package snapshotsort import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotInfo.ts#L73-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotInfo.ts#L73-L93 type SnapshotSort struct { Name string } diff --git a/typedapi/types/enums/snapshotstate/snapshotstate.go b/typedapi/types/enums/snapshotstate/snapshotstate.go index 82c5e3c8e4..bcd9cba7a8 100644 --- a/typedapi/types/enums/snapshotstate/snapshotstate.go +++ b/typedapi/types/enums/snapshotstate/snapshotstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package snapshotstate package snapshotstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotState.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotState.ts#L20-L31 type SnapshotState struct { Name string } diff --git a/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go b/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go index ee206038d9..c07f11c6ee 100644 --- a/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go +++ b/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package snapshotupgradestate package snapshotupgradestate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Model.ts#L95-L100 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Model.ts#L95-L100 type SnapshotUpgradeState struct { Name string } diff --git a/typedapi/types/enums/snowballlanguage/snowballlanguage.go b/typedapi/types/enums/snowballlanguage/snowballlanguage.go index a6b0760a7b..01941f8f4c 100644 --- a/typedapi/types/enums/snowballlanguage/snowballlanguage.go +++ b/typedapi/types/enums/snowballlanguage/snowballlanguage.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package snowballlanguage package snowballlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/languages.ts#L20-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/languages.ts#L20-L48 type SnowballLanguage struct { Name string } diff --git a/typedapi/types/enums/sortmode/sortmode.go b/typedapi/types/enums/sortmode/sortmode.go index 0e2b04a8cc..ee4611cac5 100644 --- a/typedapi/types/enums/sortmode/sortmode.go +++ b/typedapi/types/enums/sortmode/sortmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package sortmode package sortmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L108-L117 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L108-L117 type SortMode struct { Name string } diff --git a/typedapi/types/enums/sortorder/sortorder.go b/typedapi/types/enums/sortorder/sortorder.go index bb338cf4d0..f446b5707a 100644 --- a/typedapi/types/enums/sortorder/sortorder.go +++ b/typedapi/types/enums/sortorder/sortorder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package sortorder package sortorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L119-L128 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L119-L128 type SortOrder struct { Name string } diff --git a/typedapi/types/enums/sourcefieldmode/sourcefieldmode.go b/typedapi/types/enums/sourcefieldmode/sourcefieldmode.go index a6645db74c..0c901b27f5 100644 --- a/typedapi/types/enums/sourcefieldmode/sourcefieldmode.go +++ b/typedapi/types/enums/sourcefieldmode/sourcefieldmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package sourcefieldmode package sourcefieldmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L67-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/meta-fields.ts#L67-L75 type SourceFieldMode struct { Name string } diff --git a/typedapi/types/enums/sourcemode/sourcemode.go b/typedapi/types/enums/sourcemode/sourcemode.go index 32b3cbe02a..3b533ee747 100644 --- a/typedapi/types/enums/sourcemode/sourcemode.go +++ b/typedapi/types/enums/sourcemode/sourcemode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package sourcemode package sourcemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L522-L526 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L532-L536 type SourceMode struct { Name string } diff --git a/typedapi/types/enums/sqlformat/sqlformat.go b/typedapi/types/enums/sqlformat/sqlformat.go index 404c65c4ab..21e9ee0997 100644 --- a/typedapi/types/enums/sqlformat/sqlformat.go +++ b/typedapi/types/enums/sqlformat/sqlformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package sqlformat package sqlformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/query/QuerySqlRequest.ts#L153-L161 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/sql/query/QuerySqlRequest.ts#L167-L175 type SqlFormat struct { Name string } diff --git a/typedapi/types/enums/statslevel/statslevel.go b/typedapi/types/enums/statslevel/statslevel.go index 95b24a3280..6b420cffce 100644 --- a/typedapi/types/enums/statslevel/statslevel.go +++ b/typedapi/types/enums/statslevel/statslevel.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package statslevel package statslevel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/searchable_snapshots/_types/stats.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/searchable_snapshots/_types/stats.ts#L20-L24 type StatsLevel struct { Name string } diff --git a/typedapi/types/enums/stopwordlanguage/stopwordlanguage.go b/typedapi/types/enums/stopwordlanguage/stopwordlanguage.go index dc680135ec..79ffe1d895 100644 --- a/typedapi/types/enums/stopwordlanguage/stopwordlanguage.go +++ b/typedapi/types/enums/stopwordlanguage/stopwordlanguage.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package stopwordlanguage package stopwordlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/StopWords.ts#L20-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/StopWords.ts#L20-L58 type StopWordLanguage struct { Name string } diff --git a/typedapi/types/enums/storagetype/storagetype.go b/typedapi/types/enums/storagetype/storagetype.go index f2240ebeee..0b77421d1b 100644 --- a/typedapi/types/enums/storagetype/storagetype.go +++ b/typedapi/types/enums/storagetype/storagetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package storagetype package storagetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L560-L588 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L570-L598 type StorageType struct { Name string } diff --git a/typedapi/types/enums/stringdistance/stringdistance.go b/typedapi/types/enums/stringdistance/stringdistance.go index 88d5dcf1f8..3c9e67077e 100644 --- a/typedapi/types/enums/stringdistance/stringdistance.go +++ b/typedapi/types/enums/stringdistance/stringdistance.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package stringdistance package stringdistance import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L473-L494 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L474-L495 type StringDistance struct { Name string } diff --git a/typedapi/types/enums/subobjects/subobjects.go b/typedapi/types/enums/subobjects/subobjects.go index d1395a9459..b59459ee90 100644 --- a/typedapi/types/enums/subobjects/subobjects.go +++ b/typedapi/types/enums/subobjects/subobjects.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package subobjects package subobjects import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/TypeMapping.ts#L63-L74 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/TypeMapping.ts#L63-L74 type Subobjects struct { Name string } diff --git a/typedapi/types/enums/suggestmode/suggestmode.go b/typedapi/types/enums/suggestmode/suggestmode.go index d39d7bcfa9..6a9a8be5ce 100644 --- a/typedapi/types/enums/suggestmode/suggestmode.go +++ b/typedapi/types/enums/suggestmode/suggestmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package suggestmode package suggestmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L281-L294 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L283-L296 type SuggestMode struct { Name string } diff --git a/typedapi/types/enums/suggestsort/suggestsort.go b/typedapi/types/enums/suggestsort/suggestsort.go index 06533855ff..75169543ba 100644 --- a/typedapi/types/enums/suggestsort/suggestsort.go +++ b/typedapi/types/enums/suggestsort/suggestsort.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package suggestsort package suggestsort import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L496-L505 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L497-L506 type SuggestSort struct { Name string } diff --git a/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go b/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go index 01471a0755..ad0350152a 100644 --- a/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go +++ b/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package syncjobtriggermethod package syncjobtriggermethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/SyncJob.ts#L48-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/SyncJob.ts#L48-L51 type SyncJobTriggerMethod struct { Name string } diff --git a/typedapi/types/enums/syncjobtype/syncjobtype.go b/typedapi/types/enums/syncjobtype/syncjobtype.go index 9260322a0f..8de1e99c8a 100644 --- a/typedapi/types/enums/syncjobtype/syncjobtype.go +++ b/typedapi/types/enums/syncjobtype/syncjobtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package syncjobtype package syncjobtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/SyncJob.ts#L42-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/SyncJob.ts#L42-L46 type SyncJobType struct { Name string } diff --git a/typedapi/types/enums/syncstatus/syncstatus.go b/typedapi/types/enums/syncstatus/syncstatus.go index 53b4d83c74..b0ed8fe982 100644 --- a/typedapi/types/enums/syncstatus/syncstatus.go +++ b/typedapi/types/enums/syncstatus/syncstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package syncstatus package syncstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L138-L146 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L138-L146 type SyncStatus struct { Name string } diff --git a/typedapi/types/enums/synonymformat/synonymformat.go b/typedapi/types/enums/synonymformat/synonymformat.go index af44dcdbdb..9a81f95a03 100644 --- a/typedapi/types/enums/synonymformat/synonymformat.go +++ b/typedapi/types/enums/synonymformat/synonymformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package synonymformat package synonymformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L138-L141 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L146-L149 type SynonymFormat struct { Name string } diff --git a/typedapi/types/enums/syntheticsourcekeepenum/syntheticsourcekeepenum.go b/typedapi/types/enums/syntheticsourcekeepenum/syntheticsourcekeepenum.go index e805ade3c6..764bf50f35 100644 --- a/typedapi/types/enums/syntheticsourcekeepenum/syntheticsourcekeepenum.go +++ b/typedapi/types/enums/syntheticsourcekeepenum/syntheticsourcekeepenum.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package syntheticsourcekeepenum package syntheticsourcekeepenum import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/Property.ts#L100-L118 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/Property.ts#L100-L118 type SyntheticSourceKeepEnum struct { Name string } diff --git a/typedapi/types/enums/tasktype/tasktype.go b/typedapi/types/enums/tasktype/tasktype.go index b51369653e..f08f00b326 100644 --- a/typedapi/types/enums/tasktype/tasktype.go +++ b/typedapi/types/enums/tasktype/tasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktype package tasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L20-L29 type TaskType struct { Name string } diff --git a/typedapi/types/enums/tasktypeai21/tasktypeai21.go b/typedapi/types/enums/tasktypeai21/tasktypeai21.go new file mode 100644 index 0000000000..4c7022536a --- /dev/null +++ b/typedapi/types/enums/tasktypeai21/tasktypeai21.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package tasktypeai21 +package tasktypeai21 + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L36-L39 +type TaskTypeAi21 struct { + Name string +} + +var ( + Completion = TaskTypeAi21{"completion"} + + Chatcompletion = TaskTypeAi21{"chat_completion"} +) + +func (t TaskTypeAi21) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeAi21) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "completion": + *t = Completion + case "chat_completion": + *t = Chatcompletion + default: + *t = TaskTypeAi21{string(text)} + } + + return nil +} + +func (t TaskTypeAi21) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypealibabacloudai/tasktypealibabacloudai.go b/typedapi/types/enums/tasktypealibabacloudai/tasktypealibabacloudai.go index 04924279e2..81b7b7259a 100644 --- a/typedapi/types/enums/tasktypealibabacloudai/tasktypealibabacloudai.go +++ b/typedapi/types/enums/tasktypealibabacloudai/tasktypealibabacloudai.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypealibabacloudai package tasktypealibabacloudai import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L36-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L41-L46 type TaskTypeAlibabaCloudAI struct { Name string } diff --git a/typedapi/types/enums/tasktypeamazonbedrock/tasktypeamazonbedrock.go b/typedapi/types/enums/tasktypeamazonbedrock/tasktypeamazonbedrock.go index 25d41c1de4..91a679fe09 100644 --- a/typedapi/types/enums/tasktypeamazonbedrock/tasktypeamazonbedrock.go +++ b/typedapi/types/enums/tasktypeamazonbedrock/tasktypeamazonbedrock.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypeamazonbedrock package tasktypeamazonbedrock import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L48-L51 type TaskTypeAmazonBedrock struct { Name string } diff --git a/typedapi/types/enums/tasktypeamazonsagemaker/tasktypeamazonsagemaker.go b/typedapi/types/enums/tasktypeamazonsagemaker/tasktypeamazonsagemaker.go index 5140a3c704..8d1310c118 100644 --- a/typedapi/types/enums/tasktypeamazonsagemaker/tasktypeamazonsagemaker.go +++ b/typedapi/types/enums/tasktypeamazonsagemaker/tasktypeamazonsagemaker.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypeamazonsagemaker package tasktypeamazonsagemaker import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L48-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L53-L59 type TaskTypeAmazonSageMaker struct { Name string } diff --git a/typedapi/types/enums/tasktypeanthropic/tasktypeanthropic.go b/typedapi/types/enums/tasktypeanthropic/tasktypeanthropic.go index 89d6f1e41a..7630ae8ced 100644 --- a/typedapi/types/enums/tasktypeanthropic/tasktypeanthropic.go +++ b/typedapi/types/enums/tasktypeanthropic/tasktypeanthropic.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypeanthropic package tasktypeanthropic import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L61-L63 type TaskTypeAnthropic struct { Name string } diff --git a/typedapi/types/enums/tasktypeazureaistudio/tasktypeazureaistudio.go b/typedapi/types/enums/tasktypeazureaistudio/tasktypeazureaistudio.go index 64e99d4a8c..230b7ac9d9 100644 --- a/typedapi/types/enums/tasktypeazureaistudio/tasktypeazureaistudio.go +++ b/typedapi/types/enums/tasktypeazureaistudio/tasktypeazureaistudio.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypeazureaistudio package tasktypeazureaistudio import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L60-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L65-L69 type TaskTypeAzureAIStudio struct { Name string } @@ -32,6 +32,8 @@ var ( Textembedding = TaskTypeAzureAIStudio{"text_embedding"} Completion = TaskTypeAzureAIStudio{"completion"} + + Rerank = TaskTypeAzureAIStudio{"rerank"} ) func (t TaskTypeAzureAIStudio) MarshalText() (text []byte, err error) { @@ -45,6 +47,8 @@ func (t *TaskTypeAzureAIStudio) UnmarshalText(text []byte) error { *t = Textembedding case "completion": *t = Completion + case "rerank": + *t = Rerank default: *t = TaskTypeAzureAIStudio{string(text)} } diff --git a/typedapi/types/enums/tasktypeazureopenai/tasktypeazureopenai.go b/typedapi/types/enums/tasktypeazureopenai/tasktypeazureopenai.go index f4ee2407dd..4ee9fcf066 100644 --- a/typedapi/types/enums/tasktypeazureopenai/tasktypeazureopenai.go +++ b/typedapi/types/enums/tasktypeazureopenai/tasktypeazureopenai.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypeazureopenai package tasktypeazureopenai import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L65-L68 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L71-L74 type TaskTypeAzureOpenAI struct { Name string } diff --git a/typedapi/types/enums/tasktypecohere/tasktypecohere.go b/typedapi/types/enums/tasktypecohere/tasktypecohere.go index 1bde1ba1ef..f9d0a9361b 100644 --- a/typedapi/types/enums/tasktypecohere/tasktypecohere.go +++ b/typedapi/types/enums/tasktypecohere/tasktypecohere.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypecohere package tasktypecohere import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L70-L74 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L76-L80 type TaskTypeCohere struct { Name string } diff --git a/typedapi/types/enums/tasktypecontextualai/tasktypecontextualai.go b/typedapi/types/enums/tasktypecontextualai/tasktypecontextualai.go new file mode 100644 index 0000000000..722ebf9781 --- /dev/null +++ b/typedapi/types/enums/tasktypecontextualai/tasktypecontextualai.go @@ -0,0 +1,53 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package tasktypecontextualai +package tasktypecontextualai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L82-L84 +type TaskTypeContextualAI struct { + Name string +} + +var ( + Rerank = TaskTypeContextualAI{"rerank"} +) + +func (t TaskTypeContextualAI) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeContextualAI) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "rerank": + *t = Rerank + default: + *t = TaskTypeContextualAI{string(text)} + } + + return nil +} + +func (t TaskTypeContextualAI) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypecustom/tasktypecustom.go b/typedapi/types/enums/tasktypecustom/tasktypecustom.go index 1c7eef5832..fcb0785002 100644 --- a/typedapi/types/enums/tasktypecustom/tasktypecustom.go +++ b/typedapi/types/enums/tasktypecustom/tasktypecustom.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypecustom package tasktypecustom import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L76-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L86-L91 type TaskTypeCustom struct { Name string } diff --git a/typedapi/types/enums/tasktypedeepseek/tasktypedeepseek.go b/typedapi/types/enums/tasktypedeepseek/tasktypedeepseek.go index fc7ac13b25..90be61955c 100644 --- a/typedapi/types/enums/tasktypedeepseek/tasktypedeepseek.go +++ b/typedapi/types/enums/tasktypedeepseek/tasktypedeepseek.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypedeepseek package tasktypedeepseek import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L83-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L93-L96 type TaskTypeDeepSeek struct { Name string } diff --git a/typedapi/types/enums/tasktypeelasticsearch/tasktypeelasticsearch.go b/typedapi/types/enums/tasktypeelasticsearch/tasktypeelasticsearch.go index eee49fca3f..5027c940fd 100644 --- a/typedapi/types/enums/tasktypeelasticsearch/tasktypeelasticsearch.go +++ b/typedapi/types/enums/tasktypeelasticsearch/tasktypeelasticsearch.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypeelasticsearch package tasktypeelasticsearch import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L88-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L98-L102 type TaskTypeElasticsearch struct { Name string } diff --git a/typedapi/types/enums/tasktypeelser/tasktypeelser.go b/typedapi/types/enums/tasktypeelser/tasktypeelser.go index b9f1f486bb..6a5eef9abc 100644 --- a/typedapi/types/enums/tasktypeelser/tasktypeelser.go +++ b/typedapi/types/enums/tasktypeelser/tasktypeelser.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypeelser package tasktypeelser import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L94-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L104-L106 type TaskTypeELSER struct { Name string } diff --git a/typedapi/types/enums/tasktypegoogleaistudio/tasktypegoogleaistudio.go b/typedapi/types/enums/tasktypegoogleaistudio/tasktypegoogleaistudio.go index 1dd000d4c6..6dbc36012e 100644 --- a/typedapi/types/enums/tasktypegoogleaistudio/tasktypegoogleaistudio.go +++ b/typedapi/types/enums/tasktypegoogleaistudio/tasktypegoogleaistudio.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypegoogleaistudio package tasktypegoogleaistudio import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L98-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L108-L111 type TaskTypeGoogleAIStudio struct { Name string } diff --git a/typedapi/types/enums/tasktypegooglevertexai/tasktypegooglevertexai.go b/typedapi/types/enums/tasktypegooglevertexai/tasktypegooglevertexai.go index fad86448ab..01126920e4 100644 --- a/typedapi/types/enums/tasktypegooglevertexai/tasktypegooglevertexai.go +++ b/typedapi/types/enums/tasktypegooglevertexai/tasktypegooglevertexai.go @@ -16,19 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypegooglevertexai package tasktypegooglevertexai import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L103-L106 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L113-L118 type TaskTypeGoogleVertexAI struct { Name string } var ( + Chatcompletion = TaskTypeGoogleVertexAI{"chat_completion"} + + Completion = TaskTypeGoogleVertexAI{"completion"} + Textembedding = TaskTypeGoogleVertexAI{"text_embedding"} Rerank = TaskTypeGoogleVertexAI{"rerank"} @@ -41,6 +45,10 @@ func (t TaskTypeGoogleVertexAI) MarshalText() (text []byte, err error) { func (t *TaskTypeGoogleVertexAI) UnmarshalText(text []byte) error { switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + case "chat_completion": + *t = Chatcompletion + case "completion": + *t = Completion case "text_embedding": *t = Textembedding case "rerank": diff --git a/typedapi/types/enums/tasktypehuggingface/tasktypehuggingface.go b/typedapi/types/enums/tasktypehuggingface/tasktypehuggingface.go index 4bfb2970ce..eeeab13ca2 100644 --- a/typedapi/types/enums/tasktypehuggingface/tasktypehuggingface.go +++ b/typedapi/types/enums/tasktypehuggingface/tasktypehuggingface.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypehuggingface package tasktypehuggingface import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L108-L113 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L120-L125 type TaskTypeHuggingFace struct { Name string } diff --git a/typedapi/types/enums/tasktypejinaai/tasktypejinaai.go b/typedapi/types/enums/tasktypejinaai/tasktypejinaai.go index 2e604bee33..592ec9b401 100644 --- a/typedapi/types/enums/tasktypejinaai/tasktypejinaai.go +++ b/typedapi/types/enums/tasktypejinaai/tasktypejinaai.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypejinaai package tasktypejinaai import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L31-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L31-L34 type TaskTypeJinaAi struct { Name string } diff --git a/typedapi/types/enums/tasktypellama/tasktypellama.go b/typedapi/types/enums/tasktypellama/tasktypellama.go new file mode 100644 index 0000000000..e90401fc06 --- /dev/null +++ b/typedapi/types/enums/tasktypellama/tasktypellama.go @@ -0,0 +1,61 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package tasktypellama +package tasktypellama + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L127-L131 +type TaskTypeLlama struct { + Name string +} + +var ( + Textembedding = TaskTypeLlama{"text_embedding"} + + Chatcompletion = TaskTypeLlama{"chat_completion"} + + Completion = TaskTypeLlama{"completion"} +) + +func (t TaskTypeLlama) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeLlama) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "chat_completion": + *t = Chatcompletion + case "completion": + *t = Completion + default: + *t = TaskTypeLlama{string(text)} + } + + return nil +} + +func (t TaskTypeLlama) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypemistral/tasktypemistral.go b/typedapi/types/enums/tasktypemistral/tasktypemistral.go index 2fd0c0afb6..0bcedf84d4 100644 --- a/typedapi/types/enums/tasktypemistral/tasktypemistral.go +++ b/typedapi/types/enums/tasktypemistral/tasktypemistral.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypemistral package tasktypemistral import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L115-L119 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L133-L137 type TaskTypeMistral struct { Name string } diff --git a/typedapi/types/enums/tasktypeopenai/tasktypeopenai.go b/typedapi/types/enums/tasktypeopenai/tasktypeopenai.go index fcd007ef96..6b502197c5 100644 --- a/typedapi/types/enums/tasktypeopenai/tasktypeopenai.go +++ b/typedapi/types/enums/tasktypeopenai/tasktypeopenai.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypeopenai package tasktypeopenai import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L121-L125 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L139-L143 type TaskTypeOpenAI struct { Name string } diff --git a/typedapi/types/enums/tasktypeopenshiftai/tasktypeopenshiftai.go b/typedapi/types/enums/tasktypeopenshiftai/tasktypeopenshiftai.go new file mode 100644 index 0000000000..90f2c6d46b --- /dev/null +++ b/typedapi/types/enums/tasktypeopenshiftai/tasktypeopenshiftai.go @@ -0,0 +1,65 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +// Package tasktypeopenshiftai +package tasktypeopenshiftai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L145-L150 +type TaskTypeOpenShiftAi struct { + Name string +} + +var ( + Textembedding = TaskTypeOpenShiftAi{"text_embedding"} + + Chatcompletion = TaskTypeOpenShiftAi{"chat_completion"} + + Completion = TaskTypeOpenShiftAi{"completion"} + + Rerank = TaskTypeOpenShiftAi{"rerank"} +) + +func (t TaskTypeOpenShiftAi) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeOpenShiftAi) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "chat_completion": + *t = Chatcompletion + case "completion": + *t = Completion + case "rerank": + *t = Rerank + default: + *t = TaskTypeOpenShiftAi{string(text)} + } + + return nil +} + +func (t TaskTypeOpenShiftAi) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypevoyageai/tasktypevoyageai.go b/typedapi/types/enums/tasktypevoyageai/tasktypevoyageai.go index 701c828c43..7545ae7e45 100644 --- a/typedapi/types/enums/tasktypevoyageai/tasktypevoyageai.go +++ b/typedapi/types/enums/tasktypevoyageai/tasktypevoyageai.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypevoyageai package tasktypevoyageai import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L127-L130 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L152-L155 type TaskTypeVoyageAI struct { Name string } diff --git a/typedapi/types/enums/tasktypewatsonx/tasktypewatsonx.go b/typedapi/types/enums/tasktypewatsonx/tasktypewatsonx.go index fce9b57de2..ca21e37f99 100644 --- a/typedapi/types/enums/tasktypewatsonx/tasktypewatsonx.go +++ b/typedapi/types/enums/tasktypewatsonx/tasktypewatsonx.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tasktypewatsonx package tasktypewatsonx import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L132-L136 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/TaskType.ts#L157-L161 type TaskTypeWatsonx struct { Name string } diff --git a/typedapi/types/enums/tdigestexecutionhint/tdigestexecutionhint.go b/typedapi/types/enums/tdigestexecutionhint/tdigestexecutionhint.go index 096bbbc2ba..abdab2e0ac 100644 --- a/typedapi/types/enums/tdigestexecutionhint/tdigestexecutionhint.go +++ b/typedapi/types/enums/tdigestexecutionhint/tdigestexecutionhint.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tdigestexecutionhint package tdigestexecutionhint import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L257-L260 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L261-L264 type TDigestExecutionHint struct { Name string } diff --git a/typedapi/types/enums/templateformat/templateformat.go b/typedapi/types/enums/templateformat/templateformat.go index 27b756d669..828d93fd0f 100644 --- a/typedapi/types/enums/templateformat/templateformat.go +++ b/typedapi/types/enums/templateformat/templateformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package templateformat package templateformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleTemplate.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/RoleTemplate.ts#L22-L25 type TemplateFormat struct { Name string } diff --git a/typedapi/types/enums/termsaggregationcollectmode/termsaggregationcollectmode.go b/typedapi/types/enums/termsaggregationcollectmode/termsaggregationcollectmode.go index 942ed5a3b3..8bd3fe3aba 100644 --- a/typedapi/types/enums/termsaggregationcollectmode/termsaggregationcollectmode.go +++ b/typedapi/types/enums/termsaggregationcollectmode/termsaggregationcollectmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package termsaggregationcollectmode package termsaggregationcollectmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1056-L1065 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1085-L1094 type TermsAggregationCollectMode struct { Name string } diff --git a/typedapi/types/enums/termsaggregationexecutionhint/termsaggregationexecutionhint.go b/typedapi/types/enums/termsaggregationexecutionhint/termsaggregationexecutionhint.go index c1e11d6fdf..d2b3f2d0fc 100644 --- a/typedapi/types/enums/termsaggregationexecutionhint/termsaggregationexecutionhint.go +++ b/typedapi/types/enums/termsaggregationexecutionhint/termsaggregationexecutionhint.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package termsaggregationexecutionhint package termsaggregationexecutionhint import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1067-L1072 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1096-L1101 type TermsAggregationExecutionHint struct { Name string } diff --git a/typedapi/types/enums/termvectoroption/termvectoroption.go b/typedapi/types/enums/termvectoroption/termvectoroption.go index b1cb53e1a8..3fad33f876 100644 --- a/typedapi/types/enums/termvectoroption/termvectoroption.go +++ b/typedapi/types/enums/termvectoroption/termvectoroption.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package termvectoroption package termvectoroption import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/TermVectorOption.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/TermVectorOption.ts#L20-L28 type TermVectorOption struct { Name string } diff --git a/typedapi/types/enums/textquerytype/textquerytype.go b/typedapi/types/enums/textquerytype/textquerytype.go index 16fd599eb8..a2d34dd64c 100644 --- a/typedapi/types/enums/textquerytype/textquerytype.go +++ b/typedapi/types/enums/textquerytype/textquerytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package textquerytype package textquerytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L610-L636 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L611-L637 type TextQueryType struct { Name string } diff --git a/typedapi/types/enums/threadtype/threadtype.go b/typedapi/types/enums/threadtype/threadtype.go index f43112ac35..c4b8c6b3ae 100644 --- a/typedapi/types/enums/threadtype/threadtype.go +++ b/typedapi/types/enums/threadtype/threadtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package threadtype package threadtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L296-L302 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L298-L304 type ThreadType struct { Name string } diff --git a/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go b/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go index 282c29b787..3096545a46 100644 --- a/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go +++ b/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package timeseriesmetrictype package timeseriesmetrictype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/TimeSeriesMetricType.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/TimeSeriesMetricType.ts#L20-L26 type TimeSeriesMetricType struct { Name string } diff --git a/typedapi/types/enums/timeunit/timeunit.go b/typedapi/types/enums/timeunit/timeunit.go index a2ec6e2229..a21df7d802 100644 --- a/typedapi/types/enums/timeunit/timeunit.go +++ b/typedapi/types/enums/timeunit/timeunit.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package timeunit package timeunit import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L69-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Time.ts#L70-L78 type TimeUnit struct { Name string } diff --git a/typedapi/types/enums/tokenchar/tokenchar.go b/typedapi/types/enums/tokenchar/tokenchar.go index 5eebf63db5..8b4ed166e0 100644 --- a/typedapi/types/enums/tokenchar/tokenchar.go +++ b/typedapi/types/enums/tokenchar/tokenchar.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tokenchar package tokenchar import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L60-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L60-L67 type TokenChar struct { Name string } diff --git a/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go b/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go index 513803917b..a53eeaf391 100644 --- a/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go +++ b/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package tokenizationtruncate package tokenizationtruncate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L369-L373 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L373-L377 type TokenizationTruncate struct { Name string } diff --git a/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go b/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go index 24270db128..9b578e0be0 100644 --- a/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go +++ b/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package totalhitsrelation package totalhitsrelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L100-L105 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/hits.ts#L108-L113 type TotalHitsRelation struct { Name string } diff --git a/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go b/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go index 54142c4b07..99887a0dbb 100644 --- a/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go +++ b/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package trainedmodeltype package trainedmodeltype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L315-L329 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L316-L330 type TrainedModelType struct { Name string } diff --git a/typedapi/types/enums/trainingpriority/trainingpriority.go b/typedapi/types/enums/trainingpriority/trainingpriority.go index 479c21fadd..2445ab1f3a 100644 --- a/typedapi/types/enums/trainingpriority/trainingpriority.go +++ b/typedapi/types/enums/trainingpriority/trainingpriority.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package trainingpriority package trainingpriority import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L365-L368 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L366-L369 type TrainingPriority struct { Name string } diff --git a/typedapi/types/enums/translogdurability/translogdurability.go b/typedapi/types/enums/translogdurability/translogdurability.go index 99b5944e25..18a96651b2 100644 --- a/typedapi/types/enums/translogdurability/translogdurability.go +++ b/typedapi/types/enums/translogdurability/translogdurability.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package translogdurability package translogdurability import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L392-L407 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L399-L414 type TranslogDurability struct { Name string } diff --git a/typedapi/types/enums/ttesttype/ttesttype.go b/typedapi/types/enums/ttesttype/ttesttype.go index 8dd77eff3e..31aba22e86 100644 --- a/typedapi/types/enums/ttesttype/ttesttype.go +++ b/typedapi/types/enums/ttesttype/ttesttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package ttesttype package ttesttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L354-L367 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L358-L371 type TTestType struct { Name string } diff --git a/typedapi/types/enums/type_/type_.go b/typedapi/types/enums/type_/type_.go index dcd6f54673..efa0d237fc 100644 --- a/typedapi/types/enums/type_/type_.go +++ b/typedapi/types/enums/type_/type_.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package type_ package type_ import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/_types/types.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/_types/types.ts#L20-L24 type Type struct { Name string } diff --git a/typedapi/types/enums/unassignedinformationreason/unassignedinformationreason.go b/typedapi/types/enums/unassignedinformationreason/unassignedinformationreason.go index e53936aa6e..4d138edcbc 100644 --- a/typedapi/types/enums/unassignedinformationreason/unassignedinformationreason.go +++ b/typedapi/types/enums/unassignedinformationreason/unassignedinformationreason.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package unassignedinformationreason package unassignedinformationreason import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L138-L157 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L138-L157 type UnassignedInformationReason struct { Name string } diff --git a/typedapi/types/enums/useragentproperty/useragentproperty.go b/typedapi/types/enums/useragentproperty/useragentproperty.go index 0bc73350c7..ce5c9f4206 100644 --- a/typedapi/types/enums/useragentproperty/useragentproperty.go +++ b/typedapi/types/enums/useragentproperty/useragentproperty.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package useragentproperty package useragentproperty import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L548-L554 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L552-L558 type UserAgentProperty struct { Name string } diff --git a/typedapi/types/enums/valuetype/valuetype.go b/typedapi/types/enums/valuetype/valuetype.go index 304e5ef2ad..a3660c2e0b 100644 --- a/typedapi/types/enums/valuetype/valuetype.go +++ b/typedapi/types/enums/valuetype/valuetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package valuetype package valuetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L459-L470 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L463-L474 type ValueType struct { Name string } diff --git a/typedapi/types/enums/versiontype/versiontype.go b/typedapi/types/enums/versiontype/versiontype.go index e68f1678c3..51922a121f 100644 --- a/typedapi/types/enums/versiontype/versiontype.go +++ b/typedapi/types/enums/versiontype/versiontype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package versiontype package versiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L100-L119 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L99-L114 type VersionType struct { Name string } @@ -34,8 +34,6 @@ var ( External = VersionType{"external"} Externalgte = VersionType{"external_gte"} - - Force = VersionType{"force"} ) func (v VersionType) MarshalText() (text []byte, err error) { @@ -51,8 +49,6 @@ func (v *VersionType) UnmarshalText(text []byte) error { *v = External case "external_gte": *v = Externalgte - case "force": - *v = Force default: *v = VersionType{string(text)} } diff --git a/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go b/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go index e7ac906d3c..362f0d3282 100644 --- a/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go +++ b/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package voyageaiservicetype package voyageaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1680-L1682 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1977-L1979 type VoyageAIServiceType struct { Name string } diff --git a/typedapi/types/enums/voyageaitasktype/voyageaitasktype.go b/typedapi/types/enums/voyageaitasktype/voyageaitasktype.go index 7299307a2e..0013e81637 100644 --- a/typedapi/types/enums/voyageaitasktype/voyageaitasktype.go +++ b/typedapi/types/enums/voyageaitasktype/voyageaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package voyageaitasktype package voyageaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1675-L1678 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1972-L1975 type VoyageAITaskType struct { Name string } diff --git a/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go b/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go index cb0dbd9732..ad693814c1 100644 --- a/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go +++ b/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package waitforactiveshardoptions package waitforactiveshardoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L304-L308 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L306-L310 type WaitForActiveShardOptions struct { Name string } diff --git a/typedapi/types/enums/waitforevents/waitforevents.go b/typedapi/types/enums/waitforevents/waitforevents.go index 428ad0b12f..b2679844aa 100644 --- a/typedapi/types/enums/waitforevents/waitforevents.go +++ b/typedapi/types/enums/waitforevents/waitforevents.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package waitforevents package waitforevents import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L310-L317 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L312-L319 type WaitForEvents struct { Name string } diff --git a/typedapi/types/enums/watchermetric/watchermetric.go b/typedapi/types/enums/watchermetric/watchermetric.go index 3742c41a18..6d123cfba3 100644 --- a/typedapi/types/enums/watchermetric/watchermetric.go +++ b/typedapi/types/enums/watchermetric/watchermetric.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package watchermetric package watchermetric import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/stats/types.ts#L63-L69 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/stats/types.ts#L63-L69 type WatcherMetric struct { Name string } diff --git a/typedapi/types/enums/watcherstate/watcherstate.go b/typedapi/types/enums/watcherstate/watcherstate.go index 97bcdfa30a..2694afec17 100644 --- a/typedapi/types/enums/watcherstate/watcherstate.go +++ b/typedapi/types/enums/watcherstate/watcherstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package watcherstate package watcherstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/stats/types.ts#L26-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/stats/types.ts#L26-L31 type WatcherState struct { Name string } diff --git a/typedapi/types/enums/watsonxservicetype/watsonxservicetype.go b/typedapi/types/enums/watsonxservicetype/watsonxservicetype.go index a36260716d..b4d89a36c2 100644 --- a/typedapi/types/enums/watsonxservicetype/watsonxservicetype.go +++ b/typedapi/types/enums/watsonxservicetype/watsonxservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package watsonxservicetype package watsonxservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1730-L1732 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L2027-L2029 type WatsonxServiceType struct { Name string } diff --git a/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go b/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go index 7e0b63d9fc..6b820cdc19 100644 --- a/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go +++ b/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package watsonxtasktype package watsonxtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1724-L1728 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L2021-L2025 type WatsonxTaskType struct { Name string } diff --git a/typedapi/types/enums/xpackcategory/xpackcategory.go b/typedapi/types/enums/xpackcategory/xpackcategory.go index 52ad31117c..f023797ef3 100644 --- a/typedapi/types/enums/xpackcategory/xpackcategory.go +++ b/typedapi/types/enums/xpackcategory/xpackcategory.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package xpackcategory package xpackcategory import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/info/XPackInfoRequest.ts#L58-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/info/XPackInfoRequest.ts#L62-L66 type XPackCategory struct { Name string } diff --git a/typedapi/types/enums/zerotermsquery/zerotermsquery.go b/typedapi/types/enums/zerotermsquery/zerotermsquery.go index 1780738be7..e63a7dd0db 100644 --- a/typedapi/types/enums/zerotermsquery/zerotermsquery.go +++ b/typedapi/types/enums/zerotermsquery/zerotermsquery.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Package zerotermsquery package zerotermsquery import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L638-L647 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L639-L648 type ZeroTermsQuery struct { Name string } diff --git a/typedapi/types/epochtimeunitmillis.go b/typedapi/types/epochtimeunitmillis.go index b7cbef9d46..3cf2debdb5 100644 --- a/typedapi/types/epochtimeunitmillis.go +++ b/typedapi/types/epochtimeunitmillis.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // EpochTimeUnitMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L40-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Time.ts#L40-L40 type EpochTimeUnitMillis int64 type EpochTimeUnitMillisVariant interface { diff --git a/typedapi/types/epochtimeunitseconds.go b/typedapi/types/epochtimeunitseconds.go index d07a552e84..6dc4f9abda 100644 --- a/typedapi/types/epochtimeunitseconds.go +++ b/typedapi/types/epochtimeunitseconds.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // EpochTimeUnitSeconds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L40-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Time.ts#L40-L40 type EpochTimeUnitSeconds int64 type EpochTimeUnitSecondsVariant interface { diff --git a/typedapi/types/eql.go b/typedapi/types/eql.go index 23604bafc9..eaf4e052b2 100644 --- a/typedapi/types/eql.go +++ b/typedapi/types/eql.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Eql type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L361-L364 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L394-L397 type Eql struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/eqlfeatures.go b/typedapi/types/eqlfeatures.go index 13d95535b3..b50f1e08b9 100644 --- a/typedapi/types/eqlfeatures.go +++ b/typedapi/types/eqlfeatures.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // EqlFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L96-L104 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L96-L104 type EqlFeatures struct { Event uint `json:"event"` Join uint `json:"join"` diff --git a/typedapi/types/eqlfeaturesjoin.go b/typedapi/types/eqlfeaturesjoin.go index ba9f867ded..00a736c56e 100644 --- a/typedapi/types/eqlfeaturesjoin.go +++ b/typedapi/types/eqlfeaturesjoin.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // EqlFeaturesJoin type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L106-L112 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L106-L112 type EqlFeaturesJoin struct { JoinQueriesFiveOrMore uint `json:"join_queries_five_or_more"` JoinQueriesFour uint `json:"join_queries_four"` diff --git a/typedapi/types/eqlfeatureskeys.go b/typedapi/types/eqlfeatureskeys.go index 23b216693c..63d9888fdc 100644 --- a/typedapi/types/eqlfeatureskeys.go +++ b/typedapi/types/eqlfeatureskeys.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // EqlFeaturesKeys type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L114-L120 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L114-L120 type EqlFeaturesKeys struct { JoinKeysFiveOrMore uint `json:"join_keys_five_or_more"` JoinKeysFour uint `json:"join_keys_four"` diff --git a/typedapi/types/eqlfeaturespipes.go b/typedapi/types/eqlfeaturespipes.go index 0b358de461..ff397d82f6 100644 --- a/typedapi/types/eqlfeaturespipes.go +++ b/typedapi/types/eqlfeaturespipes.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // EqlFeaturesPipes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L122-L125 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L122-L125 type EqlFeaturesPipes struct { PipeHead uint `json:"pipe_head"` PipeTail uint `json:"pipe_tail"` diff --git a/typedapi/types/eqlfeaturessequences.go b/typedapi/types/eqlfeaturessequences.go index 2065603714..e6e06d84ae 100644 --- a/typedapi/types/eqlfeaturessequences.go +++ b/typedapi/types/eqlfeaturessequences.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // EqlFeaturesSequences type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L127-L134 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L127-L134 type EqlFeaturesSequences struct { SequenceMaxspan uint `json:"sequence_maxspan"` SequenceQueriesFiveOrMore uint `json:"sequence_queries_five_or_more"` diff --git a/typedapi/types/eqlhits.go b/typedapi/types/eqlhits.go index 7218932e52..fb10dc6ed6 100644 --- a/typedapi/types/eqlhits.go +++ b/typedapi/types/eqlhits.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // EqlHits type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/_types/EqlHits.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/eql/_types/EqlHits.ts#L25-L39 type EqlHits struct { // Events Contains events matching the query. Each object represents a matching event. Events []HitsEvent `json:"events,omitempty"` diff --git a/typedapi/types/errorcause.go b/typedapi/types/errorcause.go index 4d35fb350f..d4bcfc143f 100644 --- a/typedapi/types/errorcause.go +++ b/typedapi/types/errorcause.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ErrorCause type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Errors.ts#L25-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Errors.ts#L25-L50 type ErrorCause struct { CausedBy *ErrorCause `json:"caused_by,omitempty"` Metadata map[string]json.RawMessage `json:"-"` diff --git a/typedapi/types/errorresponsebase.go b/typedapi/types/errorresponsebase.go index a0c61f071f..c78844dba0 100644 --- a/typedapi/types/errorresponsebase.go +++ b/typedapi/types/errorresponsebase.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ErrorResponseBase type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Base.ts#L130-L139 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Base.ts#L135-L144 type ErrorResponseBase struct { Error ErrorCause `json:"error"` Status int `json:"status"` diff --git a/typedapi/types/esqlclusterdetails.go b/typedapi/types/esqlclusterdetails.go index 7240f2bc65..110bcdcf2f 100644 --- a/typedapi/types/esqlclusterdetails.go +++ b/typedapi/types/esqlclusterdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // EsqlClusterDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L75-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/EsqlResult.ts#L75-L81 type EsqlClusterDetails struct { Failures []EsqlShardFailure `json:"failures,omitempty"` Indices string `json:"indices"` diff --git a/typedapi/types/esqlclusterinfo.go b/typedapi/types/esqlclusterinfo.go index 88bc269d25..ecfca40231 100644 --- a/typedapi/types/esqlclusterinfo.go +++ b/typedapi/types/esqlclusterinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EsqlClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L65-L73 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/EsqlResult.ts#L65-L73 type EsqlClusterInfo struct { Details map[string]EsqlClusterDetails `json:"details"` Failed int `json:"failed"` diff --git a/typedapi/types/esqlcolumninfo.go b/typedapi/types/esqlcolumninfo.go index 55bd8159fe..b8a15f6718 100644 --- a/typedapi/types/esqlcolumninfo.go +++ b/typedapi/types/esqlcolumninfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EsqlColumnInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L60-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/EsqlResult.ts#L60-L63 type EsqlColumnInfo struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/metrics.go b/typedapi/types/esqlparam.go similarity index 74% rename from typedapi/types/metrics.go rename to typedapi/types/esqlparam.go index 769f035192..b933c52d7e 100644 --- a/typedapi/types/metrics.go +++ b/typedapi/types/esqlparam.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -// Metrics type alias. +// ESQLParam type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L70-L70 -type Metrics []string +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/types.ts#L22-L22 +type ESQLParam []FieldValue diff --git a/typedapi/types/esqlshardfailure.go b/typedapi/types/esqlshardfailure.go index c947d9439c..bb4858e58d 100644 --- a/typedapi/types/esqlshardfailure.go +++ b/typedapi/types/esqlshardfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EsqlShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L98-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/EsqlResult.ts#L98-L103 type EsqlShardFailure struct { Index *string `json:"index,omitempty"` Node *string `json:"node,omitempty"` diff --git a/typedapi/types/esqlshardinfo.go b/typedapi/types/esqlshardinfo.go index 3be916b3f4..b3ec2715ae 100644 --- a/typedapi/types/esqlshardinfo.go +++ b/typedapi/types/esqlshardinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EsqlShardInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L91-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/EsqlResult.ts#L91-L96 type EsqlShardInfo struct { Failed *int `json:"failed,omitempty"` Skipped *int `json:"skipped,omitempty"` diff --git a/typedapi/types/estoniananalyzer.go b/typedapi/types/estoniananalyzer.go index 07880f6f53..76366d3d0e 100644 --- a/typedapi/types/estoniananalyzer.go +++ b/typedapi/types/estoniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EstonianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L159-L163 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L159-L163 type EstonianAnalyzer struct { Stopwords StopWords `json:"stopwords,omitempty"` StopwordsPath *string `json:"stopwords_path,omitempty"` diff --git a/typedapi/types/eventdatastream.go b/typedapi/types/eventdatastream.go index 8c8eae031b..73e7494ce8 100644 --- a/typedapi/types/eventdatastream.go +++ b/typedapi/types/eventdatastream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // EventDataStream type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/_types/BehavioralAnalytics.ts#L29-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/_types/BehavioralAnalytics.ts#L29-L31 type EventDataStream struct { Name string `json:"name"` } diff --git a/typedapi/types/ewmamodelsettings.go b/typedapi/types/ewmamodelsettings.go index b784e487fc..34d2a72c0f 100644 --- a/typedapi/types/ewmamodelsettings.go +++ b/typedapi/types/ewmamodelsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // EwmaModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L293-L295 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L295-L297 type EwmaModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` } diff --git a/typedapi/types/ewmamovingaverageaggregation.go b/typedapi/types/ewmamovingaverageaggregation.go index 14514100b0..d91bb6a28d 100644 --- a/typedapi/types/ewmamovingaverageaggregation.go +++ b/typedapi/types/ewmamovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // EwmaMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L278-L281 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L280-L283 type EwmaMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/executeenrichpolicystatus.go b/typedapi/types/executeenrichpolicystatus.go index d29331ac94..714513c39e 100644 --- a/typedapi/types/executeenrichpolicystatus.go +++ b/typedapi/types/executeenrichpolicystatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ExecuteEnrichPolicyStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/execute_policy/types.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/execute_policy/types.ts#L20-L23 type ExecuteEnrichPolicyStatus struct { Phase enrichpolicyphase.EnrichPolicyPhase `json:"phase"` Step *string `json:"step,omitempty"` diff --git a/typedapi/types/executingpolicy.go b/typedapi/types/executingpolicy.go index 11062fa980..88569bd558 100644 --- a/typedapi/types/executingpolicy.go +++ b/typedapi/types/executingpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ExecutingPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/stats/types.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/stats/types.ts#L25-L28 type ExecutingPolicy struct { Name string `json:"name"` Task TaskInfo `json:"task"` diff --git a/typedapi/types/executionresult.go b/typedapi/types/executionresult.go index e40b8c8814..5dc1f1720e 100644 --- a/typedapi/types/executionresult.go +++ b/typedapi/types/executionresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ExecutionResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Execution.ts#L60-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Execution.ts#L60-L66 type ExecutionResult struct { Actions []ExecutionResultAction `json:"actions"` Condition ExecutionResultCondition `json:"condition"` diff --git a/typedapi/types/executionresultaction.go b/typedapi/types/executionresultaction.go index 3c6a3df197..d69b60e434 100644 --- a/typedapi/types/executionresultaction.go +++ b/typedapi/types/executionresultaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // ExecutionResultAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Execution.ts#L74-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Execution.ts#L74-L86 type ExecutionResultAction struct { Email *EmailResult `json:"email,omitempty"` Error *ErrorCause `json:"error,omitempty"` diff --git a/typedapi/types/executionresultcondition.go b/typedapi/types/executionresultcondition.go index 9dd570df35..d33623635f 100644 --- a/typedapi/types/executionresultcondition.go +++ b/typedapi/types/executionresultcondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // ExecutionResultCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Execution.ts#L68-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Execution.ts#L68-L72 type ExecutionResultCondition struct { Met bool `json:"met"` Status actionstatusoptions.ActionStatusOptions `json:"status"` diff --git a/typedapi/types/executionresultinput.go b/typedapi/types/executionresultinput.go index d240c059f3..eef0d82043 100644 --- a/typedapi/types/executionresultinput.go +++ b/typedapi/types/executionresultinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -29,7 +29,7 @@ import ( // ExecutionResultInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Execution.ts#L88-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Execution.ts#L88-L92 type ExecutionResultInput struct { Payload map[string]json.RawMessage `json:"payload"` Status actionstatusoptions.ActionStatusOptions `json:"status"` diff --git a/typedapi/types/executionstate.go b/typedapi/types/executionstate.go index ae4f862d87..99b5b4aafc 100644 --- a/typedapi/types/executionstate.go +++ b/typedapi/types/executionstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExecutionState type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L114-L118 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L114-L118 type ExecutionState struct { Reason *string `json:"reason,omitempty"` Successful bool `json:"successful"` diff --git a/typedapi/types/executionthreadpool.go b/typedapi/types/executionthreadpool.go index e0ad400a7d..a39957106c 100644 --- a/typedapi/types/executionthreadpool.go +++ b/typedapi/types/executionthreadpool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExecutionThreadPool type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Execution.ts#L94-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Execution.ts#L94-L103 type ExecutionThreadPool struct { // MaxSize The largest size of the execution thread pool, which indicates the largest // number of concurrent running watches. diff --git a/typedapi/types/existsquery.go b/typedapi/types/existsquery.go index b3b53baa41..122e09f8ae 100644 --- a/typedapi/types/existsquery.go +++ b/typedapi/types/existsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExistsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L38-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L38-L46 type ExistsQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/expandwildcards.go b/typedapi/types/expandwildcards.go index 15031e26fb..8922509c66 100644 --- a/typedapi/types/expandwildcards.go +++ b/typedapi/types/expandwildcards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // ExpandWildcards type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L214-L214 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L209-L209 type ExpandWildcards []expandwildcard.ExpandWildcard type ExpandWildcardsVariant interface { diff --git a/typedapi/types/explainanalyzetoken.go b/typedapi/types/explainanalyzetoken.go index 3d66ed5444..5d2e417977 100644 --- a/typedapi/types/explainanalyzetoken.go +++ b/typedapi/types/explainanalyzetoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExplainAnalyzeToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/types.ts#L52-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/analyze/types.ts#L52-L67 type ExplainAnalyzeToken struct { Bytes string `json:"bytes"` EndOffset int64 `json:"end_offset"` diff --git a/typedapi/types/explanation.go b/typedapi/types/explanation.go index b855b0be88..f3aab9ab3d 100644 --- a/typedapi/types/explanation.go +++ b/typedapi/types/explanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Explanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/explain/types.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/explain/types.ts#L22-L26 type Explanation struct { Description string `json:"description"` Details []ExplanationDetail `json:"details"` diff --git a/typedapi/types/explanationdetail.go b/typedapi/types/explanationdetail.go index 064bcbf561..e83fb21af0 100644 --- a/typedapi/types/explanationdetail.go +++ b/typedapi/types/explanationdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExplanationDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/explain/types.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/explain/types.ts#L28-L32 type ExplanationDetail struct { Description string `json:"description"` Details []ExplanationDetail `json:"details,omitempty"` diff --git a/typedapi/types/explorecontrols.go b/typedapi/types/explorecontrols.go index 6cde59baa8..0f5d9f0a1a 100644 --- a/typedapi/types/explorecontrols.go +++ b/typedapi/types/explorecontrols.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExploreControls type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/_types/ExploreControls.ts#L24-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/graph/_types/ExploreControls.ts#L24-L49 type ExploreControls struct { // SampleDiversity To avoid the top-matching documents sample being dominated by a single source // of results, it is sometimes necessary to request diversity in the sample. diff --git a/typedapi/types/exponentialaveragecalculationcontext.go b/typedapi/types/exponentialaveragecalculationcontext.go index d1317d39a5..1160b6a459 100644 --- a/typedapi/types/exponentialaveragecalculationcontext.go +++ b/typedapi/types/exponentialaveragecalculationcontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ExponentialAverageCalculationContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L204-L208 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L208-L212 type ExponentialAverageCalculationContext struct { IncrementalMetricValueMs Float64 `json:"incremental_metric_value_ms"` LatestTimestamp *int64 `json:"latest_timestamp,omitempty"` diff --git a/typedapi/types/extendedboundsdouble.go b/typedapi/types/extendedboundsdouble.go index fb30749289..15e75be8c0 100644 --- a/typedapi/types/extendedboundsdouble.go +++ b/typedapi/types/extendedboundsdouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExtendedBoundsdouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L508-L517 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L511-L520 type ExtendedBoundsdouble struct { // Max Maximum value for the bound. Max *Float64 `json:"max,omitempty"` diff --git a/typedapi/types/extendedboundsfielddatemath.go b/typedapi/types/extendedboundsfielddatemath.go index 3cc1897017..d32b7df203 100644 --- a/typedapi/types/extendedboundsfielddatemath.go +++ b/typedapi/types/extendedboundsfielddatemath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ExtendedBoundsFieldDateMath type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L508-L517 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L511-L520 type ExtendedBoundsFieldDateMath struct { // Max Maximum value for the bound. Max FieldDateMath `json:"max,omitempty"` diff --git a/typedapi/types/extendedmemorystats.go b/typedapi/types/extendedmemorystats.go index 43a9ec6fb4..cf19080562 100644 --- a/typedapi/types/extendedmemorystats.go +++ b/typedapi/types/extendedmemorystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExtendedMemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L660-L669 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L660-L669 type ExtendedMemoryStats struct { // AdjustedTotalInBytes If the amount of physical memory has been overridden using the // `es`.`total_memory_bytes` system property then this reports the overridden diff --git a/typedapi/types/extendedretrieverssearchusage.go b/typedapi/types/extendedretrieverssearchusage.go new file mode 100644 index 0000000000..2dd1beee44 --- /dev/null +++ b/typedapi/types/extendedretrieverssearchusage.go @@ -0,0 +1,35 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// ExtendedRetrieversSearchUsage type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L163-L165 +type ExtendedRetrieversSearchUsage struct { + TextSimilarityReranker *ExtendedTextSimilarityRetrieverUsage `json:"text_similarity_reranker,omitempty"` +} + +// NewExtendedRetrieversSearchUsage returns a ExtendedRetrieversSearchUsage. +func NewExtendedRetrieversSearchUsage() *ExtendedRetrieversSearchUsage { + r := &ExtendedRetrieversSearchUsage{} + + return r +} diff --git a/typedapi/types/extendedsearchusage.go b/typedapi/types/extendedsearchusage.go new file mode 100644 index 0000000000..f02b8a8f31 --- /dev/null +++ b/typedapi/types/extendedsearchusage.go @@ -0,0 +1,35 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// ExtendedSearchUsage type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L159-L161 +type ExtendedSearchUsage struct { + Retrievers *ExtendedRetrieversSearchUsage `json:"retrievers,omitempty"` +} + +// NewExtendedSearchUsage returns a ExtendedSearchUsage. +func NewExtendedSearchUsage() *ExtendedSearchUsage { + r := &ExtendedSearchUsage{} + + return r +} diff --git a/typedapi/types/extendedstatsaggregate.go b/typedapi/types/extendedstatsaggregate.go index e8a52ef348..d4c430cb7c 100644 --- a/typedapi/types/extendedstatsaggregate.go +++ b/typedapi/types/extendedstatsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L299-L320 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L304-L325 type ExtendedStatsAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` diff --git a/typedapi/types/extendedstatsaggregation.go b/typedapi/types/extendedstatsaggregation.go index 93b4d254fa..bc507ac8bb 100644 --- a/typedapi/types/extendedstatsaggregation.go +++ b/typedapi/types/extendedstatsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L107-L112 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L107-L112 type ExtendedStatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/extendedstatsbucketaggregate.go b/typedapi/types/extendedstatsbucketaggregate.go index 29a0d581b2..91fd234571 100644 --- a/typedapi/types/extendedstatsbucketaggregate.go +++ b/typedapi/types/extendedstatsbucketaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L322-L323 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L327-L328 type ExtendedStatsBucketAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` diff --git a/typedapi/types/extendedstatsbucketaggregation.go b/typedapi/types/extendedstatsbucketaggregation.go index 8a9eb7be25..f5102fbfd4 100644 --- a/typedapi/types/extendedstatsbucketaggregation.go +++ b/typedapi/types/extendedstatsbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ExtendedStatsBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L218-L223 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L220-L225 type ExtendedStatsBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/extendedtextsimilarityretrieverusage.go b/typedapi/types/extendedtextsimilarityretrieverusage.go new file mode 100644 index 0000000000..6d0e99fdee --- /dev/null +++ b/typedapi/types/extendedtextsimilarityretrieverusage.go @@ -0,0 +1,79 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ExtendedTextSimilarityRetrieverUsage type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L167-L169 +type ExtendedTextSimilarityRetrieverUsage struct { + ChunkRescorer *int64 `json:"chunk_rescorer,omitempty"` +} + +func (s *ExtendedTextSimilarityRetrieverUsage) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "chunk_rescorer": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "ChunkRescorer", err) + } + s.ChunkRescorer = &value + case float64: + f := int64(v) + s.ChunkRescorer = &f + } + + } + } + return nil +} + +// NewExtendedTextSimilarityRetrieverUsage returns a ExtendedTextSimilarityRetrieverUsage. +func NewExtendedTextSimilarityRetrieverUsage() *ExtendedTextSimilarityRetrieverUsage { + r := &ExtendedTextSimilarityRetrieverUsage{} + + return r +} diff --git a/typedapi/types/failprocessor.go b/typedapi/types/failprocessor.go index 94b93c65b7..d933ec93ec 100644 --- a/typedapi/types/failprocessor.go +++ b/typedapi/types/failprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FailProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L889-L895 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L893-L899 type FailProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/failurestore.go b/typedapi/types/failurestore.go index c876a904ed..9af02e8de8 100644 --- a/typedapi/types/failurestore.go +++ b/typedapi/types/failurestore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FailureStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L48-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStream.ts#L49-L53 type FailureStore struct { Enabled bool `json:"enabled"` Indices []DataStreamIndex `json:"indices"` diff --git a/typedapi/types/failurestorelifecycle.go b/typedapi/types/failurestorelifecycle.go index db662df4ec..ab8a03a5bf 100644 --- a/typedapi/types/failurestorelifecycle.go +++ b/typedapi/types/failurestorelifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FailureStoreLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamFailureStore.ts#L56-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamFailureStore.ts#L56-L72 type FailureStoreLifecycle struct { // DataRetention If defined, every document added to this data stream will be stored at least // for this time frame. diff --git a/typedapi/types/failurestorelifecycletemplate.go b/typedapi/types/failurestorelifecycletemplate.go index 6870d9ea35..e312c159ad 100644 --- a/typedapi/types/failurestorelifecycletemplate.go +++ b/typedapi/types/failurestorelifecycletemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FailureStoreLifecycleTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamFailureStore.ts#L74-L90 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/DataStreamFailureStore.ts#L74-L90 type FailureStoreLifecycleTemplate struct { // DataRetention If defined, every document added to this data stream will be stored at least // for this time frame. diff --git a/typedapi/types/feature.go b/typedapi/types/feature.go index b66548d3e1..f8b6caa9b4 100644 --- a/typedapi/types/feature.go +++ b/typedapi/types/feature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Feature type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/features/_types/Feature.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/features/_types/Feature.ts#L20-L23 type Feature struct { Description string `json:"description"` Name string `json:"name"` diff --git a/typedapi/types/featureenabled.go b/typedapi/types/featureenabled.go index 09eda510af..ceb0647cae 100644 --- a/typedapi/types/featureenabled.go +++ b/typedapi/types/featureenabled.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FeatureEnabled type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L215-L217 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L215-L217 type FeatureEnabled struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/featureextractor.go b/typedapi/types/featureextractor.go index 5b9e66ee2b..5f435350e1 100644 --- a/typedapi/types/featureextractor.go +++ b/typedapi/types/featureextractor.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // FeatureExtractor type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L93-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L93-L96 type FeatureExtractor QueryFeatureExtractor type FeatureExtractorVariant interface { diff --git a/typedapi/types/features.go b/typedapi/types/features.go index 404d4fccc3..cb30aa07a2 100644 --- a/typedapi/types/features.go +++ b/typedapi/types/features.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ import ( // Features type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get/IndicesGetRequest.ts#L103-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get/IndicesGetRequest.ts#L104-L104 type Features []feature.Feature diff --git a/typedapi/types/featuretoggle.go b/typedapi/types/featuretoggle.go index 0755b04f70..0dd731afe8 100644 --- a/typedapi/types/featuretoggle.go +++ b/typedapi/types/featuretoggle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FeatureToggle type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L37-L39 type FeatureToggle struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/fetchprofile.go b/typedapi/types/fetchprofile.go index 4936693b60..561b72ff27 100644 --- a/typedapi/types/fetchprofile.go +++ b/typedapi/types/fetchprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FetchProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L230-L237 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L230-L237 type FetchProfile struct { Breakdown FetchProfileBreakdown `json:"breakdown"` Children []FetchProfile `json:"children,omitempty"` diff --git a/typedapi/types/fetchprofilebreakdown.go b/typedapi/types/fetchprofilebreakdown.go index 6fbc886ffb..c8c2210e6e 100644 --- a/typedapi/types/fetchprofilebreakdown.go +++ b/typedapi/types/fetchprofilebreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FetchProfileBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L239-L248 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L239-L248 type FetchProfileBreakdown struct { LoadSource *int `json:"load_source,omitempty"` LoadSourceCount *int `json:"load_source_count,omitempty"` diff --git a/typedapi/types/fetchprofiledebug.go b/typedapi/types/fetchprofiledebug.go index fdde6c0a2b..a0a30ba1f1 100644 --- a/typedapi/types/fetchprofiledebug.go +++ b/typedapi/types/fetchprofiledebug.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FetchProfileDebug type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L250-L253 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L250-L253 type FetchProfileDebug struct { FastPath *int `json:"fast_path,omitempty"` StoredFields []string `json:"stored_fields,omitempty"` diff --git a/typedapi/types/fieldaliasproperty.go b/typedapi/types/fieldaliasproperty.go index 2317ed5d24..572bcf85bc 100644 --- a/typedapi/types/fieldaliasproperty.go +++ b/typedapi/types/fieldaliasproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // FieldAliasProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L64-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L65-L68 type FieldAliasProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/fieldandformat.go b/typedapi/types/fieldandformat.go index 495f82658a..9270c24028 100644 --- a/typedapi/types/fieldandformat.go +++ b/typedapi/types/fieldandformat.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldAndFormat type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/abstractions.ts#L535-L549 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/abstractions.ts#L535-L549 type FieldAndFormat struct { // Field A wildcard pattern. The request returns values for field names matching this // pattern. diff --git a/typedapi/types/fieldcapability.go b/typedapi/types/fieldcapability.go index 51de8b0df2..2c44cf2e2d 100644 --- a/typedapi/types/fieldcapability.go +++ b/typedapi/types/fieldcapability.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // FieldCapability type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/field_caps/types.ts#L23-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/field_caps/types.ts#L23-L81 type FieldCapability struct { // Aggregatable Whether this field can be aggregated on all indices. Aggregatable bool `json:"aggregatable"` diff --git a/typedapi/types/fieldcollapse.go b/typedapi/types/fieldcollapse.go index 2a79529cbe..4a68348f6c 100644 --- a/typedapi/types/fieldcollapse.go +++ b/typedapi/types/fieldcollapse.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldCollapse type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/FieldCollapse.ts#L24-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/FieldCollapse.ts#L24-L41 type FieldCollapse struct { Collapse *FieldCollapse `json:"collapse,omitempty"` // Field The field to collapse the result set on diff --git a/typedapi/types/fielddatafrequencyfilter.go b/typedapi/types/fielddatafrequencyfilter.go index 215d8cb530..d63ab80197 100644 --- a/typedapi/types/fielddatafrequencyfilter.go +++ b/typedapi/types/fielddatafrequencyfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FielddataFrequencyFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/FielddataFrequencyFilter.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/FielddataFrequencyFilter.ts#L22-L26 type FielddataFrequencyFilter struct { Max Float64 `json:"max"` Min Float64 `json:"min"` diff --git a/typedapi/types/fielddatarecord.go b/typedapi/types/fielddatarecord.go index 7eefd59e21..4ada228daf 100644 --- a/typedapi/types/fielddatarecord.go +++ b/typedapi/types/fielddatarecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FielddataRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/fielddata/types.ts#L20-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/fielddata/types.ts#L20-L48 type FielddataRecord struct { // Field field name Field *string `json:"field,omitempty"` diff --git a/typedapi/types/fielddatastats.go b/typedapi/types/fielddatastats.go index c7cdc4cbf4..b76743fde9 100644 --- a/typedapi/types/fielddatastats.go +++ b/typedapi/types/fielddatastats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FielddataStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L123-L129 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L123-L129 type FielddataStats struct { Evictions *int64 `json:"evictions,omitempty"` Fields map[string]FieldMemoryUsage `json:"fields,omitempty"` diff --git a/typedapi/types/fielddatemath.go b/typedapi/types/fielddatemath.go index e993d2c42d..5f56826bc7 100644 --- a/typedapi/types/fielddatemath.go +++ b/typedapi/types/fielddatemath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // Float64 // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L309-L316 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L312-L319 type FieldDateMath any type FieldDateMathVariant interface { diff --git a/typedapi/types/fieldlookup.go b/typedapi/types/fieldlookup.go index 0f0276638d..72c8c97bcf 100644 --- a/typedapi/types/fieldlookup.go +++ b/typedapi/types/fieldlookup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // FieldLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/abstractions.ts#L436-L453 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/abstractions.ts#L436-L453 type FieldLookup struct { // Id `id` of the document. Id string `json:"id"` @@ -39,7 +39,7 @@ type FieldLookup struct { // Path Name of the field. Path *string `json:"path,omitempty"` // Routing Custom routing value. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` } func (s *FieldLookup) UnmarshalJSON(data []byte) error { @@ -73,8 +73,19 @@ func (s *FieldLookup) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } } diff --git a/typedapi/types/fieldmapping.go b/typedapi/types/fieldmapping.go index 718039ed94..6466539f0f 100644 --- a/typedapi/types/fieldmapping.go +++ b/typedapi/types/fieldmapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/meta-fields.ts#L24-L27 type FieldMapping struct { FullName string `json:"full_name"` Mapping map[string]Property `json:"mapping"` diff --git a/typedapi/types/fieldmemoryusage.go b/typedapi/types/fieldmemoryusage.go index e2405e302b..595d2f6f6d 100644 --- a/typedapi/types/fieldmemoryusage.go +++ b/typedapi/types/fieldmemoryusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldMemoryUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L143-L146 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L143-L146 type FieldMemoryUsage struct { MemorySize ByteSize `json:"memory_size,omitempty"` MemorySizeInBytes int64 `json:"memory_size_in_bytes"` diff --git a/typedapi/types/fieldmetric.go b/typedapi/types/fieldmetric.go index 43aa2830a6..ed9b4a9029 100644 --- a/typedapi/types/fieldmetric.go +++ b/typedapi/types/fieldmetric.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // FieldMetric type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/_types/Metric.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/_types/Metric.ts#L30-L35 type FieldMetric struct { // Field The field to collect metrics for. This must be a numeric of some kind. Field string `json:"field"` diff --git a/typedapi/types/fieldnamesfield.go b/typedapi/types/fieldnamesfield.go index 8ebe443ef8..4847240ac4 100644 --- a/typedapi/types/fieldnamesfield.go +++ b/typedapi/types/fieldnamesfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldNamesField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/meta-fields.ts#L42-L44 type FieldNamesField struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/fields.go b/typedapi/types/fields.go index 30d52b1cf8..95314b6877 100644 --- a/typedapi/types/fields.go +++ b/typedapi/types/fields.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Fields type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L137-L137 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L132-L132 type Fields []string type FieldsVariant interface { diff --git a/typedapi/types/fieldsecurity.go b/typedapi/types/fieldsecurity.go index b4374efb85..e6e319353c 100644 --- a/typedapi/types/fieldsecurity.go +++ b/typedapi/types/fieldsecurity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // FieldSecurity type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/FieldSecurity.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/FieldSecurity.ts#L22-L25 type FieldSecurity struct { Except []string `json:"except,omitempty"` Grant []string `json:"grant,omitempty"` diff --git a/typedapi/types/fieldsizeusage.go b/typedapi/types/fieldsizeusage.go index 133c82c5f7..2edd73d31d 100644 --- a/typedapi/types/fieldsizeusage.go +++ b/typedapi/types/fieldsizeusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldSizeUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L95-L98 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L95-L98 type FieldSizeUsage struct { Size ByteSize `json:"size,omitempty"` SizeInBytes int64 `json:"size_in_bytes"` diff --git a/typedapi/types/fieldsort.go b/typedapi/types/fieldsort.go index f526e67416..866b51f8ff 100644 --- a/typedapi/types/fieldsort.go +++ b/typedapi/types/fieldsort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // FieldSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L43-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L43-L52 type FieldSort struct { Format *string `json:"format,omitempty"` Missing Missing `json:"missing,omitempty"` diff --git a/typedapi/types/fieldstat.go b/typedapi/types/fieldstat.go index 702ee494af..369e654c2c 100644 --- a/typedapi/types/fieldstat.go +++ b/typedapi/types/fieldstat.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldStat type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/_types/Structure.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/_types/Structure.ts#L23-L33 type FieldStat struct { Cardinality int `json:"cardinality"` Count int `json:"count"` diff --git a/typedapi/types/fieldstatistics.go b/typedapi/types/fieldstatistics.go index a64100f032..86e7a19d45 100644 --- a/typedapi/types/fieldstatistics.go +++ b/typedapi/types/fieldstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/termvectors/types.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/termvectors/types.ts#L28-L32 type FieldStatistics struct { DocCount int `json:"doc_count"` SumDocFreq int64 `json:"sum_doc_freq"` diff --git a/typedapi/types/fieldsuggester.go b/typedapi/types/fieldsuggester.go index 0eb4976574..94bd409eb0 100644 --- a/typedapi/types/fieldsuggester.go +++ b/typedapi/types/fieldsuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L110-L143 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L110-L143 type FieldSuggester struct { AdditionalFieldSuggesterProperty map[string]json.RawMessage `json:"-"` // Completion Provides auto-complete/search-as-you-type functionality. diff --git a/typedapi/types/fieldsummary.go b/typedapi/types/fieldsummary.go index f5f90b30ed..0875cbecd3 100644 --- a/typedapi/types/fieldsummary.go +++ b/typedapi/types/fieldsummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // FieldSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L58-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L58-L67 type FieldSummary struct { Any uint `json:"any"` DocValues uint `json:"doc_values"` diff --git a/typedapi/types/fieldtypes.go b/typedapi/types/fieldtypes.go index c9a9aa9280..628667100d 100644 --- a/typedapi/types/fieldtypes.go +++ b/typedapi/types/fieldtypes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L211-L254 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L229-L272 type FieldTypes struct { // Count The number of occurrences of the field type in selected nodes. Count int `json:"count"` diff --git a/typedapi/types/fieldtypesmappings.go b/typedapi/types/fieldtypesmappings.go index c12f0e61f1..ab481b10f5 100644 --- a/typedapi/types/fieldtypesmappings.go +++ b/typedapi/types/fieldtypesmappings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FieldTypesMappings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L180-L209 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L198-L227 type FieldTypesMappings struct { // FieldTypes Contains statistics about field data types used in selected nodes. FieldTypes []FieldTypes `json:"field_types"` diff --git a/typedapi/types/fieldvalue.go b/typedapi/types/fieldvalue.go index 8419a3180e..8d4330f4c5 100644 --- a/typedapi/types/fieldvalue.go +++ b/typedapi/types/fieldvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -28,7 +28,7 @@ package types // bool // nil // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L25-L31 type FieldValue any type FieldValueVariant interface { diff --git a/typedapi/types/fieldvaluefactorscorefunction.go b/typedapi/types/fieldvaluefactorscorefunction.go index 3d9caec08d..340211f98b 100644 --- a/typedapi/types/fieldvaluefactorscorefunction.go +++ b/typedapi/types/fieldvaluefactorscorefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // FieldValueFactorScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L149-L168 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L151-L170 type FieldValueFactorScoreFunction struct { // Factor Optional factor to multiply the field value with. Factor *Float64 `json:"factor,omitempty"` diff --git a/typedapi/types/filecountsnapshotstats.go b/typedapi/types/filecountsnapshotstats.go index 755f7e1994..221d936f83 100644 --- a/typedapi/types/filecountsnapshotstats.go +++ b/typedapi/types/filecountsnapshotstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FileCountSnapshotStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/FileCountSnapshotStats.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/FileCountSnapshotStats.ts#L22-L25 type FileCountSnapshotStats struct { FileCount int `json:"file_count"` SizeInBytes int64 `json:"size_in_bytes"` diff --git a/typedapi/types/filedetails.go b/typedapi/types/filedetails.go index 0d4f8ed740..f4d74dd37c 100644 --- a/typedapi/types/filedetails.go +++ b/typedapi/types/filedetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FileDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L50-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L50-L54 type FileDetails struct { Length int64 `json:"length"` Name string `json:"name"` diff --git a/typedapi/types/filesettingsindicator.go b/typedapi/types/filesettingsindicator.go index 3a8cdc357d..e472574961 100644 --- a/typedapi/types/filesettingsindicator.go +++ b/typedapi/types/filesettingsindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // FileSettingsIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L208-L212 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L208-L212 type FileSettingsIndicator struct { Details *FileSettingsIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/filesettingsindicatordetails.go b/typedapi/types/filesettingsindicatordetails.go index ffe9ef6d0b..5514304e2c 100644 --- a/typedapi/types/filesettingsindicatordetails.go +++ b/typedapi/types/filesettingsindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FileSettingsIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L214-L217 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L214-L217 type FileSettingsIndicatorDetails struct { FailureStreak int64 `json:"failure_streak"` MostRecentFailure string `json:"most_recent_failure"` diff --git a/typedapi/types/filesystem.go b/typedapi/types/filesystem.go index 2e64954bbf..7480c423d3 100644 --- a/typedapi/types/filesystem.go +++ b/typedapi/types/filesystem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FileSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L771-L789 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L771-L789 type FileSystem struct { // Data List of all file stores. Data []DataPathStats `json:"data,omitempty"` diff --git a/typedapi/types/filesystemtotal.go b/typedapi/types/filesystemtotal.go index 5a5d89bf26..096857414a 100644 --- a/typedapi/types/filesystemtotal.go +++ b/typedapi/types/filesystemtotal.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FileSystemTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L830-L859 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L830-L859 type FileSystemTotal struct { // Available Total disk space available to this Java virtual machine on all file stores. // Depending on OS or process level restrictions, this might appear less than diff --git a/typedapi/types/fillmaskinferenceoptions.go b/typedapi/types/fillmaskinferenceoptions.go index 91b1821c58..61ca279107 100644 --- a/typedapi/types/fillmaskinferenceoptions.go +++ b/typedapi/types/fillmaskinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FillMaskInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L284-L299 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L286-L303 type FillMaskInferenceOptions struct { // MaskToken The string/token which will be removed from incoming documents and replaced // with the inference prediction(s). @@ -50,7 +50,7 @@ type FillMaskInferenceOptions struct { ResultsField *string `json:"results_field,omitempty"` // Tokenization The tokenization options to update when inferring Tokenization *TokenizationConfigContainer `json:"tokenization,omitempty"` - Vocabulary Vocabulary `json:"vocabulary"` + Vocabulary *Vocabulary `json:"vocabulary,omitempty"` } func (s *FillMaskInferenceOptions) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/fillmaskinferenceupdateoptions.go b/typedapi/types/fillmaskinferenceupdateoptions.go index d54b72c3d1..ce6e717fbd 100644 --- a/typedapi/types/fillmaskinferenceupdateoptions.go +++ b/typedapi/types/fillmaskinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FillMaskInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L430-L437 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L434-L441 type FillMaskInferenceUpdateOptions struct { // NumTopClasses Specifies the number of top class predictions to return. Defaults to 0. NumTopClasses *int `json:"num_top_classes,omitempty"` diff --git a/typedapi/types/filteraggregate.go b/typedapi/types/filteraggregate.go index d8a1c94ef7..0eca595b78 100644 --- a/typedapi/types/filteraggregate.go +++ b/typedapi/types/filteraggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // FilterAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L552-L556 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L624-L628 type FilterAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *FilterAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *FilterAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/filteringadvancedsnippet.go b/typedapi/types/filteringadvancedsnippet.go index dda96c9e52..9b967c2ee3 100644 --- a/typedapi/types/filteringadvancedsnippet.go +++ b/typedapi/types/filteringadvancedsnippet.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // FilteringAdvancedSnippet type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L192-L196 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L192-L196 type FilteringAdvancedSnippet struct { CreatedAt DateTime `json:"created_at,omitempty"` UpdatedAt DateTime `json:"updated_at,omitempty"` diff --git a/typedapi/types/filteringconfig.go b/typedapi/types/filteringconfig.go index 2c8cf97589..3e3327fa03 100644 --- a/typedapi/types/filteringconfig.go +++ b/typedapi/types/filteringconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FilteringConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L209-L213 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L209-L213 type FilteringConfig struct { Active FilteringRules `json:"active"` Domain *string `json:"domain,omitempty"` diff --git a/typedapi/types/filteringrule.go b/typedapi/types/filteringrule.go index bbaa53ebaf..a69fe10f44 100644 --- a/typedapi/types/filteringrule.go +++ b/typedapi/types/filteringrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // FilteringRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L170-L179 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L170-L179 type FilteringRule struct { CreatedAt DateTime `json:"created_at,omitempty"` Field string `json:"field"` diff --git a/typedapi/types/filteringrules.go b/typedapi/types/filteringrules.go index 65879bf82d..72bfd41427 100644 --- a/typedapi/types/filteringrules.go +++ b/typedapi/types/filteringrules.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // FilteringRules type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L203-L207 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L203-L207 type FilteringRules struct { AdvancedSnippet FilteringAdvancedSnippet `json:"advanced_snippet"` Rules []FilteringRule `json:"rules"` diff --git a/typedapi/types/filteringrulesvalidation.go b/typedapi/types/filteringrulesvalidation.go index 42cc8200f8..42553b1fac 100644 --- a/typedapi/types/filteringrulesvalidation.go +++ b/typedapi/types/filteringrulesvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // FilteringRulesValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L198-L201 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L198-L201 type FilteringRulesValidation struct { Errors []FilteringValidation `json:"errors"` State filteringvalidationstate.FilteringValidationState `json:"state"` diff --git a/typedapi/types/filteringvalidation.go b/typedapi/types/filteringvalidation.go index 949220fe8f..6e6a1f9889 100644 --- a/typedapi/types/filteringvalidation.go +++ b/typedapi/types/filteringvalidation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // FilteringValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L181-L184 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L181-L184 type FilteringValidation struct { Ids []string `json:"ids"` Messages []string `json:"messages"` diff --git a/typedapi/types/filterref.go b/typedapi/types/filterref.go index 22847b8c8e..ae1537ae61 100644 --- a/typedapi/types/filterref.go +++ b/typedapi/types/filterref.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // FilterRef type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Filter.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Filter.ts#L31-L41 type FilterRef struct { // FilterId The identifier for the filter. FilterId string `json:"filter_id"` diff --git a/typedapi/types/filtersaggregate.go b/typedapi/types/filtersaggregate.go index 9dccb35f31..fc3713404f 100644 --- a/typedapi/types/filtersaggregate.go +++ b/typedapi/types/filtersaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // FiltersAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L639-L643 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L711-L715 type FiltersAggregate struct { Buckets BucketsFiltersBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/filtersaggregation.go b/typedapi/types/filtersaggregation.go index c56d07b3b5..3a4ca67bb6 100644 --- a/typedapi/types/filtersaggregation.go +++ b/typedapi/types/filtersaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FiltersAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L374-L394 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L377-L397 type FiltersAggregation struct { // Filters Collection of queries from which to build buckets. Filters BucketsQuery `json:"filters,omitempty"` diff --git a/typedapi/types/filtersbucket.go b/typedapi/types/filtersbucket.go index fce9e02d77..b80ab1616b 100644 --- a/typedapi/types/filtersbucket.go +++ b/typedapi/types/filtersbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // FiltersBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L645-L647 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L717-L719 type FiltersBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -204,6 +204,13 @@ func (s *FiltersBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -232,6 +239,20 @@ func (s *FiltersBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/fingerprintanalyzer.go b/typedapi/types/fingerprintanalyzer.go index c80eeb4507..b40c3387e1 100644 --- a/typedapi/types/fingerprintanalyzer.go +++ b/typedapi/types/fingerprintanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FingerprintAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L37-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L37-L64 type FingerprintAnalyzer struct { // MaxOutputSize The maximum token size to emit. Tokens larger than this size will be // discarded. diff --git a/typedapi/types/fingerprintprocessor.go b/typedapi/types/fingerprintprocessor.go index a4d9d07828..e2484ea71e 100644 --- a/typedapi/types/fingerprintprocessor.go +++ b/typedapi/types/fingerprintprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // FingerprintProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L905-L933 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L909-L937 type FingerprintProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/fingerprinttokenfilter.go b/typedapi/types/fingerprinttokenfilter.go index 0d19bca637..b7ebfd060b 100644 --- a/typedapi/types/fingerprinttokenfilter.go +++ b/typedapi/types/fingerprinttokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FingerprintTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L260-L266 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L281-L287 type FingerprintTokenFilter struct { // MaxOutputSize Maximum character length, including whitespace, of the output token. Defaults // to `255`. Concatenated tokens longer than this will result in no token diff --git a/typedapi/types/finnishanalyzer.go b/typedapi/types/finnishanalyzer.go index 274f0d6b88..227130aaa1 100644 --- a/typedapi/types/finnishanalyzer.go +++ b/typedapi/types/finnishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FinnishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L165-L170 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L165-L170 type FinnishAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/flattened.go b/typedapi/types/flattened.go index 2672f486f0..3a78527e20 100644 --- a/typedapi/types/flattened.go +++ b/typedapi/types/flattened.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Flattened type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L366-L368 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L399-L401 type Flattened struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/flattenedproperty.go b/typedapi/types/flattenedproperty.go index ef3be46a1a..ab2b28697c 100644 --- a/typedapi/types/flattenedproperty.go +++ b/typedapi/types/flattenedproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // FlattenedProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/complex.ts#L26-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/complex.ts#L26-L38 type FlattenedProperty struct { Boost *Float64 `json:"boost,omitempty"` DepthLimit *int `json:"depth_limit,omitempty"` diff --git a/typedapi/types/flattengraphtokenfilter.go b/typedapi/types/flattengraphtokenfilter.go index b2d3cafbd9..12b349ca42 100644 --- a/typedapi/types/flattengraphtokenfilter.go +++ b/typedapi/types/flattengraphtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // FlattenGraphTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L486-L488 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L521-L523 type FlattenGraphTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/floatnumberproperty.go b/typedapi/types/floatnumberproperty.go index 20adc7b99e..567e5bb210 100644 --- a/typedapi/types/floatnumberproperty.go +++ b/typedapi/types/floatnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // FloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L157-L160 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L158-L161 type FloatNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/floatrangeproperty.go b/typedapi/types/floatrangeproperty.go index f7115ad3d5..e6e4a13a8c 100644 --- a/typedapi/types/floatrangeproperty.go +++ b/typedapi/types/floatrangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // FloatRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/range.ts#L38-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/range.ts#L38-L40 type FloatRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/flushstats.go b/typedapi/types/flushstats.go index ed439d0ec8..3726e3da8f 100644 --- a/typedapi/types/flushstats.go +++ b/typedapi/types/flushstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FlushStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L148-L153 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L148-L153 type FlushStats struct { Periodic int64 `json:"periodic"` Total int64 `json:"total"` diff --git a/typedapi/types/followerindex.go b/typedapi/types/followerindex.go index 71e3f03bcc..a36ebf4f96 100644 --- a/typedapi/types/followerindex.go +++ b/typedapi/types/followerindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // FollowerIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/follow_info/types.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/follow_info/types.ts#L24-L35 type FollowerIndex struct { // FollowerIndex The name of the follower index. FollowerIndex string `json:"follower_index"` diff --git a/typedapi/types/followerindexparameters.go b/typedapi/types/followerindexparameters.go index 1e25359599..dcbd000359 100644 --- a/typedapi/types/followerindexparameters.go +++ b/typedapi/types/followerindexparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FollowerIndexParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/follow_info/types.ts#L42-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/follow_info/types.ts#L42-L88 type FollowerIndexParameters struct { // MaxOutstandingReadRequests The maximum number of outstanding reads requests from the remote cluster. MaxOutstandingReadRequests *int64 `json:"max_outstanding_read_requests,omitempty"` diff --git a/typedapi/types/followindexstats.go b/typedapi/types/followindexstats.go index 8537f5b324..ed8e106f9b 100644 --- a/typedapi/types/followindexstats.go +++ b/typedapi/types/followindexstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // FollowIndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/_types/FollowIndexStats.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/_types/FollowIndexStats.ts#L30-L35 type FollowIndexStats struct { // Index The name of the follower index. Index string `json:"index"` diff --git a/typedapi/types/followstats.go b/typedapi/types/followstats.go index a58d418d12..cf2948dc70 100644 --- a/typedapi/types/followstats.go +++ b/typedapi/types/followstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // FollowStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/stats/types.ts.ts#L49-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/stats/types.ts.ts#L49-L51 type FollowStats struct { Indices []FollowIndexStats `json:"indices"` } diff --git a/typedapi/types/forcemergeaction.go b/typedapi/types/forcemergeaction.go index 09dedfedcc..3cac758a58 100644 --- a/typedapi/types/forcemergeaction.go +++ b/typedapi/types/forcemergeaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ForceMergeAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L123-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L126-L129 type ForceMergeAction struct { IndexCodec *string `json:"index_codec,omitempty"` MaxNumSegments int `json:"max_num_segments"` diff --git a/typedapi/types/foreachprocessor.go b/typedapi/types/foreachprocessor.go index b768519d3d..9ec179014b 100644 --- a/typedapi/types/foreachprocessor.go +++ b/typedapi/types/foreachprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ForeachProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L935-L949 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L939-L953 type ForeachProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/foundstatus.go b/typedapi/types/foundstatus.go index 74bd0eea63..6d9d4bd9e5 100644 --- a/typedapi/types/foundstatus.go +++ b/typedapi/types/foundstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FoundStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/delete_privileges/types.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/delete_privileges/types.ts#L20-L22 type FoundStatus struct { Found bool `json:"found"` } diff --git a/typedapi/types/frenchanalyzer.go b/typedapi/types/frenchanalyzer.go index 98b073dd23..ade436917f 100644 --- a/typedapi/types/frenchanalyzer.go +++ b/typedapi/types/frenchanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FrenchAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L172-L177 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L172-L177 type FrenchAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/frenchstemtokenfilter.go b/typedapi/types/frenchstemtokenfilter.go index e4c3ec4729..cd4338e215 100644 --- a/typedapi/types/frenchstemtokenfilter.go +++ b/typedapi/types/frenchstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // FrenchStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L555-L557 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L592-L594 type FrenchStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/frequencyencodingpreprocessor.go b/typedapi/types/frequencyencodingpreprocessor.go index 1caf47c8be..3cac2fdaed 100644 --- a/typedapi/types/frequencyencodingpreprocessor.go +++ b/typedapi/types/frequencyencodingpreprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FrequencyEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L38-L42 type FrequencyEncodingPreprocessor struct { FeatureName string `json:"feature_name"` Field string `json:"field"` diff --git a/typedapi/types/frequentitemsetsaggregate.go b/typedapi/types/frequentitemsetsaggregate.go index 0814670bd6..5383169a84 100644 --- a/typedapi/types/frequentitemsetsaggregate.go +++ b/typedapi/types/frequentitemsetsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // FrequentItemSetsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L724-L725 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L796-L797 type FrequentItemSetsAggregate struct { Buckets BucketsFrequentItemSetsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/frequentitemsetsaggregation.go b/typedapi/types/frequentitemsetsaggregation.go index 1413f8666a..3cb7e94370 100644 --- a/typedapi/types/frequentitemsetsaggregation.go +++ b/typedapi/types/frequentitemsetsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FrequentItemSetsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1241-L1268 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1270-L1297 type FrequentItemSetsAggregation struct { // Fields Fields to analyze. Fields []FrequentItemSetsField `json:"fields"` diff --git a/typedapi/types/frequentitemsetsbucket.go b/typedapi/types/frequentitemsetsbucket.go index 77a901a0f5..f637939434 100644 --- a/typedapi/types/frequentitemsetsbucket.go +++ b/typedapi/types/frequentitemsetsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // FrequentItemSetsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L727-L730 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L799-L802 type FrequentItemSetsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -217,6 +217,13 @@ func (s *FrequentItemSetsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -245,6 +252,20 @@ func (s *FrequentItemSetsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/frequentitemsetsfield.go b/typedapi/types/frequentitemsetsfield.go index b2aa684e23..2e0c989b35 100644 --- a/typedapi/types/frequentitemsetsfield.go +++ b/typedapi/types/frequentitemsetsfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // FrequentItemSetsField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1227-L1239 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1256-L1268 type FrequentItemSetsField struct { // Exclude Values to exclude. // Can be regular expression strings or arrays of strings of exact terms. diff --git a/typedapi/types/functionscore.go b/typedapi/types/functionscore.go index 084109b471..1b58850bd4 100644 --- a/typedapi/types/functionscore.go +++ b/typedapi/types/functionscore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,9 +31,8 @@ import ( // FunctionScore type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L226-L266 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L228-L268 type FunctionScore struct { - AdditionalFunctionScoreProperty map[string]json.RawMessage `json:"-"` // Exp Function that scores a document with a exponential decay, depending on the // distance of a numeric field value of the document from an origin. Exp DecayFunction `json:"exp,omitempty"` @@ -153,58 +152,14 @@ func (s *FunctionScore) UnmarshalJSON(data []byte) error { s.Weight = &f } - default: - - if key, ok := t.(string); ok { - if s.AdditionalFunctionScoreProperty == nil { - s.AdditionalFunctionScoreProperty = make(map[string]json.RawMessage, 0) - } - raw := new(json.RawMessage) - if err := dec.Decode(&raw); err != nil { - return fmt.Errorf("%s | %w", "AdditionalFunctionScoreProperty", err) - } - s.AdditionalFunctionScoreProperty[key] = *raw - } - } } return nil } -// MarhsalJSON overrides marshalling for types with additional properties -func (s FunctionScore) MarshalJSON() ([]byte, error) { - type opt FunctionScore - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalFunctionScoreProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalFunctionScoreProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewFunctionScore returns a FunctionScore. func NewFunctionScore() *FunctionScore { - r := &FunctionScore{ - AdditionalFunctionScoreProperty: make(map[string]json.RawMessage), - } + r := &FunctionScore{} return r } diff --git a/typedapi/types/functionscorequery.go b/typedapi/types/functionscorequery.go index d6bfd266e9..1911db3e3f 100644 --- a/typedapi/types/functionscorequery.go +++ b/typedapi/types/functionscorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // FunctionScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L105-L135 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L105-L136 type FunctionScoreQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/fuzziness.go b/typedapi/types/fuzziness.go index 597c2b44e1..ef68a526a1 100644 --- a/typedapi/types/fuzziness.go +++ b/typedapi/types/fuzziness.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // int // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L130-L131 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L125-L126 type Fuzziness any type FuzzinessVariant interface { diff --git a/typedapi/types/fuzzyquery.go b/typedapi/types/fuzzyquery.go index 5c270b00b7..185e0fa9c9 100644 --- a/typedapi/types/fuzzyquery.go +++ b/typedapi/types/fuzzyquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // FuzzyQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L48-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L48-L87 type FuzzyQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/galiciananalyzer.go b/typedapi/types/galiciananalyzer.go index 0105e00e2f..47ed24d82b 100644 --- a/typedapi/types/galiciananalyzer.go +++ b/typedapi/types/galiciananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GalicianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L179-L184 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L179-L184 type GalicianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/garbagecollector.go b/typedapi/types/garbagecollector.go index e923f29135..541afb505e 100644 --- a/typedapi/types/garbagecollector.go +++ b/typedapi/types/garbagecollector.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // GarbageCollector type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1001-L1006 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1001-L1006 type GarbageCollector struct { // Collectors Contains statistics about JVM garbage collectors for the node. Collectors map[string]GarbageCollectorTotal `json:"collectors,omitempty"` diff --git a/typedapi/types/garbagecollectortotal.go b/typedapi/types/garbagecollectortotal.go index 3f630569b2..01a4299ae6 100644 --- a/typedapi/types/garbagecollectortotal.go +++ b/typedapi/types/garbagecollectortotal.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GarbageCollectorTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1008-L1021 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1008-L1021 type GarbageCollectorTotal struct { // CollectionCount Total number of JVM garbage collectors that collect objects. CollectionCount *int64 `json:"collection_count,omitempty"` diff --git a/typedapi/types/gcsrepository.go b/typedapi/types/gcsrepository.go index 3f957ca84f..365e5b02f9 100644 --- a/typedapi/types/gcsrepository.go +++ b/typedapi/types/gcsrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GcsRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L52-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L52-L62 type GcsRepository struct { // Settings The repository settings. Settings GcsRepositorySettings `json:"settings"` diff --git a/typedapi/types/gcsrepositorysettings.go b/typedapi/types/gcsrepositorysettings.go index 119e23ab88..32a720028c 100644 --- a/typedapi/types/gcsrepositorysettings.go +++ b/typedapi/types/gcsrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GcsRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L198-L235 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L198-L235 type GcsRepositorySettings struct { // ApplicationName The name used by the client when it uses the Google Cloud Storage service. ApplicationName *string `json:"application_name,omitempty"` diff --git a/typedapi/types/geoboundingboxquery.go b/typedapi/types/geoboundingboxquery.go index 4dcf2547da..557d826a53 100644 --- a/typedapi/types/geoboundingboxquery.go +++ b/typedapi/types/geoboundingboxquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // GeoBoundingBoxQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L35-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/geo.ts#L35-L57 type GeoBoundingBoxQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/geobounds.go b/typedapi/types/geobounds.go index a35b3e5b6e..aa78ddbbbe 100644 --- a/typedapi/types/geobounds.go +++ b/typedapi/types/geobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -27,7 +27,7 @@ package types // TopRightBottomLeftGeoBounds // WktGeoBounds // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L135-L148 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L134-L147 type GeoBounds any type GeoBoundsVariant interface { diff --git a/typedapi/types/geoboundsaggregate.go b/typedapi/types/geoboundsaggregate.go index fef23b70d1..0214e4c920 100644 --- a/typedapi/types/geoboundsaggregate.go +++ b/typedapi/types/geoboundsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GeoBoundsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L327-L333 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L343-L349 type GeoBoundsAggregate struct { Bounds GeoBounds `json:"bounds,omitempty"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geoboundsaggregation.go b/typedapi/types/geoboundsaggregation.go index 31b139fc9c..857d33f0c0 100644 --- a/typedapi/types/geoboundsaggregation.go +++ b/typedapi/types/geoboundsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoBoundsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L114-L123 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L118-L127 type GeoBoundsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/geocentroidaggregate.go b/typedapi/types/geocentroidaggregate.go index 7bf62cd74f..788c50725c 100644 --- a/typedapi/types/geocentroidaggregate.go +++ b/typedapi/types/geocentroidaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoCentroidAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L335-L342 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L351-L358 type GeoCentroidAggregate struct { Count int64 `json:"count"` Location GeoLocation `json:"location,omitempty"` diff --git a/typedapi/types/geocentroidaggregation.go b/typedapi/types/geocentroidaggregation.go index 84cda571e9..101c2d199d 100644 --- a/typedapi/types/geocentroidaggregation.go +++ b/typedapi/types/geocentroidaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoCentroidAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L125-L128 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L129-L132 type GeoCentroidAggregation struct { Count *int64 `json:"count,omitempty"` // Field The field on which to run the aggregation. diff --git a/typedapi/types/geodecayfunction.go b/typedapi/types/geodecayfunction.go index f37bbc57db..c62efe0b74 100644 --- a/typedapi/types/geodecayfunction.go +++ b/typedapi/types/geodecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -29,7 +29,7 @@ import ( // GeoDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L210-L213 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L212-L215 type GeoDecayFunction struct { DecayFunctionBaseGeoLocationDistance map[string]DecayPlacementGeoLocationDistance `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the diff --git a/typedapi/types/geodistanceaggregate.go b/typedapi/types/geodistanceaggregate.go index 64417b5703..55318d16e3 100644 --- a/typedapi/types/geodistanceaggregate.go +++ b/typedapi/types/geodistanceaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GeoDistanceAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L617-L622 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L689-L694 type GeoDistanceAggregate struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geodistanceaggregation.go b/typedapi/types/geodistanceaggregation.go index 72f915d7f6..556f0941e5 100644 --- a/typedapi/types/geodistanceaggregation.go +++ b/typedapi/types/geodistanceaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // GeoDistanceAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L396-L419 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L399-L422 type GeoDistanceAggregation struct { // DistanceType The distance calculation type. DistanceType *geodistancetype.GeoDistanceType `json:"distance_type,omitempty"` diff --git a/typedapi/types/geodistancefeaturequery.go b/typedapi/types/geodistancefeaturequery.go index b315ee3e0e..b40882dfb6 100644 --- a/typedapi/types/geodistancefeaturequery.go +++ b/typedapi/types/geodistancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L66-L69 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L66-L69 type GeoDistanceFeatureQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/geodistancequery.go b/typedapi/types/geodistancequery.go index 14dd519f81..4b4537aa29 100644 --- a/typedapi/types/geodistancequery.go +++ b/typedapi/types/geodistancequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // GeoDistanceQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L64-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/geo.ts#L64-L96 type GeoDistanceQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/geodistancesort.go b/typedapi/types/geodistancesort.go index 5911c522e8..6fd8ac0016 100644 --- a/typedapi/types/geodistancesort.go +++ b/typedapi/types/geodistancesort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // GeoDistanceSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L58-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L58-L70 type GeoDistanceSort struct { DistanceType *geodistancetype.GeoDistanceType `json:"distance_type,omitempty"` GeoDistanceSort map[string][]GeoLocation `json:"-"` diff --git a/typedapi/types/geogridprocessor.go b/typedapi/types/geogridprocessor.go index 8144336056..ce4a5414aa 100644 --- a/typedapi/types/geogridprocessor.go +++ b/typedapi/types/geogridprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // GeoGridProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L389-L430 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L393-L434 type GeoGridProcessor struct { // ChildrenField If specified and children tiles exist, save those tile addresses to this // field as an array of strings. diff --git a/typedapi/types/geogridquery.go b/typedapi/types/geogridquery.go index fd2593f398..5006286441 100644 --- a/typedapi/types/geogridquery.go +++ b/typedapi/types/geogridquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,9 +31,8 @@ import ( // GeoGridQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L98-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/geo.ts#L98-L103 type GeoGridQuery struct { - AdditionalGeoGridQueryProperty map[string]json.RawMessage `json:"-"` // Boost Floating point number used to decrease or increase the relevance scores of // the query. // Boost values are relative to the default value of 1.0. @@ -104,58 +103,14 @@ func (s *GeoGridQuery) UnmarshalJSON(data []byte) error { } s.QueryName_ = &o - default: - - if key, ok := t.(string); ok { - if s.AdditionalGeoGridQueryProperty == nil { - s.AdditionalGeoGridQueryProperty = make(map[string]json.RawMessage, 0) - } - raw := new(json.RawMessage) - if err := dec.Decode(&raw); err != nil { - return fmt.Errorf("%s | %w", "AdditionalGeoGridQueryProperty", err) - } - s.AdditionalGeoGridQueryProperty[key] = *raw - } - } } return nil } -// MarhsalJSON overrides marshalling for types with additional properties -func (s GeoGridQuery) MarshalJSON() ([]byte, error) { - type opt GeoGridQuery - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalGeoGridQueryProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalGeoGridQueryProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewGeoGridQuery returns a GeoGridQuery. func NewGeoGridQuery() *GeoGridQuery { - r := &GeoGridQuery{ - AdditionalGeoGridQueryProperty: make(map[string]json.RawMessage), - } + r := &GeoGridQuery{} return r } diff --git a/typedapi/types/geohashgridaggregate.go b/typedapi/types/geohashgridaggregate.go index 959272d3bf..dbbf63f756 100644 --- a/typedapi/types/geohashgridaggregate.go +++ b/typedapi/types/geohashgridaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GeoHashGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L566-L568 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L638-L640 type GeoHashGridAggregate struct { Buckets BucketsGeoHashGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geohashgridaggregation.go b/typedapi/types/geohashgridaggregation.go index 6daf1b7d2c..032cf19990 100644 --- a/typedapi/types/geohashgridaggregation.go +++ b/typedapi/types/geohashgridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoHashGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L421-L449 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L424-L452 type GeoHashGridAggregation struct { // Bounds The bounding box to filter the points in each bucket. Bounds GeoBounds `json:"bounds,omitempty"` diff --git a/typedapi/types/geohashgridbucket.go b/typedapi/types/geohashgridbucket.go index 6c774a3ebf..de6832b808 100644 --- a/typedapi/types/geohashgridbucket.go +++ b/typedapi/types/geohashgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // GeoHashGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L570-L572 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L642-L644 type GeoHashGridBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *GeoHashGridBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *GeoHashGridBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/geohashlocation.go b/typedapi/types/geohashlocation.go index 8321f9ed4a..4aea9d1997 100644 --- a/typedapi/types/geohashlocation.go +++ b/typedapi/types/geohashlocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GeoHashLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L131-L133 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L130-L132 type GeoHashLocation struct { Geohash string `json:"geohash"` } diff --git a/typedapi/types/geohashprecision.go b/typedapi/types/geohashprecision.go index 85e744b1fd..9b1ac1af74 100644 --- a/typedapi/types/geohashprecision.go +++ b/typedapi/types/geohashprecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L86-L90 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L86-L90 type GeoHashPrecision any type GeoHashPrecisionVariant interface { diff --git a/typedapi/types/geohexgridaggregate.go b/typedapi/types/geohexgridaggregate.go index 80aeaa095e..862d4d489f 100644 --- a/typedapi/types/geohexgridaggregate.go +++ b/typedapi/types/geohexgridaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GeoHexGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L585-L586 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L657-L658 type GeoHexGridAggregate struct { Buckets BucketsGeoHexGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geohexgridaggregation.go b/typedapi/types/geohexgridaggregation.go index 39ca148c45..a7834bebdb 100644 --- a/typedapi/types/geohexgridaggregation.go +++ b/typedapi/types/geohexgridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeohexGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L479-L504 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L482-L507 type GeohexGridAggregation struct { // Bounds Bounding box used to filter the geo-points in each bucket. Bounds GeoBounds `json:"bounds,omitempty"` diff --git a/typedapi/types/geohexgridbucket.go b/typedapi/types/geohexgridbucket.go index 4547cad34a..d5bfc5e917 100644 --- a/typedapi/types/geohexgridbucket.go +++ b/typedapi/types/geohexgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // GeoHexGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L588-L590 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L660-L662 type GeoHexGridBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *GeoHexGridBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *GeoHexGridBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/geoipdatabaseconfigurationmetadata.go b/typedapi/types/geoipdatabaseconfigurationmetadata.go index 353ca1615b..50e921ed20 100644 --- a/typedapi/types/geoipdatabaseconfigurationmetadata.go +++ b/typedapi/types/geoipdatabaseconfigurationmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoipDatabaseConfigurationMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L29-L34 type GeoipDatabaseConfigurationMetadata struct { Database DatabaseConfiguration `json:"database"` Id string `json:"id"` diff --git a/typedapi/types/geoipdownloadstatistics.go b/typedapi/types/geoipdownloadstatistics.go index 651ad3a0f2..0e71ec314c 100644 --- a/typedapi/types/geoipdownloadstatistics.go +++ b/typedapi/types/geoipdownloadstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoIpDownloadStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/geo_ip_stats/types.ts#L24-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/geo_ip_stats/types.ts#L24-L37 type GeoIpDownloadStatistics struct { // DatabasesCount Current number of databases available for use. DatabasesCount int `json:"databases_count"` diff --git a/typedapi/types/geoipnodedatabasename.go b/typedapi/types/geoipnodedatabasename.go index f376a9359f..5b42b2344b 100644 --- a/typedapi/types/geoipnodedatabasename.go +++ b/typedapi/types/geoipnodedatabasename.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GeoIpNodeDatabaseName type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/geo_ip_stats/types.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/geo_ip_stats/types.ts#L47-L50 type GeoIpNodeDatabaseName struct { // Name Name of the database. Name string `json:"name"` diff --git a/typedapi/types/geoipnodedatabases.go b/typedapi/types/geoipnodedatabases.go index 51e39e23b9..e1b0fcd615 100644 --- a/typedapi/types/geoipnodedatabases.go +++ b/typedapi/types/geoipnodedatabases.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // GeoIpNodeDatabases type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/geo_ip_stats/types.ts#L39-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/geo_ip_stats/types.ts#L39-L45 type GeoIpNodeDatabases struct { // Databases Downloaded databases for the node. Databases []GeoIpNodeDatabaseName `json:"databases"` diff --git a/typedapi/types/geoipprocessor.go b/typedapi/types/geoipprocessor.go index 565e7463c7..3338e2bb06 100644 --- a/typedapi/types/geoipprocessor.go +++ b/typedapi/types/geoipprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoIpProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L443-L477 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L447-L481 type GeoIpProcessor struct { // DatabaseFile The database filename referring to a database the module ships with // (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom diff --git a/typedapi/types/geoline.go b/typedapi/types/geoline.go index 2d1371e3a3..efb36c5a85 100644 --- a/typedapi/types/geoline.go +++ b/typedapi/types/geoline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoLine type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L56-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L56-L62 type GeoLine struct { // Coordinates Array of `[lon, lat]` coordinates Coordinates [][]Float64 `json:"coordinates"` diff --git a/typedapi/types/geolineaggregate.go b/typedapi/types/geolineaggregate.go index 6ec22664e7..edcff98450 100644 --- a/typedapi/types/geolineaggregate.go +++ b/typedapi/types/geolineaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoLineAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L904-L914 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L976-L986 type GeoLineAggregate struct { Geometry GeoLine `json:"geometry"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geolineaggregation.go b/typedapi/types/geolineaggregation.go index 1cf1a94f29..f42e19cabc 100644 --- a/typedapi/types/geolineaggregation.go +++ b/typedapi/types/geolineaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // GeoLineAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L130-L155 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L134-L159 type GeoLineAggregation struct { // IncludeSort When `true`, returns an additional array of the sort values in the feature // properties. @@ -47,7 +47,7 @@ type GeoLineAggregation struct { // When the `geo_line` aggregation is nested inside a `time_series` aggregation, // this field defaults to `@timestamp`, and any other value will result in // error. - Sort GeoLineSort `json:"sort"` + Sort *GeoLineSort `json:"sort,omitempty"` // SortOrder The order in which the line is sorted (ascending or descending). SortOrder *sortorder.SortOrder `json:"sort_order,omitempty"` } diff --git a/typedapi/types/geolinepoint.go b/typedapi/types/geolinepoint.go index 007fcad123..5621021054 100644 --- a/typedapi/types/geolinepoint.go +++ b/typedapi/types/geolinepoint.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GeoLinePoint type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L164-L169 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L168-L173 type GeoLinePoint struct { // Field The name of the geo_point field. Field string `json:"field"` diff --git a/typedapi/types/geolinesort.go b/typedapi/types/geolinesort.go index a41843be0d..76d53c3cb2 100644 --- a/typedapi/types/geolinesort.go +++ b/typedapi/types/geolinesort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GeoLineSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L157-L162 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L161-L166 type GeoLineSort struct { // Field The name of the numeric field to use as the sort key for ordering the points. Field string `json:"field"` diff --git a/typedapi/types/geolocation.go b/typedapi/types/geolocation.go index f529a91059..0770909b6a 100644 --- a/typedapi/types/geolocation.go +++ b/typedapi/types/geolocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -27,7 +27,7 @@ package types // []Float64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L104-L118 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L98-L112 type GeoLocation any type GeoLocationVariant interface { diff --git a/typedapi/types/geopointproperty.go b/typedapi/types/geopointproperty.go index df38107e60..9991c76a56 100644 --- a/typedapi/types/geopointproperty.go +++ b/typedapi/types/geopointproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // GeoPointProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/geo.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/geo.ts#L24-L33 type GeoPointProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` diff --git a/typedapi/types/geopolygonpoints.go b/typedapi/types/geopolygonpoints.go index c18c282533..3048267ec1 100644 --- a/typedapi/types/geopolygonpoints.go +++ b/typedapi/types/geopolygonpoints.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // GeoPolygonPoints type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L105-L107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/geo.ts#L105-L107 type GeoPolygonPoints struct { Points []GeoLocation `json:"points"` } diff --git a/typedapi/types/geopolygonquery.go b/typedapi/types/geopolygonquery.go index c437f30327..58abb710ed 100644 --- a/typedapi/types/geopolygonquery.go +++ b/typedapi/types/geopolygonquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // GeoPolygonQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L109-L121 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/geo.ts#L109-L121 type GeoPolygonQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/georesults.go b/typedapi/types/georesults.go index 0d2dd605b8..55e271da42 100644 --- a/typedapi/types/georesults.go +++ b/typedapi/types/georesults.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoResults type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Anomaly.ts#L146-L155 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Anomaly.ts#L146-L155 type GeoResults struct { // ActualPoint The actual value for the bucket formatted as a `geo_point`. ActualPoint *string `json:"actual_point,omitempty"` diff --git a/typedapi/types/geoshapefieldquery.go b/typedapi/types/geoshapefieldquery.go index d50331716e..4e8ec75683 100644 --- a/typedapi/types/geoshapefieldquery.go +++ b/typedapi/types/geoshapefieldquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // GeoShapeFieldQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L128-L139 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/geo.ts#L128-L139 type GeoShapeFieldQuery struct { // IndexedShape Query using an indexed shape retrieved from the the specified document and // path. diff --git a/typedapi/types/geoshapeproperty.go b/typedapi/types/geoshapeproperty.go index 596ff53932..2fe2a9f494 100644 --- a/typedapi/types/geoshapeproperty.go +++ b/typedapi/types/geoshapeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // GeoShapeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/geo.ts#L48-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/geo.ts#L48-L62 type GeoShapeProperty struct { Coerce *bool `json:"coerce,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/geoshapequery.go b/typedapi/types/geoshapequery.go index 655eccea35..1cf3d5f24c 100644 --- a/typedapi/types/geoshapequery.go +++ b/typedapi/types/geoshapequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoShapeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L141-L157 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/geo.ts#L141-L157 type GeoShapeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/geotilegridaggregate.go b/typedapi/types/geotilegridaggregate.go index 54d8877e31..91ac31a68e 100644 --- a/typedapi/types/geotilegridaggregate.go +++ b/typedapi/types/geotilegridaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GeoTileGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L574-L579 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L646-L651 type GeoTileGridAggregate struct { Buckets BucketsGeoTileGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/geotilegridaggregation.go b/typedapi/types/geotilegridaggregation.go index 5dbd6d666d..02cd5901f7 100644 --- a/typedapi/types/geotilegridaggregation.go +++ b/typedapi/types/geotilegridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GeoTileGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L451-L477 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L454-L480 type GeoTileGridAggregation struct { // Bounds A bounding box to filter the geo-points or geo-shapes in each bucket. Bounds GeoBounds `json:"bounds,omitempty"` diff --git a/typedapi/types/geotilegridbucket.go b/typedapi/types/geotilegridbucket.go index 7e22c911fa..6d6c5304dd 100644 --- a/typedapi/types/geotilegridbucket.go +++ b/typedapi/types/geotilegridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // GeoTileGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L581-L583 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L653-L655 type GeoTileGridBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *GeoTileGridBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *GeoTileGridBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/germananalyzer.go b/typedapi/types/germananalyzer.go index b8651c845d..02fe0f43ef 100644 --- a/typedapi/types/germananalyzer.go +++ b/typedapi/types/germananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GermanAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L186-L191 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L186-L191 type GermanAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/germannormalizationtokenfilter.go b/typedapi/types/germannormalizationtokenfilter.go index ccbec068df..7d4314d884 100644 --- a/typedapi/types/germannormalizationtokenfilter.go +++ b/typedapi/types/germannormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GermanNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L498-L500 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L533-L535 type GermanNormalizationTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/germanstemtokenfilter.go b/typedapi/types/germanstemtokenfilter.go index 2ca77b5896..d41d37bd12 100644 --- a/typedapi/types/germanstemtokenfilter.go +++ b/typedapi/types/germanstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GermanStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L563-L565 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L600-L602 type GermanStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/getmigrationfeature.go b/typedapi/types/getmigrationfeature.go index 79af78b86c..5f6f45b302 100644 --- a/typedapi/types/getmigrationfeature.go +++ b/typedapi/types/getmigrationfeature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // GetMigrationFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L37-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L37-L42 type GetMigrationFeature struct { FeatureName string `json:"feature_name"` Indices []MigrationFeatureIndexInfo `json:"indices"` diff --git a/typedapi/types/getresult.go b/typedapi/types/getresult.go index b15f170c10..1edb9812bd 100644 --- a/typedapi/types/getresult.go +++ b/typedapi/types/getresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GetResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get/types.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get/types.ts#L25-L67 type GetResult struct { // Fields If the `stored_fields` parameter is set to `true` and `found` is `true`, it // contains the document fields stored in the index. diff --git a/typedapi/types/getscriptcontext.go b/typedapi/types/getscriptcontext.go index 62873d2b90..942742e919 100644 --- a/typedapi/types/getscriptcontext.go +++ b/typedapi/types/getscriptcontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GetScriptContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get_script_context/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get_script_context/types.ts#L22-L25 type GetScriptContext struct { Methods []ContextMethod `json:"methods"` Name string `json:"name"` diff --git a/typedapi/types/getstats.go b/typedapi/types/getstats.go index 327a74f36b..45dea04f5e 100644 --- a/typedapi/types/getstats.go +++ b/typedapi/types/getstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GetStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L155-L166 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L155-L166 type GetStats struct { Current int64 `json:"current"` ExistsTime Duration `json:"exists_time,omitempty"` diff --git a/typedapi/types/getuserprofileerrors.go b/typedapi/types/getuserprofileerrors.go index c7ad22b769..765d0417da 100644 --- a/typedapi/types/getuserprofileerrors.go +++ b/typedapi/types/getuserprofileerrors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GetUserProfileErrors type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_user_profile/types.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_user_profile/types.ts#L25-L28 type GetUserProfileErrors struct { Count int64 `json:"count"` Details map[string]ErrorCause `json:"details"` diff --git a/typedapi/types/globalaggregate.go b/typedapi/types/globalaggregate.go index e0f37cd5cf..497efe2ba1 100644 --- a/typedapi/types/globalaggregate.go +++ b/typedapi/types/globalaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // GlobalAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L546-L550 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L618-L622 type GlobalAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *GlobalAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *GlobalAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/globalaggregation.go b/typedapi/types/globalaggregation.go index 9b2502bdd9..1fa08c526e 100644 --- a/typedapi/types/globalaggregation.go +++ b/typedapi/types/globalaggregation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // GlobalAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L506-L506 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L509-L509 type GlobalAggregation struct { } diff --git a/typedapi/types/globalordinalfieldstats.go b/typedapi/types/globalordinalfieldstats.go index 3326107809..ef240da0da 100644 --- a/typedapi/types/globalordinalfieldstats.go +++ b/typedapi/types/globalordinalfieldstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GlobalOrdinalFieldStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L137-L141 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L137-L141 type GlobalOrdinalFieldStats struct { BuildTime *string `json:"build_time,omitempty"` BuildTimeInMillis int64 `json:"build_time_in_millis"` diff --git a/typedapi/types/globalordinalsstats.go b/typedapi/types/globalordinalsstats.go index 05fff79772..24e3f312e4 100644 --- a/typedapi/types/globalordinalsstats.go +++ b/typedapi/types/globalordinalsstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GlobalOrdinalsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L131-L135 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L131-L135 type GlobalOrdinalsStats struct { BuildTime *string `json:"build_time,omitempty"` BuildTimeInMillis int64 `json:"build_time_in_millis"` diff --git a/typedapi/types/globalprivilege.go b/typedapi/types/globalprivilege.go index 60498844d8..4917258a26 100644 --- a/typedapi/types/globalprivilege.go +++ b/typedapi/types/globalprivilege.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // GlobalPrivilege type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L432-L434 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L432-L434 type GlobalPrivilege struct { Application ApplicationGlobalUserPrivileges `json:"application"` } diff --git a/typedapi/types/googleaistudioservicesettings.go b/typedapi/types/googleaistudioservicesettings.go index 7888ef01e2..572ac45910 100644 --- a/typedapi/types/googleaistudioservicesettings.go +++ b/typedapi/types/googleaistudioservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GoogleAiStudioServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1305-L1321 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1410-L1426 type GoogleAiStudioServiceSettings struct { // ApiKey A valid API key of your Google Gemini account. ApiKey string `json:"api_key"` diff --git a/typedapi/types/googlenormalizeddistanceheuristic.go b/typedapi/types/googlenormalizeddistanceheuristic.go index d99287bbe9..92f1a57ada 100644 --- a/typedapi/types/googlenormalizeddistanceheuristic.go +++ b/typedapi/types/googlenormalizeddistanceheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GoogleNormalizedDistanceHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L793-L798 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L796-L801 type GoogleNormalizedDistanceHeuristic struct { // BackgroundIsSuperset Set to `false` if you defined a custom background filter that represents a // different set of documents that you want to compare to. diff --git a/typedapi/types/googlevertexaiservicesettings.go b/typedapi/types/googlevertexaiservicesettings.go index 6c584ac162..62450fa94c 100644 --- a/typedapi/types/googlevertexaiservicesettings.go +++ b/typedapi/types/googlevertexaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -27,20 +27,51 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/googlemodelgardenprovider" ) // GoogleVertexAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1332-L1358 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1437-L1504 type GoogleVertexAIServiceSettings struct { - // Location The name of the location to use for the inference task. + // Dimensions For a `text_embedding` task, the number of dimensions the resulting output + // embeddings should have. + // By default, the model's standard output dimension is used. + // Refer to the Google documentation for more information. + Dimensions *int `json:"dimensions,omitempty"` + // Location The name of the location to use for the inference task for the Google Vertex + // AI inference task. + // For Google Vertex AI, when `provider` is omitted or `google` `location` is + // mandatory. + // For Google Model Garden's `completion` and `chat_completion` tasks, when + // `provider` is a supported non-`google` value - `location` is ignored. // Refer to the Google documentation for the list of supported locations. - Location string `json:"location"` + Location *string `json:"location,omitempty"` // ModelId The name of the model to use for the inference task. - // Refer to the Google documentation for the list of supported models. - ModelId string `json:"model_id"` - // ProjectId The name of the project to use for the inference task. - ProjectId string `json:"project_id"` + // For Google Vertex AI `model_id` is mandatory. + // For Google Model Garden's `completion` and `chat_completion` tasks, when + // `provider` is a supported non-`google` value - `model_id` will be used for + // some providers that require it, otherwise - ignored. + // Refer to the Google documentation for the list of supported models for Google + // Vertex AI. + ModelId *string `json:"model_id,omitempty"` + // ProjectId The name of the project to use for the Google Vertex AI inference task. + // For Google Vertex AI `project_id` is mandatory. + // For Google Model Garden's `completion` and `chat_completion` tasks, when + // `provider` is a supported non-`google` value - `project_id` is ignored. + ProjectId *string `json:"project_id,omitempty"` + // Provider The name of the Google Model Garden Provider for `completion` and + // `chat_completion` tasks. + // In order for a Google Model Garden endpoint to be used `provider` must be + // defined and be other than `google`. + // Modes: + // - Google Model Garden (third-party models): set `provider` to a supported + // non-`google` value and provide `url` and/or `streaming_url`. + // - Google Vertex AI: omit `provider` or set it to `google`. In this mode, do + // not set `url` or `streaming_url` and Elastic will construct the endpoint url + // from `location`, `model_id`, and `project_id` parameters. + Provider *googlemodelgardenprovider.GoogleModelGardenProvider `json:"provider,omitempty"` // RateLimit This setting helps to minimize the number of rate limit errors returned from // Google Vertex AI. // By default, the `googlevertexai` service sets the number of requests allowed @@ -48,6 +79,42 @@ type GoogleVertexAIServiceSettings struct { RateLimit *RateLimitSetting `json:"rate_limit,omitempty"` // ServiceAccountJson A valid service account in JSON format for the Google Vertex AI API. ServiceAccountJson string `json:"service_account_json"` + // StreamingUrl The URL for streaming `completion` and `chat_completion` requests to a Google + // Model Garden provider endpoint. + // If both `streaming_url` and `url` are provided, each is used for its + // respective mode. + // If `url` is not provided, `streaming_url` is also used for non-streaming + // `completion` requests. + // If `provider` is not provided or set to `google` (Google Vertex AI), do not + // set `streaming_url` (or `url`). + // At least one of `streaming_url` or `url` must be provided for Google Model + // Garden endpoint usage. + // Certain providers require separate URLs for streaming and non-streaming + // operations (e.g., Anthropic, Mistral, AI21). Others support both operation + // types through a single URL (e.g., Meta, Hugging Face). + // Information on constructing the URL for various providers can be found in the + // Google Model Garden documentation for the model, or on the endpoint’s `Sample + // request` page. The request examples also illustrate the proper formatting for + // the `streaming_url`. + StreamingUrl *string `json:"streaming_url,omitempty"` + // Url The URL for non-streaming `completion` requests to a Google Model Garden + // provider endpoint. + // If both `url` and `streaming_url` are provided, each is used for its + // respective mode. + // If `streaming_url` is not provided, `url` is also used for streaming + // `completion` and `chat_completion`. + // If `provider` is not provided or set to `google` (Google Vertex AI), do not + // set `url` (or `streaming_url`). + // At least one of `url` or `streaming_url` must be provided for Google Model + // Garden endpoint usage. + // Certain providers require separate URLs for streaming and non-streaming + // operations (e.g., Anthropic, Mistral, AI21). Others support both operation + // types through a single URL (e.g., Meta, Hugging Face). + // Information on constructing the URL for various providers can be found in the + // Google Model Garden documentation for the model, or on the endpoint’s `Sample + // request` page. The request examples also illustrate the proper formatting for + // the `url`. + Url *string `json:"url,omitempty"` } func (s *GoogleVertexAIServiceSettings) UnmarshalJSON(data []byte) error { @@ -65,6 +132,22 @@ func (s *GoogleVertexAIServiceSettings) UnmarshalJSON(data []byte) error { switch t { + case "dimensions": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Dimensions", err) + } + s.Dimensions = &value + case float64: + f := int(v) + s.Dimensions = &f + } + case "location": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { @@ -75,7 +158,7 @@ func (s *GoogleVertexAIServiceSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Location = o + s.Location = &o case "model_id": var tmp json.RawMessage @@ -87,7 +170,7 @@ func (s *GoogleVertexAIServiceSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.ModelId = o + s.ModelId = &o case "project_id": var tmp json.RawMessage @@ -99,7 +182,12 @@ func (s *GoogleVertexAIServiceSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.ProjectId = o + s.ProjectId = &o + + case "provider": + if err := dec.Decode(&s.Provider); err != nil { + return fmt.Errorf("%s | %w", "Provider", err) + } case "rate_limit": if err := dec.Decode(&s.RateLimit); err != nil { @@ -118,6 +206,30 @@ func (s *GoogleVertexAIServiceSettings) UnmarshalJSON(data []byte) error { } s.ServiceAccountJson = o + case "streaming_url": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "StreamingUrl", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.StreamingUrl = &o + + case "url": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Url", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Url = &o + } } return nil diff --git a/typedapi/types/googlevertexaitasksettings.go b/typedapi/types/googlevertexaitasksettings.go index b0166dbeee..0517ebe9f0 100644 --- a/typedapi/types/googlevertexaitasksettings.go +++ b/typedapi/types/googlevertexaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,11 +31,24 @@ import ( // GoogleVertexAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1360-L1369 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1515-L1538 type GoogleVertexAITaskSettings struct { // AutoTruncate For a `text_embedding` task, truncate inputs longer than the maximum token // length automatically. AutoTruncate *bool `json:"auto_truncate,omitempty"` + // MaxTokens For `completion` and `chat_completion` tasks, specifies the `max_tokens` + // value for requests sent to the Google Model Garden `anthropic` provider. + // If `provider` is not set to `anthropic`, this field is ignored. + // If `max_tokens` is specified - it must be a positive integer. If not + // specified, the default value of 1024 is used. + // Anthropic models require `max_tokens` to be set for each request. Please + // refer to the Anthropic documentation for more information. + MaxTokens *int `json:"max_tokens,omitempty"` + // ThinkingConfig For a `completion` or `chat_completion` task, allows configuration of the + // thinking features for the model. + // Refer to the Google documentation for the allowable configurations for each + // model type. + ThinkingConfig *ThinkingConfig `json:"thinking_config,omitempty"` // TopN For a `rerank` task, the number of the top N documents that should be // returned. TopN *int `json:"top_n,omitempty"` @@ -70,6 +83,27 @@ func (s *GoogleVertexAITaskSettings) UnmarshalJSON(data []byte) error { s.AutoTruncate = &v } + case "max_tokens": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "MaxTokens", err) + } + s.MaxTokens = &value + case float64: + f := int(v) + s.MaxTokens = &f + } + + case "thinking_config": + if err := dec.Decode(&s.ThinkingConfig); err != nil { + return fmt.Errorf("%s | %w", "ThinkingConfig", err) + } + case "top_n": var tmp any diff --git a/typedapi/types/grantapikey.go b/typedapi/types/grantapikey.go index fbf150da81..7bf36eb922 100644 --- a/typedapi/types/grantapikey.go +++ b/typedapi/types/grantapikey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // GrantApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/grant_api_key/types.ts#L25-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/grant_api_key/types.ts#L25-L45 type GrantApiKey struct { // Expiration Expiration time for the API key. By default, API keys never expire. Expiration *string `json:"expiration,omitempty"` diff --git a/typedapi/types/greaterthanvalidation.go b/typedapi/types/greaterthanvalidation.go index f5cd4c3655..bec0f11586 100644 --- a/typedapi/types/greaterthanvalidation.go +++ b/typedapi/types/greaterthanvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GreaterThanValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L63-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L63-L66 type GreaterThanValidation struct { Constraint Float64 `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/greekanalyzer.go b/typedapi/types/greekanalyzer.go index 2157fb53a6..df5c46c5dc 100644 --- a/typedapi/types/greekanalyzer.go +++ b/typedapi/types/greekanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GreekAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L193-L197 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L193-L197 type GreekAnalyzer struct { Stopwords StopWords `json:"stopwords,omitempty"` StopwordsPath *string `json:"stopwords_path,omitempty"` diff --git a/typedapi/types/grokprocessor.go b/typedapi/types/grokprocessor.go index b9b01a579e..9b4c0395d4 100644 --- a/typedapi/types/grokprocessor.go +++ b/typedapi/types/grokprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GrokProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L951-L982 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L955-L986 type GrokProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/groupings.go b/typedapi/types/groupings.go index 46bf051abe..f39c5d61a4 100644 --- a/typedapi/types/groupings.go +++ b/typedapi/types/groupings.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Groupings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/_types/Groupings.ts#L24-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/_types/Groupings.ts#L24-L40 type Groupings struct { // DateHistogram A date histogram group aggregates a date field into time-based buckets. // This group is mandatory; you currently cannot roll up documents without a diff --git a/typedapi/types/gsubprocessor.go b/typedapi/types/gsubprocessor.go index 325cbe3d0a..351f31c009 100644 --- a/typedapi/types/gsubprocessor.go +++ b/typedapi/types/gsubprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // GsubProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L984-L1008 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L988-L1012 type GsubProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/halffloatnumberproperty.go b/typedapi/types/halffloatnumberproperty.go index a932fd1336..cc13842bbf 100644 --- a/typedapi/types/halffloatnumberproperty.go +++ b/typedapi/types/halffloatnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // HalfFloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L162-L165 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L163-L166 type HalfFloatNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/haschildquery.go b/typedapi/types/haschildquery.go index 07889ef72f..0db8819af9 100644 --- a/typedapi/types/haschildquery.go +++ b/typedapi/types/haschildquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // HasChildQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/joining.ts#L41-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/joining.ts#L41-L79 type HasChildQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/hasparentquery.go b/typedapi/types/hasparentquery.go index 9d46a2b857..5988c9673e 100644 --- a/typedapi/types/hasparentquery.go +++ b/typedapi/types/hasparentquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HasParentQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/joining.ts#L81-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/joining.ts#L81-L110 type HasParentQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/hasprivilegesuserprofileerrors.go b/typedapi/types/hasprivilegesuserprofileerrors.go index 00c715b84a..ba8cd8df80 100644 --- a/typedapi/types/hasprivilegesuserprofileerrors.go +++ b/typedapi/types/hasprivilegesuserprofileerrors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HasPrivilegesUserProfileErrors type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges_user_profile/types.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges_user_profile/types.ts#L39-L42 type HasPrivilegesUserProfileErrors struct { Count int64 `json:"count"` Details map[string]ErrorCause `json:"details"` diff --git a/typedapi/types/hdrmethod.go b/typedapi/types/hdrmethod.go index 6557938ec7..8ed98d2f5c 100644 --- a/typedapi/types/hdrmethod.go +++ b/typedapi/types/hdrmethod.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HdrMethod type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L237-L242 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L241-L246 type HdrMethod struct { // NumberOfSignificantValueDigits Specifies the resolution of values for the histogram in number of significant // digits. diff --git a/typedapi/types/hdrpercentileranksaggregate.go b/typedapi/types/hdrpercentileranksaggregate.go index 8745782833..467d7ed970 100644 --- a/typedapi/types/hdrpercentileranksaggregate.go +++ b/typedapi/types/hdrpercentileranksaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // HdrPercentileRanksAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L171-L172 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L176-L177 type HdrPercentileRanksAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/hdrpercentilesaggregate.go b/typedapi/types/hdrpercentilesaggregate.go index 7c57d4f5c3..81eeff3819 100644 --- a/typedapi/types/hdrpercentilesaggregate.go +++ b/typedapi/types/hdrpercentilesaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // HdrPercentilesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L168-L169 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L173-L174 type HdrPercentilesAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/healthrecord.go b/typedapi/types/healthrecord.go index 72f9bbc557..33391da5e9 100644 --- a/typedapi/types/healthrecord.go +++ b/typedapi/types/healthrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HealthRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/health/types.ts#L23-L99 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/health/types.ts#L23-L99 type HealthRecord struct { // ActiveShardsPercent active number of shards in percent ActiveShardsPercent *string `json:"active_shards_percent,omitempty"` diff --git a/typedapi/types/healthstatistics.go b/typedapi/types/healthstatistics.go index 9164232aed..de6506ac38 100644 --- a/typedapi/types/healthstatistics.go +++ b/typedapi/types/healthstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HealthStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L150-L152 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L150-L152 type HealthStatistics struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/highlight.go b/typedapi/types/highlight.go index da445c8487..04a6dea375 100644 --- a/typedapi/types/highlight.go +++ b/typedapi/types/highlight.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -38,7 +38,7 @@ import ( // Highlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L152-L157 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/highlighting.ts#L152-L157 type Highlight struct { // BoundaryChars A string that contains each boundary character. BoundaryChars *string `json:"boundary_chars,omitempty"` diff --git a/typedapi/types/highlightfield.go b/typedapi/types/highlightfield.go index 8ffb94a07f..be40606358 100644 --- a/typedapi/types/highlightfield.go +++ b/typedapi/types/highlightfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -37,7 +37,7 @@ import ( // HighlightField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L194-L197 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/highlighting.ts#L194-L197 type HighlightField struct { // BoundaryChars A string that contains each boundary character. BoundaryChars *string `json:"boundary_chars,omitempty"` diff --git a/typedapi/types/hindianalyzer.go b/typedapi/types/hindianalyzer.go index 4ed41d6283..efcd534d80 100644 --- a/typedapi/types/hindianalyzer.go +++ b/typedapi/types/hindianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HindiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L199-L204 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L199-L204 type HindiAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/hindinormalizationtokenfilter.go b/typedapi/types/hindinormalizationtokenfilter.go index 6d0ce58bc7..a543132cb8 100644 --- a/typedapi/types/hindinormalizationtokenfilter.go +++ b/typedapi/types/hindinormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // HindiNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L502-L504 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L537-L539 type HindiNormalizationTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/hint.go b/typedapi/types/hint.go index da7cb92890..32bcb9daf7 100644 --- a/typedapi/types/hint.go +++ b/typedapi/types/hint.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Hint type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/suggest_user_profiles/types.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/suggest_user_profiles/types.ts#L23-L34 type Hint struct { // Labels A single key-value pair to match against the labels section // of a profile. A profile is considered matching if it matches diff --git a/typedapi/types/histogramaggregate.go b/typedapi/types/histogramaggregate.go index a7ccd6fa06..e5e06d9a94 100644 --- a/typedapi/types/histogramaggregate.go +++ b/typedapi/types/histogramaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // HistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L372-L376 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L443-L447 type HistogramAggregate struct { Buckets BucketsHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/histogramaggregation.go b/typedapi/types/histogramaggregation.go index b5103710dd..c3469075d2 100644 --- a/typedapi/types/histogramaggregation.go +++ b/typedapi/types/histogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // HistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L519-L565 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L522-L568 type HistogramAggregation struct { // ExtendedBounds Enables extending the bounds of the histogram beyond the data itself. ExtendedBounds *ExtendedBoundsdouble `json:"extended_bounds,omitempty"` diff --git a/typedapi/types/histogrambucket.go b/typedapi/types/histogrambucket.go index b5b8e60c1f..5b1cb81c08 100644 --- a/typedapi/types/histogrambucket.go +++ b/typedapi/types/histogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // HistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L378-L381 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L449-L452 type HistogramBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -221,6 +221,13 @@ func (s *HistogramBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -249,6 +256,20 @@ func (s *HistogramBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/histogramgrouping.go b/typedapi/types/histogramgrouping.go index 1140fe4326..83c40c1e0e 100644 --- a/typedapi/types/histogramgrouping.go +++ b/typedapi/types/histogramgrouping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HistogramGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/_types/Groupings.ts#L84-L97 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/_types/Groupings.ts#L84-L97 type HistogramGrouping struct { // Fields The set of fields that you wish to build histograms for. // All fields specified must be some kind of numeric. diff --git a/typedapi/types/histogramproperty.go b/typedapi/types/histogramproperty.go index 04c901eece..951bddedec 100644 --- a/typedapi/types/histogramproperty.go +++ b/typedapi/types/histogramproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // HistogramProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L69-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L70-L73 type HistogramProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/hit.go b/typedapi/types/hit.go index ee404f5ee6..9a31138916 100644 --- a/typedapi/types/hit.go +++ b/typedapi/types/hit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Hit type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L40-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/hits.ts#L40-L69 type Hit struct { Explanation_ *Explanation `json:"_explanation,omitempty"` Fields map[string]json.RawMessage `json:"fields,omitempty"` diff --git a/typedapi/types/hitsevent.go b/typedapi/types/hitsevent.go index 1f5f4e630d..9f33045f67 100644 --- a/typedapi/types/hitsevent.go +++ b/typedapi/types/hitsevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HitsEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/_types/EqlHits.ts#L41-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/eql/_types/EqlHits.ts#L41-L54 type HitsEvent struct { Fields map[string][]json.RawMessage `json:"fields,omitempty"` // Id_ Unique identifier for the event. This ID is only unique within the index. diff --git a/typedapi/types/hitsmetadata.go b/typedapi/types/hitsmetadata.go index 6d3d419841..be5b977f66 100644 --- a/typedapi/types/hitsmetadata.go +++ b/typedapi/types/hitsmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // HitsMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L67-L73 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/hits.ts#L71-L81 type HitsMetadata struct { Hits []Hit `json:"hits"` MaxScore *Float64 `json:"max_score,omitempty"` diff --git a/typedapi/types/hitssequence.go b/typedapi/types/hitssequence.go index 95acf17cf2..18b07fa583 100644 --- a/typedapi/types/hitssequence.go +++ b/typedapi/types/hitssequence.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // HitsSequence type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/_types/EqlHits.ts#L56-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/eql/_types/EqlHits.ts#L56-L64 type HitsSequence struct { // Events Contains events matching the query. Each object represents a matching event. Events []HitsEvent `json:"events"` diff --git a/typedapi/types/holtlinearmodelsettings.go b/typedapi/types/holtlinearmodelsettings.go index c76a04458d..8a851aeb79 100644 --- a/typedapi/types/holtlinearmodelsettings.go +++ b/typedapi/types/holtlinearmodelsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HoltLinearModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L297-L300 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L299-L302 type HoltLinearModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` Beta *float32 `json:"beta,omitempty"` diff --git a/typedapi/types/holtmovingaverageaggregation.go b/typedapi/types/holtmovingaverageaggregation.go index efcf558b77..291a3a9afa 100644 --- a/typedapi/types/holtmovingaverageaggregation.go +++ b/typedapi/types/holtmovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // HoltMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L283-L286 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L285-L288 type HoltMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/holtwintersmodelsettings.go b/typedapi/types/holtwintersmodelsettings.go index 8c882d21c6..5ca57e06cd 100644 --- a/typedapi/types/holtwintersmodelsettings.go +++ b/typedapi/types/holtwintersmodelsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // HoltWintersModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L301-L308 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L303-L310 type HoltWintersModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` Beta *float32 `json:"beta,omitempty"` diff --git a/typedapi/types/holtwintersmovingaverageaggregation.go b/typedapi/types/holtwintersmovingaverageaggregation.go index 2925a8a1d8..53472f8dc0 100644 --- a/typedapi/types/holtwintersmovingaverageaggregation.go +++ b/typedapi/types/holtwintersmovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // HoltWintersMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L288-L291 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L290-L293 type HoltWintersMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/hop.go b/typedapi/types/hop.go index ba5386ff53..42bf683a3e 100644 --- a/typedapi/types/hop.go +++ b/typedapi/types/hop.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Hop type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/_types/Hop.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/graph/_types/Hop.ts#L23-L36 type Hop struct { // Connections Specifies one or more fields from which you want to extract terms that are // associated with the specified vertices. diff --git a/typedapi/types/hourandminute.go b/typedapi/types/hourandminute.go index 61d7b8d8a2..0126ec16a8 100644 --- a/typedapi/types/hourandminute.go +++ b/typedapi/types/hourandminute.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // HourAndMinute type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L106-L109 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L106-L109 type HourAndMinute struct { Hour []int `json:"hour"` Minute []int `json:"minute"` diff --git a/typedapi/types/hourlyschedule.go b/typedapi/types/hourlyschedule.go index 7509fdbf34..7e89bcd30c 100644 --- a/typedapi/types/hourlyschedule.go +++ b/typedapi/types/hourlyschedule.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // HourlySchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L47-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L47-L49 type HourlySchedule struct { Minute []int `json:"minute"` } diff --git a/typedapi/types/htmlstripcharfilter.go b/typedapi/types/htmlstripcharfilter.go index b3127eca6b..d386f3780a 100644 --- a/typedapi/types/htmlstripcharfilter.go +++ b/typedapi/types/htmlstripcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // HtmlStripCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/char_filters.ts#L46-L49 type HtmlStripCharFilter struct { EscapedTags []string `json:"escaped_tags,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/htmlstripprocessor.go b/typedapi/types/htmlstripprocessor.go index 3b29b265c8..1aeea45a97 100644 --- a/typedapi/types/htmlstripprocessor.go +++ b/typedapi/types/htmlstripprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HtmlStripProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1010-L1026 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1014-L1030 type HtmlStripProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/http.go b/typedapi/types/http.go index aa4dc7680a..cff44c5b6e 100644 --- a/typedapi/types/http.go +++ b/typedapi/types/http.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Http type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L671-L690 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L671-L690 type Http struct { // Clients Information on current and recently-closed HTTP client connections. // Clients that have been closed longer than the diff --git a/typedapi/types/httpemailattachment.go b/typedapi/types/httpemailattachment.go index 6c3e505a62..90c45d369a 100644 --- a/typedapi/types/httpemailattachment.go +++ b/typedapi/types/httpemailattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HttpEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L218-L222 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L218-L222 type HttpEmailAttachment struct { ContentType *string `json:"content_type,omitempty"` Inline *bool `json:"inline,omitempty"` diff --git a/typedapi/types/httpheaders.go b/typedapi/types/httpheaders.go index 3e058cdbd4..c95763a654 100644 --- a/typedapi/types/httpheaders.go +++ b/typedapi/types/httpheaders.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // HttpHeaders type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L155-L155 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L150-L150 type HttpHeaders map[string][]string type HttpHeadersVariant interface { diff --git a/typedapi/types/httpinput.go b/typedapi/types/httpinput.go index c1dc45ca79..a79d0cc336 100644 --- a/typedapi/types/httpinput.go +++ b/typedapi/types/httpinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // HttpInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L44-L48 type HttpInput struct { Extract []string `json:"extract,omitempty"` Request *HttpInputRequestDefinition `json:"request,omitempty"` diff --git a/typedapi/types/httpinputauthentication.go b/typedapi/types/httpinputauthentication.go index 8d88fb0301..9df439ecc1 100644 --- a/typedapi/types/httpinputauthentication.go +++ b/typedapi/types/httpinputauthentication.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // HttpInputAuthentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L50-L52 type HttpInputAuthentication struct { Basic HttpInputBasicAuthentication `json:"basic"` } diff --git a/typedapi/types/httpinputbasicauthentication.go b/typedapi/types/httpinputbasicauthentication.go index 74d24765ff..34b76abcb8 100644 --- a/typedapi/types/httpinputbasicauthentication.go +++ b/typedapi/types/httpinputbasicauthentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // HttpInputBasicAuthentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L54-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L54-L57 type HttpInputBasicAuthentication struct { Password string `json:"password"` Username string `json:"username"` diff --git a/typedapi/types/httpinputproxy.go b/typedapi/types/httpinputproxy.go index 0f66604c07..a228fed1f5 100644 --- a/typedapi/types/httpinputproxy.go +++ b/typedapi/types/httpinputproxy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // HttpInputProxy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L67-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L67-L70 type HttpInputProxy struct { Host string `json:"host"` Port uint `json:"port"` diff --git a/typedapi/types/httpinputrequestdefinition.go b/typedapi/types/httpinputrequestdefinition.go index 99105fce17..b1431b6867 100644 --- a/typedapi/types/httpinputrequestdefinition.go +++ b/typedapi/types/httpinputrequestdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // HttpInputRequestDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L72-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L72-L86 type HttpInputRequestDefinition struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` diff --git a/typedapi/types/httpinputrequestresult.go b/typedapi/types/httpinputrequestresult.go index 20f2530c26..8a315840e5 100644 --- a/typedapi/types/httpinputrequestresult.go +++ b/typedapi/types/httpinputrequestresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // HttpInputRequestResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L300-L300 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L300-L300 type HttpInputRequestResult struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` diff --git a/typedapi/types/httpinputresponseresult.go b/typedapi/types/httpinputresponseresult.go index dff7a2e5ea..76d17533f7 100644 --- a/typedapi/types/httpinputresponseresult.go +++ b/typedapi/types/httpinputresponseresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HttpInputResponseResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L302-L306 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L302-L306 type HttpInputResponseResult struct { Body string `json:"body"` Headers HttpHeaders `json:"headers"` diff --git a/typedapi/types/httproute.go b/typedapi/types/httproute.go index 8c78ed6c4e..67d402da7d 100644 --- a/typedapi/types/httproute.go +++ b/typedapi/types/httproute.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // HttpRoute type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L692-L695 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L692-L695 type HttpRoute struct { Requests HttpRouteRequests `json:"requests"` Responses HttpRouteResponses `json:"responses"` diff --git a/typedapi/types/httprouterequests.go b/typedapi/types/httprouterequests.go index 64f60ab822..ce4c99d1d1 100644 --- a/typedapi/types/httprouterequests.go +++ b/typedapi/types/httprouterequests.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HttpRouteRequests type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L697-L701 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L697-L701 type HttpRouteRequests struct { Count int64 `json:"count"` SizeHistogram []SizeHttpHistogram `json:"size_histogram"` diff --git a/typedapi/types/httprouteresponses.go b/typedapi/types/httprouteresponses.go index ad376254fc..e713870b6a 100644 --- a/typedapi/types/httprouteresponses.go +++ b/typedapi/types/httprouteresponses.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HttpRouteResponses type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L703-L708 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L703-L708 type HttpRouteResponses struct { Count int64 `json:"count"` HandlingTimeHistogram []TimeHttpHistogram `json:"handling_time_histogram"` diff --git a/typedapi/types/huggingfaceservicesettings.go b/typedapi/types/huggingfaceservicesettings.go index 71e73790c8..5183d9e13a 100644 --- a/typedapi/types/huggingfaceservicesettings.go +++ b/typedapi/types/huggingfaceservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HuggingFaceServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1382-L1414 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1558-L1590 type HuggingFaceServiceSettings struct { // ApiKey A valid access token for your HuggingFace account. // You can create or find your access tokens on the HuggingFace settings page. diff --git a/typedapi/types/huggingfacetasksettings.go b/typedapi/types/huggingfacetasksettings.go index 2c5c19f9d6..4dbd7dcc66 100644 --- a/typedapi/types/huggingfacetasksettings.go +++ b/typedapi/types/huggingfacetasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HuggingFaceTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1416-L1426 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1592-L1602 type HuggingFaceTaskSettings struct { // ReturnDocuments For a `rerank` task, return doc text within the results. ReturnDocuments *bool `json:"return_documents,omitempty"` diff --git a/typedapi/types/hungariananalyzer.go b/typedapi/types/hungariananalyzer.go index dd8431e959..ad29ab789b 100644 --- a/typedapi/types/hungariananalyzer.go +++ b/typedapi/types/hungariananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HungarianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L206-L211 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L206-L211 type HungarianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/hunspelltokenfilter.go b/typedapi/types/hunspelltokenfilter.go index 670b8fcfd6..9089e8d55d 100644 --- a/typedapi/types/hunspelltokenfilter.go +++ b/typedapi/types/hunspelltokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HunspellTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L268-L280 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L289-L305 type HunspellTokenFilter struct { // Dedup If `true`, duplicate tokens are removed from the filter’s output. Defaults to // `true`. diff --git a/typedapi/types/hyperparameter.go b/typedapi/types/hyperparameter.go index f2b5134988..35e039fd37 100644 --- a/typedapi/types/hyperparameter.go +++ b/typedapi/types/hyperparameter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Hyperparameter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L274-L288 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L275-L289 type Hyperparameter struct { // AbsoluteImportance A positive number showing how much the parameter influences the variation of // the loss function. For hyperparameters with values that are not specified by diff --git a/typedapi/types/hyperparameters.go b/typedapi/types/hyperparameters.go index dc07b3408c..c6df81d4b4 100644 --- a/typedapi/types/hyperparameters.go +++ b/typedapi/types/hyperparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Hyperparameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L420-L526 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L420-L526 type Hyperparameters struct { // Alpha Advanced configuration option. // Machine learning uses loss guided tree growing, which means that the decision diff --git a/typedapi/types/hyphenationdecompoundertokenfilter.go b/typedapi/types/hyphenationdecompoundertokenfilter.go index dd3a02273e..b798b46056 100644 --- a/typedapi/types/hyphenationdecompoundertokenfilter.go +++ b/typedapi/types/hyphenationdecompoundertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // HyphenationDecompounderTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L67-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L71-L82 type HyphenationDecompounderTokenFilter struct { // HyphenationPatternsPath Path to an Apache FOP (Formatting Objects Processor) XML hyphenation pattern // file. diff --git a/typedapi/types/icuanalyzer.go b/typedapi/types/icuanalyzer.go index 4e424ff8ae..742c3fa4c9 100644 --- a/typedapi/types/icuanalyzer.go +++ b/typedapi/types/icuanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -29,7 +29,7 @@ import ( // IcuAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L68-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L68-L72 type IcuAnalyzer struct { Method icunormalizationtype.IcuNormalizationType `json:"method"` Mode icunormalizationmode.IcuNormalizationMode `json:"mode"` diff --git a/typedapi/types/icucollationproperty.go b/typedapi/types/icucollationproperty.go index 4a5c1206b0..a00f96e122 100644 --- a/typedapi/types/icucollationproperty.go +++ b/typedapi/types/icucollationproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -39,7 +39,7 @@ import ( // IcuCollationProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L103-L127 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L104-L128 type IcuCollationProperty struct { Alternate *icucollationalternate.IcuCollationAlternate `json:"alternate,omitempty"` CaseFirst *icucollationcasefirst.IcuCollationCaseFirst `json:"case_first,omitempty"` diff --git a/typedapi/types/icucollationtokenfilter.go b/typedapi/types/icucollationtokenfilter.go index e313bc4238..f32af2d05e 100644 --- a/typedapi/types/icucollationtokenfilter.go +++ b/typedapi/types/icucollationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // IcuCollationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L52-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L52-L66 type IcuCollationTokenFilter struct { Alternate *icucollationalternate.IcuCollationAlternate `json:"alternate,omitempty"` CaseFirst *icucollationcasefirst.IcuCollationCaseFirst `json:"caseFirst,omitempty"` diff --git a/typedapi/types/icufoldingtokenfilter.go b/typedapi/types/icufoldingtokenfilter.go index 946c2e08db..3983fff761 100644 --- a/typedapi/types/icufoldingtokenfilter.go +++ b/typedapi/types/icufoldingtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IcuFoldingTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L47-L50 type IcuFoldingTokenFilter struct { Type string `json:"type,omitempty"` UnicodeSetFilter string `json:"unicode_set_filter"` diff --git a/typedapi/types/icunormalizationcharfilter.go b/typedapi/types/icunormalizationcharfilter.go index 047268a464..7fc8b6bce6 100644 --- a/typedapi/types/icunormalizationcharfilter.go +++ b/typedapi/types/icunormalizationcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // IcuNormalizationCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L40-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L40-L45 type IcuNormalizationCharFilter struct { Mode *icunormalizationmode.IcuNormalizationMode `json:"mode,omitempty"` Name *icunormalizationtype.IcuNormalizationType `json:"name,omitempty"` diff --git a/typedapi/types/icunormalizationtokenfilter.go b/typedapi/types/icunormalizationtokenfilter.go index db9805840e..3509eb5bcf 100644 --- a/typedapi/types/icunormalizationtokenfilter.go +++ b/typedapi/types/icunormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // IcuNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L35-L38 type IcuNormalizationTokenFilter struct { Name icunormalizationtype.IcuNormalizationType `json:"name"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/icutokenizer.go b/typedapi/types/icutokenizer.go index 5a6eb19585..aa3b4f900f 100644 --- a/typedapi/types/icutokenizer.go +++ b/typedapi/types/icutokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IcuTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L30-L33 type IcuTokenizer struct { RuleFiles string `json:"rule_files"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/icutransformtokenfilter.go b/typedapi/types/icutransformtokenfilter.go index fea3dc3e05..cdc66cdf61 100644 --- a/typedapi/types/icutransformtokenfilter.go +++ b/typedapi/types/icutransformtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IcuTransformTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/icu-plugin.ts#L24-L28 type IcuTransformTokenFilter struct { Dir *icutransformdirection.IcuTransformDirection `json:"dir,omitempty"` Id string `json:"id"` diff --git a/typedapi/types/ids.go b/typedapi/types/ids.go index db9da36662..1a66779746 100644 --- a/typedapi/types/ids.go +++ b/typedapi/types/ids.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Ids type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L56-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L56-L56 type Ids []string type IdsVariant interface { diff --git a/typedapi/types/idsquery.go b/typedapi/types/idsquery.go index f7f7c27e1d..bd8bdf3fce 100644 --- a/typedapi/types/idsquery.go +++ b/typedapi/types/idsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IdsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L88-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L89-L97 type IdsQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/ilm.go b/typedapi/types/ilm.go index c8ad0bcd4b..76e9e4834e 100644 --- a/typedapi/types/ilm.go +++ b/typedapi/types/ilm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Ilm type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L172-L175 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L172-L175 type Ilm struct { PolicyCount int `json:"policy_count"` PolicyStats []IlmPolicyStatistics `json:"policy_stats"` diff --git a/typedapi/types/ilmactions.go b/typedapi/types/ilmactions.go index da1137b9f4..1a3b4f174a 100644 --- a/typedapi/types/ilmactions.go +++ b/typedapi/types/ilmactions.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IlmActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L39-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L39-L93 type IlmActions struct { // Allocate Phases allowed: warm, cold. Allocate *AllocateAction `json:"allocate,omitempty"` diff --git a/typedapi/types/ilmindicator.go b/typedapi/types/ilmindicator.go index 18cd08aea0..580bfff297 100644 --- a/typedapi/types/ilmindicator.go +++ b/typedapi/types/ilmindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IlmIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L165-L169 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L165-L169 type IlmIndicator struct { Details *IlmIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/ilmindicatordetails.go b/typedapi/types/ilmindicatordetails.go index da6682047f..7c17bd3002 100644 --- a/typedapi/types/ilmindicatordetails.go +++ b/typedapi/types/ilmindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IlmIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L170-L174 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L170-L174 type IlmIndicatorDetails struct { IlmStatus lifecycleoperationmode.LifecycleOperationMode `json:"ilm_status"` Policies int64 `json:"policies"` diff --git a/typedapi/types/ilmpolicy.go b/typedapi/types/ilmpolicy.go index 89e813dfcc..90049d240b 100644 --- a/typedapi/types/ilmpolicy.go +++ b/typedapi/types/ilmpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IlmPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Policy.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Policy.ts#L23-L29 type IlmPolicy struct { // Meta_ Arbitrary metadata that is not automatically generated or used by // Elasticsearch. diff --git a/typedapi/types/ilmpolicystatistics.go b/typedapi/types/ilmpolicystatistics.go index e0e9d349f5..f7b9ddff4b 100644 --- a/typedapi/types/ilmpolicystatistics.go +++ b/typedapi/types/ilmpolicystatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IlmPolicyStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L167-L170 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L167-L170 type IlmPolicyStatistics struct { IndicesManaged int `json:"indices_managed"` Phases UsagePhases `json:"phases"` diff --git a/typedapi/types/impact.go b/typedapi/types/impact.go index 7bcb9dd374..9564be4713 100644 --- a/typedapi/types/impact.go +++ b/typedapi/types/impact.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // Impact type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L68-L73 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L68-L73 type Impact struct { Description string `json:"description"` Id string `json:"id"` diff --git a/typedapi/types/includedinvalidation.go b/typedapi/types/includedinvalidation.go index 2027e3b74c..112d793f05 100644 --- a/typedapi/types/includedinvalidation.go +++ b/typedapi/types/includedinvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // IncludedInValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L73-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L73-L76 type IncludedInValidation struct { Constraint []ScalarValue `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/indeterminable.go b/typedapi/types/indeterminable.go new file mode 100644 index 0000000000..f09b1aa0b1 --- /dev/null +++ b/typedapi/types/indeterminable.go @@ -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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// Indeterminable type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L425-L427 +type Indeterminable struct { + Reason string `json:"reason"` +} + +func (s *Indeterminable) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "reason": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Reason", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Reason = o + + } + } + return nil +} + +// NewIndeterminable returns a Indeterminable. +func NewIndeterminable() *Indeterminable { + r := &Indeterminable{} + + return r +} diff --git a/typedapi/types/indexaction.go b/typedapi/types/indexaction.go index ebf85a2240..e8eb3ed3db 100644 --- a/typedapi/types/indexaction.go +++ b/typedapi/types/indexaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IndexAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L256-L265 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L256-L265 type IndexAction struct { DocId *string `json:"doc_id,omitempty"` ExecutionTimeField *string `json:"execution_time_field,omitempty"` diff --git a/typedapi/types/indexaliases.go b/typedapi/types/indexaliases.go index 288878f11a..c2cfadde77 100644 --- a/typedapi/types/indexaliases.go +++ b/typedapi/types/indexaliases.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexAliases type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_alias/_types/response.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_alias/_types/response.ts#L25-L27 type IndexAliases struct { Aliases map[string]AliasDefinition `json:"aliases"` } diff --git a/typedapi/types/indexanddatastreamaction.go b/typedapi/types/indexanddatastreamaction.go index 87e11893e3..e0656b4cd8 100644 --- a/typedapi/types/indexanddatastreamaction.go +++ b/typedapi/types/indexanddatastreamaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndexAndDataStreamAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/modify_data_stream/types.ts#L39-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/modify_data_stream/types.ts#L39-L44 type IndexAndDataStreamAction struct { // DataStream Data stream targeted by the action. DataStream string `json:"data_stream"` diff --git a/typedapi/types/indexcapabilities.go b/typedapi/types/indexcapabilities.go index 3cf703c83c..79db5ecf85 100644 --- a/typedapi/types/indexcapabilities.go +++ b/typedapi/types/indexcapabilities.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexCapabilities type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_rollup_index_caps/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_rollup_index_caps/types.ts#L24-L26 type IndexCapabilities struct { RollupJobs []RollupJobSummary `json:"rollup_jobs"` } diff --git a/typedapi/types/indexdetails.go b/typedapi/types/indexdetails.go index 0efb65f08b..e080bb2672 100644 --- a/typedapi/types/indexdetails.go +++ b/typedapi/types/indexdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndexDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotIndexDetails.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotIndexDetails.ts#L23-L28 type IndexDetails struct { MaxSegmentsPerShard int64 `json:"max_segments_per_shard"` ShardCount int `json:"shard_count"` diff --git a/typedapi/types/indexfield.go b/typedapi/types/indexfield.go index aefcee39e1..9f882cc306 100644 --- a/typedapi/types/indexfield.go +++ b/typedapi/types/indexfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndexField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L46-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/meta-fields.ts#L46-L48 type IndexField struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/indexhealthstats.go b/typedapi/types/indexhealthstats.go index a9394b9d54..c6bab099c1 100644 --- a/typedapi/types/indexhealthstats.go +++ b/typedapi/types/indexhealthstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IndexHealthStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/health/types.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/health/types.ts#L24-L35 type IndexHealthStats struct { ActivePrimaryShards int `json:"active_primary_shards"` ActiveShards int `json:"active_shards"` diff --git a/typedapi/types/indexingslowlogsettings.go b/typedapi/types/indexingslowlogsettings.go index f39cf9186d..c169fd03f4 100644 --- a/typedapi/types/indexingslowlogsettings.go +++ b/typedapi/types/indexingslowlogsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndexingSlowlogSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L603-L608 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L613-L618 type IndexingSlowlogSettings struct { Level *string `json:"level,omitempty"` Reformat *bool `json:"reformat,omitempty"` diff --git a/typedapi/types/indexingslowlogtresholds.go b/typedapi/types/indexingslowlogtresholds.go index b410d0dd08..a5e976d618 100644 --- a/typedapi/types/indexingslowlogtresholds.go +++ b/typedapi/types/indexingslowlogtresholds.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexingSlowlogTresholds type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L610-L617 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L620-L627 type IndexingSlowlogTresholds struct { // Index The indexing slow log, similar in functionality to the search slow log. The // log file name ends with `_index_indexing_slowlog.json`. diff --git a/typedapi/types/indexingstats.go b/typedapi/types/indexingstats.go index 4350c285b8..99fe1eae03 100644 --- a/typedapi/types/indexingstats.go +++ b/typedapi/types/indexingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndexingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L168-L186 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L168-L186 type IndexingStats struct { DeleteCurrent int64 `json:"delete_current"` DeleteTime Duration `json:"delete_time,omitempty"` diff --git a/typedapi/types/indexmappingrecord.go b/typedapi/types/indexmappingrecord.go index 98dd6b209b..af2b3e619b 100644 --- a/typedapi/types/indexmappingrecord.go +++ b/typedapi/types/indexmappingrecord.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexMappingRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32 type IndexMappingRecord struct { Item *TypeMapping `json:"item,omitempty"` Mappings TypeMapping `json:"mappings"` diff --git a/typedapi/types/indexoperation.go b/typedapi/types/indexoperation.go index fb9b0b2b07..7ba5c0f79c 100644 --- a/typedapi/types/indexoperation.go +++ b/typedapi/types/indexoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IndexOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L142-L142 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/types.ts#L142-L142 type IndexOperation struct { // DynamicTemplates A map from the full name of fields to the name of dynamic templates. // It defaults to an empty map. @@ -57,7 +57,7 @@ type IndexOperation struct { // RequireAlias If `true`, the request's actions must target an index alias. RequireAlias *bool `json:"require_alias,omitempty"` // Routing A custom value used to route operations to a specific shard. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` Version *int64 `json:"version,omitempty"` VersionType *versiontype.VersionType `json:"version_type,omitempty"` } @@ -142,8 +142,19 @@ func (s *IndexOperation) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "version": diff --git a/typedapi/types/indexprivilegescheck.go b/typedapi/types/indexprivilegescheck.go index 1275524125..7987042241 100644 --- a/typedapi/types/indexprivilegescheck.go +++ b/typedapi/types/indexprivilegescheck.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IndexPrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges/types.ts#L34-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges/types.ts#L36-L47 type IndexPrivilegesCheck struct { // AllowRestrictedIndices This needs to be set to `true` (default is `false`) if using wildcards or // regexps for patterns that cover restricted indices. diff --git a/typedapi/types/indexresult.go b/typedapi/types/indexresult.go index e3903ca0e9..ff634413fa 100644 --- a/typedapi/types/indexresult.go +++ b/typedapi/types/indexresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L267-L269 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L267-L269 type IndexResult struct { Response IndexResultSummary `json:"response"` } diff --git a/typedapi/types/indexresultsummary.go b/typedapi/types/indexresultsummary.go index dc4dc4a653..e670f5ec95 100644 --- a/typedapi/types/indexresultsummary.go +++ b/typedapi/types/indexresultsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IndexResultSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L271-L277 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L271-L277 type IndexResultSummary struct { Created bool `json:"created"` Id string `json:"id"` diff --git a/typedapi/types/indexrouting.go b/typedapi/types/indexrouting.go index 5a1732d297..33d7346817 100644 --- a/typedapi/types/indexrouting.go +++ b/typedapi/types/indexrouting.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexRouting.ts#L22-L25 type IndexRouting struct { Allocation *IndexRoutingAllocation `json:"allocation,omitempty"` Rebalance *IndexRoutingRebalance `json:"rebalance,omitempty"` diff --git a/typedapi/types/indexroutingallocation.go b/typedapi/types/indexroutingallocation.go index 77eafbe674..53a1324328 100644 --- a/typedapi/types/indexroutingallocation.go +++ b/typedapi/types/indexroutingallocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // IndexRoutingAllocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L27-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexRouting.ts#L27-L32 type IndexRoutingAllocation struct { Disk *IndexRoutingAllocationDisk `json:"disk,omitempty"` Enable *indexroutingallocationoptions.IndexRoutingAllocationOptions `json:"enable,omitempty"` diff --git a/typedapi/types/indexroutingallocationdisk.go b/typedapi/types/indexroutingallocationdisk.go index b615f07593..72871a470a 100644 --- a/typedapi/types/indexroutingallocationdisk.go +++ b/typedapi/types/indexroutingallocationdisk.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndexRoutingAllocationDisk type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L62-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexRouting.ts#L62-L65 type IndexRoutingAllocationDisk struct { ThresholdEnabled *string `json:"threshold_enabled,omitempty"` } diff --git a/typedapi/types/indexroutingallocationinclude.go b/typedapi/types/indexroutingallocationinclude.go index 41327a2e46..0c1f1a7854 100644 --- a/typedapi/types/indexroutingallocationinclude.go +++ b/typedapi/types/indexroutingallocationinclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndexRoutingAllocationInclude type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L52-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexRouting.ts#L52-L55 type IndexRoutingAllocationInclude struct { Id_ *string `json:"_id,omitempty"` TierPreference_ *string `json:"_tier_preference,omitempty"` diff --git a/typedapi/types/indexroutingallocationinitialrecovery.go b/typedapi/types/indexroutingallocationinitialrecovery.go index c6a6d2ab1d..8310d086b4 100644 --- a/typedapi/types/indexroutingallocationinitialrecovery.go +++ b/typedapi/types/indexroutingallocationinitialrecovery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndexRoutingAllocationInitialRecovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L57-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexRouting.ts#L57-L59 type IndexRoutingAllocationInitialRecovery struct { Id_ *string `json:"_id,omitempty"` } diff --git a/typedapi/types/indexroutingrebalance.go b/typedapi/types/indexroutingrebalance.go index d6b2f8eafe..77855f6c58 100644 --- a/typedapi/types/indexroutingrebalance.go +++ b/typedapi/types/indexroutingrebalance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // IndexRoutingRebalance type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexRouting.ts#L34-L36 type IndexRoutingRebalance struct { Enable indexroutingrebalanceoptions.IndexRoutingRebalanceOptions `json:"enable"` } diff --git a/typedapi/types/indexsamplingconfiguration.go b/typedapi/types/indexsamplingconfiguration.go new file mode 100644 index 0000000000..d109857f8d --- /dev/null +++ b/typedapi/types/indexsamplingconfiguration.go @@ -0,0 +1,74 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// IndexSamplingConfiguration type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_all_sample_configuration/_types/IndexSamplingConfiguration.ts#L23-L26 +type IndexSamplingConfiguration struct { + Configuration SamplingConfiguration `json:"configuration"` + Index string `json:"index"` +} + +func (s *IndexSamplingConfiguration) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "configuration": + if err := dec.Decode(&s.Configuration); err != nil { + return fmt.Errorf("%s | %w", "Configuration", err) + } + + case "index": + if err := dec.Decode(&s.Index); err != nil { + return fmt.Errorf("%s | %w", "Index", err) + } + + } + } + return nil +} + +// NewIndexSamplingConfiguration returns a IndexSamplingConfiguration. +func NewIndexSamplingConfiguration() *IndexSamplingConfiguration { + r := &IndexSamplingConfiguration{} + + return r +} diff --git a/typedapi/types/indexsegment.go b/typedapi/types/indexsegment.go index 6afb3062e6..2a387dc013 100644 --- a/typedapi/types/indexsegment.go +++ b/typedapi/types/indexsegment.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexSegment type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/segments/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/segments/types.ts#L24-L26 type IndexSegment struct { Shards map[string][]ShardsSegment `json:"shards"` } diff --git a/typedapi/types/indexsegmentsort.go b/typedapi/types/indexsegmentsort.go index 20a4763938..2ed4b7e18a 100644 --- a/typedapi/types/indexsegmentsort.go +++ b/typedapi/types/indexsegmentsort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // IndexSegmentSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSegmentSort.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSegmentSort.ts#L22-L27 type IndexSegmentSort struct { Field []string `json:"field,omitempty"` Missing []segmentsortmissing.SegmentSortMissing `json:"missing,omitempty"` diff --git a/typedapi/types/indexsettingblocks.go b/typedapi/types/indexsettingblocks.go index 7f7563933c..e3575aa0ee 100644 --- a/typedapi/types/indexsettingblocks.go +++ b/typedapi/types/indexsettingblocks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndexSettingBlocks type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L264-L270 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L270-L276 type IndexSettingBlocks struct { Metadata Stringifiedboolean `json:"metadata,omitempty"` Read Stringifiedboolean `json:"read,omitempty"` diff --git a/typedapi/types/indexsettingresults.go b/typedapi/types/indexsettingresults.go index f4e620a634..3b363516eb 100644 --- a/typedapi/types/indexsettingresults.go +++ b/typedapi/types/indexsettingresults.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexSettingResults type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L57-L69 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L57-L69 type IndexSettingResults struct { // AppliedToDataStreamAndBackingIndices The list of settings that were applied to the data stream and to all of its // backing indices. These settings will diff --git a/typedapi/types/indexsettings.go b/typedapi/types/indexsettings.go index 6c4eb974b6..b9e06e2f53 100644 --- a/typedapi/types/indexsettings.go +++ b/typedapi/types/indexsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IndexSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L70-L178 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L70-L184 type IndexSettings struct { Analysis *IndexSettingsAnalysis `json:"analysis,omitempty"` // Analyze Settings to define analyzers, tokenizers, token filters and character diff --git a/typedapi/types/indexsettingsanalysis.go b/typedapi/types/indexsettingsanalysis.go index ac2acc7663..74fb5db7a9 100644 --- a/typedapi/types/indexsettingsanalysis.go +++ b/typedapi/types/indexsettingsanalysis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndexSettingsAnalysis type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L346-L352 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L353-L359 type IndexSettingsAnalysis struct { Analyzer map[string]Analyzer `json:"analyzer,omitempty"` CharFilter map[string]CharFilter `json:"char_filter,omitempty"` diff --git a/typedapi/types/indexsettingslifecycle.go b/typedapi/types/indexsettingslifecycle.go index ae645bc194..d8d31e3b1c 100644 --- a/typedapi/types/indexsettingslifecycle.go +++ b/typedapi/types/indexsettingslifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndexSettingsLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L297-L336 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L303-L343 type IndexSettingsLifecycle struct { // IndexingComplete Indicates whether or not the index has been rolled over. Automatically set to // true when ILM completes the rollover action. diff --git a/typedapi/types/indexsettingslifecyclestep.go b/typedapi/types/indexsettingslifecyclestep.go index 4508a04e9c..6bb472522a 100644 --- a/typedapi/types/indexsettingslifecyclestep.go +++ b/typedapi/types/indexsettingslifecyclestep.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndexSettingsLifecycleStep type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L338-L344 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L345-L351 type IndexSettingsLifecycleStep struct { // WaitTimeThreshold Time to wait for the cluster to resolve allocation issues during an ILM // shrink action. Must be greater than 1h (1 hour). diff --git a/typedapi/types/indexsettingstimeseries.go b/typedapi/types/indexsettingstimeseries.go index 07f5c4c90b..3e7a906685 100644 --- a/typedapi/types/indexsettingstimeseries.go +++ b/typedapi/types/indexsettingstimeseries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndexSettingsTimeSeries type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L354-L357 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L361-L364 type IndexSettingsTimeSeries struct { EndTime DateTime `json:"end_time,omitempty"` StartTime DateTime `json:"start_time,omitempty"` diff --git a/typedapi/types/indexstate.go b/typedapi/types/indexstate.go index e9d9acdc3d..ac4943fafa 100644 --- a/typedapi/types/indexstate.go +++ b/typedapi/types/indexstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndexState type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexState.ts#L27-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexState.ts#L27-L40 type IndexState struct { Aliases map[string]Alias `json:"aliases,omitempty"` DataStream *string `json:"data_stream,omitempty"` diff --git a/typedapi/types/indexstats.go b/typedapi/types/indexstats.go index a24113e3fb..a830e96130 100644 --- a/typedapi/types/indexstats.go +++ b/typedapi/types/indexstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L52-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L52-L93 type IndexStats struct { Bulk *BulkStats `json:"bulk,omitempty"` // Completion Contains statistics about completions across all shards assigned to the node. diff --git a/typedapi/types/indextemplate.go b/typedapi/types/indextemplate.go index f42cd0040f..6e9878d99a 100644 --- a/typedapi/types/indextemplate.go +++ b/typedapi/types/indextemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,13 +31,19 @@ import ( // IndexTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexTemplate.ts#L29-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexTemplate.ts#L30-L107 type IndexTemplate struct { AllowAutoCreate *bool `json:"allow_auto_create,omitempty"` // ComposedOf An ordered list of component template names. // Component templates are merged in the order specified, meaning that the last // component template specified has the highest precedence. ComposedOf []string `json:"composed_of"` + // CreatedDate Date and time when the index template was created. Only returned if the + // `human` query parameter is `true`. + CreatedDate DateTime `json:"created_date,omitempty"` + // CreatedDateMillis Date and time when the index template was created, in milliseconds since the + // epoch. + CreatedDateMillis *int64 `json:"created_date_millis,omitempty"` // DataStream If this object is included, the template is used to create data streams and // their backing indices. // Supports an empty object. @@ -55,6 +61,12 @@ type IndexTemplate struct { // Meta_ Optional user metadata about the index template. May have any contents. // This map is not automatically generated by Elasticsearch. Meta_ Metadata `json:"_meta,omitempty"` + // ModifiedDate Date and time when the index template was last modified. Only returned if the + // `human` query parameter is `true`. + ModifiedDate DateTime `json:"modified_date,omitempty"` + // ModifiedDateMillis Date and time when the index template was last modified, in milliseconds + // since the epoch. + ModifiedDateMillis *int64 `json:"modified_date_millis,omitempty"` // Priority Priority to determine index template precedence when a new data stream or // index is created. // The index template with the highest priority is chosen. @@ -105,6 +117,16 @@ func (s *IndexTemplate) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "ComposedOf", err) } + case "created_date": + if err := dec.Decode(&s.CreatedDate); err != nil { + return fmt.Errorf("%s | %w", "CreatedDate", err) + } + + case "created_date_millis": + if err := dec.Decode(&s.CreatedDateMillis); err != nil { + return fmt.Errorf("%s | %w", "CreatedDateMillis", err) + } + case "data_stream": if err := dec.Decode(&s.DataStream); err != nil { return fmt.Errorf("%s | %w", "DataStream", err) @@ -161,6 +183,16 @@ func (s *IndexTemplate) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Meta_", err) } + case "modified_date": + if err := dec.Decode(&s.ModifiedDate); err != nil { + return fmt.Errorf("%s | %w", "ModifiedDate", err) + } + + case "modified_date_millis": + if err := dec.Decode(&s.ModifiedDateMillis); err != nil { + return fmt.Errorf("%s | %w", "ModifiedDateMillis", err) + } + case "priority": var tmp any dec.Decode(&tmp) diff --git a/typedapi/types/indextemplatedatastreamconfiguration.go b/typedapi/types/indextemplatedatastreamconfiguration.go index 45102d7f59..d7e683a2e7 100644 --- a/typedapi/types/indextemplatedatastreamconfiguration.go +++ b/typedapi/types/indextemplatedatastreamconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndexTemplateDataStreamConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexTemplate.ts#L84-L95 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexTemplate.ts#L109-L120 type IndexTemplateDataStreamConfiguration struct { // AllowCustomRouting If true, the data stream supports custom routing. AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` diff --git a/typedapi/types/indextemplateitem.go b/typedapi/types/indextemplateitem.go index 1b6f38322e..65fba7af39 100644 --- a/typedapi/types/indextemplateitem.go +++ b/typedapi/types/indextemplateitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndexTemplateItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32 type IndexTemplateItem struct { IndexTemplate IndexTemplate `json:"index_template"` Name string `json:"name"` diff --git a/typedapi/types/indextemplatemapping.go b/typedapi/types/indextemplatemapping.go index d116bc1af8..a9fe58ae87 100644 --- a/typedapi/types/indextemplatemapping.go +++ b/typedapi/types/indextemplatemapping.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndexTemplateMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L159-L181 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L162-L184 type IndexTemplateMapping struct { // Aliases Aliases to add. // If the index template includes a `data_stream` object, these are data stream diff --git a/typedapi/types/indextemplatesummary.go b/typedapi/types/indextemplatesummary.go index 3d0cc75abe..ad6d7abb64 100644 --- a/typedapi/types/indextemplatesummary.go +++ b/typedapi/types/indextemplatesummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndexTemplateSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexTemplate.ts#L97-L124 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexTemplate.ts#L122-L149 type IndexTemplateSummary struct { // Aliases Aliases to add. // If the index template includes a `data_stream` object, these are data stream diff --git a/typedapi/types/indexversioning.go b/typedapi/types/indexversioning.go index c29e17d10a..97df34a243 100644 --- a/typedapi/types/indexversioning.go +++ b/typedapi/types/indexversioning.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndexVersioning type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L292-L295 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L298-L301 type IndexVersioning struct { Created *string `json:"created,omitempty"` CreatedString *string `json:"created_string,omitempty"` diff --git a/typedapi/types/indicatornode.go b/typedapi/types/indicatornode.go index 5999fea07b..1d9f1732a1 100644 --- a/typedapi/types/indicatornode.go +++ b/typedapi/types/indicatornode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndicatorNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L93-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L93-L96 type IndicatorNode struct { Name *string `json:"name,omitempty"` NodeId *string `json:"node_id,omitempty"` diff --git a/typedapi/types/indicators.go b/typedapi/types/indicators.go index fc5f5fcc51..4e69df527b 100644 --- a/typedapi/types/indicators.go +++ b/typedapi/types/indicators.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Indicators type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L33-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L33-L43 type Indicators struct { DataStreamLifecycle *DataStreamLifecycleIndicator `json:"data_stream_lifecycle,omitempty"` Disk *DiskIndicator `json:"disk,omitempty"` diff --git a/typedapi/types/indices.go b/typedapi/types/indices.go index 60dd6d50b2..287ea4c27f 100644 --- a/typedapi/types/indices.go +++ b/typedapi/types/indices.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Indices type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L61-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L61-L61 type Indices []string type IndicesVariant interface { diff --git a/typedapi/types/indicesaction.go b/typedapi/types/indicesaction.go index 57c10506e0..8ee69c6cb6 100644 --- a/typedapi/types/indicesaction.go +++ b/typedapi/types/indicesaction.go @@ -16,23 +16,17 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // IndicesAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/types.ts#L23-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/update_aliases/types.ts#L23-L39 type IndicesAction struct { // Add Adds a data stream or index to an alias. // If the alias doesn’t exist, the `add` action creates it. - Add *AddAction `json:"add,omitempty"` - AdditionalIndicesActionProperty map[string]json.RawMessage `json:"-"` + Add *AddAction `json:"add,omitempty"` // Remove Removes a data stream or index from an alias. Remove *RemoveAction `json:"remove,omitempty"` // RemoveIndex Deletes an index. @@ -40,40 +34,9 @@ type IndicesAction struct { RemoveIndex *RemoveIndexAction `json:"remove_index,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s IndicesAction) MarshalJSON() ([]byte, error) { - type opt IndicesAction - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalIndicesActionProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalIndicesActionProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewIndicesAction returns a IndicesAction. func NewIndicesAction() *IndicesAction { - r := &IndicesAction{ - AdditionalIndicesActionProperty: make(map[string]json.RawMessage), - } + r := &IndicesAction{} return r } diff --git a/typedapi/types/indicesindexingpressure.go b/typedapi/types/indicesindexingpressure.go index 7e175cadad..f6cab209e9 100644 --- a/typedapi/types/indicesindexingpressure.go +++ b/typedapi/types/indicesindexingpressure.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndicesIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L590-L592 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L600-L602 type IndicesIndexingPressure struct { Memory IndicesIndexingPressureMemory `json:"memory"` } diff --git a/typedapi/types/indicesindexingpressurememory.go b/typedapi/types/indicesindexingpressurememory.go index c79c7be916..44539e21f8 100644 --- a/typedapi/types/indicesindexingpressurememory.go +++ b/typedapi/types/indicesindexingpressurememory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndicesIndexingPressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L594-L601 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L604-L611 type IndicesIndexingPressureMemory struct { // Limit Number of outstanding bytes that may be consumed by indexing requests. When // this limit is reached or exceeded, diff --git a/typedapi/types/indicesmodifyaction.go b/typedapi/types/indicesmodifyaction.go index a804a2f78c..e927f5426c 100644 --- a/typedapi/types/indicesmodifyaction.go +++ b/typedapi/types/indicesmodifyaction.go @@ -16,66 +16,29 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // IndicesModifyAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/modify_data_stream/types.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/modify_data_stream/types.ts#L22-L37 type IndicesModifyAction struct { // AddBackingIndex Adds an existing index as a backing index for a data stream. // The index is hidden as part of this operation. // WARNING: Adding indices with the `add_backing_index` action can potentially // result in improper data stream behavior. // This should be considered an expert level API. - AddBackingIndex *IndexAndDataStreamAction `json:"add_backing_index,omitempty"` - AdditionalIndicesModifyActionProperty map[string]json.RawMessage `json:"-"` + AddBackingIndex *IndexAndDataStreamAction `json:"add_backing_index,omitempty"` // RemoveBackingIndex Removes a backing index from a data stream. // The index is unhidden as part of this operation. // A data stream’s write index cannot be removed. RemoveBackingIndex *IndexAndDataStreamAction `json:"remove_backing_index,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s IndicesModifyAction) MarshalJSON() ([]byte, error) { - type opt IndicesModifyAction - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalIndicesModifyActionProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalIndicesModifyActionProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewIndicesModifyAction returns a IndicesModifyAction. func NewIndicesModifyAction() *IndicesModifyAction { - r := &IndicesModifyAction{ - AdditionalIndicesModifyActionProperty: make(map[string]json.RawMessage), - } + r := &IndicesModifyAction{} return r } diff --git a/typedapi/types/indicesoptions.go b/typedapi/types/indicesoptions.go index b8c142ac82..ae9d8a4828 100644 --- a/typedapi/types/indicesoptions.go +++ b/typedapi/types/indicesoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IndicesOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L334-L361 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L336-L363 type IndicesOptions struct { // AllowNoIndices If false, the request returns an error if any wildcard expression, index // alias, or `_all` value targets only diff --git a/typedapi/types/indicesprivileges.go b/typedapi/types/indicesprivileges.go index cf82867cac..d979a4abb4 100644 --- a/typedapi/types/indicesprivileges.go +++ b/typedapi/types/indicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L218-L244 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L218-L244 type IndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited diff --git a/typedapi/types/indicesprivilegesquery.go b/typedapi/types/indicesprivilegesquery.go index 5f663bb8e3..1bf2f4ec57 100644 --- a/typedapi/types/indicesprivilegesquery.go +++ b/typedapi/types/indicesprivilegesquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ package types // Query // RoleTemplateQuery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L343-L351 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L343-L351 type IndicesPrivilegesQuery any type IndicesPrivilegesQueryVariant interface { diff --git a/typedapi/types/indicesrecord.go b/typedapi/types/indicesrecord.go index 8e9fcfab1d..12fc67d67e 100644 --- a/typedapi/types/indicesrecord.go +++ b/typedapi/types/indicesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndicesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/indices/types.ts#L20-L808 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/indices/types.ts#L20-L812 type IndicesRecord struct { // BulkAvgSizeInBytes average size in bytes of shard bulk BulkAvgSizeInBytes *string `json:"bulk.avg_size_in_bytes,omitempty"` @@ -51,7 +51,11 @@ type IndicesRecord struct { CreationDateString *string `json:"creation.date.string,omitempty"` // DatasetSize total size of dataset (including the cache for partially mounted indices) DatasetSize *string `json:"dataset.size,omitempty"` - // DocsCount available docs + // DocsCount The number of documents in the index, including hidden nested documents. + // For indices with `semantic_text` fields or other nested field types, + // this count includes the internal nested documents. + // To get the logical document count (excluding nested documents), use + // the `_count` API or `_cat/count` API instead. DocsCount *string `json:"docs.count,omitempty"` // DocsDeleted deleted docs DocsDeleted *string `json:"docs.deleted,omitempty"` diff --git a/typedapi/types/indicesshardsstats.go b/typedapi/types/indicesshardsstats.go index fa36b11b84..b7972c1e0e 100644 --- a/typedapi/types/indicesshardsstats.go +++ b/typedapi/types/indicesshardsstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndicesShardsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L53-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L53-L56 type IndicesShardsStats struct { AllFields FieldSummary `json:"all_fields"` Fields map[string]FieldSummary `json:"fields"` diff --git a/typedapi/types/indicesshardstats.go b/typedapi/types/indicesshardstats.go index 0725cd7157..58d74841f9 100644 --- a/typedapi/types/indicesshardstats.go +++ b/typedapi/types/indicesshardstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // IndicesShardStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L192-L223 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L192-L223 type IndicesShardStats struct { Bulk *BulkStats `json:"bulk,omitempty"` Commit *ShardCommit `json:"commit,omitempty"` diff --git a/typedapi/types/indicesshardstores.go b/typedapi/types/indicesshardstores.go index b49a10afbe..10f5d23569 100644 --- a/typedapi/types/indicesshardstores.go +++ b/typedapi/types/indicesshardstores.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IndicesShardStores type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shard_stores/types.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shard_stores/types.ts#L25-L27 type IndicesShardStores struct { Shards map[string]ShardStoreWrapper `json:"shards"` } diff --git a/typedapi/types/indicesstats.go b/typedapi/types/indicesstats.go index dd65ebccea..6461cd3260 100644 --- a/typedapi/types/indicesstats.go +++ b/typedapi/types/indicesstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // IndicesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L95-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L95-L110 type IndicesStats struct { Health *healthstatus.HealthStatus `json:"health,omitempty"` Primaries *IndexStats `json:"primaries,omitempty"` diff --git a/typedapi/types/indicesvalidationexplanation.go b/typedapi/types/indicesvalidationexplanation.go index 58ac0014be..0c7fc0d6d4 100644 --- a/typedapi/types/indicesvalidationexplanation.go +++ b/typedapi/types/indicesvalidationexplanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndicesValidationExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37 type IndicesValidationExplanation struct { Error *string `json:"error,omitempty"` Explanation *string `json:"explanation,omitempty"` diff --git a/typedapi/types/indicesversions.go b/typedapi/types/indicesversions.go index 2b8a147aa8..0739c4356d 100644 --- a/typedapi/types/indicesversions.go +++ b/typedapi/types/indicesversions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndicesVersions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L359-L365 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L377-L383 type IndicesVersions struct { IndexCount int `json:"index_count"` PrimaryShardCount int `json:"primary_shard_count"` diff --git a/typedapi/types/indicnormalizationtokenfilter.go b/typedapi/types/indicnormalizationtokenfilter.go index 4aac007c42..6cf2b5118a 100644 --- a/typedapi/types/indicnormalizationtokenfilter.go +++ b/typedapi/types/indicnormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IndicNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L506-L508 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L541-L543 type IndicNormalizationTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/indonesiananalyzer.go b/typedapi/types/indonesiananalyzer.go index 2a69565917..ef1f88603c 100644 --- a/typedapi/types/indonesiananalyzer.go +++ b/typedapi/types/indonesiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IndonesianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L213-L218 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L213-L218 type IndonesianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/inferenceaggregate.go b/typedapi/types/inferenceaggregate.go index 674759b81d..068d32a9b4 100644 --- a/typedapi/types/inferenceaggregate.go +++ b/typedapi/types/inferenceaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InferenceAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L757-L772 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L829-L844 type InferenceAggregate struct { Data map[string]json.RawMessage `json:"-"` FeatureImportance []InferenceFeatureImportance `json:"feature_importance,omitempty"` diff --git a/typedapi/types/inferenceaggregation.go b/typedapi/types/inferenceaggregation.go index 7fff7faadd..aec0abd5fa 100644 --- a/typedapi/types/inferenceaggregation.go +++ b/typedapi/types/inferenceaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // InferenceAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L225-L234 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L227-L236 type InferenceAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/inferencechunkingsettings.go b/typedapi/types/inferencechunkingsettings.go index 565cc506a4..29d2623a58 100644 --- a/typedapi/types/inferencechunkingsettings.go +++ b/typedapi/types/inferencechunkingsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,11 +31,12 @@ import ( // InferenceChunkingSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Services.ts#L288-L317 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Services.ts#L339-L398 type InferenceChunkingSettings struct { // MaxChunkSize The maximum size of a chunk in words. - // This value cannot be higher than `300` or lower than `20` (for `sentence` - // strategy) or `10` (for `word` strategy). + // This value cannot be lower than `20` (for `sentence` strategy) or `10` (for + // `word` strategy). + // This value should not exceed the window size for the associated model. MaxChunkSize *int `json:"max_chunk_size,omitempty"` // Overlap The number of overlapping words for chunks. // It is applicable only to a `word` chunking strategy. @@ -45,7 +46,35 @@ type InferenceChunkingSettings struct { // It is applicable only for a `sentence` chunking strategy. // It can be either `1` or `0`. SentenceOverlap *int `json:"sentence_overlap,omitempty"` - // Strategy The chunking strategy: `sentence` or `word`. + // SeparatorGroup Only applicable to the `recursive` strategy and required when using it. + // + // Sets a predefined list of separators in the saved chunking settings based on + // the selected text type. + // Values can be `markdown` or `plaintext`. + // + // Using this parameter is an alternative to manually specifying a custom + // `separators` list. + SeparatorGroup *string `json:"separator_group,omitempty"` + // Separators Only applicable to the `recursive` strategy and required when using it. + // + // A list of strings used as possible split points when chunking text. + // + // Each string can be a plain string or a regular expression (regex) pattern. + // The system tries each separator in order to split the text, starting from the + // first item in the list. + // + // After splitting, it attempts to recombine smaller pieces into larger chunks + // that stay within + // the `max_chunk_size` limit, to reduce the total number of chunks generated. + Separators []string `json:"separators,omitempty"` + // Strategy The chunking strategy: `sentence`, `word`, `none` or `recursive`. + // + // - If `strategy` is set to `recursive`, you must also specify: + // + // - `max_chunk_size` + // - either `separators` or`separator_group` + // + // Learn more about different chunking strategies in the linked documentation. Strategy *string `json:"strategy,omitempty"` } @@ -112,6 +141,23 @@ func (s *InferenceChunkingSettings) UnmarshalJSON(data []byte) error { s.SentenceOverlap = &f } + case "separator_group": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "SeparatorGroup", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.SeparatorGroup = &o + + case "separators": + if err := dec.Decode(&s.Separators); err != nil { + return fmt.Errorf("%s | %w", "Separators", err) + } + case "strategy": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/inferenceclassimportance.go b/typedapi/types/inferenceclassimportance.go index dd169b689d..23e224a6d8 100644 --- a/typedapi/types/inferenceclassimportance.go +++ b/typedapi/types/inferenceclassimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InferenceClassImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L786-L789 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L858-L861 type InferenceClassImportance struct { ClassName string `json:"class_name"` Importance Float64 `json:"importance"` diff --git a/typedapi/types/inferenceconfig.go b/typedapi/types/inferenceconfig.go index fda4760114..68b0995d32 100644 --- a/typedapi/types/inferenceconfig.go +++ b/typedapi/types/inferenceconfig.go @@ -16,60 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // InferenceConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1067-L1079 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1071-L1083 type InferenceConfig struct { - AdditionalInferenceConfigProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. Classification *InferenceConfigClassification `json:"classification,omitempty"` // Regression Regression configuration for inference. Regression *InferenceConfigRegression `json:"regression,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s InferenceConfig) MarshalJSON() ([]byte, error) { - type opt InferenceConfig - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalInferenceConfigProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalInferenceConfigProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewInferenceConfig returns a InferenceConfig. func NewInferenceConfig() *InferenceConfig { - r := &InferenceConfig{ - AdditionalInferenceConfigProperty: make(map[string]json.RawMessage), - } + r := &InferenceConfig{} return r } diff --git a/typedapi/types/inferenceconfigclassification.go b/typedapi/types/inferenceconfigclassification.go index 543a134030..2cbf539c00 100644 --- a/typedapi/types/inferenceconfigclassification.go +++ b/typedapi/types/inferenceconfigclassification.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InferenceConfigClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1094-L1120 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1098-L1124 type InferenceConfigClassification struct { // NumTopClasses Specifies the number of top class predictions to return. NumTopClasses *int `json:"num_top_classes,omitempty"` diff --git a/typedapi/types/inferenceconfigcontainer.go b/typedapi/types/inferenceconfigcontainer.go index 653b1ddc2e..242da3cfb8 100644 --- a/typedapi/types/inferenceconfigcontainer.go +++ b/typedapi/types/inferenceconfigcontainer.go @@ -16,60 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // InferenceConfigContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L236-L242 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L238-L244 type InferenceConfigContainer struct { - AdditionalInferenceConfigContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. Classification *ClassificationInferenceOptions `json:"classification,omitempty"` // Regression Regression configuration for inference. Regression *RegressionInferenceOptions `json:"regression,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s InferenceConfigContainer) MarshalJSON() ([]byte, error) { - type opt InferenceConfigContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalInferenceConfigContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalInferenceConfigContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewInferenceConfigContainer returns a InferenceConfigContainer. func NewInferenceConfigContainer() *InferenceConfigContainer { - r := &InferenceConfigContainer{ - AdditionalInferenceConfigContainerProperty: make(map[string]json.RawMessage), - } + r := &InferenceConfigContainer{} return r } diff --git a/typedapi/types/inferenceconfigcreatecontainer.go b/typedapi/types/inferenceconfigcreatecontainer.go index 6420845478..b8d0ad4394 100644 --- a/typedapi/types/inferenceconfigcreatecontainer.go +++ b/typedapi/types/inferenceconfigcreatecontainer.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // InferenceConfigCreateContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L26-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L26-L85 type InferenceConfigCreateContainer struct { - AdditionalInferenceConfigCreateContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. Classification *ClassificationInferenceOptions `json:"classification,omitempty"` // FillMask Fill mask configuration for inference. @@ -53,40 +47,9 @@ type InferenceConfigCreateContainer struct { ZeroShotClassification *ZeroShotClassificationInferenceOptions `json:"zero_shot_classification,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s InferenceConfigCreateContainer) MarshalJSON() ([]byte, error) { - type opt InferenceConfigCreateContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalInferenceConfigCreateContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalInferenceConfigCreateContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewInferenceConfigCreateContainer returns a InferenceConfigCreateContainer. func NewInferenceConfigCreateContainer() *InferenceConfigCreateContainer { - r := &InferenceConfigCreateContainer{ - AdditionalInferenceConfigCreateContainerProperty: make(map[string]json.RawMessage), - } + r := &InferenceConfigCreateContainer{} return r } diff --git a/typedapi/types/inferenceconfigregression.go b/typedapi/types/inferenceconfigregression.go index 3bec130700..a81e64427b 100644 --- a/typedapi/types/inferenceconfigregression.go +++ b/typedapi/types/inferenceconfigregression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InferenceConfigRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1081-L1092 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1085-L1096 type InferenceConfigRegression struct { // NumTopFeatureImportanceValues Specifies the maximum number of feature importance values per document. NumTopFeatureImportanceValues *int `json:"num_top_feature_importance_values,omitempty"` diff --git a/typedapi/types/inferenceconfigupdatecontainer.go b/typedapi/types/inferenceconfigupdatecontainer.go index 8305cb0e5f..4a14dd9ab7 100644 --- a/typedapi/types/inferenceconfigupdatecontainer.go +++ b/typedapi/types/inferenceconfigupdatecontainer.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // InferenceConfigUpdateContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L315-L337 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L319-L341 type InferenceConfigUpdateContainer struct { - AdditionalInferenceConfigUpdateContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. Classification *ClassificationInferenceOptions `json:"classification,omitempty"` // FillMask Fill mask configuration for inference. @@ -52,40 +46,9 @@ type InferenceConfigUpdateContainer struct { ZeroShotClassification *ZeroShotClassificationInferenceUpdateOptions `json:"zero_shot_classification,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s InferenceConfigUpdateContainer) MarshalJSON() ([]byte, error) { - type opt InferenceConfigUpdateContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalInferenceConfigUpdateContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalInferenceConfigUpdateContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewInferenceConfigUpdateContainer returns a InferenceConfigUpdateContainer. func NewInferenceConfigUpdateContainer() *InferenceConfigUpdateContainer { - r := &InferenceConfigUpdateContainer{ - AdditionalInferenceConfigUpdateContainerProperty: make(map[string]json.RawMessage), - } + r := &InferenceConfigUpdateContainer{} return r } diff --git a/typedapi/types/inferenceendpoint.go b/typedapi/types/inferenceendpoint.go index c8cfb2fba4..e0c64e370d 100644 --- a/typedapi/types/inferenceendpoint.go +++ b/typedapi/types/inferenceendpoint.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,9 +31,12 @@ import ( // InferenceEndpoint type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Services.ts#L45-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Services.ts#L49-L71 type InferenceEndpoint struct { - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *InferenceChunkingSettings `json:"chunking_settings,omitempty"` // Service The service type Service string `json:"service"` diff --git a/typedapi/types/inferenceendpointinfo.go b/typedapi/types/inferenceendpointinfo.go index f969872e6c..c2b13f5a27 100644 --- a/typedapi/types/inferenceendpointinfo.go +++ b/typedapi/types/inferenceendpointinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,9 +33,12 @@ import ( // InferenceEndpointInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Services.ts#L67-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Services.ts#L73-L85 type InferenceEndpointInfo struct { - // ChunkingSettings Chunking configuration object + // ChunkingSettings The chunking configuration object. + // Applies only to the `sparse_embedding` and `text_embedding` task types. + // Not applicable to the `rerank`, `completion`, or `chat_completion` task + // types. ChunkingSettings *InferenceChunkingSettings `json:"chunking_settings,omitempty"` // InferenceId The inference Id InferenceId string `json:"inference_id"` diff --git a/typedapi/types/inferencefeatureimportance.go b/typedapi/types/inferencefeatureimportance.go index 6621fdfcfe..4664cefa6e 100644 --- a/typedapi/types/inferencefeatureimportance.go +++ b/typedapi/types/inferencefeatureimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InferenceFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L780-L784 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L852-L856 type InferenceFeatureImportance struct { Classes []InferenceClassImportance `json:"classes,omitempty"` FeatureName string `json:"feature_name"` diff --git a/typedapi/types/inferenceprocessor.go b/typedapi/types/inferenceprocessor.go index 75194e0d85..10cb5187e6 100644 --- a/typedapi/types/inferenceprocessor.go +++ b/typedapi/types/inferenceprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InferenceProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1028-L1060 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1032-L1064 type InferenceProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/inferenceresponseresult.go b/typedapi/types/inferenceresponseresult.go index 78f769ebf9..f08a9ff8a7 100644 --- a/typedapi/types/inferenceresponseresult.go +++ b/typedapi/types/inferenceresponseresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InferenceResponseResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L478-L526 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L482-L530 type InferenceResponseResult struct { // Entities If the model is trained for named entity recognition (NER) tasks, the // response contains the recognized entities. diff --git a/typedapi/types/inferencetopclassentry.go b/typedapi/types/inferencetopclassentry.go index 9fa08a9f9b..1c5307c8fe 100644 --- a/typedapi/types/inferencetopclassentry.go +++ b/typedapi/types/inferencetopclassentry.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InferenceTopClassEntry type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L774-L778 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L846-L850 type InferenceTopClassEntry struct { ClassName FieldValue `json:"class_name"` ClassProbability Float64 `json:"class_probability"` diff --git a/typedapi/types/influence.go b/typedapi/types/influence.go index 63fa9222c2..4c622b58a8 100644 --- a/typedapi/types/influence.go +++ b/typedapi/types/influence.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Influence type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Anomaly.ts#L141-L144 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Anomaly.ts#L141-L144 type Influence struct { InfluencerFieldName string `json:"influencer_field_name"` InfluencerFieldValues []string `json:"influencer_field_values"` diff --git a/typedapi/types/influencer.go b/typedapi/types/influencer.go index f81fa341a0..7771cd7d14 100644 --- a/typedapi/types/influencer.go +++ b/typedapi/types/influencer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Influencer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Influencer.ts#L24-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Influencer.ts#L24-L76 type Influencer struct { // BucketSpan The length of the bucket in seconds. This value matches the bucket span that // is specified in the job. diff --git a/typedapi/types/infofeaturestate.go b/typedapi/types/infofeaturestate.go index 090e7a8bd8..4c6315b492 100644 --- a/typedapi/types/infofeaturestate.go +++ b/typedapi/types/infofeaturestate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InfoFeatureState type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotInfoFeatureState.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotInfoFeatureState.ts#L22-L25 type InfoFeatureState struct { FeatureName string `json:"feature_name"` Indices []string `json:"indices"` diff --git a/typedapi/types/ingest.go b/typedapi/types/ingest.go index bbdee69d76..d8d2a9e94d 100644 --- a/typedapi/types/ingest.go +++ b/typedapi/types/ingest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Ingest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Simulation.ts#L28-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Simulation.ts#L28-L36 type Ingest struct { Pipeline *string `json:"pipeline,omitempty"` Redact_ *Redact `json:"_redact,omitempty"` diff --git a/typedapi/types/ingestdocumentsimulation.go b/typedapi/types/ingestdocumentsimulation.go index 7610768830..0a3e32d410 100644 --- a/typedapi/types/ingestdocumentsimulation.go +++ b/typedapi/types/ingestdocumentsimulation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,8 +30,9 @@ import ( // IngestDocumentSimulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/simulate/ingest/SimulateIngestResponse.ts#L35-L78 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/simulate/ingest/SimulateIngestResponse.ts#L36-L80 type IngestDocumentSimulation struct { + EffectiveMapping *TypeMapping `json:"effective_mapping,omitempty"` // Error Any error resulting from simulatng ingest on this doc. This can be an error // generated by // executing a processor, or a mapping validation error when simulating indexing @@ -72,6 +73,11 @@ func (s *IngestDocumentSimulation) UnmarshalJSON(data []byte) error { switch t { + case "effective_mapping": + if err := dec.Decode(&s.EffectiveMapping); err != nil { + return fmt.Errorf("%s | %w", "EffectiveMapping", err) + } + case "error": if err := dec.Decode(&s.Error); err != nil { return fmt.Errorf("%s | %w", "Error", err) diff --git a/typedapi/types/ingestpipeline.go b/typedapi/types/ingestpipeline.go index 2d678beb30..f17a388e57 100644 --- a/typedapi/types/ingestpipeline.go +++ b/typedapi/types/ingestpipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -27,12 +27,19 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/fieldaccesspattern" ) // IngestPipeline type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Pipeline.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Pipeline.ts#L24-L83 type IngestPipeline struct { + // CreatedDate Date and time when the pipeline was created. Only returned if the `human` + // query parameter is `true`. + CreatedDate DateTime `json:"created_date,omitempty"` + // CreatedDateMillis Date and time when the pipeline was created, in milliseconds since the epoch. + CreatedDateMillis *int64 `json:"created_date_millis,omitempty"` // Deprecated Marks this ingest pipeline as deprecated. // When a deprecated ingest pipeline is referenced as the default or final // pipeline when creating or updating a non-deprecated index template, @@ -40,9 +47,18 @@ type IngestPipeline struct { Deprecated *bool `json:"deprecated,omitempty"` // Description Description of the ingest pipeline. Description *string `json:"description,omitempty"` + // FieldAccessPattern Controls how processors in this pipeline should read and write data on a + // document's source. + FieldAccessPattern *fieldaccesspattern.FieldAccessPattern `json:"field_access_pattern,omitempty"` // Meta_ Arbitrary metadata about the ingest pipeline. This map is not automatically // generated by Elasticsearch. Meta_ Metadata `json:"_meta,omitempty"` + // ModifiedDate Date and time when the pipeline was last modified. Only returned if the + // `human` query parameter is `true`. + ModifiedDate DateTime `json:"modified_date,omitempty"` + // ModifiedDateMillis Date and time when the pipeline was last modified, in milliseconds since the + // epoch. + ModifiedDateMillis *int64 `json:"modified_date_millis,omitempty"` // OnFailure Processors to run immediately after a processor failure. OnFailure []ProcessorContainer `json:"on_failure,omitempty"` // Processors Processors used to perform transformations on documents before indexing. @@ -67,6 +83,16 @@ func (s *IngestPipeline) UnmarshalJSON(data []byte) error { switch t { + case "created_date": + if err := dec.Decode(&s.CreatedDate); err != nil { + return fmt.Errorf("%s | %w", "CreatedDate", err) + } + + case "created_date_millis": + if err := dec.Decode(&s.CreatedDateMillis); err != nil { + return fmt.Errorf("%s | %w", "CreatedDateMillis", err) + } + case "deprecated": var tmp any dec.Decode(&tmp) @@ -93,11 +119,26 @@ func (s *IngestPipeline) UnmarshalJSON(data []byte) error { } s.Description = &o + case "field_access_pattern": + if err := dec.Decode(&s.FieldAccessPattern); err != nil { + return fmt.Errorf("%s | %w", "FieldAccessPattern", err) + } + case "_meta": if err := dec.Decode(&s.Meta_); err != nil { return fmt.Errorf("%s | %w", "Meta_", err) } + case "modified_date": + if err := dec.Decode(&s.ModifiedDate); err != nil { + return fmt.Errorf("%s | %w", "ModifiedDate", err) + } + + case "modified_date_millis": + if err := dec.Decode(&s.ModifiedDateMillis); err != nil { + return fmt.Errorf("%s | %w", "ModifiedDateMillis", err) + } + case "on_failure": if err := dec.Decode(&s.OnFailure); err != nil { return fmt.Errorf("%s | %w", "OnFailure", err) diff --git a/typedapi/types/ingestpipelineparams.go b/typedapi/types/ingestpipelineparams.go index 5f0c500f45..4ba22567a6 100644 --- a/typedapi/types/ingestpipelineparams.go +++ b/typedapi/types/ingestpipelineparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IngestPipelineParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L148-L153 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L148-L153 type IngestPipelineParams struct { ExtractBinaryContent bool `json:"extract_binary_content"` Name string `json:"name"` diff --git a/typedapi/types/ingeststats.go b/typedapi/types/ingeststats.go index 7b469df3d6..084b956af8 100644 --- a/typedapi/types/ingeststats.go +++ b/typedapi/types/ingeststats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IngestStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L358-L396 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L358-L396 type IngestStats struct { // Count Total number of documents ingested during the lifetime of this node. Count int64 `json:"count"` diff --git a/typedapi/types/ingesttotal.go b/typedapi/types/ingesttotal.go index b7ef2ef3c8..cbbdc160a8 100644 --- a/typedapi/types/ingesttotal.go +++ b/typedapi/types/ingesttotal.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IngestTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L398-L415 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L398-L415 type IngestTotal struct { // Count Total number of documents ingested during the lifetime of this node. Count int64 `json:"count"` diff --git a/typedapi/types/inlineget.go b/typedapi/types/inlineget.go index 390b8eddef..4ed122190f 100644 --- a/typedapi/types/inlineget.go +++ b/typedapi/types/inlineget.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,13 +31,13 @@ import ( // InlineGet type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L319-L332 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L321-L334 type InlineGet struct { Fields map[string]json.RawMessage `json:"fields,omitempty"` Found bool `json:"found"` Metadata map[string]json.RawMessage `json:"-"` PrimaryTerm_ *int64 `json:"_primary_term,omitempty"` - Routing_ *string `json:"_routing,omitempty"` + Routing_ []string `json:"_routing,omitempty"` SeqNo_ *int64 `json:"_seq_no,omitempty"` Source_ json.RawMessage `json:"_source,omitempty"` } @@ -95,8 +95,19 @@ func (s *InlineGet) UnmarshalJSON(data []byte) error { } case "_routing": - if err := dec.Decode(&s.Routing_); err != nil { - return fmt.Errorf("%s | %w", "Routing_", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing_", err) + } + + s.Routing_ = append(s.Routing_, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing_); err != nil { + return fmt.Errorf("%s | %w", "Routing_", err) + } } case "_seq_no": diff --git a/typedapi/types/inlinegetdictuserdefined.go b/typedapi/types/inlinegetdictuserdefined.go index 7bc916e3a1..dfdbc62c01 100644 --- a/typedapi/types/inlinegetdictuserdefined.go +++ b/typedapi/types/inlinegetdictuserdefined.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,13 +31,13 @@ import ( // InlineGetDictUserDefined type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L319-L332 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L321-L334 type InlineGetDictUserDefined struct { Fields map[string]json.RawMessage `json:"fields,omitempty"` Found bool `json:"found"` InlineGetDictUserDefined map[string]json.RawMessage `json:"-"` PrimaryTerm_ *int64 `json:"_primary_term,omitempty"` - Routing_ *string `json:"_routing,omitempty"` + Routing_ []string `json:"_routing,omitempty"` SeqNo_ *int64 `json:"_seq_no,omitempty"` Source_ map[string]json.RawMessage `json:"_source,omitempty"` } @@ -95,8 +95,19 @@ func (s *InlineGetDictUserDefined) UnmarshalJSON(data []byte) error { } case "_routing": - if err := dec.Decode(&s.Routing_); err != nil { - return fmt.Errorf("%s | %w", "Routing_", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing_", err) + } + + s.Routing_ = append(s.Routing_, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing_); err != nil { + return fmt.Errorf("%s | %w", "Routing_", err) + } } case "_seq_no": diff --git a/typedapi/types/innerhits.go b/typedapi/types/innerhits.go index 2c1d6f5738..a1bd46e0c0 100644 --- a/typedapi/types/innerhits.go +++ b/typedapi/types/innerhits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InnerHits type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L107-L141 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/hits.ts#L115-L149 type InnerHits struct { Collapse *FieldCollapse `json:"collapse,omitempty"` DocvalueFields []FieldAndFormat `json:"docvalue_fields,omitempty"` diff --git a/typedapi/types/innerhitsresult.go b/typedapi/types/innerhitsresult.go index a64ae6ee61..609a616bf8 100644 --- a/typedapi/types/innerhitsresult.go +++ b/typedapi/types/innerhitsresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // InnerHitsResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L85-L87 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/hits.ts#L93-L95 type InnerHitsResult struct { Hits HitsMetadata `json:"hits"` } diff --git a/typedapi/types/innerretriever.go b/typedapi/types/innerretriever.go index a25fc5efa0..d3f0a70388 100644 --- a/typedapi/types/innerretriever.go +++ b/typedapi/types/innerretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // InnerRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L85-L89 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L86-L90 type InnerRetriever struct { Normalizer scorenormalizer.ScoreNormalizer `json:"normalizer"` Retriever RetrieverContainer `json:"retriever"` diff --git a/typedapi/types/inprogress.go b/typedapi/types/inprogress.go index 0fb13da1e9..271f9e42a5 100644 --- a/typedapi/types/inprogress.go +++ b/typedapi/types/inprogress.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/_types/SnapshotLifecycle.ts#L141-L146 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/_types/SnapshotLifecycle.ts#L141-L146 type InProgress struct { Name string `json:"name"` StartTimeMillis int64 `json:"start_time_millis"` diff --git a/typedapi/types/input.go b/typedapi/types/input.go index 1c261a451a..326a7f285b 100644 --- a/typedapi/types/input.go +++ b/typedapi/types/input.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Input type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L56-L58 type Input struct { FieldNames []string `json:"field_names"` } diff --git a/typedapi/types/inputconfig.go b/typedapi/types/inputconfig.go index cfcb8071d0..b92c3f31d6 100644 --- a/typedapi/types/inputconfig.go +++ b/typedapi/types/inputconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // InputConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1062-L1065 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1066-L1069 type InputConfig struct { InputField string `json:"input_field"` OutputField string `json:"output_field"` diff --git a/typedapi/types/integernumberproperty.go b/typedapi/types/integernumberproperty.go index f638cc820c..243ceaa254 100644 --- a/typedapi/types/integernumberproperty.go +++ b/typedapi/types/integernumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // IntegerNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L172-L175 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L173-L176 type IntegerNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/integerrangeproperty.go b/typedapi/types/integerrangeproperty.go index 5dc9d6df7d..d34b52b773 100644 --- a/typedapi/types/integerrangeproperty.go +++ b/typedapi/types/integerrangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // IntegerRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/range.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/range.ts#L42-L44 type IntegerRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/intervals.go b/typedapi/types/intervals.go index 95cdee325d..5ad322ac2d 100644 --- a/typedapi/types/intervals.go +++ b/typedapi/types/intervals.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // Intervals type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L83-L112 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L83-L112 type Intervals struct { - AdditionalIntervalsProperty map[string]json.RawMessage `json:"-"` // AllOf Returns matches that span a combination of other rules. AllOf *IntervalsAllOf `json:"all_of,omitempty"` // AnyOf Returns intervals produced by any of its sub-rules. @@ -46,40 +40,9 @@ type Intervals struct { Wildcard *IntervalsWildcard `json:"wildcard,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s Intervals) MarshalJSON() ([]byte, error) { - type opt Intervals - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalIntervalsProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalIntervalsProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewIntervals returns a Intervals. func NewIntervals() *Intervals { - r := &Intervals{ - AdditionalIntervalsProperty: make(map[string]json.RawMessage), - } + r := &Intervals{} return r } diff --git a/typedapi/types/intervalsallof.go b/typedapi/types/intervalsallof.go index 60788f9c6f..c361f49ae0 100644 --- a/typedapi/types/intervalsallof.go +++ b/typedapi/types/intervalsallof.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IntervalsAllOf type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L50-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L50-L70 type IntervalsAllOf struct { // Filter Rule used to filter returned intervals. Filter *IntervalsFilter `json:"filter,omitempty"` diff --git a/typedapi/types/intervalsanyof.go b/typedapi/types/intervalsanyof.go index 06ec6a9628..e0c681bc22 100644 --- a/typedapi/types/intervalsanyof.go +++ b/typedapi/types/intervalsanyof.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IntervalsAnyOf type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L72-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L72-L81 type IntervalsAnyOf struct { // Filter Rule used to filter returned intervals. Filter *IntervalsFilter `json:"filter,omitempty"` diff --git a/typedapi/types/intervalsfilter.go b/typedapi/types/intervalsfilter.go index 359fc36b03..6070ebbd1c 100644 --- a/typedapi/types/intervalsfilter.go +++ b/typedapi/types/intervalsfilter.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // IntervalsFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L114-L154 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L114-L154 type IntervalsFilter struct { - AdditionalIntervalsFilterProperty map[string]json.RawMessage `json:"-"` // After Query used to return intervals that follow an interval from the `filter` // rule. After *Intervals `json:"after,omitempty"` @@ -59,40 +53,9 @@ type IntervalsFilter struct { Script *Script `json:"script,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s IntervalsFilter) MarshalJSON() ([]byte, error) { - type opt IntervalsFilter - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalIntervalsFilterProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalIntervalsFilterProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewIntervalsFilter returns a IntervalsFilter. func NewIntervalsFilter() *IntervalsFilter { - r := &IntervalsFilter{ - AdditionalIntervalsFilterProperty: make(map[string]json.RawMessage), - } + r := &IntervalsFilter{} return r } diff --git a/typedapi/types/intervalsfuzzy.go b/typedapi/types/intervalsfuzzy.go index 3c14878d9a..0a2b601467 100644 --- a/typedapi/types/intervalsfuzzy.go +++ b/typedapi/types/intervalsfuzzy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IntervalsFuzzy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L156-L186 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L156-L186 type IntervalsFuzzy struct { // Analyzer Analyzer used to normalize the term. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/intervalsmatch.go b/typedapi/types/intervalsmatch.go index 30e8300307..0571ff72df 100644 --- a/typedapi/types/intervalsmatch.go +++ b/typedapi/types/intervalsmatch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IntervalsMatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L188-L218 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L188-L218 type IntervalsMatch struct { // Analyzer Analyzer used to analyze terms in the query. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/intervalsprefix.go b/typedapi/types/intervalsprefix.go index 06d043453a..10c835b799 100644 --- a/typedapi/types/intervalsprefix.go +++ b/typedapi/types/intervalsprefix.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IntervalsPrefix type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L220-L235 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L220-L235 type IntervalsPrefix struct { // Analyzer Analyzer used to analyze the `prefix`. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/intervalsquery.go b/typedapi/types/intervalsquery.go index 0b0b9e7046..336e046b86 100644 --- a/typedapi/types/intervalsquery.go +++ b/typedapi/types/intervalsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,9 +31,8 @@ import ( // IntervalsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L283-L317 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L283-L317 type IntervalsQuery struct { - AdditionalIntervalsQueryProperty map[string]json.RawMessage `json:"-"` // AllOf Returns matches that span a combination of other rules. AllOf *IntervalsAllOf `json:"all_of,omitempty"` // AnyOf Returns intervals produced by any of its sub-rules. @@ -141,58 +140,14 @@ func (s *IntervalsQuery) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Wildcard", err) } - default: - - if key, ok := t.(string); ok { - if s.AdditionalIntervalsQueryProperty == nil { - s.AdditionalIntervalsQueryProperty = make(map[string]json.RawMessage, 0) - } - raw := new(json.RawMessage) - if err := dec.Decode(&raw); err != nil { - return fmt.Errorf("%s | %w", "AdditionalIntervalsQueryProperty", err) - } - s.AdditionalIntervalsQueryProperty[key] = *raw - } - } } return nil } -// MarhsalJSON overrides marshalling for types with additional properties -func (s IntervalsQuery) MarshalJSON() ([]byte, error) { - type opt IntervalsQuery - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalIntervalsQueryProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalIntervalsQueryProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewIntervalsQuery returns a IntervalsQuery. func NewIntervalsQuery() *IntervalsQuery { - r := &IntervalsQuery{ - AdditionalIntervalsQueryProperty: make(map[string]json.RawMessage), - } + r := &IntervalsQuery{} return r } diff --git a/typedapi/types/intervalsrange.go b/typedapi/types/intervalsrange.go index 4b0f52924f..680bc32215 100644 --- a/typedapi/types/intervalsrange.go +++ b/typedapi/types/intervalsrange.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IntervalsRange type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L237-L264 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L237-L264 type IntervalsRange struct { // Analyzer Analyzer used to analyze the `prefix`. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/intervalsregexp.go b/typedapi/types/intervalsregexp.go index 2e5652435e..1ce02e56ec 100644 --- a/typedapi/types/intervalsregexp.go +++ b/typedapi/types/intervalsregexp.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IntervalsRegexp type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L266-L281 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L266-L281 type IntervalsRegexp struct { // Analyzer Analyzer used to analyze the `prefix`. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/intervalswildcard.go b/typedapi/types/intervalswildcard.go index f37ac2510d..ccbdb7f8ce 100644 --- a/typedapi/types/intervalswildcard.go +++ b/typedapi/types/intervalswildcard.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IntervalsWildcard type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L319-L334 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L319-L334 type IntervalsWildcard struct { // Analyzer Analyzer used to analyze the `pattern`. // Defaults to the top-level field's analyzer. diff --git a/typedapi/types/invertedindex.go b/typedapi/types/invertedindex.go index 14f3e84301..5f8116924a 100644 --- a/typedapi/types/invertedindex.go +++ b/typedapi/types/invertedindex.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // InvertedIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L69-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L69-L77 type InvertedIndex struct { Offsets uint `json:"offsets"` Payloads uint `json:"payloads"` diff --git a/typedapi/types/invocation.go b/typedapi/types/invocation.go index 3b076804df..364e7510b1 100644 --- a/typedapi/types/invocation.go +++ b/typedapi/types/invocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Invocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/_types/SnapshotLifecycle.ts#L148-L151 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/_types/SnapshotLifecycle.ts#L148-L151 type Invocation struct { SnapshotName string `json:"snapshot_name"` Time DateTime `json:"time"` diff --git a/typedapi/types/invocations.go b/typedapi/types/invocations.go index e86601a3ad..ccd081761d 100644 --- a/typedapi/types/invocations.go +++ b/typedapi/types/invocations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Invocations type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L41-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L41-L43 type Invocations struct { Total int64 `json:"total"` } diff --git a/typedapi/types/iostatdevice.go b/typedapi/types/iostatdevice.go index ff74227c7e..e10e7033c8 100644 --- a/typedapi/types/iostatdevice.go +++ b/typedapi/types/iostatdevice.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IoStatDevice type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L803-L828 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L803-L828 type IoStatDevice struct { // DeviceName The Linux device name. DeviceName *string `json:"device_name,omitempty"` diff --git a/typedapi/types/iostats.go b/typedapi/types/iostats.go index 6d0e610e6a..cd93ea9642 100644 --- a/typedapi/types/iostats.go +++ b/typedapi/types/iostats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // IoStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L791-L801 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L791-L801 type IoStats struct { // Devices Array of disk metrics for each device that is backing an Elasticsearch data // path. diff --git a/typedapi/types/ipfilter.go b/typedapi/types/ipfilter.go index d20a28ae75..3efbc93cd2 100644 --- a/typedapi/types/ipfilter.go +++ b/typedapi/types/ipfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IpFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L177-L180 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L177-L180 type IpFilter struct { Http bool `json:"http"` Transport bool `json:"transport"` diff --git a/typedapi/types/ipinfo.go b/typedapi/types/ipinfo.go index 4507788479..4d8ded09d0 100644 --- a/typedapi/types/ipinfo.go +++ b/typedapi/types/ipinfo.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Ipinfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Database.ts#L59-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Database.ts#L59-L59 type Ipinfo struct { } diff --git a/typedapi/types/iplocationdatabaseconfigurationmetadata.go b/typedapi/types/iplocationdatabaseconfigurationmetadata.go index 96e8c52497..67fdd6b027 100644 --- a/typedapi/types/iplocationdatabaseconfigurationmetadata.go +++ b/typedapi/types/iplocationdatabaseconfigurationmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IpLocationDatabaseConfigurationMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L28-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L28-L34 type IpLocationDatabaseConfigurationMetadata struct { Database DatabaseConfigurationFull `json:"database"` Id string `json:"id"` diff --git a/typedapi/types/iplocationprocessor.go b/typedapi/types/iplocationprocessor.go index 7541afc152..31621a93d0 100644 --- a/typedapi/types/iplocationprocessor.go +++ b/typedapi/types/iplocationprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IpLocationProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L479-L513 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L483-L517 type IpLocationProcessor struct { // DatabaseFile The database filename referring to a database the module ships with // (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom diff --git a/typedapi/types/ipprefixaggregate.go b/typedapi/types/ipprefixaggregate.go index 665497eae3..9f22d07bf7 100644 --- a/typedapi/types/ipprefixaggregate.go +++ b/typedapi/types/ipprefixaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IpPrefixAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L711-L715 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L783-L787 type IpPrefixAggregate struct { Buckets BucketsIpPrefixBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/ipprefixaggregation.go b/typedapi/types/ipprefixaggregation.go index da624ef19e..240982bd1d 100644 --- a/typedapi/types/ipprefixaggregation.go +++ b/typedapi/types/ipprefixaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IpPrefixAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1196-L1225 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1225-L1254 type IpPrefixAggregation struct { // AppendPrefixLength Defines whether the prefix length is appended to IP address keys in the // response. diff --git a/typedapi/types/ipprefixbucket.go b/typedapi/types/ipprefixbucket.go index af652695cd..42076a2b95 100644 --- a/typedapi/types/ipprefixbucket.go +++ b/typedapi/types/ipprefixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // IpPrefixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L717-L722 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L789-L794 type IpPrefixBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -249,6 +249,13 @@ func (s *IpPrefixBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -277,6 +284,20 @@ func (s *IpPrefixBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/ipproperty.go b/typedapi/types/ipproperty.go index 5c9c58e4f4..f7b0796ea0 100644 --- a/typedapi/types/ipproperty.go +++ b/typedapi/types/ipproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // IpProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L74-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L75-L89 type IpProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/iprangeaggregate.go b/typedapi/types/iprangeaggregate.go index a713870818..af7e0cfdfe 100644 --- a/typedapi/types/iprangeaggregate.go +++ b/typedapi/types/iprangeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IpRangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L624-L629 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L696-L701 type IpRangeAggregate struct { Buckets BucketsIpRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/iprangeaggregation.go b/typedapi/types/iprangeaggregation.go index 7442bc03b9..f01974c603 100644 --- a/typedapi/types/iprangeaggregation.go +++ b/typedapi/types/iprangeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // IpRangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L567-L576 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L570-L579 type IpRangeAggregation struct { // Field The date field whose values are used to build ranges. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/iprangeaggregationrange.go b/typedapi/types/iprangeaggregationrange.go index 3d6450730a..1731e8873d 100644 --- a/typedapi/types/iprangeaggregationrange.go +++ b/typedapi/types/iprangeaggregationrange.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IpRangeAggregationRange type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L578-L591 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L581-L594 type IpRangeAggregationRange struct { // From Start of the range. From *string `json:"from,omitempty"` diff --git a/typedapi/types/iprangebucket.go b/typedapi/types/iprangebucket.go index 980a5b5508..a5e83e77e7 100644 --- a/typedapi/types/iprangebucket.go +++ b/typedapi/types/iprangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // IpRangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L631-L635 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L703-L707 type IpRangeBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -230,6 +230,13 @@ func (s *IpRangeBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -258,6 +265,20 @@ func (s *IpRangeBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/iprangeproperty.go b/typedapi/types/iprangeproperty.go index e88f207dce..f0686b83e5 100644 --- a/typedapi/types/iprangeproperty.go +++ b/typedapi/types/iprangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // IpRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/range.ts#L46-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/range.ts#L46-L48 type IpRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/irishanalyzer.go b/typedapi/types/irishanalyzer.go index b3d7bd0f4d..44a648c088 100644 --- a/typedapi/types/irishanalyzer.go +++ b/typedapi/types/irishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // IrishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L220-L225 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L220-L225 type IrishAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/italiananalyzer.go b/typedapi/types/italiananalyzer.go index a175a8fa63..2da6a1ecb1 100644 --- a/typedapi/types/italiananalyzer.go +++ b/typedapi/types/italiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ItalianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L227-L232 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L227-L232 type ItalianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/jastoptokenfilter.go b/typedapi/types/jastoptokenfilter.go index ced70c596d..1ce359fe66 100644 --- a/typedapi/types/jastoptokenfilter.go +++ b/typedapi/types/jastoptokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // JaStopTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/kuromoji-plugin.ts#L32-L35 type JaStopTokenFilter struct { Stopwords StopWords `json:"stopwords,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/jinaaiservicesettings.go b/typedapi/types/jinaaiservicesettings.go index c9f099fb03..95674ad3e0 100644 --- a/typedapi/types/jinaaiservicesettings.go +++ b/typedapi/types/jinaaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // JinaAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1439-L1468 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1615-L1644 type JinaAIServiceSettings struct { // ApiKey A valid API key of your JinaAI account. // diff --git a/typedapi/types/jinaaitasksettings.go b/typedapi/types/jinaaitasksettings.go index 1f04cc5a89..b0c0c7861b 100644 --- a/typedapi/types/jinaaitasksettings.go +++ b/typedapi/types/jinaaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // JinaAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1470-L1491 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1646-L1667 type JinaAITaskSettings struct { // ReturnDocuments For a `rerank` task, return the doc text within the results. ReturnDocuments *bool `json:"return_documents,omitempty"` diff --git a/typedapi/types/job.go b/typedapi/types/job.go index 7f235e50ae..2a6ecb8e01 100644 --- a/typedapi/types/job.go +++ b/typedapi/types/job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Job type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L61-L180 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L61-L180 type Job struct { // AllowLazyOpen Advanced configuration option. // Specifies whether this job can open when there is insufficient machine diff --git a/typedapi/types/jobblocked.go b/typedapi/types/jobblocked.go index ae287d9109..de3959163d 100644 --- a/typedapi/types/jobblocked.go +++ b/typedapi/types/jobblocked.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // JobBlocked type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L392-L395 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L394-L397 type JobBlocked struct { Reason jobblockedreason.JobBlockedReason `json:"reason"` TaskId *string `json:"task_id,omitempty"` diff --git a/typedapi/types/jobconfig.go b/typedapi/types/jobconfig.go index 71c763ad95..a7c11e4fec 100644 --- a/typedapi/types/jobconfig.go +++ b/typedapi/types/jobconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JobConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L182-L283 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L182-L285 type JobConfig struct { // AllowLazyOpen Advanced configuration option. Specifies whether this job can open when there // is insufficient machine learning node capacity for it to be immediately diff --git a/typedapi/types/jobforecaststatistics.go b/typedapi/types/jobforecaststatistics.go index bea44cba53..cb05bc5822 100644 --- a/typedapi/types/jobforecaststatistics.go +++ b/typedapi/types/jobforecaststatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JobForecastStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L343-L350 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L345-L352 type JobForecastStatistics struct { ForecastedJobs int `json:"forecasted_jobs"` MemoryBytes *JobStatistics `json:"memory_bytes,omitempty"` diff --git a/typedapi/types/jobsrecord.go b/typedapi/types/jobsrecord.go index 9c299f6cf5..7ebbdc30d8 100644 --- a/typedapi/types/jobsrecord.go +++ b/typedapi/types/jobsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // JobsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_jobs/types.ts#L24-L347 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/ml_jobs/types.ts#L24-L347 type JobsRecord struct { // AssignmentExplanation For open anomaly detection jobs only, contains messages relating to the // selection of a node to run the job. diff --git a/typedapi/types/jobstatistics.go b/typedapi/types/jobstatistics.go index 8ef5b3cbe8..f5740adef2 100644 --- a/typedapi/types/jobstatistics.go +++ b/typedapi/types/jobstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JobStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L54-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L54-L59 type JobStatistics struct { Avg Float64 `json:"avg"` Max Float64 `json:"max"` diff --git a/typedapi/types/jobstats.go b/typedapi/types/jobstats.go index e03c45405c..10e2ffa18f 100644 --- a/typedapi/types/jobstats.go +++ b/typedapi/types/jobstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // JobStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L284-L330 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L286-L332 type JobStats struct { // AssignmentExplanation For open anomaly detection jobs only, contains messages relating to the // selection of a node to run the job. diff --git a/typedapi/types/jobtimingstats.go b/typedapi/types/jobtimingstats.go index 073ba3b8d0..33def8083b 100644 --- a/typedapi/types/jobtimingstats.go +++ b/typedapi/types/jobtimingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JobTimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L332-L341 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Job.ts#L334-L343 type JobTimingStats struct { AverageBucketProcessingTimeMs Float64 `json:"average_bucket_processing_time_ms,omitempty"` BucketCount int64 `json:"bucket_count"` diff --git a/typedapi/types/jobusage.go b/typedapi/types/jobusage.go index 4aadb74db6..4f02c86b2b 100644 --- a/typedapi/types/jobusage.go +++ b/typedapi/types/jobusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JobUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L370-L376 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L403-L409 type JobUsage struct { Count int `json:"count"` CreatedBy map[string]int64 `json:"created_by"` diff --git a/typedapi/types/joinprocessor.go b/typedapi/types/joinprocessor.go index 718208ed7c..1b7e9d1185 100644 --- a/typedapi/types/joinprocessor.go +++ b/typedapi/types/joinprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JoinProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1122-L1137 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1126-L1141 type JoinProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/joinproperty.go b/typedapi/types/joinproperty.go index b7b746d187..b934a30bff 100644 --- a/typedapi/types/joinproperty.go +++ b/typedapi/types/joinproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // JoinProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L103-L107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L104-L108 type JoinProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` EagerGlobalOrdinals *bool `json:"eager_global_ordinals,omitempty"` diff --git a/typedapi/types/jsonprocessor.go b/typedapi/types/jsonprocessor.go index a54a0c2daf..eec02ee472 100644 --- a/typedapi/types/jsonprocessor.go +++ b/typedapi/types/jsonprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // JsonProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1139-L1168 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1143-L1172 type JsonProcessor struct { // AddToRoot Flag that forces the parsed JSON to be added at the top level of the // document. diff --git a/typedapi/types/jvm.go b/typedapi/types/jvm.go index a26134268e..ae3fa7b5d0 100644 --- a/typedapi/types/jvm.go +++ b/typedapi/types/jvm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Jvm type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L884-L918 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L884-L918 type Jvm struct { // BufferPools Contains statistics about JVM buffer pools for the node. BufferPools map[string]NodeBufferPool `json:"buffer_pools,omitempty"` diff --git a/typedapi/types/jvmclasses.go b/typedapi/types/jvmclasses.go index 86d7b30338..6a962cf5ce 100644 --- a/typedapi/types/jvmclasses.go +++ b/typedapi/types/jvmclasses.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JvmClasses type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L986-L999 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L986-L999 type JvmClasses struct { // CurrentLoadedCount Number of classes currently loaded by JVM. CurrentLoadedCount *int64 `json:"current_loaded_count,omitempty"` diff --git a/typedapi/types/jvmmemorystats.go b/typedapi/types/jvmmemorystats.go index 997072d8d1..14e748dd5d 100644 --- a/typedapi/types/jvmmemorystats.go +++ b/typedapi/types/jvmmemorystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JvmMemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L920-L954 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L920-L954 type JvmMemoryStats struct { // HeapCommittedInBytes Amount of memory, in bytes, available for use by the heap. HeapCommittedInBytes *int64 `json:"heap_committed_in_bytes,omitempty"` diff --git a/typedapi/types/jvmstats.go b/typedapi/types/jvmstats.go index 5f365ab922..d59f31e0ec 100644 --- a/typedapi/types/jvmstats.go +++ b/typedapi/types/jvmstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JvmStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_memory_stats/types.ts#L50-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_memory_stats/types.ts#L50-L63 type JvmStats struct { // HeapMax Maximum amount of memory available for use by the heap. HeapMax ByteSize `json:"heap_max,omitempty"` diff --git a/typedapi/types/jvmthreads.go b/typedapi/types/jvmthreads.go index 59c20f2ef5..b0c31468ca 100644 --- a/typedapi/types/jvmthreads.go +++ b/typedapi/types/jvmthreads.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // JvmThreads type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L975-L984 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L975-L984 type JvmThreads struct { // Count Number of active threads in use by JVM. Count *int64 `json:"count,omitempty"` diff --git a/typedapi/types/keeptypestokenfilter.go b/typedapi/types/keeptypestokenfilter.go index 89f334d968..00da9710d9 100644 --- a/typedapi/types/keeptypestokenfilter.go +++ b/typedapi/types/keeptypestokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // KeepTypesTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L287-L293 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L312-L318 type KeepTypesTokenFilter struct { // Mode Indicates whether to keep or remove the specified token types. Mode *keeptypesmode.KeepTypesMode `json:"mode,omitempty"` diff --git a/typedapi/types/keepwordstokenfilter.go b/typedapi/types/keepwordstokenfilter.go index d8d2c9cf2f..90eb5657fb 100644 --- a/typedapi/types/keepwordstokenfilter.go +++ b/typedapi/types/keepwordstokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KeepWordsTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L295-L306 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L320-L335 type KeepWordsTokenFilter struct { // KeepWords List of words to keep. Only tokens that match words in this list are included // in the output. diff --git a/typedapi/types/keyedpercentiles.go b/typedapi/types/keyedpercentiles.go index 8e91065994..ca939524f3 100644 --- a/typedapi/types/keyedpercentiles.go +++ b/typedapi/types/keyedpercentiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // KeyedPercentiles type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L160-L160 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L165-L165 type KeyedPercentiles map[string]string func (s KeyedPercentiles) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/keyedprocessor.go b/typedapi/types/keyedprocessor.go index 9753c57390..75cfa29af9 100644 --- a/typedapi/types/keyedprocessor.go +++ b/typedapi/types/keyedprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KeyedProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L417-L420 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L417-L420 type KeyedProcessor struct { Stats *Processor `json:"stats,omitempty"` Type *string `json:"type,omitempty"` diff --git a/typedapi/types/keyvalueprocessor.go b/typedapi/types/keyvalueprocessor.go index 8de5dc37f0..d2da8e5c91 100644 --- a/typedapi/types/keyvalueprocessor.go +++ b/typedapi/types/keyvalueprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KeyValueProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1177-L1229 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1181-L1233 type KeyValueProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/keywordanalyzer.go b/typedapi/types/keywordanalyzer.go index fcfc7e404a..cacc3e2fa2 100644 --- a/typedapi/types/keywordanalyzer.go +++ b/typedapi/types/keywordanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // KeywordAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L66-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L66-L70 type KeywordAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/keywordmarkertokenfilter.go b/typedapi/types/keywordmarkertokenfilter.go index de654692a9..fe6f9dabc1 100644 --- a/typedapi/types/keywordmarkertokenfilter.go +++ b/typedapi/types/keywordmarkertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KeywordMarkerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L308-L322 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L337-L357 type KeywordMarkerTokenFilter struct { // IgnoreCase If `true`, matching for the `keywords` and `keywords_path` parameters ignores // letter case. Defaults to `false`. diff --git a/typedapi/types/keywordproperty.go b/typedapi/types/keywordproperty.go index 6586755d98..83eb980678 100644 --- a/typedapi/types/keywordproperty.go +++ b/typedapi/types/keywordproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // KeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L109-L128 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L110-L129 type KeywordProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/keywordrepeattokenfilter.go b/typedapi/types/keywordrepeattokenfilter.go index 01fb646140..c739d7c66d 100644 --- a/typedapi/types/keywordrepeattokenfilter.go +++ b/typedapi/types/keywordrepeattokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // KeywordRepeatTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L510-L512 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L545-L547 type KeywordRepeatTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/keywordtokenizer.go b/typedapi/types/keywordtokenizer.go index 9a9971844b..31880a014c 100644 --- a/typedapi/types/keywordtokenizer.go +++ b/typedapi/types/keywordtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KeywordTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L69-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L69-L75 type KeywordTokenizer struct { BufferSize *int `json:"buffer_size,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/kibanatoken.go b/typedapi/types/kibanatoken.go index 3a10c3769f..de079a2975 100644 --- a/typedapi/types/kibanatoken.go +++ b/typedapi/types/kibanatoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KibanaToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/enroll_kibana/Response.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/enroll_kibana/Response.ts#L31-L41 type KibanaToken struct { // Name The name of the bearer token for the `elastic/kibana` service account. Name string `json:"name"` diff --git a/typedapi/types/knncollectorresult.go b/typedapi/types/knncollectorresult.go index c30b43a869..85d493aab0 100644 --- a/typedapi/types/knncollectorresult.go +++ b/typedapi/types/knncollectorresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KnnCollectorResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L222-L228 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L222-L228 type KnnCollectorResult struct { Children []KnnCollectorResult `json:"children,omitempty"` Name string `json:"name"` diff --git a/typedapi/types/knnquery.go b/typedapi/types/knnquery.go index 9e9b871088..d62d79ccf9 100644 --- a/typedapi/types/knnquery.go +++ b/typedapi/types/knnquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KnnQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Knn.ts#L64-L87 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Knn.ts#L71-L101 type KnnQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -57,6 +57,9 @@ type KnnQuery struct { RescoreVector *RescoreVector `json:"rescore_vector,omitempty"` // Similarity The minimum similarity for a vector to be considered a match Similarity *float32 `json:"similarity,omitempty"` + // VisitPercentage The percentage of vectors to explore per shard while doing knn search with + // bbq_disk + VisitPercentage *float32 `json:"visit_percentage,omitempty"` } func (s *KnnQuery) UnmarshalJSON(data []byte) error { @@ -186,6 +189,22 @@ func (s *KnnQuery) UnmarshalJSON(data []byte) error { s.Similarity = &f } + case "visit_percentage": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 32) + if err != nil { + return fmt.Errorf("%s | %w", "VisitPercentage", err) + } + f := float32(value) + s.VisitPercentage = &f + case float64: + f := float32(v) + s.VisitPercentage = &f + } + } } return nil diff --git a/typedapi/types/knnqueryprofilebreakdown.go b/typedapi/types/knnqueryprofilebreakdown.go index 63d6d56d77..cff7c13ef3 100644 --- a/typedapi/types/knnqueryprofilebreakdown.go +++ b/typedapi/types/knnqueryprofilebreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KnnQueryProfileBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L199-L220 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L199-L220 type KnnQueryProfileBreakdown struct { Advance int64 `json:"advance"` AdvanceCount int64 `json:"advance_count"` diff --git a/typedapi/types/knnqueryprofileresult.go b/typedapi/types/knnqueryprofileresult.go index 2cffc2f487..1317cac01e 100644 --- a/typedapi/types/knnqueryprofileresult.go +++ b/typedapi/types/knnqueryprofileresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KnnQueryProfileResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L188-L196 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L188-L196 type KnnQueryProfileResult struct { Breakdown KnnQueryProfileBreakdown `json:"breakdown"` Children []KnnQueryProfileResult `json:"children,omitempty"` diff --git a/typedapi/types/knnretriever.go b/typedapi/types/knnretriever.go index a59cdb9ace..46beb26286 100644 --- a/typedapi/types/knnretriever.go +++ b/typedapi/types/knnretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KnnRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L115-L133 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L116-L141 type KnnRetriever struct { // Field The name of the vector field to search against. Field string `json:"field"` @@ -56,6 +56,9 @@ type KnnRetriever struct { RescoreVector *RescoreVector `json:"rescore_vector,omitempty"` // Similarity The minimum similarity required for a document to be considered a match. Similarity *float32 `json:"similarity,omitempty"` + // VisitPercentage The percentage of vectors to explore per shard while doing knn search with + // bbq_disk + VisitPercentage *float32 `json:"visit_percentage,omitempty"` } func (s *KnnRetriever) UnmarshalJSON(data []byte) error { @@ -192,6 +195,22 @@ func (s *KnnRetriever) UnmarshalJSON(data []byte) error { s.Similarity = &f } + case "visit_percentage": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 32) + if err != nil { + return fmt.Errorf("%s | %w", "VisitPercentage", err) + } + f := float32(value) + s.VisitPercentage = &f + case float64: + f := float32(v) + s.VisitPercentage = &f + } + } } return nil diff --git a/typedapi/types/knnsearch.go b/typedapi/types/knnsearch.go index e6f05a1f55..11fa14ab35 100644 --- a/typedapi/types/knnsearch.go +++ b/typedapi/types/knnsearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KnnSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Knn.ts#L35-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Knn.ts#L35-L69 type KnnSearch struct { // Boost Boost value to apply to kNN scores Boost *float32 `json:"boost,omitempty"` @@ -54,6 +54,9 @@ type KnnSearch struct { RescoreVector *RescoreVector `json:"rescore_vector,omitempty"` // Similarity The minimum similarity for a vector to be considered a match Similarity *float32 `json:"similarity,omitempty"` + // VisitPercentage The percentage of vectors to explore per shard while doing knn search with + // bbq_disk + VisitPercentage *float32 `json:"visit_percentage,omitempty"` } func (s *KnnSearch) UnmarshalJSON(data []byte) error { @@ -176,6 +179,22 @@ func (s *KnnSearch) UnmarshalJSON(data []byte) error { s.Similarity = &f } + case "visit_percentage": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 32) + if err != nil { + return fmt.Errorf("%s | %w", "VisitPercentage", err) + } + f := float32(value) + s.VisitPercentage = &f + case float64: + f := float32(v) + s.VisitPercentage = &f + } + } } return nil diff --git a/typedapi/types/knnsearchquery.go b/typedapi/types/knnsearchquery.go new file mode 100644 index 0000000000..1010670910 --- /dev/null +++ b/typedapi/types/knnsearchquery.go @@ -0,0 +1,121 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// KnnSearchQuery type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/knn_search/_types/Knn.ts#L24-L33 +type KnnSearchQuery struct { + // Field The name of the vector field to search against + Field string `json:"field"` + // K The final number of nearest neighbors to return as top hits + K int `json:"k"` + // NumCandidates The number of nearest neighbor candidates to consider per shard + NumCandidates int `json:"num_candidates"` + // QueryVector The query vector + QueryVector []float32 `json:"query_vector"` +} + +func (s *KnnSearchQuery) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "field": + if err := dec.Decode(&s.Field); err != nil { + return fmt.Errorf("%s | %w", "Field", err) + } + + case "k": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "K", err) + } + s.K = value + case float64: + f := int(v) + s.K = f + } + + case "num_candidates": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "NumCandidates", err) + } + s.NumCandidates = value + case float64: + f := int(v) + s.NumCandidates = f + } + + case "query_vector": + if err := dec.Decode(&s.QueryVector); err != nil { + return fmt.Errorf("%s | %w", "QueryVector", err) + } + + } + } + return nil +} + +// NewKnnSearchQuery returns a KnnSearchQuery. +func NewKnnSearchQuery() *KnnSearchQuery { + r := &KnnSearchQuery{} + + return r +} + +type KnnSearchQueryVariant interface { + KnnSearchQueryCaster() *KnnSearchQuery +} + +func (s *KnnSearchQuery) KnnSearchQueryCaster() *KnnSearchQuery { + return s +} diff --git a/typedapi/types/kstemtokenfilter.go b/typedapi/types/kstemtokenfilter.go index 67bac279d2..1c674dce50 100644 --- a/typedapi/types/kstemtokenfilter.go +++ b/typedapi/types/kstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // KStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L324-L326 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L359-L361 type KStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/kuromojianalyzer.go b/typedapi/types/kuromojianalyzer.go index 594015677d..d7cb53d146 100644 --- a/typedapi/types/kuromojianalyzer.go +++ b/typedapi/types/kuromojianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,11 +33,11 @@ import ( // KuromojiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L26-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/kuromoji-plugin.ts#L26-L30 type KuromojiAnalyzer struct { - Mode kuromojitokenizationmode.KuromojiTokenizationMode `json:"mode"` - Type string `json:"type,omitempty"` - UserDictionary *string `json:"user_dictionary,omitempty"` + Mode *kuromojitokenizationmode.KuromojiTokenizationMode `json:"mode,omitempty"` + Type string `json:"type,omitempty"` + UserDictionary *string `json:"user_dictionary,omitempty"` } func (s *KuromojiAnalyzer) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/kuromojiiterationmarkcharfilter.go b/typedapi/types/kuromojiiterationmarkcharfilter.go index 416c71311e..fc8ea8f19b 100644 --- a/typedapi/types/kuromojiiterationmarkcharfilter.go +++ b/typedapi/types/kuromojiiterationmarkcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KuromojiIterationMarkCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L37-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/kuromoji-plugin.ts#L37-L41 type KuromojiIterationMarkCharFilter struct { NormalizeKana bool `json:"normalize_kana"` NormalizeKanji bool `json:"normalize_kanji"` diff --git a/typedapi/types/kuromojipartofspeechtokenfilter.go b/typedapi/types/kuromojipartofspeechtokenfilter.go index 44aae178ba..591069a151 100644 --- a/typedapi/types/kuromojipartofspeechtokenfilter.go +++ b/typedapi/types/kuromojipartofspeechtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // KuromojiPartOfSpeechTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/kuromoji-plugin.ts#L43-L46 type KuromojiPartOfSpeechTokenFilter struct { Stoptags []string `json:"stoptags"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/kuromojireadingformtokenfilter.go b/typedapi/types/kuromojireadingformtokenfilter.go index 7bd4948ae6..f825ae36d7 100644 --- a/typedapi/types/kuromojireadingformtokenfilter.go +++ b/typedapi/types/kuromojireadingformtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KuromojiReadingFormTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L48-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/kuromoji-plugin.ts#L48-L51 type KuromojiReadingFormTokenFilter struct { Type string `json:"type,omitempty"` UseRomaji bool `json:"use_romaji"` diff --git a/typedapi/types/kuromojistemmertokenfilter.go b/typedapi/types/kuromojistemmertokenfilter.go index a6f04b94a8..a4da155f55 100644 --- a/typedapi/types/kuromojistemmertokenfilter.go +++ b/typedapi/types/kuromojistemmertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // KuromojiStemmerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L53-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/kuromoji-plugin.ts#L53-L56 type KuromojiStemmerTokenFilter struct { MinimumLength int `json:"minimum_length"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/kuromojitokenizer.go b/typedapi/types/kuromojitokenizer.go index 3ff69fbe8a..675de011f9 100644 --- a/typedapi/types/kuromojitokenizer.go +++ b/typedapi/types/kuromojitokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // KuromojiTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L64-L73 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/kuromoji-plugin.ts#L64-L73 type KuromojiTokenizer struct { DiscardCompoundToken *bool `json:"discard_compound_token,omitempty"` DiscardPunctuation *bool `json:"discard_punctuation,omitempty"` diff --git a/typedapi/types/languagecontext.go b/typedapi/types/languagecontext.go index ae5b984cb4..c038032b92 100644 --- a/typedapi/types/languagecontext.go +++ b/typedapi/types/languagecontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // LanguageContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get_script_languages/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/get_script_languages/types.ts#L22-L25 type LanguageContext struct { Contexts []string `json:"contexts"` Language scriptlanguage.ScriptLanguage `json:"language"` diff --git a/typedapi/types/laplacesmoothingmodel.go b/typedapi/types/laplacesmoothingmodel.go index 8d7792bdc3..35e2283c0c 100644 --- a/typedapi/types/laplacesmoothingmodel.go +++ b/typedapi/types/laplacesmoothingmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LaplaceSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L431-L436 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L432-L437 type LaplaceSmoothingModel struct { // Alpha A constant that is added to all counts to balance weights. Alpha Float64 `json:"alpha"` diff --git a/typedapi/types/latest.go b/typedapi/types/latest.go index 31bf4f78db..3a6ebe6d3a 100644 --- a/typedapi/types/latest.go +++ b/typedapi/types/latest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Latest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L47-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L47-L52 type Latest struct { // Sort Specifies the date field that is used to identify the latest documents. Sort string `json:"sort"` diff --git a/typedapi/types/latlongeolocation.go b/typedapi/types/latlongeolocation.go index a37699a4ba..87c42379b9 100644 --- a/typedapi/types/latlongeolocation.go +++ b/typedapi/types/latlongeolocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LatLonGeoLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L120-L129 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L114-L123 type LatLonGeoLocation struct { // Lat Latitude Lat Float64 `json:"lat"` diff --git a/typedapi/types/latviananalyzer.go b/typedapi/types/latviananalyzer.go index f615c1ce67..9036f8e53e 100644 --- a/typedapi/types/latviananalyzer.go +++ b/typedapi/types/latviananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LatvianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L234-L239 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L234-L239 type LatvianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/learningtorank.go b/typedapi/types/learningtorank.go index e68ff7528a..f041bd838b 100644 --- a/typedapi/types/learningtorank.go +++ b/typedapi/types/learningtorank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LearningToRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/rescoring.ts#L88-L97 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/rescoring.ts#L91-L100 type LearningToRank struct { // ModelId The unique identifier of the trained model uploaded to Elasticsearch ModelId string `json:"model_id"` diff --git a/typedapi/types/learningtorankconfig.go b/typedapi/types/learningtorankconfig.go index 63d0813e7e..cdb374cb87 100644 --- a/typedapi/types/learningtorankconfig.go +++ b/typedapi/types/learningtorankconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LearningToRankConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L87-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L87-L91 type LearningToRankConfig struct { DefaultParams map[string]json.RawMessage `json:"default_params,omitempty"` FeatureExtractors []map[string]QueryFeatureExtractor `json:"feature_extractors,omitempty"` diff --git a/typedapi/types/lengthtokenfilter.go b/typedapi/types/lengthtokenfilter.go index 19f48222f3..8a87d111ef 100644 --- a/typedapi/types/lengthtokenfilter.go +++ b/typedapi/types/lengthtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LengthTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L328-L334 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L363-L369 type LengthTokenFilter struct { // Max Maximum character length of a token. Longer tokens are excluded from the // output. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`. diff --git a/typedapi/types/lessthanvalidation.go b/typedapi/types/lessthanvalidation.go index 796d87d8aa..21c047dc58 100644 --- a/typedapi/types/lessthanvalidation.go +++ b/typedapi/types/lessthanvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LessThanValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L58-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L58-L61 type LessThanValidation struct { Constraint Float64 `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/lettertokenizer.go b/typedapi/types/lettertokenizer.go index 2ad6ad698a..c8d1e5bf29 100644 --- a/typedapi/types/lettertokenizer.go +++ b/typedapi/types/lettertokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // LetterTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L77-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L77-L79 type LetterTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/license.go b/typedapi/types/license.go index d15b82b7e2..13afbce3ee 100644 --- a/typedapi/types/license.go +++ b/typedapi/types/license.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // License type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/_types/License.ts#L42-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/_types/License.ts#L42-L53 type License struct { ExpiryDateInMillis int64 `json:"expiry_date_in_millis"` IssueDateInMillis int64 `json:"issue_date_in_millis"` diff --git a/typedapi/types/licenseinformation.go b/typedapi/types/licenseinformation.go index 9f364abc5d..ccd81bd9ee 100644 --- a/typedapi/types/licenseinformation.go +++ b/typedapi/types/licenseinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // LicenseInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/get/types.ts#L25-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/license/get/types.ts#L25-L38 type LicenseInformation struct { ExpiryDate DateTime `json:"expiry_date,omitempty"` ExpiryDateInMillis *int64 `json:"expiry_date_in_millis,omitempty"` diff --git a/typedapi/types/lifecycle.go b/typedapi/types/lifecycle.go index 8d593ceb85..f54dc96fda 100644 --- a/typedapi/types/lifecycle.go +++ b/typedapi/types/lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Lifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/get_lifecycle/types.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/get_lifecycle/types.ts#L24-L28 type Lifecycle struct { ModifiedDate DateTime `json:"modified_date"` Policy IlmPolicy `json:"policy"` diff --git a/typedapi/types/lifecycleexplain.go b/typedapi/types/lifecycleexplain.go index 7b8363db9b..27a2f414bf 100644 --- a/typedapi/types/lifecycleexplain.go +++ b/typedapi/types/lifecycleexplain.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // LifecycleExplainManaged // LifecycleExplainUnmanaged // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/explain_lifecycle/types.ts#L65-L68 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/explain_lifecycle/types.ts#L75-L78 type LifecycleExplain any diff --git a/typedapi/types/lifecycleexplainmanaged.go b/typedapi/types/lifecycleexplainmanaged.go index 170e18eaaf..4967387a8c 100644 --- a/typedapi/types/lifecycleexplainmanaged.go +++ b/typedapi/types/lifecycleexplainmanaged.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,12 +31,13 @@ import ( // LifecycleExplainManaged type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/explain_lifecycle/types.ts#L27-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/explain_lifecycle/types.ts#L33-L68 type LifecycleExplainManaged struct { Action *string `json:"action,omitempty"` ActionTime DateTime `json:"action_time,omitempty"` ActionTimeMillis *int64 `json:"action_time_millis,omitempty"` Age Duration `json:"age,omitempty"` + AgeInMillis *int64 `json:"age_in_millis,omitempty"` FailedStep *string `json:"failed_step,omitempty"` FailedStepRetryCount *int `json:"failed_step_retry_count,omitempty"` Index string `json:"index"` @@ -98,6 +99,11 @@ func (s *LifecycleExplainManaged) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Age", err) } + case "age_in_millis": + if err := dec.Decode(&s.AgeInMillis); err != nil { + return fmt.Errorf("%s | %w", "AgeInMillis", err) + } + case "failed_step": if err := dec.Decode(&s.FailedStep); err != nil { return fmt.Errorf("%s | %w", "FailedStep", err) @@ -287,6 +293,7 @@ func (s LifecycleExplainManaged) MarshalJSON() ([]byte, error) { ActionTime: s.ActionTime, ActionTimeMillis: s.ActionTimeMillis, Age: s.Age, + AgeInMillis: s.AgeInMillis, FailedStep: s.FailedStep, FailedStepRetryCount: s.FailedStepRetryCount, Index: s.Index, diff --git a/typedapi/types/lifecycleexplainphaseexecution.go b/typedapi/types/lifecycleexplainphaseexecution.go index 6975e0cc4b..c1a643f7bf 100644 --- a/typedapi/types/lifecycleexplainphaseexecution.go +++ b/typedapi/types/lifecycleexplainphaseexecution.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // LifecycleExplainPhaseExecution type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/explain_lifecycle/types.ts#L70-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/explain_lifecycle/types.ts#L80-L85 type LifecycleExplainPhaseExecution struct { ModifiedDateInMillis int64 `json:"modified_date_in_millis"` PhaseDefinition *Phase `json:"phase_definition,omitempty"` diff --git a/typedapi/types/lifecycleexplainunmanaged.go b/typedapi/types/lifecycleexplainunmanaged.go index 1798f80b62..bd6f2dfc1d 100644 --- a/typedapi/types/lifecycleexplainunmanaged.go +++ b/typedapi/types/lifecycleexplainunmanaged.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // LifecycleExplainUnmanaged type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/explain_lifecycle/types.ts#L60-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/explain_lifecycle/types.ts#L70-L73 type LifecycleExplainUnmanaged struct { Index string `json:"index"` Managed bool `json:"managed,omitempty"` diff --git a/typedapi/types/like.go b/typedapi/types/like.go index 504521ce5f..42294706a7 100644 --- a/typedapi/types/like.go +++ b/typedapi/types/like.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // LikeDocument // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L198-L203 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L198-L203 type Like any type LikeVariant interface { diff --git a/typedapi/types/likedocument.go b/typedapi/types/likedocument.go index f041439c1e..fe4b8535cb 100644 --- a/typedapi/types/likedocument.go +++ b/typedapi/types/likedocument.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // LikeDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L174-L196 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L174-L196 type LikeDocument struct { // Doc A document not present in the index. Doc json.RawMessage `json:"doc,omitempty"` @@ -43,7 +43,7 @@ type LikeDocument struct { Index_ *string `json:"_index,omitempty"` // PerFieldAnalyzer Overrides the default analyzer. PerFieldAnalyzer map[string]string `json:"per_field_analyzer,omitempty"` - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` Version *int64 `json:"version,omitempty"` VersionType *versiontype.VersionType `json:"version_type,omitempty"` } @@ -92,8 +92,19 @@ func (s *LikeDocument) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "version": diff --git a/typedapi/types/limits.go b/typedapi/types/limits.go index d28ef5e4c6..08900031fc 100644 --- a/typedapi/types/limits.go +++ b/typedapi/types/limits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Limits type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/info/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/info/types.ts#L34-L40 type Limits struct { EffectiveMaxModelMemoryLimit ByteSize `json:"effective_max_model_memory_limit,omitempty"` MaxModelMemoryLimit ByteSize `json:"max_model_memory_limit,omitempty"` diff --git a/typedapi/types/limittokencounttokenfilter.go b/typedapi/types/limittokencounttokenfilter.go index 45a945c32f..ca6c561081 100644 --- a/typedapi/types/limittokencounttokenfilter.go +++ b/typedapi/types/limittokencounttokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LimitTokenCountTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L336-L342 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L371-L377 type LimitTokenCountTokenFilter struct { // ConsumeAllTokens If `true`, the limit filter exhausts the token stream, even if the // `max_token_count` has already been reached. Defaults to `false`. diff --git a/typedapi/types/linearinterpolationsmoothingmodel.go b/typedapi/types/linearinterpolationsmoothingmodel.go index 56bfe040ff..8965233b45 100644 --- a/typedapi/types/linearinterpolationsmoothingmodel.go +++ b/typedapi/types/linearinterpolationsmoothingmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LinearInterpolationSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L438-L442 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L439-L443 type LinearInterpolationSmoothingModel struct { BigramLambda Float64 `json:"bigram_lambda"` TrigramLambda Float64 `json:"trigram_lambda"` diff --git a/typedapi/types/linearmovingaverageaggregation.go b/typedapi/types/linearmovingaverageaggregation.go index 2f1959252e..a32c042424 100644 --- a/typedapi/types/linearmovingaverageaggregation.go +++ b/typedapi/types/linearmovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // LinearMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L268-L271 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L270-L273 type LinearMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/linearretriever.go b/typedapi/types/linearretriever.go index 4b455fc150..4c13e2f56b 100644 --- a/typedapi/types/linearretriever.go +++ b/typedapi/types/linearretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // LinearRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L68-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L69-L76 type LinearRetriever struct { Fields []string `json:"fields,omitempty"` // Filter Query to filter the documents that can match. diff --git a/typedapi/types/listtypevalidation.go b/typedapi/types/listtypevalidation.go index 2808035c7d..f981e5cc6a 100644 --- a/typedapi/types/listtypevalidation.go +++ b/typedapi/types/listtypevalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ListTypeValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L68-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L68-L71 type ListTypeValidation struct { Constraint string `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/lithuaniananalyzer.go b/typedapi/types/lithuaniananalyzer.go index 510442c0ef..609ab2011d 100644 --- a/typedapi/types/lithuaniananalyzer.go +++ b/typedapi/types/lithuaniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LithuanianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L241-L246 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L241-L246 type LithuanianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/llamaservicesettings.go b/typedapi/types/llamaservicesettings.go new file mode 100644 index 0000000000..f1d68998fc --- /dev/null +++ b/typedapi/types/llamaservicesettings.go @@ -0,0 +1,148 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/llamasimilaritytype" +) + +// LlamaServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1691-L1721 +type LlamaServiceSettings struct { + // MaxInputTokens For a `text_embedding` task, the maximum number of tokens per input before + // chunking occurs. + MaxInputTokens *int `json:"max_input_tokens,omitempty"` + // ModelId The name of the model to use for the inference task. + // Refer to the Llama downloading models documentation for different ways of + // getting a list of available models and downloading them. + // Service has been tested and confirmed to be working with the following + // models: + // * For `text_embedding` task - `all-MiniLM-L6-v2`. + // * For `completion` and `chat_completion` tasks - `llama3.2:3b`. + ModelId string `json:"model_id"` + // RateLimit This setting helps to minimize the number of rate limit errors returned from + // the Llama API. + // By default, the `llama` service sets the number of requests allowed per + // minute to 3000. + RateLimit *RateLimitSetting `json:"rate_limit,omitempty"` + // Similarity For a `text_embedding` task, the similarity measure. One of cosine, + // dot_product, l2_norm. + Similarity *llamasimilaritytype.LlamaSimilarityType `json:"similarity,omitempty"` + // Url The URL endpoint of the Llama stack endpoint. + // URL must contain: + // * For `text_embedding` task - `/v1/inference/embeddings`. + // * For `completion` and `chat_completion` tasks - + // `/v1/openai/v1/chat/completions`. + Url string `json:"url"` +} + +func (s *LlamaServiceSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "max_input_tokens": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "MaxInputTokens", err) + } + s.MaxInputTokens = &value + case float64: + f := int(v) + s.MaxInputTokens = &f + } + + case "model_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ModelId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ModelId = o + + case "rate_limit": + if err := dec.Decode(&s.RateLimit); err != nil { + return fmt.Errorf("%s | %w", "RateLimit", err) + } + + case "similarity": + if err := dec.Decode(&s.Similarity); err != nil { + return fmt.Errorf("%s | %w", "Similarity", err) + } + + case "url": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Url", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Url = o + + } + } + return nil +} + +// NewLlamaServiceSettings returns a LlamaServiceSettings. +func NewLlamaServiceSettings() *LlamaServiceSettings { + r := &LlamaServiceSettings{} + + return r +} + +type LlamaServiceSettingsVariant interface { + LlamaServiceSettingsCaster() *LlamaServiceSettings +} + +func (s *LlamaServiceSettings) LlamaServiceSettingsCaster() *LlamaServiceSettings { + return s +} diff --git a/typedapi/types/local.go b/typedapi/types/local.go index 419dda1d05..3ed6243026 100644 --- a/typedapi/types/local.go +++ b/typedapi/types/local.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Local type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Database.ts#L63-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Database.ts#L63-L65 type Local struct { Type string `json:"type"` } diff --git a/typedapi/types/loggingaction.go b/typedapi/types/loggingaction.go index 0eb0e8b4e2..764bd9f187 100644 --- a/typedapi/types/loggingaction.go +++ b/typedapi/types/loggingaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LoggingAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L281-L285 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L281-L285 type LoggingAction struct { Category *string `json:"category,omitempty"` Level *string `json:"level,omitempty"` diff --git a/typedapi/types/loggingresult.go b/typedapi/types/loggingresult.go index 1166ae3412..efa07151f3 100644 --- a/typedapi/types/loggingresult.go +++ b/typedapi/types/loggingresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LoggingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L287-L289 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L287-L289 type LoggingResult struct { LoggedText string `json:"logged_text"` } diff --git a/typedapi/types/logsstatus.go b/typedapi/types/logsstatus.go new file mode 100644 index 0000000000..276552d168 --- /dev/null +++ b/typedapi/types/logsstatus.go @@ -0,0 +1,79 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// LogsStatus type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/streams/status/StreamsStatusResponse.ts#L26-L31 +type LogsStatus struct { + // Enabled If true, the logs stream feature is enabled. + Enabled bool `json:"enabled"` +} + +func (s *LogsStatus) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "enabled": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "Enabled", err) + } + s.Enabled = value + case bool: + s.Enabled = v + } + + } + } + return nil +} + +// NewLogsStatus returns a LogsStatus. +func NewLogsStatus() *LogsStatus { + r := &LogsStatus{} + + return r +} diff --git a/typedapi/types/logstashpipeline.go b/typedapi/types/logstashpipeline.go index c4e3e15fa0..39095b3f77 100644 --- a/typedapi/types/logstashpipeline.go +++ b/typedapi/types/logstashpipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LogstashPipeline type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/logstash/_types/Pipeline.ts#L56-L87 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/logstash/_types/Pipeline.ts#L56-L87 type LogstashPipeline struct { // Description A description of the pipeline. // This description is not used by Elasticsearch or Logstash. diff --git a/typedapi/types/longnumberproperty.go b/typedapi/types/longnumberproperty.go index 263434e4af..724ea4a52b 100644 --- a/typedapi/types/longnumberproperty.go +++ b/typedapi/types/longnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // LongNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L177-L180 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L178-L181 type LongNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/longrangeproperty.go b/typedapi/types/longrangeproperty.go index 2bcc6633b7..4c8cbf51d3 100644 --- a/typedapi/types/longrangeproperty.go +++ b/typedapi/types/longrangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // LongRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/range.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/range.ts#L50-L52 type LongRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/longraretermsaggregate.go b/typedapi/types/longraretermsaggregate.go index 82f658f91e..30ce3391e9 100644 --- a/typedapi/types/longraretermsaggregate.go +++ b/typedapi/types/longraretermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // LongRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L471-L476 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L543-L548 type LongRareTermsAggregate struct { Buckets BucketsLongRareTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/longraretermsbucket.go b/typedapi/types/longraretermsbucket.go index d6cf22929c..e584b30bff 100644 --- a/typedapi/types/longraretermsbucket.go +++ b/typedapi/types/longraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // LongRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L478-L481 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L550-L553 type LongRareTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -220,6 +220,13 @@ func (s *LongRareTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -248,6 +255,20 @@ func (s *LongRareTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/longtermsaggregate.go b/typedapi/types/longtermsaggregate.go index f8dbc68833..35fe7a6c3b 100644 --- a/typedapi/types/longtermsaggregate.go +++ b/typedapi/types/longtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LongTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L439-L444 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L511-L516 type LongTermsAggregate struct { Buckets BucketsLongTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/longtermsbucket.go b/typedapi/types/longtermsbucket.go index d3ae5d2588..801f530160 100644 --- a/typedapi/types/longtermsbucket.go +++ b/typedapi/types/longtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // LongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L446-L449 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L518-L521 type LongTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -236,6 +236,13 @@ func (s *LongTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -264,6 +271,20 @@ func (s *LongTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/lowercasenormalizer.go b/typedapi/types/lowercasenormalizer.go index a16f17e24d..c0a5b4f71a 100644 --- a/typedapi/types/lowercasenormalizer.go +++ b/typedapi/types/lowercasenormalizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // LowercaseNormalizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/normalizers.ts#L26-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/normalizers.ts#L26-L28 type LowercaseNormalizer struct { Type string `json:"type,omitempty"` } diff --git a/typedapi/types/lowercaseprocessor.go b/typedapi/types/lowercaseprocessor.go index c8f00c61fc..ac70f85ad0 100644 --- a/typedapi/types/lowercaseprocessor.go +++ b/typedapi/types/lowercaseprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // LowercaseProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1231-L1247 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1235-L1251 type LowercaseProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/lowercasetokenfilter.go b/typedapi/types/lowercasetokenfilter.go index c1a91d0e8f..02c0ecdd21 100644 --- a/typedapi/types/lowercasetokenfilter.go +++ b/typedapi/types/lowercasetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // LowercaseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L350-L354 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L385-L389 type LowercaseTokenFilter struct { // Language Language-specific lowercase token filter to use. Language *lowercasetokenfilterlanguages.LowercaseTokenFilterLanguages `json:"language,omitempty"` diff --git a/typedapi/types/lowercasetokenizer.go b/typedapi/types/lowercasetokenizer.go index f4c220cf49..200cb88220 100644 --- a/typedapi/types/lowercasetokenizer.go +++ b/typedapi/types/lowercasetokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // LowercaseTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L81-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L81-L83 type LowercaseTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/machinelearning.go b/typedapi/types/machinelearning.go index 5f6c2e37a9..090776864b 100644 --- a/typedapi/types/machinelearning.go +++ b/typedapi/types/machinelearning.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MachineLearning type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L378-L385 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L411-L418 type MachineLearning struct { Available bool `json:"available"` DataFrameAnalyticsJobs MlDataFrameAnalyticsJobs `json:"data_frame_analytics_jobs"` diff --git a/typedapi/types/manageuserprivileges.go b/typedapi/types/manageuserprivileges.go index 3d2751c15a..c0ed9f8150 100644 --- a/typedapi/types/manageuserprivileges.go +++ b/typedapi/types/manageuserprivileges.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ManageUserPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L440-L442 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L440-L442 type ManageUserPrivileges struct { Applications []string `json:"applications"` } diff --git a/typedapi/types/mapboxvectortiles.go b/typedapi/types/mapboxvectortiles.go index d4820726cc..881f069380 100644 --- a/typedapi/types/mapboxvectortiles.go +++ b/typedapi/types/mapboxvectortiles.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // MapboxVectorTiles type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Binary.ts#L21-L21 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Binary.ts#L21-L21 type MapboxVectorTiles []byte diff --git a/typedapi/types/mappingcharfilter.go b/typedapi/types/mappingcharfilter.go index 498b432578..53f40a67e7 100644 --- a/typedapi/types/mappingcharfilter.go +++ b/typedapi/types/mappingcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MappingCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L51-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/char_filters.ts#L51-L55 type MappingCharFilter struct { Mappings []string `json:"mappings,omitempty"` MappingsPath *string `json:"mappings_path,omitempty"` diff --git a/typedapi/types/mappinglimitsettings.go b/typedapi/types/mappinglimitsettings.go index e4efd106b7..00847fc5f3 100644 --- a/typedapi/types/mappinglimitsettings.go +++ b/typedapi/types/mappinglimitsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L438-L452 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L445-L460 type MappingLimitSettings struct { Coerce *bool `json:"coerce,omitempty"` Depth *MappingLimitSettingsDepth `json:"depth,omitempty"` diff --git a/typedapi/types/mappinglimitsettingsdepth.go b/typedapi/types/mappinglimitsettingsdepth.go index 8bed6306d1..bd0c6da7de 100644 --- a/typedapi/types/mappinglimitsettingsdepth.go +++ b/typedapi/types/mappinglimitsettingsdepth.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsDepth type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L473-L480 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L483-L490 type MappingLimitSettingsDepth struct { // Limit The maximum depth for a field, which is measured as the number of inner // objects. For instance, if all fields are defined diff --git a/typedapi/types/mappinglimitsettingsdimensionfields.go b/typedapi/types/mappinglimitsettingsdimensionfields.go index 5e6a9eeef2..0838b3d452 100644 --- a/typedapi/types/mappinglimitsettingsdimensionfields.go +++ b/typedapi/types/mappinglimitsettingsdimensionfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsDimensionFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L510-L516 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L520-L526 type MappingLimitSettingsDimensionFields struct { // Limit [preview] This functionality is in technical preview and may be changed or // removed in a future release. diff --git a/typedapi/types/mappinglimitsettingsfieldnamelength.go b/typedapi/types/mappinglimitsettingsfieldnamelength.go index ad68e8d1d4..b6f1d62496 100644 --- a/typedapi/types/mappinglimitsettingsfieldnamelength.go +++ b/typedapi/types/mappinglimitsettingsfieldnamelength.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsFieldNameLength type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L501-L508 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L511-L518 type MappingLimitSettingsFieldNameLength struct { // Limit Setting for the maximum length of a field name. This setting isn’t really // something that addresses mappings explosion but diff --git a/typedapi/types/mappinglimitsettingsnestedfields.go b/typedapi/types/mappinglimitsettingsnestedfields.go index 23693b63fe..4168e1e270 100644 --- a/typedapi/types/mappinglimitsettingsnestedfields.go +++ b/typedapi/types/mappinglimitsettingsnestedfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsNestedFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L482-L490 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L492-L500 type MappingLimitSettingsNestedFields struct { // Limit The maximum number of distinct nested mappings in an index. The nested type // should only be used in special cases, when diff --git a/typedapi/types/mappinglimitsettingsnestedobjects.go b/typedapi/types/mappinglimitsettingsnestedobjects.go index 385ffafef2..65b3bbc002 100644 --- a/typedapi/types/mappinglimitsettingsnestedobjects.go +++ b/typedapi/types/mappinglimitsettingsnestedobjects.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsNestedObjects type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L492-L499 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L502-L509 type MappingLimitSettingsNestedObjects struct { // Limit The maximum number of nested JSON objects that a single document can contain // across all nested types. This limit helps diff --git a/typedapi/types/mappinglimitsettingssourcefields.go b/typedapi/types/mappinglimitsettingssourcefields.go index 00075694a8..05fc8db521 100644 --- a/typedapi/types/mappinglimitsettingssourcefields.go +++ b/typedapi/types/mappinglimitsettingssourcefields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // MappingLimitSettingsSourceFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L518-L520 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L528-L530 type MappingLimitSettingsSourceFields struct { Mode sourcemode.SourceMode `json:"mode"` } diff --git a/typedapi/types/mappinglimitsettingstotalfields.go b/typedapi/types/mappinglimitsettingstotalfields.go index 21fe3db36f..d985becbb5 100644 --- a/typedapi/types/mappinglimitsettingstotalfields.go +++ b/typedapi/types/mappinglimitsettingstotalfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsTotalFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L454-L471 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L462-L481 type MappingLimitSettingsTotalFields struct { // IgnoreDynamicBeyondLimit This setting determines what happens when a dynamically mapped field would // exceed the total fields limit. When set diff --git a/typedapi/types/mappingstats.go b/typedapi/types/mappingstats.go index 5dc94a75b2..3e23d13ad0 100644 --- a/typedapi/types/mappingstats.go +++ b/typedapi/types/mappingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MappingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L186-L190 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L186-L190 type MappingStats struct { TotalCount int64 `json:"total_count"` TotalEstimatedOverhead ByteSize `json:"total_estimated_overhead,omitempty"` diff --git a/typedapi/types/masterisstableindicator.go b/typedapi/types/masterisstableindicator.go index a2779682fe..32e5f0d157 100644 --- a/typedapi/types/masterisstableindicator.go +++ b/typedapi/types/masterisstableindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MasterIsStableIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L82-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L82-L86 type MasterIsStableIndicator struct { Details *MasterIsStableIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/masterisstableindicatorclusterformationnode.go b/typedapi/types/masterisstableindicatorclusterformationnode.go index 3aa23da0f4..ac5e750875 100644 --- a/typedapi/types/masterisstableindicatorclusterformationnode.go +++ b/typedapi/types/masterisstableindicatorclusterformationnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MasterIsStableIndicatorClusterFormationNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L101-L105 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L101-L105 type MasterIsStableIndicatorClusterFormationNode struct { ClusterFormationMessage string `json:"cluster_formation_message"` Name *string `json:"name,omitempty"` diff --git a/typedapi/types/masterisstableindicatordetails.go b/typedapi/types/masterisstableindicatordetails.go index 50a8572853..c24bb200e6 100644 --- a/typedapi/types/masterisstableindicatordetails.go +++ b/typedapi/types/masterisstableindicatordetails.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // MasterIsStableIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L87-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L87-L92 type MasterIsStableIndicatorDetails struct { ClusterFormation []MasterIsStableIndicatorClusterFormationNode `json:"cluster_formation,omitempty"` CurrentMaster IndicatorNode `json:"current_master"` diff --git a/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go b/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go index 57a6deb9a2..2902aedabb 100644 --- a/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go +++ b/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MasterIsStableIndicatorExceptionFetchingHistory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L97-L100 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L97-L100 type MasterIsStableIndicatorExceptionFetchingHistory struct { Message string `json:"message"` StackTrace string `json:"stack_trace"` diff --git a/typedapi/types/masterrecord.go b/typedapi/types/masterrecord.go index 07422b1265..17dbd129f1 100644 --- a/typedapi/types/masterrecord.go +++ b/typedapi/types/masterrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MasterRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/master/types.ts#L20-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/master/types.ts#L20-L39 type MasterRecord struct { // Host host name Host *string `json:"host,omitempty"` diff --git a/typedapi/types/matchallquery.go b/typedapi/types/matchallquery.go index 7394510ecc..f8ffa5c10b 100644 --- a/typedapi/types/matchallquery.go +++ b/typedapi/types/matchallquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MatchAllQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/MatchAllQuery.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/MatchAllQuery.ts#L22-L25 type MatchAllQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/matchboolprefixquery.go b/typedapi/types/matchboolprefixquery.go index 3eaf24323e..f03b357183 100644 --- a/typedapi/types/matchboolprefixquery.go +++ b/typedapi/types/matchboolprefixquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MatchBoolPrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L406-L463 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L407-L464 type MatchBoolPrefixQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/matchedfield.go b/typedapi/types/matchedfield.go index a8dd2862a6..3b79ce8bbf 100644 --- a/typedapi/types/matchedfield.go +++ b/typedapi/types/matchedfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MatchedField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/test_grok_pattern/types.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/test_grok_pattern/types.ts#L23-L27 type MatchedField struct { Length int `json:"length"` Match string `json:"match"` diff --git a/typedapi/types/matchedtext.go b/typedapi/types/matchedtext.go index d65b324472..93921460fe 100644 --- a/typedapi/types/matchedtext.go +++ b/typedapi/types/matchedtext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MatchedText type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/test_grok_pattern/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/test_grok_pattern/types.ts#L29-L32 type MatchedText struct { Fields map[string][]MatchedField `json:"fields,omitempty"` Matched bool `json:"matched"` diff --git a/typedapi/types/matchnonequery.go b/typedapi/types/matchnonequery.go index 84450cfcf3..669ed276ae 100644 --- a/typedapi/types/matchnonequery.go +++ b/typedapi/types/matchnonequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MatchNoneQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/MatchNoneQuery.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/MatchNoneQuery.ts#L22-L25 type MatchNoneQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/matchonlytextproperty.go b/typedapi/types/matchonlytextproperty.go index 1eef9ea2ad..cbe744be74 100644 --- a/typedapi/types/matchonlytextproperty.go +++ b/typedapi/types/matchonlytextproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // MatchOnlyTextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L282-L307 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L295-L320 type MatchOnlyTextProperty struct { // CopyTo Allows you to copy the values of multiple fields into a group // field, which can then be queried as a single field. diff --git a/typedapi/types/matchphraseprefixquery.go b/typedapi/types/matchphraseprefixquery.go index 5f4e4f8ec7..eaf809b116 100644 --- a/typedapi/types/matchphraseprefixquery.go +++ b/typedapi/types/matchphraseprefixquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MatchPhrasePrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L491-L520 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L492-L521 type MatchPhrasePrefixQuery struct { // Analyzer Analyzer used to convert text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/matchphrasequery.go b/typedapi/types/matchphrasequery.go index ecf7a8ca45..3d6ee3bfd4 100644 --- a/typedapi/types/matchphrasequery.go +++ b/typedapi/types/matchphrasequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MatchPhraseQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L465-L489 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L466-L490 type MatchPhraseQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/matchquery.go b/typedapi/types/matchquery.go index 2151d6edc1..a6175c46a5 100644 --- a/typedapi/types/matchquery.go +++ b/typedapi/types/matchquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // MatchQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L336-L404 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L336-L405 type MatchQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/matrixstatsaggregate.go b/typedapi/types/matrixstatsaggregate.go index eebe9b23c5..39052d1563 100644 --- a/typedapi/types/matrixstatsaggregate.go +++ b/typedapi/types/matrixstatsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MatrixStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L868-L875 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L940-L947 type MatrixStatsAggregate struct { DocCount int64 `json:"doc_count"` Fields []MatrixStatsFields `json:"fields,omitempty"` diff --git a/typedapi/types/matrixstatsaggregation.go b/typedapi/types/matrixstatsaggregation.go index ceb27cf08a..0e7274b1ab 100644 --- a/typedapi/types/matrixstatsaggregation.go +++ b/typedapi/types/matrixstatsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // MatrixStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/matrix.ts#L38-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/matrix.ts#L38-L44 type MatrixStatsAggregation struct { // Fields An array of fields for computing the statistics. Fields []string `json:"fields,omitempty"` diff --git a/typedapi/types/matrixstatsfields.go b/typedapi/types/matrixstatsfields.go index 4ba149fa6b..c2fc75f86f 100644 --- a/typedapi/types/matrixstatsfields.go +++ b/typedapi/types/matrixstatsfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MatrixStatsFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L877-L886 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L949-L958 type MatrixStatsFields struct { Correlation map[string]Float64 `json:"correlation"` Count int64 `json:"count"` diff --git a/typedapi/types/maxaggregate.go b/typedapi/types/maxaggregate.go index a3877d69ef..49285f2e00 100644 --- a/typedapi/types/maxaggregate.go +++ b/typedapi/types/maxaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MaxAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L205-L209 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L210-L214 type MaxAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to diff --git a/typedapi/types/maxaggregation.go b/typedapi/types/maxaggregation.go index 7ba0c2cb96..ec93224787 100644 --- a/typedapi/types/maxaggregation.go +++ b/typedapi/types/maxaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MaxAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L171-L171 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L175-L175 type MaxAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/maxbucketaggregation.go b/typedapi/types/maxbucketaggregation.go index 2b6949c37b..1ce1c5c537 100644 --- a/typedapi/types/maxbucketaggregation.go +++ b/typedapi/types/maxbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MaxBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L244-L247 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L246-L249 type MaxBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/maxmind.go b/typedapi/types/maxmind.go index 1a7a90eae2..c2a4bdde90 100644 --- a/typedapi/types/maxmind.go +++ b/typedapi/types/maxmind.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Maxmind type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Database.ts#L55-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Database.ts#L55-L57 type Maxmind struct { AccountId string `json:"account_id"` } diff --git a/typedapi/types/medianabsolutedeviationaggregate.go b/typedapi/types/medianabsolutedeviationaggregate.go index 1bb12dbb2e..e6b4956e67 100644 --- a/typedapi/types/medianabsolutedeviationaggregate.go +++ b/typedapi/types/medianabsolutedeviationaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MedianAbsoluteDeviationAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L196-L197 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L201-L202 type MedianAbsoluteDeviationAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to diff --git a/typedapi/types/medianabsolutedeviationaggregation.go b/typedapi/types/medianabsolutedeviationaggregation.go index 0212900395..53c719d8e2 100644 --- a/typedapi/types/medianabsolutedeviationaggregation.go +++ b/typedapi/types/medianabsolutedeviationaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MedianAbsoluteDeviationAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L173-L188 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L177-L192 type MedianAbsoluteDeviationAggregation struct { // Compression Limits the maximum number of nodes used by the underlying TDigest algorithm // to `20 * compression`, enabling control of memory usage and approximation diff --git a/typedapi/types/memmlstats.go b/typedapi/types/memmlstats.go index 1e2dc12043..a1a06446a4 100644 --- a/typedapi/types/memmlstats.go +++ b/typedapi/types/memmlstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MemMlStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_memory_stats/types.ts#L90-L111 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_memory_stats/types.ts#L90-L111 type MemMlStats struct { // AnomalyDetectors Amount of native memory set aside for anomaly detection jobs. AnomalyDetectors ByteSize `json:"anomaly_detectors,omitempty"` diff --git a/typedapi/types/memory.go b/typedapi/types/memory.go index e68c91e089..71706df7b2 100644 --- a/typedapi/types/memory.go +++ b/typedapi/types/memory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Memory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_memory_stats/types.ts#L25-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_memory_stats/types.ts#L25-L48 type Memory struct { Attributes map[string]string `json:"attributes"` EphemeralId string `json:"ephemeral_id"` diff --git a/typedapi/types/memorystats.go b/typedapi/types/memorystats.go index 2d92bc6259..1ad26453d0 100644 --- a/typedapi/types/memorystats.go +++ b/typedapi/types/memorystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L634-L658 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L634-L658 type MemoryStats struct { // AdjustedTotalInBytes If the amount of physical memory has been overridden using the // `es`.`total_memory_bytes` system property then this reports the overridden diff --git a/typedapi/types/memstats.go b/typedapi/types/memstats.go index c7100af6c3..c5cdcf8b64 100644 --- a/typedapi/types/memstats.go +++ b/typedapi/types/memstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MemStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/get_memory_stats/types.ts#L65-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/get_memory_stats/types.ts#L65-L88 type MemStats struct { // AdjustedTotal If the amount of physical memory has been overridden using the // es.total_memory_bytes system property diff --git a/typedapi/types/merge.go b/typedapi/types/merge.go index 8679183890..375be6d010 100644 --- a/typedapi/types/merge.go +++ b/typedapi/types/merge.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Merge type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L359-L361 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L366-L368 type Merge struct { Scheduler *MergeScheduler `json:"scheduler,omitempty"` } diff --git a/typedapi/types/mergescheduler.go b/typedapi/types/mergescheduler.go index 81adc33c7b..e5f8613db8 100644 --- a/typedapi/types/mergescheduler.go +++ b/typedapi/types/mergescheduler.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // MergeScheduler type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L363-L366 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L370-L373 type MergeScheduler struct { MaxMergeCount Stringifiedinteger `json:"max_merge_count,omitempty"` MaxThreadCount Stringifiedinteger `json:"max_thread_count,omitempty"` diff --git a/typedapi/types/mergesstats.go b/typedapi/types/mergesstats.go index 015fd1f914..125df19605 100644 --- a/typedapi/types/mergesstats.go +++ b/typedapi/types/mergesstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MergesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L188-L205 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L188-L205 type MergesStats struct { Current int64 `json:"current"` CurrentDocs int64 `json:"current_docs"` diff --git a/typedapi/types/message.go b/typedapi/types/message.go index 0caa7ea59b..d4aa06a5da 100644 --- a/typedapi/types/message.go +++ b/typedapi/types/message.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Message type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L174-L228 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L174-L228 type Message struct { // Content The content of the message. // diff --git a/typedapi/types/messagecontent.go b/typedapi/types/messagecontent.go index f6c48f13d2..09d627042b 100644 --- a/typedapi/types/messagecontent.go +++ b/typedapi/types/messagecontent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // []ContentObject // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L169-L172 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L169-L172 type MessageContent any type MessageContentVariant interface { diff --git a/typedapi/types/metadata.go b/typedapi/types/metadata.go index 22eefcb20d..8bf962d44a 100644 --- a/typedapi/types/metadata.go +++ b/typedapi/types/metadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // Metadata type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L93-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L92-L92 type Metadata map[string]json.RawMessage type MetadataVariant interface { diff --git a/typedapi/types/mgetoperation.go b/typedapi/types/mgetoperation.go index 23c6f27bfb..2defcea9a7 100644 --- a/typedapi/types/mgetoperation.go +++ b/typedapi/types/mgetoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // MgetOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mget/types.ts#L32-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/mget/types.ts#L32-L55 type MgetOperation struct { // Id_ The unique document ID. Id_ string `json:"_id"` @@ -40,7 +40,7 @@ type MgetOperation struct { Index_ *string `json:"_index,omitempty"` // Routing The key for the primary shard the document resides on. Required if routing is // used during indexing. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` // Source_ If `false`, excludes all _source fields. Source_ SourceConfig `json:"_source,omitempty"` // StoredFields The stored fields you want to retrieve. @@ -75,8 +75,19 @@ func (s *MgetOperation) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "_source": diff --git a/typedapi/types/mgetresponseitem.go b/typedapi/types/mgetresponseitem.go index 7d77180a64..476de55574 100644 --- a/typedapi/types/mgetresponseitem.go +++ b/typedapi/types/mgetresponseitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // GetResult // MultiGetError // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mget/types.ts#L57-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/mget/types.ts#L57-L60 type MgetResponseItem any diff --git a/typedapi/types/migrateaction.go b/typedapi/types/migrateaction.go index 25595573f2..b52344e159 100644 --- a/typedapi/types/migrateaction.go +++ b/typedapi/types/migrateaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MigrateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L141-L143 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L144-L146 type MigrateAction struct { Enabled *bool `json:"enabled,omitempty"` } diff --git a/typedapi/types/migratereindex.go b/typedapi/types/migratereindex.go index a473ca3f27..902bc10905 100644 --- a/typedapi/types/migratereindex.go +++ b/typedapi/types/migratereindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // MigrateReindex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L39-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L45-L54 type MigrateReindex struct { // Mode Reindex mode. Currently only 'upgrade' is supported. Mode modeenum.ModeEnum `json:"mode"` diff --git a/typedapi/types/migrationfeatureindexinfo.go b/typedapi/types/migrationfeatureindexinfo.go index a965861fc7..d643e3f9a3 100644 --- a/typedapi/types/migrationfeatureindexinfo.go +++ b/typedapi/types/migrationfeatureindexinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // MigrationFeatureIndexInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L44-L48 type MigrationFeatureIndexInfo struct { FailureCause *ErrorCause `json:"failure_cause,omitempty"` Index string `json:"index"` diff --git a/typedapi/types/minaggregate.go b/typedapi/types/minaggregate.go index 314d907392..9ddbb1ac2f 100644 --- a/typedapi/types/minaggregate.go +++ b/typedapi/types/minaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MinAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L199-L203 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L204-L208 type MinAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to diff --git a/typedapi/types/minaggregation.go b/typedapi/types/minaggregation.go index 5a7cb8abf6..de998d9b3b 100644 --- a/typedapi/types/minaggregation.go +++ b/typedapi/types/minaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MinAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L190-L190 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L194-L194 type MinAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/minbucketaggregation.go b/typedapi/types/minbucketaggregation.go index a4496a4269..e46d0807a6 100644 --- a/typedapi/types/minbucketaggregation.go +++ b/typedapi/types/minbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MinBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L249-L252 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L251-L254 type MinBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/minhashtokenfilter.go b/typedapi/types/minhashtokenfilter.go index ae403901fd..193415a4d5 100644 --- a/typedapi/types/minhashtokenfilter.go +++ b/typedapi/types/minhashtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MinHashTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L514-L525 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L549-L562 type MinHashTokenFilter struct { // BucketCount Number of buckets to which hashes are assigned. Defaults to `512`. BucketCount *int `json:"bucket_count,omitempty"` diff --git a/typedapi/types/minimallicenseinformation.go b/typedapi/types/minimallicenseinformation.go index 4f3fbc17ab..68d8dbea11 100644 --- a/typedapi/types/minimallicenseinformation.go +++ b/typedapi/types/minimallicenseinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // MinimalLicenseInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/info/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/info/types.ts#L34-L40 type MinimalLicenseInformation struct { ExpiryDateInMillis int64 `json:"expiry_date_in_millis"` Mode licensetype.LicenseType `json:"mode"` diff --git a/typedapi/types/minimumshouldmatch.go b/typedapi/types/minimumshouldmatch.go index ab0fc5574c..2cf578f690 100644 --- a/typedapi/types/minimumshouldmatch.go +++ b/typedapi/types/minimumshouldmatch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L160-L164 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L155-L159 type MinimumShouldMatch any type MinimumShouldMatchVariant interface { diff --git a/typedapi/types/missing.go b/typedapi/types/missing.go index b31c0d88ca..6836eb21db 100644 --- a/typedapi/types/missing.go +++ b/typedapi/types/missing.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -27,7 +27,7 @@ package types // Float64 // bool // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/AggregationContainer.ts#L535-L535 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/AggregationContainer.ts#L557-L557 type Missing any type MissingVariant interface { diff --git a/typedapi/types/missingaggregate.go b/typedapi/types/missingaggregate.go index 03cbc7a247..583a9d7904 100644 --- a/typedapi/types/missingaggregate.go +++ b/typedapi/types/missingaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // MissingAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L528-L532 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L600-L604 type MissingAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *MissingAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *MissingAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/missingaggregation.go b/typedapi/types/missingaggregation.go index dec9765504..82274886e8 100644 --- a/typedapi/types/missingaggregation.go +++ b/typedapi/types/missingaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // MissingAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L593-L599 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L596-L602 type MissingAggregation struct { // Field The name of the field. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/mistralservicesettings.go b/typedapi/types/mistralservicesettings.go index 344163c518..eb8b2625bf 100644 --- a/typedapi/types/mistralservicesettings.go +++ b/typedapi/types/mistralservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MistralServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1515-L1542 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1739-L1766 type MistralServiceSettings struct { // ApiKey A valid API key of your Mistral account. // You can find your Mistral API keys or you can create a new one on the API diff --git a/typedapi/types/mlcounter.go b/typedapi/types/mlcounter.go index b22f714bfb..0db6e171dc 100644 --- a/typedapi/types/mlcounter.go +++ b/typedapi/types/mlcounter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MlCounter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L265-L267 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L265-L267 type MlCounter struct { Count int64 `json:"count"` } diff --git a/typedapi/types/mldatafeed.go b/typedapi/types/mldatafeed.go index 1684578a37..a8302159fb 100644 --- a/typedapi/types/mldatafeed.go +++ b/typedapi/types/mldatafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MLDatafeed type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L37-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L37-L64 type MLDatafeed struct { Aggregations map[string]Aggregations `json:"aggregations,omitempty"` // Authorization The security privileges that the datafeed uses to run its queries. If Elastic @@ -41,17 +41,25 @@ type MLDatafeed struct { ChunkingConfig *ChunkingConfig `json:"chunking_config,omitempty"` DatafeedId string `json:"datafeed_id"` DelayedDataCheckConfig DelayedDataCheckConfig `json:"delayed_data_check_config"` - Frequency Duration `json:"frequency,omitempty"` - Indexes []string `json:"indexes,omitempty"` - Indices []string `json:"indices"` - IndicesOptions *IndicesOptions `json:"indices_options,omitempty"` - JobId string `json:"job_id"` - MaxEmptySearches *int `json:"max_empty_searches,omitempty"` - Query Query `json:"query"` - QueryDelay Duration `json:"query_delay,omitempty"` - RuntimeMappings RuntimeFields `json:"runtime_mappings,omitempty"` - ScriptFields map[string]ScriptField `json:"script_fields,omitempty"` - ScrollSize *int `json:"scroll_size,omitempty"` + // Frequency The interval at which scheduled queries are made while the datafeed runs in + // real time. The default value is either the bucket span for short bucket + // spans, or, for longer bucket spans, a sensible fraction of the bucket span. + // For example: `150s`. When `frequency` is shorter than the bucket span, + // interim results for the last (partial) bucket are written then eventually + // overwritten by the full bucket results. If the datafeed uses aggregations, + // this value must be divisible by the interval of the date histogram + // aggregation. + Frequency Duration `json:"frequency,omitempty"` + Indexes []string `json:"indexes,omitempty"` + Indices []string `json:"indices"` + IndicesOptions *IndicesOptions `json:"indices_options,omitempty"` + JobId string `json:"job_id"` + MaxEmptySearches *int `json:"max_empty_searches,omitempty"` + Query Query `json:"query"` + QueryDelay Duration `json:"query_delay,omitempty"` + RuntimeMappings RuntimeFields `json:"runtime_mappings,omitempty"` + ScriptFields map[string]ScriptField `json:"script_fields,omitempty"` + ScrollSize *int `json:"scroll_size,omitempty"` } func (s *MLDatafeed) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/mldataframeanalyticsjobs.go b/typedapi/types/mldataframeanalyticsjobs.go index 65a02b3fb5..771b9e5eda 100644 --- a/typedapi/types/mldataframeanalyticsjobs.go +++ b/typedapi/types/mldataframeanalyticsjobs.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // MlDataFrameAnalyticsJobs type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L187-L192 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L187-L192 type MlDataFrameAnalyticsJobs struct { All_ MlDataFrameAnalyticsJobsCount `json:"_all"` AnalysisCounts *MlDataFrameAnalyticsJobsAnalysis `json:"analysis_counts,omitempty"` diff --git a/typedapi/types/mldataframeanalyticsjobsanalysis.go b/typedapi/types/mldataframeanalyticsjobsanalysis.go index 7f8d922704..c95cc3a0ec 100644 --- a/typedapi/types/mldataframeanalyticsjobsanalysis.go +++ b/typedapi/types/mldataframeanalyticsjobsanalysis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MlDataFrameAnalyticsJobsAnalysis type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L194-L198 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L194-L198 type MlDataFrameAnalyticsJobsAnalysis struct { Classification *int `json:"classification,omitempty"` OutlierDetection *int `json:"outlier_detection,omitempty"` diff --git a/typedapi/types/mldataframeanalyticsjobscount.go b/typedapi/types/mldataframeanalyticsjobscount.go index 19664f9552..45cb722e49 100644 --- a/typedapi/types/mldataframeanalyticsjobscount.go +++ b/typedapi/types/mldataframeanalyticsjobscount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MlDataFrameAnalyticsJobsCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L204-L206 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L204-L206 type MlDataFrameAnalyticsJobsCount struct { Count int64 `json:"count"` } diff --git a/typedapi/types/mldataframeanalyticsjobsmemory.go b/typedapi/types/mldataframeanalyticsjobsmemory.go index 176e33b476..d70350f6dd 100644 --- a/typedapi/types/mldataframeanalyticsjobsmemory.go +++ b/typedapi/types/mldataframeanalyticsjobsmemory.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // MlDataFrameAnalyticsJobsMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L200-L202 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L200-L202 type MlDataFrameAnalyticsJobsMemory struct { PeakUsageBytes JobStatistics `json:"peak_usage_bytes"` } diff --git a/typedapi/types/mlfilter.go b/typedapi/types/mlfilter.go index 1a58dcf023..fab83d017f 100644 --- a/typedapi/types/mlfilter.go +++ b/typedapi/types/mlfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MLFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Filter.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Filter.ts#L22-L29 type MLFilter struct { // Description A description of the filter. Description *string `json:"description,omitempty"` diff --git a/typedapi/types/mlinference.go b/typedapi/types/mlinference.go index 8280486aef..1d125fab32 100644 --- a/typedapi/types/mlinference.go +++ b/typedapi/types/mlinference.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // MlInference type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L208-L216 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L208-L216 type MlInference struct { Deployments *MlInferenceDeployments `json:"deployments,omitempty"` IngestProcessors map[string]MlInferenceIngestProcessor `json:"ingest_processors"` diff --git a/typedapi/types/mlinferencedeployments.go b/typedapi/types/mlinferencedeployments.go index 98c54513ad..b86b040d48 100644 --- a/typedapi/types/mlinferencedeployments.go +++ b/typedapi/types/mlinferencedeployments.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MlInferenceDeployments type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L237-L242 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L237-L242 type MlInferenceDeployments struct { Count int `json:"count"` InferenceCounts JobStatistics `json:"inference_counts"` diff --git a/typedapi/types/mlinferencedeploymentstimems.go b/typedapi/types/mlinferencedeploymentstimems.go index 6479b3bc15..60d25455e3 100644 --- a/typedapi/types/mlinferencedeploymentstimems.go +++ b/typedapi/types/mlinferencedeploymentstimems.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MlInferenceDeploymentsTimeMs type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L244-L246 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L244-L246 type MlInferenceDeploymentsTimeMs struct { Avg Float64 `json:"avg"` } diff --git a/typedapi/types/mlinferenceingestprocessor.go b/typedapi/types/mlinferenceingestprocessor.go index 8131780450..8e575c9958 100644 --- a/typedapi/types/mlinferenceingestprocessor.go +++ b/typedapi/types/mlinferenceingestprocessor.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // MlInferenceIngestProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L218-L223 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L218-L223 type MlInferenceIngestProcessor struct { NumDocsProcessed MlInferenceIngestProcessorCount `json:"num_docs_processed"` NumFailures MlInferenceIngestProcessorCount `json:"num_failures"` diff --git a/typedapi/types/mlinferenceingestprocessorcount.go b/typedapi/types/mlinferenceingestprocessorcount.go index fa081e297d..a16556d7a8 100644 --- a/typedapi/types/mlinferenceingestprocessorcount.go +++ b/typedapi/types/mlinferenceingestprocessorcount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MlInferenceIngestProcessorCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L248-L252 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L248-L252 type MlInferenceIngestProcessorCount struct { Max int64 `json:"max"` Min int64 `json:"min"` diff --git a/typedapi/types/mlinferencetrainedmodels.go b/typedapi/types/mlinferencetrainedmodels.go index 0b34f995a9..3edb7dd663 100644 --- a/typedapi/types/mlinferencetrainedmodels.go +++ b/typedapi/types/mlinferencetrainedmodels.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // MlInferenceTrainedModels type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L225-L235 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L225-L235 type MlInferenceTrainedModels struct { All_ MlCounter `json:"_all"` Count *MlInferenceTrainedModelsCount `json:"count,omitempty"` diff --git a/typedapi/types/mlinferencetrainedmodelscount.go b/typedapi/types/mlinferencetrainedmodelscount.go index 8d367831f2..de7c3f7ac5 100644 --- a/typedapi/types/mlinferencetrainedmodelscount.go +++ b/typedapi/types/mlinferencetrainedmodelscount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MlInferenceTrainedModelsCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L254-L263 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L254-L263 type MlInferenceTrainedModelsCount struct { Classification *int64 `json:"classification,omitempty"` Ner *int64 `json:"ner,omitempty"` diff --git a/typedapi/types/mljobforecasts.go b/typedapi/types/mljobforecasts.go index d8ed482038..706f4f929b 100644 --- a/typedapi/types/mljobforecasts.go +++ b/typedapi/types/mljobforecasts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MlJobForecasts type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L182-L185 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L182-L185 type MlJobForecasts struct { ForecastedJobs int64 `json:"forecasted_jobs"` Total int64 `json:"total"` diff --git a/typedapi/types/modelpackageconfig.go b/typedapi/types/modelpackageconfig.go index d22412d94c..9a3bc9fb07 100644 --- a/typedapi/types/modelpackageconfig.go +++ b/typedapi/types/modelpackageconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ModelPackageConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L257-L272 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L258-L273 type ModelPackageConfig struct { CreateTime *int64 `json:"create_time,omitempty"` Description *string `json:"description,omitempty"` diff --git a/typedapi/types/modelplotconfig.go b/typedapi/types/modelplotconfig.go index dc02a84c94..742b8566d0 100644 --- a/typedapi/types/modelplotconfig.go +++ b/typedapi/types/modelplotconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ModelPlotConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/ModelPlot.ts#L23-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/ModelPlot.ts#L23-L42 type ModelPlotConfig struct { // AnnotationsEnabled If true, enables calculation and storage of the model change annotations for // each entity that is being analyzed. diff --git a/typedapi/types/modelsizestats.go b/typedapi/types/modelsizestats.go index ce6b641b0c..19b130d04a 100644 --- a/typedapi/types/modelsizestats.go +++ b/typedapi/types/modelsizestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // ModelSizeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Model.ts#L59-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Model.ts#L59-L82 type ModelSizeStats struct { AssignmentMemoryBasis *string `json:"assignment_memory_basis,omitempty"` BucketAllocationFailuresCount int64 `json:"bucket_allocation_failures_count"` diff --git a/typedapi/types/modelsnapshot.go b/typedapi/types/modelsnapshot.go index 6212e95253..8515d5d352 100644 --- a/typedapi/types/modelsnapshot.go +++ b/typedapi/types/modelsnapshot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ModelSnapshot type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Model.ts#L25-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Model.ts#L25-L46 type ModelSnapshot struct { // Description An optional description of the job. Description *string `json:"description,omitempty"` diff --git a/typedapi/types/modelsnapshotupgrade.go b/typedapi/types/modelsnapshotupgrade.go index a84eedb531..9702a9b68b 100644 --- a/typedapi/types/modelsnapshotupgrade.go +++ b/typedapi/types/modelsnapshotupgrade.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ModelSnapshotUpgrade type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Model.ts#L48-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Model.ts#L48-L57 type ModelSnapshotUpgrade struct { AssignmentExplanation string `json:"assignment_explanation"` JobId string `json:"job_id"` diff --git a/typedapi/types/monitoring.go b/typedapi/types/monitoring.go index 1dac33c80e..f9ff278fe4 100644 --- a/typedapi/types/monitoring.go +++ b/typedapi/types/monitoring.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Monitoring type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L387-L390 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L420-L423 type Monitoring struct { Available bool `json:"available"` CollectionEnabled bool `json:"collection_enabled"` diff --git a/typedapi/types/morelikethisquery.go b/typedapi/types/morelikethisquery.go index 6e699fc603..ba91609850 100644 --- a/typedapi/types/morelikethisquery.go +++ b/typedapi/types/morelikethisquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MoreLikeThisQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L87-L172 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L87-L172 type MoreLikeThisQuery struct { // Analyzer The analyzer that is used to analyze the free form text. // Defaults to the analyzer associated with the first field in fields. @@ -81,7 +81,7 @@ type MoreLikeThisQuery struct { // number of terms that must match. MinimumShouldMatch MinimumShouldMatch `json:"minimum_should_match,omitempty"` QueryName_ *string `json:"_name,omitempty"` - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` // StopWords An array of stop words. // Any word in this set is ignored. StopWords StopWords `json:"stop_words,omitempty"` @@ -314,8 +314,19 @@ func (s *MoreLikeThisQuery) UnmarshalJSON(data []byte) error { s.QueryName_ = &o case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "stop_words": diff --git a/typedapi/types/mountedsnapshot.go b/typedapi/types/mountedsnapshot.go index 5667814c34..a1cbecba78 100644 --- a/typedapi/types/mountedsnapshot.go +++ b/typedapi/types/mountedsnapshot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // MountedSnapshot type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/searchable_snapshots/mount/types.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/searchable_snapshots/mount/types.ts#L23-L27 type MountedSnapshot struct { Indices []string `json:"indices"` Shards ShardStatistics `json:"shards"` diff --git a/typedapi/types/movingaverageaggregation.go b/typedapi/types/movingaverageaggregation.go index d09ca309f3..9756e887be 100644 --- a/typedapi/types/movingaverageaggregation.go +++ b/typedapi/types/movingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -28,7 +28,7 @@ package types // HoltMovingAverageAggregation // HoltWintersMovingAverageAggregation // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L254-L260 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L256-L262 type MovingAverageAggregation any type MovingAverageAggregationVariant interface { diff --git a/typedapi/types/movingfunctionaggregation.go b/typedapi/types/movingfunctionaggregation.go index e0ce70137f..250af5e02c 100644 --- a/typedapi/types/movingfunctionaggregation.go +++ b/typedapi/types/movingfunctionaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MovingFunctionAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L314-L332 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L316-L334 type MovingFunctionAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/movingpercentilesaggregation.go b/typedapi/types/movingpercentilesaggregation.go index 4e09098c22..a0d871ee83 100644 --- a/typedapi/types/movingpercentilesaggregation.go +++ b/typedapi/types/movingpercentilesaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MovingPercentilesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L334-L349 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L336-L351 type MovingPercentilesAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/msearchrequestitem.go b/typedapi/types/msearchrequestitem.go index 543c1dfa3c..450cbe1979 100644 --- a/typedapi/types/msearchrequestitem.go +++ b/typedapi/types/msearchrequestitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // MultisearchHeader // SearchRequestBody // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/types.ts#L26-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch/types.ts#L32-L35 type MsearchRequestItem any type MsearchRequestItemVariant interface { diff --git a/typedapi/types/msearchresponseitem.go b/typedapi/types/msearchresponseitem.go index 2452ff5c8b..8e893138f7 100644 --- a/typedapi/types/msearchresponseitem.go +++ b/typedapi/types/msearchresponseitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // MultiSearchItem // ErrorResponseBase // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/types.ts#L53-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch/types.ts#L60-L63 type MsearchResponseItem any diff --git a/typedapi/types/mtermvectorsoperation.go b/typedapi/types/mtermvectorsoperation.go index e97dd2c5ce..aab5d2b0eb 100644 --- a/typedapi/types/mtermvectorsoperation.go +++ b/typedapi/types/mtermvectorsoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // MTermVectorsOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mtermvectors/types.ts#L35-L94 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/mtermvectors/types.ts#L35-L94 type MTermVectorsOperation struct { // Doc An artificial document (a document not present in the index) for which you // want to retrieve term vectors. @@ -59,7 +59,7 @@ type MTermVectorsOperation struct { // Positions If `true`, the response includes term positions. Positions *bool `json:"positions,omitempty"` // Routing Custom value used to route operations to a specific shard. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` // TermStatistics If true, the response includes term frequency and document frequency. TermStatistics *bool `json:"term_statistics,omitempty"` // Version If `true`, returns the document version as part of a hit. @@ -176,8 +176,19 @@ func (s *MTermVectorsOperation) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "term_statistics": diff --git a/typedapi/types/multigeterror.go b/typedapi/types/multigeterror.go index 3bdab3d83c..b4cce99834 100644 --- a/typedapi/types/multigeterror.go +++ b/typedapi/types/multigeterror.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // MultiGetError type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mget/types.ts#L62-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/mget/types.ts#L62-L66 type MultiGetError struct { Error ErrorCause `json:"error"` Id_ string `json:"_id"` diff --git a/typedapi/types/multimatchquery.go b/typedapi/types/multimatchquery.go index 6d05af28dc..d4888155a1 100644 --- a/typedapi/types/multimatchquery.go +++ b/typedapi/types/multimatchquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // MultiMatchQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L522-L608 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L523-L609 type MultiMatchQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` diff --git a/typedapi/types/multiplexertokenfilter.go b/typedapi/types/multiplexertokenfilter.go index 17b24b46a6..4500cfffcb 100644 --- a/typedapi/types/multiplexertokenfilter.go +++ b/typedapi/types/multiplexertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // MultiplexerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L356-L362 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L391-L397 type MultiplexerTokenFilter struct { // Filters A list of token filters to apply to incoming tokens. Filters []string `json:"filters"` diff --git a/typedapi/types/multisearchheader.go b/typedapi/types/multisearchheader.go index 95cd04aaf8..209a1e9f03 100644 --- a/typedapi/types/multisearchheader.go +++ b/typedapi/types/multisearchheader.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // MultisearchHeader type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/types.ts#L31-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch/types.ts#L37-L53 type MultisearchHeader struct { AllowNoIndices *bool `json:"allow_no_indices,omitempty"` AllowPartialSearchResults *bool `json:"allow_partial_search_results,omitempty"` @@ -44,8 +44,9 @@ type MultisearchHeader struct { IgnoreUnavailable *bool `json:"ignore_unavailable,omitempty"` Index []string `json:"index,omitempty"` Preference *string `json:"preference,omitempty"` + ProjectRouting *string `json:"project_routing,omitempty"` RequestCache *bool `json:"request_cache,omitempty"` - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` SearchType *searchtype.SearchType `json:"search_type,omitempty"` } @@ -178,6 +179,11 @@ func (s *MultisearchHeader) UnmarshalJSON(data []byte) error { } s.Preference = &o + case "project_routing": + if err := dec.Decode(&s.ProjectRouting); err != nil { + return fmt.Errorf("%s | %w", "ProjectRouting", err) + } + case "request_cache": var tmp any dec.Decode(&tmp) @@ -193,8 +199,19 @@ func (s *MultisearchHeader) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "search_type": diff --git a/typedapi/types/multisearchitem.go b/typedapi/types/multisearchitem.go index 29300ce243..87ffa518d6 100644 --- a/typedapi/types/multisearchitem.go +++ b/typedapi/types/multisearchitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // MultiSearchItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/types.ts#L58-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch/types.ts#L65-L68 type MultiSearchItem struct { Aggregations map[string]Aggregate `json:"aggregations,omitempty"` Clusters_ *ClusterStatistics `json:"_clusters,omitempty"` @@ -224,6 +224,13 @@ func (s *MultiSearchItem) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -252,6 +259,20 @@ func (s *MultiSearchItem) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/multitermlookup.go b/typedapi/types/multitermlookup.go index 91c25b119b..a175fdae28 100644 --- a/typedapi/types/multitermlookup.go +++ b/typedapi/types/multitermlookup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // MultiTermLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L643-L653 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L646-L656 type MultiTermLookup struct { // Field A fields from which to retrieve terms. Field string `json:"field"` diff --git a/typedapi/types/multitermsaggregate.go b/typedapi/types/multitermsaggregate.go index 0810e7621f..2760b9c2c3 100644 --- a/typedapi/types/multitermsaggregate.go +++ b/typedapi/types/multitermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MultiTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L501-L506 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L573-L578 type MultiTermsAggregate struct { Buckets BucketsMultiTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/multitermsaggregation.go b/typedapi/types/multitermsaggregation.go index 34335cf656..f0fcf2b200 100644 --- a/typedapi/types/multitermsaggregation.go +++ b/typedapi/types/multitermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // MultiTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L601-L641 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L604-L644 type MultiTermsAggregation struct { // CollectMode Specifies the strategy for data collection. CollectMode *termsaggregationcollectmode.TermsAggregationCollectMode `json:"collect_mode,omitempty"` diff --git a/typedapi/types/multitermsbucket.go b/typedapi/types/multitermsbucket.go index abff795339..b5394b8d8f 100644 --- a/typedapi/types/multitermsbucket.go +++ b/typedapi/types/multitermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // MultiTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L508-L512 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L580-L584 type MultiTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -226,6 +226,13 @@ func (s *MultiTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -254,6 +261,20 @@ func (s *MultiTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/murmur3hashproperty.go b/typedapi/types/murmur3hashproperty.go index 3844a16041..7ee6beb1af 100644 --- a/typedapi/types/murmur3hashproperty.go +++ b/typedapi/types/murmur3hashproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // Murmur3HashProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L90-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L91-L93 type Murmur3HashProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` diff --git a/typedapi/types/mutualinformationheuristic.go b/typedapi/types/mutualinformationheuristic.go index e90cfd8135..14e0c67992 100644 --- a/typedapi/types/mutualinformationheuristic.go +++ b/typedapi/types/mutualinformationheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // MutualInformationHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L800-L809 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L803-L812 type MutualInformationHeuristic struct { // BackgroundIsSuperset Set to `false` if you defined a custom background filter that represents a // different set of documents that you want to compare to. diff --git a/typedapi/types/names.go b/typedapi/types/names.go index 9e7d5ffd58..fb7dd8c1a4 100644 --- a/typedapi/types/names.go +++ b/typedapi/types/names.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Names type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L75-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L74-L74 type Names []string type NamesVariant interface { diff --git a/typedapi/types/nativecode.go b/typedapi/types/nativecode.go index 24bebb3309..13aee64bf3 100644 --- a/typedapi/types/nativecode.go +++ b/typedapi/types/nativecode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NativeCode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/info/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/info/types.ts#L29-L32 type NativeCode struct { BuildHash string `json:"build_hash"` Version string `json:"version"` diff --git a/typedapi/types/nativecodeinformation.go b/typedapi/types/nativecodeinformation.go index 619c7ac92b..8617485529 100644 --- a/typedapi/types/nativecodeinformation.go +++ b/typedapi/types/nativecodeinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NativeCodeInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/info/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/info/types.ts#L29-L32 type NativeCodeInformation struct { BuildHash string `json:"build_hash"` Version string `json:"version"` diff --git a/typedapi/types/nerinferenceoptions.go b/typedapi/types/nerinferenceoptions.go index 4d3027c769..c00d56bbc3 100644 --- a/typedapi/types/nerinferenceoptions.go +++ b/typedapi/types/nerinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NerInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L273-L282 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L275-L284 type NerInferenceOptions struct { // ClassificationLabels The token classification labels. Must be IOB formatted tags ClassificationLabels []string `json:"classification_labels,omitempty"` diff --git a/typedapi/types/nerinferenceupdateoptions.go b/typedapi/types/nerinferenceupdateoptions.go index 9078370b77..271b3f555a 100644 --- a/typedapi/types/nerinferenceupdateoptions.go +++ b/typedapi/types/nerinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NerInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L423-L428 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L427-L432 type NerInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/nestedaggregate.go b/typedapi/types/nestedaggregate.go index 21ff150c65..f1996308c0 100644 --- a/typedapi/types/nestedaggregate.go +++ b/typedapi/types/nestedaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // NestedAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L534-L538 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L606-L610 type NestedAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *NestedAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *NestedAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/nestedaggregation.go b/typedapi/types/nestedaggregation.go index 40d4ea7a71..3a08ed0d79 100644 --- a/typedapi/types/nestedaggregation.go +++ b/typedapi/types/nestedaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NestedAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L655-L660 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L658-L663 type NestedAggregation struct { // Path The path to the field of type `nested`. Path *string `json:"path,omitempty"` diff --git a/typedapi/types/nestedidentity.go b/typedapi/types/nestedidentity.go index 18675bc15a..e92148327d 100644 --- a/typedapi/types/nestedidentity.go +++ b/typedapi/types/nestedidentity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NestedIdentity type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L89-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/hits.ts#L97-L101 type NestedIdentity struct { Field string `json:"field"` Nested_ *NestedIdentity `json:"_nested,omitempty"` diff --git a/typedapi/types/nestedproperty.go b/typedapi/types/nestedproperty.go index 416f84fa13..77ca52b741 100644 --- a/typedapi/types/nestedproperty.go +++ b/typedapi/types/nestedproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // NestedProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/complex.ts#L40-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/complex.ts#L40-L45 type NestedProperty struct { CopyTo []string `json:"copy_to,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` diff --git a/typedapi/types/nestedquery.go b/typedapi/types/nestedquery.go index 7580359cc2..83d3634363 100644 --- a/typedapi/types/nestedquery.go +++ b/typedapi/types/nestedquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NestedQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/joining.ts#L112-L139 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/joining.ts#L112-L139 type NestedQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/nestedsortvalue.go b/typedapi/types/nestedsortvalue.go index df5d333d1d..dde77e8a54 100644 --- a/typedapi/types/nestedsortvalue.go +++ b/typedapi/types/nestedsortvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NestedSortValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L29-L34 type NestedSortValue struct { Filter *Query `json:"filter,omitempty"` MaxChildren *int `json:"max_children,omitempty"` diff --git a/typedapi/types/networkdirectionprocessor.go b/typedapi/types/networkdirectionprocessor.go index 038b50642e..f9f0c5b82a 100644 --- a/typedapi/types/networkdirectionprocessor.go +++ b/typedapi/types/networkdirectionprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NetworkDirectionProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1249-L1283 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1253-L1287 type NetworkDirectionProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/nevercondition.go b/typedapi/types/nevercondition.go index f750c896b5..6d3cafa7b2 100644 --- a/typedapi/types/nevercondition.go +++ b/typedapi/types/nevercondition.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NeverCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L73-L73 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Conditions.ts#L73-L73 type NeverCondition struct { } diff --git a/typedapi/types/ngramtokenfilter.go b/typedapi/types/ngramtokenfilter.go index a024bae6f8..b6ff2084e4 100644 --- a/typedapi/types/ngramtokenfilter.go +++ b/typedapi/types/ngramtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NGramTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L364-L372 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L399-L407 type NGramTokenFilter struct { // MaxGram Maximum length of characters in a gram. Defaults to `2`. MaxGram *int `json:"max_gram,omitempty"` diff --git a/typedapi/types/ngramtokenizer.go b/typedapi/types/ngramtokenizer.go index d1035c6e15..b321084a08 100644 --- a/typedapi/types/ngramtokenizer.go +++ b/typedapi/types/ngramtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NGramTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L85-L95 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L85-L95 type NGramTokenizer struct { CustomTokenChars *string `json:"custom_token_chars,omitempty"` MaxGram *int `json:"max_gram,omitempty"` diff --git a/typedapi/types/nlpberttokenizationconfig.go b/typedapi/types/nlpberttokenizationconfig.go index 241456eaf9..b17e7e24d5 100644 --- a/typedapi/types/nlpberttokenizationconfig.go +++ b/typedapi/types/nlpberttokenizationconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NlpBertTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L188-L189 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L188-L189 type NlpBertTokenizationConfig struct { // DoLowerCase Should the tokenizer lower case the text DoLowerCase *bool `json:"do_lower_case,omitempty"` diff --git a/typedapi/types/nlprobertatokenizationconfig.go b/typedapi/types/nlprobertatokenizationconfig.go index 2c137eb5c8..43e8af7cd7 100644 --- a/typedapi/types/nlprobertatokenizationconfig.go +++ b/typedapi/types/nlprobertatokenizationconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NlpRobertaTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L191-L198 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L191-L198 type NlpRobertaTokenizationConfig struct { // AddPrefixSpace Should the tokenizer prefix input with a space character AddPrefixSpace *bool `json:"add_prefix_space,omitempty"` diff --git a/typedapi/types/nlptokenizationupdateoptions.go b/typedapi/types/nlptokenizationupdateoptions.go index 9d054ef0b3..059c04684d 100644 --- a/typedapi/types/nlptokenizationupdateoptions.go +++ b/typedapi/types/nlptokenizationupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NlpTokenizationUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L375-L380 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L379-L384 type NlpTokenizationUpdateOptions struct { // Span Span options to apply Span *int `json:"span,omitempty"` diff --git a/typedapi/types/node.go b/typedapi/types/node.go index a85693ef7b..b5a857b85b 100644 --- a/typedapi/types/node.go +++ b/typedapi/types/node.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Node type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/searchable_snapshots/cache_stats/Response.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/searchable_snapshots/cache_stats/Response.ts#L30-L32 type Node struct { SharedCache Shared `json:"shared_cache"` } diff --git a/typedapi/types/nodeallocationexplanation.go b/typedapi/types/nodeallocationexplanation.go index eaeb8f6ba3..2c94cdce6e 100644 --- a/typedapi/types/nodeallocationexplanation.go +++ b/typedapi/types/nodeallocationexplanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,9 +34,9 @@ import ( // NodeAllocationExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L103-L117 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L103-L117 type NodeAllocationExplanation struct { - Deciders []AllocationDecision `json:"deciders"` + Deciders []AllocationDecision `json:"deciders,omitempty"` NodeAttributes map[string]string `json:"node_attributes"` NodeDecision decision.Decision `json:"node_decision"` NodeId string `json:"node_id"` @@ -44,7 +44,7 @@ type NodeAllocationExplanation struct { Roles []noderole.NodeRole `json:"roles"` Store *AllocationStore `json:"store,omitempty"` TransportAddress string `json:"transport_address"` - WeightRanking int `json:"weight_ranking"` + WeightRanking *int `json:"weight_ranking,omitempty"` } func (s *NodeAllocationExplanation) UnmarshalJSON(data []byte) error { @@ -115,10 +115,10 @@ func (s *NodeAllocationExplanation) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "WeightRanking", err) } - s.WeightRanking = value + s.WeightRanking = &value case float64: f := int(v) - s.WeightRanking = f + s.WeightRanking = &f } } diff --git a/typedapi/types/nodeattributes.go b/typedapi/types/nodeattributes.go index ba8046687c..7944998c66 100644 --- a/typedapi/types/nodeattributes.go +++ b/typedapi/types/nodeattributes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NodeAttributes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Node.ts#L41-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Node.ts#L41-L52 type NodeAttributes struct { // Attributes Lists node attributes. Attributes map[string]string `json:"attributes"` diff --git a/typedapi/types/nodeattributesrecord.go b/typedapi/types/nodeattributesrecord.go index 08e4b72e63..1eaf7be260 100644 --- a/typedapi/types/nodeattributesrecord.go +++ b/typedapi/types/nodeattributesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeAttributesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/nodeattrs/types.ts#L20-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/nodeattrs/types.ts#L20-L55 type NodeAttributesRecord struct { // Attr The attribute name. Attr *string `json:"attr,omitempty"` diff --git a/typedapi/types/nodebufferpool.go b/typedapi/types/nodebufferpool.go index cfda4b5ee5..c43f974c6a 100644 --- a/typedapi/types/nodebufferpool.go +++ b/typedapi/types/nodebufferpool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeBufferPool type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L861-L882 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L861-L882 type NodeBufferPool struct { // Count Number of buffer pools. Count *int64 `json:"count,omitempty"` diff --git a/typedapi/types/nodediskusage.go b/typedapi/types/nodediskusage.go index 2e12ac50db..184fe79431 100644 --- a/typedapi/types/nodediskusage.go +++ b/typedapi/types/nodediskusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NodeDiskUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L57-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L57-L61 type NodeDiskUsage struct { LeastAvailable DiskUsage `json:"least_available"` MostAvailable DiskUsage `json:"most_available"` diff --git a/typedapi/types/nodeids.go b/typedapi/types/nodeids.go index d6ba1882bc..6f8283dc89 100644 --- a/typedapi/types/nodeids.go +++ b/typedapi/types/nodeids.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeIds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L58-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L58-L58 type NodeIds []string diff --git a/typedapi/types/nodeinfo.go b/typedapi/types/nodeinfo.go index eced2b7808..3218f512ff 100644 --- a/typedapi/types/nodeinfo.go +++ b/typedapi/types/nodeinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L32-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L32-L72 type NodeInfo struct { Aggregations map[string]NodeInfoAggregation `json:"aggregations,omitempty"` Attributes map[string]string `json:"attributes"` diff --git a/typedapi/types/nodeinfoaction.go b/typedapi/types/nodeinfoaction.go index 51eae5ec5f..ef2b0a2465 100644 --- a/typedapi/types/nodeinfoaction.go +++ b/typedapi/types/nodeinfoaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L194-L196 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L195-L197 type NodeInfoAction struct { DestructiveRequiresName string `json:"destructive_requires_name"` } diff --git a/typedapi/types/nodeinfoaggregation.go b/typedapi/types/nodeinfoaggregation.go index 09183de52b..eaa1e3933c 100644 --- a/typedapi/types/nodeinfoaggregation.go +++ b/typedapi/types/nodeinfoaggregation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L250-L252 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L253-L255 type NodeInfoAggregation struct { Types []string `json:"types"` } diff --git a/typedapi/types/nodeinfobootstrap.go b/typedapi/types/nodeinfobootstrap.go index 634d9b1905..3036323dc6 100644 --- a/typedapi/types/nodeinfobootstrap.go +++ b/typedapi/types/nodeinfobootstrap.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoBootstrap type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L214-L216 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L217-L219 type NodeInfoBootstrap struct { MemoryLock string `json:"memory_lock"` } diff --git a/typedapi/types/nodeinfoclient.go b/typedapi/types/nodeinfoclient.go index ec033981e7..01fb83d968 100644 --- a/typedapi/types/nodeinfoclient.go +++ b/typedapi/types/nodeinfoclient.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoClient type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L198-L200 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L199-L201 type NodeInfoClient struct { Type string `json:"type"` } diff --git a/typedapi/types/nodeinfodiscover.go b/typedapi/types/nodeinfodiscover.go index 8429640c2c..051dcf7529 100644 --- a/typedapi/types/nodeinfodiscover.go +++ b/typedapi/types/nodeinfodiscover.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoDiscover type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L183-L192 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L184-L193 type NodeInfoDiscover struct { NodeInfoDiscover map[string]json.RawMessage `json:"-"` SeedHosts []string `json:"seed_hosts,omitempty"` diff --git a/typedapi/types/nodeinfohttp.go b/typedapi/types/nodeinfohttp.go index 935eb8b2da..47d91e43e8 100644 --- a/typedapi/types/nodeinfohttp.go +++ b/typedapi/types/nodeinfohttp.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoHttp type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L326-L331 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L329-L334 type NodeInfoHttp struct { BoundAddress []string `json:"bound_address"` MaxContentLength ByteSize `json:"max_content_length,omitempty"` diff --git a/typedapi/types/nodeinfoingest.go b/typedapi/types/nodeinfoingest.go index 4d62318270..8e2e184d7c 100644 --- a/typedapi/types/nodeinfoingest.go +++ b/typedapi/types/nodeinfoingest.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L242-L244 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L245-L247 type NodeInfoIngest struct { Processors []NodeInfoIngestProcessor `json:"processors"` } diff --git a/typedapi/types/nodeinfoingestdownloader.go b/typedapi/types/nodeinfoingestdownloader.go index b78def3e8f..a71d3ee4f8 100644 --- a/typedapi/types/nodeinfoingestdownloader.go +++ b/typedapi/types/nodeinfoingestdownloader.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoIngestDownloader type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L138-L140 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L138-L140 type NodeInfoIngestDownloader struct { Enabled string `json:"enabled"` } diff --git a/typedapi/types/nodeinfoingestinfo.go b/typedapi/types/nodeinfoingestinfo.go index df78a90f0b..3264581b39 100644 --- a/typedapi/types/nodeinfoingestinfo.go +++ b/typedapi/types/nodeinfoingestinfo.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoIngestInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L134-L136 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L134-L136 type NodeInfoIngestInfo struct { Downloader NodeInfoIngestDownloader `json:"downloader"` } diff --git a/typedapi/types/nodeinfoingestprocessor.go b/typedapi/types/nodeinfoingestprocessor.go index f721a114b2..8af627130a 100644 --- a/typedapi/types/nodeinfoingestprocessor.go +++ b/typedapi/types/nodeinfoingestprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoIngestProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L246-L248 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L249-L251 type NodeInfoIngestProcessor struct { Type string `json:"type"` } diff --git a/typedapi/types/nodeinfojvmmemory.go b/typedapi/types/nodeinfojvmmemory.go index 2631a8c3b9..61aadc5da9 100644 --- a/typedapi/types/nodeinfojvmmemory.go +++ b/typedapi/types/nodeinfojvmmemory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoJvmMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L333-L344 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L336-L347 type NodeInfoJvmMemory struct { DirectMax ByteSize `json:"direct_max,omitempty"` DirectMaxInBytes int64 `json:"direct_max_in_bytes"` diff --git a/typedapi/types/nodeinfomemory.go b/typedapi/types/nodeinfomemory.go index 3a9330ef56..fdccdb6c06 100644 --- a/typedapi/types/nodeinfomemory.go +++ b/typedapi/types/nodeinfomemory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L346-L349 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L349-L352 type NodeInfoMemory struct { Total string `json:"total"` TotalInBytes int64 `json:"total_in_bytes"` diff --git a/typedapi/types/nodeinfooscpu.go b/typedapi/types/nodeinfooscpu.go index 4a988dc681..f0e586de28 100644 --- a/typedapi/types/nodeinfooscpu.go +++ b/typedapi/types/nodeinfooscpu.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoOSCPU type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L351-L360 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L354-L363 type NodeInfoOSCPU struct { CacheSize string `json:"cache_size"` CacheSizeInBytes int `json:"cache_size_in_bytes"` diff --git a/typedapi/types/nodeinfopath.go b/typedapi/types/nodeinfopath.go index 2b2e5d2705..5e452a6e97 100644 --- a/typedapi/types/nodeinfopath.go +++ b/typedapi/types/nodeinfopath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoPath type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L168-L173 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L169-L174 type NodeInfoPath struct { Data []string `json:"data,omitempty"` Home *string `json:"home,omitempty"` diff --git a/typedapi/types/nodeinforepositories.go b/typedapi/types/nodeinforepositories.go index bbd41bee0c..4aaf89b979 100644 --- a/typedapi/types/nodeinforepositories.go +++ b/typedapi/types/nodeinforepositories.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoRepositories type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L175-L177 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L176-L178 type NodeInfoRepositories struct { Url NodeInfoRepositoriesUrl `json:"url"` } diff --git a/typedapi/types/nodeinforepositoriesurl.go b/typedapi/types/nodeinforepositoriesurl.go index bd7c3a6c98..a2a8f8d2e0 100644 --- a/typedapi/types/nodeinforepositoriesurl.go +++ b/typedapi/types/nodeinforepositoriesurl.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoRepositoriesUrl type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L179-L181 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L180-L182 type NodeInfoRepositoriesUrl struct { AllowedUrls string `json:"allowed_urls"` } diff --git a/typedapi/types/nodeinfoscript.go b/typedapi/types/nodeinfoscript.go index 4c189d6390..c9e5c3005f 100644 --- a/typedapi/types/nodeinfoscript.go +++ b/typedapi/types/nodeinfoscript.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L304-L307 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L307-L310 type NodeInfoScript struct { AllowedTypes string `json:"allowed_types"` DisableMaxCompilationsRate *string `json:"disable_max_compilations_rate,omitempty"` diff --git a/typedapi/types/nodeinfosearch.go b/typedapi/types/nodeinfosearch.go index 154503de61..d4887e6058 100644 --- a/typedapi/types/nodeinfosearch.go +++ b/typedapi/types/nodeinfosearch.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L309-L311 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L312-L314 type NodeInfoSearch struct { Remote NodeInfoSearchRemote `json:"remote"` } diff --git a/typedapi/types/nodeinfosearchremote.go b/typedapi/types/nodeinfosearchremote.go index 9ede1ca089..75246841de 100644 --- a/typedapi/types/nodeinfosearchremote.go +++ b/typedapi/types/nodeinfosearchremote.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoSearchRemote type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L313-L315 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L316-L318 type NodeInfoSearchRemote struct { Connect string `json:"connect"` } diff --git a/typedapi/types/nodeinfosettings.go b/typedapi/types/nodeinfosettings.go index 9628ccd9b5..a9ee72a4af 100644 --- a/typedapi/types/nodeinfosettings.go +++ b/typedapi/types/nodeinfosettings.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L79-L95 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L79-L95 type NodeInfoSettings struct { Action *NodeInfoAction `json:"action,omitempty"` Bootstrap *NodeInfoBootstrap `json:"bootstrap,omitempty"` diff --git a/typedapi/types/nodeinfosettingscluster.go b/typedapi/types/nodeinfosettingscluster.go index 6e62d20d95..5b01865c3a 100644 --- a/typedapi/types/nodeinfosettingscluster.go +++ b/typedapi/types/nodeinfosettingscluster.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsCluster type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L142-L152 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L142-L152 type NodeInfoSettingsCluster struct { DeprecationIndexing *DeprecationIndexing `json:"deprecation_indexing,omitempty"` Election NodeInfoSettingsClusterElection `json:"election"` diff --git a/typedapi/types/nodeinfosettingsclusterelection.go b/typedapi/types/nodeinfosettingsclusterelection.go index 9915aeec77..86b289a593 100644 --- a/typedapi/types/nodeinfosettingsclusterelection.go +++ b/typedapi/types/nodeinfosettingsclusterelection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsClusterElection type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L158-L160 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L159-L161 type NodeInfoSettingsClusterElection struct { Strategy string `json:"strategy"` } diff --git a/typedapi/types/nodeinfosettingshttp.go b/typedapi/types/nodeinfosettingshttp.go index ed2c986bcd..9815240cbc 100644 --- a/typedapi/types/nodeinfosettingshttp.go +++ b/typedapi/types/nodeinfosettingshttp.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsHttp type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L202-L207 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L203-L210 type NodeInfoSettingsHttp struct { Compression *string `json:"compression,omitempty"` Port *string `json:"port,omitempty"` diff --git a/typedapi/types/nodeinfosettingshttptype.go b/typedapi/types/nodeinfosettingshttptype.go index 48d8853ba6..0bf571bce3 100644 --- a/typedapi/types/nodeinfosettingshttptype.go +++ b/typedapi/types/nodeinfosettingshttptype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsHttpType type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L209-L212 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L212-L215 type NodeInfoSettingsHttpType struct { Default string `json:"default"` } diff --git a/typedapi/types/nodeinfosettingsingest.go b/typedapi/types/nodeinfosettingsingest.go index 964527f1a4..a9f5385fe3 100644 --- a/typedapi/types/nodeinfosettingsingest.go +++ b/typedapi/types/nodeinfosettingsingest.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoSettingsIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L97-L132 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L97-L132 type NodeInfoSettingsIngest struct { Append *NodeInfoIngestInfo `json:"append,omitempty"` Attachment *NodeInfoIngestInfo `json:"attachment,omitempty"` diff --git a/typedapi/types/nodeinfosettingsnetwork.go b/typedapi/types/nodeinfosettingsnetwork.go index 517ae2ded4..c9eccd54b2 100644 --- a/typedapi/types/nodeinfosettingsnetwork.go +++ b/typedapi/types/nodeinfosettingsnetwork.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsNetwork type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L238-L240 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L241-L243 type NodeInfoSettingsNetwork struct { Host []string `json:"host,omitempty"` } diff --git a/typedapi/types/nodeinfosettingsnode.go b/typedapi/types/nodeinfosettingsnode.go index 4ccb215b96..439e3342c4 100644 --- a/typedapi/types/nodeinfosettingsnode.go +++ b/typedapi/types/nodeinfosettingsnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L162-L166 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L163-L167 type NodeInfoSettingsNode struct { Attr map[string]json.RawMessage `json:"attr"` MaxLocalStorageNodes *string `json:"max_local_storage_nodes,omitempty"` diff --git a/typedapi/types/nodeinfosettingstransport.go b/typedapi/types/nodeinfosettingstransport.go index 6e902b388e..da6c0190f6 100644 --- a/typedapi/types/nodeinfosettingstransport.go +++ b/typedapi/types/nodeinfosettingstransport.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransport type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L218-L227 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L221-L230 type NodeInfoSettingsTransport struct { Features *NodeInfoSettingsTransportFeatures `json:"features,omitempty"` // IgnoreDeserializationErrors Only used in unit tests diff --git a/typedapi/types/nodeinfosettingstransportfeatures.go b/typedapi/types/nodeinfosettingstransportfeatures.go index afc23d4e1f..89146c7c0c 100644 --- a/typedapi/types/nodeinfosettingstransportfeatures.go +++ b/typedapi/types/nodeinfosettingstransportfeatures.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransportFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L234-L236 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L237-L239 type NodeInfoSettingsTransportFeatures struct { XPack string `json:"x-pack"` } diff --git a/typedapi/types/nodeinfosettingstransporttype.go b/typedapi/types/nodeinfosettingstransporttype.go index d9cfebb483..634de3d0f6 100644 --- a/typedapi/types/nodeinfosettingstransporttype.go +++ b/typedapi/types/nodeinfosettingstransporttype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransportType type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L229-L232 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L232-L235 type NodeInfoSettingsTransportType struct { Default string `json:"default"` } diff --git a/typedapi/types/nodeinfotransport.go b/typedapi/types/nodeinfotransport.go index 61c746ba4b..f848c21456 100644 --- a/typedapi/types/nodeinfotransport.go +++ b/typedapi/types/nodeinfotransport.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoTransport type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L362-L366 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L365-L369 type NodeInfoTransport struct { BoundAddress []string `json:"bound_address"` Profiles map[string]string `json:"profiles"` diff --git a/typedapi/types/nodeinfoxpack.go b/typedapi/types/nodeinfoxpack.go index 731996da4b..481df0ca1d 100644 --- a/typedapi/types/nodeinfoxpack.go +++ b/typedapi/types/nodeinfoxpack.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // NodeInfoXpack type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L254-L259 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L257-L262 type NodeInfoXpack struct { License *NodeInfoXpackLicense `json:"license,omitempty"` Ml *NodeInfoXpackMl `json:"ml,omitempty"` diff --git a/typedapi/types/nodeinfoxpacklicense.go b/typedapi/types/nodeinfoxpacklicense.go index 93b89accc1..a91d0d9d9e 100644 --- a/typedapi/types/nodeinfoxpacklicense.go +++ b/typedapi/types/nodeinfoxpacklicense.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoXpackLicense type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L296-L298 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L299-L301 type NodeInfoXpackLicense struct { SelfGenerated NodeInfoXpackLicenseType `json:"self_generated"` } diff --git a/typedapi/types/nodeinfoxpacklicensetype.go b/typedapi/types/nodeinfoxpacklicensetype.go index 8b3bb723ba..5a3f412b6b 100644 --- a/typedapi/types/nodeinfoxpacklicensetype.go +++ b/typedapi/types/nodeinfoxpacklicensetype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackLicenseType type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L300-L302 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L303-L305 type NodeInfoXpackLicenseType struct { Type string `json:"type"` } diff --git a/typedapi/types/nodeinfoxpackml.go b/typedapi/types/nodeinfoxpackml.go index 22d883d81b..d6da43a59e 100644 --- a/typedapi/types/nodeinfoxpackml.go +++ b/typedapi/types/nodeinfoxpackml.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackMl type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L268-L270 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L271-L273 type NodeInfoXpackMl struct { UseAutoMachineMemoryPercent *bool `json:"use_auto_machine_memory_percent,omitempty"` } diff --git a/typedapi/types/nodeinfoxpacksecurity.go b/typedapi/types/nodeinfoxpacksecurity.go index f2ccb4b68e..cc6eafc236 100644 --- a/typedapi/types/nodeinfoxpacksecurity.go +++ b/typedapi/types/nodeinfoxpacksecurity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurity type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L261-L266 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L264-L269 type NodeInfoXpackSecurity struct { Authc *NodeInfoXpackSecurityAuthc `json:"authc,omitempty"` Enabled string `json:"enabled"` diff --git a/typedapi/types/nodeinfoxpacksecurityauthc.go b/typedapi/types/nodeinfoxpacksecurityauthc.go index 8894d2ee2d..edae88b612 100644 --- a/typedapi/types/nodeinfoxpacksecurityauthc.go +++ b/typedapi/types/nodeinfoxpacksecurityauthc.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoXpackSecurityAuthc type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L276-L279 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L279-L282 type NodeInfoXpackSecurityAuthc struct { Realms *NodeInfoXpackSecurityAuthcRealms `json:"realms,omitempty"` Token *NodeInfoXpackSecurityAuthcToken `json:"token,omitempty"` diff --git a/typedapi/types/nodeinfoxpacksecurityauthcrealms.go b/typedapi/types/nodeinfoxpacksecurityauthcrealms.go index 98cfb36297..a5e945763e 100644 --- a/typedapi/types/nodeinfoxpacksecurityauthcrealms.go +++ b/typedapi/types/nodeinfoxpacksecurityauthcrealms.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoXpackSecurityAuthcRealms type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L281-L285 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L284-L288 type NodeInfoXpackSecurityAuthcRealms struct { File map[string]NodeInfoXpackSecurityAuthcRealmsStatus `json:"file,omitempty"` Native map[string]NodeInfoXpackSecurityAuthcRealmsStatus `json:"native,omitempty"` diff --git a/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go b/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go index 1d2aa1645a..644703ad38 100644 --- a/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go +++ b/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurityAuthcRealmsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L291-L294 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L294-L297 type NodeInfoXpackSecurityAuthcRealmsStatus struct { Enabled *string `json:"enabled,omitempty"` Order string `json:"order"` diff --git a/typedapi/types/nodeinfoxpacksecurityauthctoken.go b/typedapi/types/nodeinfoxpacksecurityauthctoken.go index 36820e844d..525638c826 100644 --- a/typedapi/types/nodeinfoxpacksecurityauthctoken.go +++ b/typedapi/types/nodeinfoxpacksecurityauthctoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurityAuthcToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L287-L289 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L290-L292 type NodeInfoXpackSecurityAuthcToken struct { Enabled string `json:"enabled"` } diff --git a/typedapi/types/nodeinfoxpacksecurityssl.go b/typedapi/types/nodeinfoxpacksecurityssl.go index 778860be5a..54b294fb52 100644 --- a/typedapi/types/nodeinfoxpacksecurityssl.go +++ b/typedapi/types/nodeinfoxpacksecurityssl.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodeInfoXpackSecuritySsl type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L272-L274 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L275-L277 type NodeInfoXpackSecuritySsl struct { Ssl map[string]string `json:"ssl"` } diff --git a/typedapi/types/nodejvminfo.go b/typedapi/types/nodejvminfo.go index 42dc7b1127..83417a552b 100644 --- a/typedapi/types/nodejvminfo.go +++ b/typedapi/types/nodejvminfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeJvmInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L368-L381 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L371-L385 type NodeJvmInfo struct { GcCollectors []string `json:"gc_collectors"` InputArguments []string `json:"input_arguments"` diff --git a/typedapi/types/nodeoperatingsysteminfo.go b/typedapi/types/nodeoperatingsysteminfo.go index c525453345..0080b771d3 100644 --- a/typedapi/types/nodeoperatingsysteminfo.go +++ b/typedapi/types/nodeoperatingsysteminfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeOperatingSystemInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L383-L400 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L387-L404 type NodeOperatingSystemInfo struct { // AllocatedProcessors The number of processors actually used to calculate thread pool size. This // number can be set with the node.processors setting of a node and defaults to diff --git a/typedapi/types/nodepackagingtype.go b/typedapi/types/nodepackagingtype.go index c29e5260d0..44c01e41a7 100644 --- a/typedapi/types/nodepackagingtype.go +++ b/typedapi/types/nodepackagingtype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodePackagingType type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L700-L713 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L718-L731 type NodePackagingType struct { // Count Number of selected nodes using the distribution flavor and file type. Count int `json:"count"` diff --git a/typedapi/types/nodeprocessinfo.go b/typedapi/types/nodeprocessinfo.go index a8be4872aa..5b96d7169a 100644 --- a/typedapi/types/nodeprocessinfo.go +++ b/typedapi/types/nodeprocessinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeProcessInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L402-L409 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L406-L413 type NodeProcessInfo struct { // Id Process identifier (PID) Id int64 `json:"id"` diff --git a/typedapi/types/nodereloadresult.go b/typedapi/types/nodereloadresult.go index e0e3ad2461..189a1341fb 100644 --- a/typedapi/types/nodereloadresult.go +++ b/typedapi/types/nodereloadresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NodeReloadResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/NodeReloadResult.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/NodeReloadResult.ts#L23-L26 type NodeReloadResult struct { Name string `json:"name"` ReloadException *ErrorCause `json:"reload_exception,omitempty"` diff --git a/typedapi/types/nodescontext.go b/typedapi/types/nodescontext.go index 0f396c7a34..9cd47f7fd3 100644 --- a/typedapi/types/nodescontext.go +++ b/typedapi/types/nodescontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodesContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1075-L1080 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1075-L1080 type NodesContext struct { CacheEvictions *int64 `json:"cache_evictions,omitempty"` CompilationLimitTriggered *int64 `json:"compilation_limit_triggered,omitempty"` diff --git a/typedapi/types/nodescredentials.go b/typedapi/types/nodescredentials.go index 7f4c7b2396..41bb9e4054 100644 --- a/typedapi/types/nodescredentials.go +++ b/typedapi/types/nodescredentials.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodesCredentials type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_service_credentials/types.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_service_credentials/types.ts#L23-L28 type NodesCredentials struct { // FileTokens File-backed tokens collected from all nodes FileTokens map[string]NodesCredentialsFileToken `json:"file_tokens"` diff --git a/typedapi/types/nodescredentialsfiletoken.go b/typedapi/types/nodescredentialsfiletoken.go index 2cebf36fca..3cc5274899 100644 --- a/typedapi/types/nodescredentialsfiletoken.go +++ b/typedapi/types/nodescredentialsfiletoken.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodesCredentialsFileToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_service_credentials/types.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_service_credentials/types.ts#L30-L32 type NodesCredentialsFileToken struct { Nodes []string `json:"nodes"` } diff --git a/typedapi/types/nodesecuritystats.go b/typedapi/types/nodesecuritystats.go new file mode 100644 index 0000000000..4a6ff6d62f --- /dev/null +++ b/typedapi/types/nodesecuritystats.go @@ -0,0 +1,36 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// NodeSecurityStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/NodeSecurityStats.ts#L22-L27 +type NodeSecurityStats struct { + // Roles Role statistics. + Roles RolesStats `json:"roles"` +} + +// NewNodeSecurityStats returns a NodeSecurityStats. +func NewNodeSecurityStats() *NodeSecurityStats { + r := &NodeSecurityStats{} + + return r +} diff --git a/typedapi/types/nodeshard.go b/typedapi/types/nodeshard.go index 97e67530ee..8afe207465 100644 --- a/typedapi/types/nodeshard.go +++ b/typedapi/types/nodeshard.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NodeShard type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Node.ts#L54-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Node.ts#L54-L65 type NodeShard struct { AllocationId map[string]string `json:"allocation_id,omitempty"` Index string `json:"index"` diff --git a/typedapi/types/nodeshutdownstatus.go b/typedapi/types/nodeshutdownstatus.go index 6a7ba8ab10..75d4c3e18e 100644 --- a/typedapi/types/nodeshutdownstatus.go +++ b/typedapi/types/nodeshutdownstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // NodeShutdownStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L29-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L29-L38 type NodeShutdownStatus struct { NodeId string `json:"node_id"` PersistentTasks PersistentTaskStatus `json:"persistent_tasks"` diff --git a/typedapi/types/nodesindexingpressure.go b/typedapi/types/nodesindexingpressure.go index 645974176a..2b017ea57c 100644 --- a/typedapi/types/nodesindexingpressure.go +++ b/typedapi/types/nodesindexingpressure.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodesIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L116-L121 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L116-L121 type NodesIndexingPressure struct { // Memory Contains statistics for memory consumption from indexing load. Memory *NodesIndexingPressureMemory `json:"memory,omitempty"` diff --git a/typedapi/types/nodesindexingpressurememory.go b/typedapi/types/nodesindexingpressurememory.go index 80ff70550c..da4489681f 100644 --- a/typedapi/types/nodesindexingpressurememory.go +++ b/typedapi/types/nodesindexingpressurememory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodesIndexingPressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L123-L142 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L123-L142 type NodesIndexingPressureMemory struct { // Current Contains statistics for current indexing load. Current *PressureMemory `json:"current,omitempty"` diff --git a/typedapi/types/nodesinfometrics.go b/typedapi/types/nodesinfometrics.go new file mode 100644 index 0000000000..87c5318556 --- /dev/null +++ b/typedapi/types/nodesinfometrics.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/nodesinfometric" +) + +// NodesInfoMetrics type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/NodesInfoRequest.ts#L90-L90 +type NodesInfoMetrics []nodesinfometric.NodesInfoMetric diff --git a/typedapi/types/nodesingest.go b/typedapi/types/nodesingest.go index 8a667fc921..f9ea7fcc9f 100644 --- a/typedapi/types/nodesingest.go +++ b/typedapi/types/nodesingest.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // NodesIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L347-L356 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L347-L356 type NodesIngest struct { // Pipelines Contains statistics about ingest pipelines for the node. Pipelines map[string]IngestStats `json:"pipelines,omitempty"` diff --git a/typedapi/types/nodesrecord.go b/typedapi/types/nodesrecord.go index 10a39fed1a..4875748e4f 100644 --- a/typedapi/types/nodesrecord.go +++ b/typedapi/types/nodesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,8 +31,10 @@ import ( // NodesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/nodes/types.ts#L23-L542 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/nodes/types.ts#L23-L547 type NodesRecord struct { + // AvailableProcessors The number of available processors (logical CPU cores available to the JVM). + AvailableProcessors *string `json:"available_processors,omitempty"` // Build The Elasticsearch build hash. Build *string `json:"build,omitempty"` // BulkAvgSizeInBytes The average size in bytes of shard bulk. @@ -249,6 +251,18 @@ func (s *NodesRecord) UnmarshalJSON(data []byte) error { switch t { + case "available_processors", "ap": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "AvailableProcessors", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.AvailableProcessors = &o + case "build", "b": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/nodestatistics.go b/typedapi/types/nodestatistics.go index 768dd08b71..42a2e7f66c 100644 --- a/typedapi/types/nodestatistics.go +++ b/typedapi/types/nodestatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Node.ts#L28-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Node.ts#L28-L39 type NodeStatistics struct { // Failed Number of nodes that rejected the request or failed to respond. If this value // is not 0, a reason for the rejection or failure is included in the response. diff --git a/typedapi/types/nodestatsmetrics.go b/typedapi/types/nodestatsmetrics.go new file mode 100644 index 0000000000..6c2ff7f08e --- /dev/null +++ b/typedapi/types/nodestatsmetrics.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/nodestatsmetric" +) + +// NodeStatsMetrics type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/stats/NodesStatsRequest.ts#L133-L133 +type NodeStatsMetrics []nodestatsmetric.NodeStatsMetric diff --git a/typedapi/types/nodesusagemetrics.go b/typedapi/types/nodesusagemetrics.go new file mode 100644 index 0000000000..c340b5a3d2 --- /dev/null +++ b/typedapi/types/nodesusagemetrics.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/nodesusagemetric" +) + +// NodesUsageMetrics type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/usage/NodesUsageRequest.ts#L77-L77 +type NodesUsageMetrics []nodesusagemetric.NodesUsageMetric diff --git a/typedapi/types/nodetasks.go b/typedapi/types/nodetasks.go index 2a2a07b768..7c3376297c 100644 --- a/typedapi/types/nodetasks.go +++ b/typedapi/types/nodetasks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NodeTasks type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/_types/TaskListResponseBase.ts#L49-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/tasks/_types/TaskListResponseBase.ts#L49-L57 type NodeTasks struct { Attributes map[string]string `json:"attributes,omitempty"` Host *string `json:"host,omitempty"` diff --git a/typedapi/types/nodethreadpoolinfo.go b/typedapi/types/nodethreadpoolinfo.go index ccc5f91f05..3df52a1d95 100644 --- a/typedapi/types/nodethreadpoolinfo.go +++ b/typedapi/types/nodethreadpoolinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NodeThreadPoolInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L317-L324 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L320-L327 type NodeThreadPoolInfo struct { Core *int `json:"core,omitempty"` KeepAlive Duration `json:"keep_alive,omitempty"` diff --git a/typedapi/types/nodeusage.go b/typedapi/types/nodeusage.go index 21ed3a2bda..fed2f4d2f9 100644 --- a/typedapi/types/nodeusage.go +++ b/typedapi/types/nodeusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NodeUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/usage/types.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/usage/types.ts#L25-L30 type NodeUsage struct { Aggregations map[string]json.RawMessage `json:"aggregations"` RestActions map[string]int `json:"rest_actions"` diff --git a/typedapi/types/nonstationary.go b/typedapi/types/nonstationary.go new file mode 100644 index 0000000000..0dd73ddb7a --- /dev/null +++ b/typedapi/types/nonstationary.go @@ -0,0 +1,110 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// NonStationary type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L429-L433 +type NonStationary struct { + PValue Float64 `json:"p_value"` + RValue Float64 `json:"r_value"` + Trend string `json:"trend"` +} + +func (s *NonStationary) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "p_value": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "PValue", err) + } + f := Float64(value) + s.PValue = f + case float64: + f := Float64(v) + s.PValue = f + } + + case "r_value": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "RValue", err) + } + f := Float64(value) + s.RValue = f + case float64: + f := Float64(v) + s.RValue = f + } + + case "trend": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Trend", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Trend = o + + } + } + return nil +} + +// NewNonStationary returns a NonStationary. +func NewNonStationary() *NonStationary { + r := &NonStationary{} + + return r +} diff --git a/typedapi/types/norianalyzer.go b/typedapi/types/norianalyzer.go index a31b093442..913680a085 100644 --- a/typedapi/types/norianalyzer.go +++ b/typedapi/types/norianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NoriAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L323-L330 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L323-L330 type NoriAnalyzer struct { DecompoundMode *noridecompoundmode.NoriDecompoundMode `json:"decompound_mode,omitempty"` Stoptags []string `json:"stoptags,omitempty"` diff --git a/typedapi/types/noripartofspeechtokenfilter.go b/typedapi/types/noripartofspeechtokenfilter.go index 0f1b532b19..3f37dea789 100644 --- a/typedapi/types/noripartofspeechtokenfilter.go +++ b/typedapi/types/noripartofspeechtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // NoriPartOfSpeechTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/nori-plugin.ts#L37-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/nori-plugin.ts#L37-L41 type NoriPartOfSpeechTokenFilter struct { // Stoptags An array of part-of-speech tags that should be removed. Stoptags []string `json:"stoptags,omitempty"` diff --git a/typedapi/types/noritokenizer.go b/typedapi/types/noritokenizer.go index d7f118c4fc..3898bc64d0 100644 --- a/typedapi/types/noritokenizer.go +++ b/typedapi/types/noritokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NoriTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/nori-plugin.ts#L29-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/nori-plugin.ts#L29-L35 type NoriTokenizer struct { DecompoundMode *noridecompoundmode.NoriDecompoundMode `json:"decompound_mode,omitempty"` DiscardPunctuation *bool `json:"discard_punctuation,omitempty"` diff --git a/typedapi/types/normalizeaggregation.go b/typedapi/types/normalizeaggregation.go index f278a091fb..e276334547 100644 --- a/typedapi/types/normalizeaggregation.go +++ b/typedapi/types/normalizeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // NormalizeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L351-L359 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L353-L361 type NormalizeAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/normalizer.go b/typedapi/types/normalizer.go index 6c28abd5cc..8da78e77c6 100644 --- a/typedapi/types/normalizer.go +++ b/typedapi/types/normalizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // LowercaseNormalizer // CustomNormalizer // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/normalizers.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/normalizers.ts#L20-L24 type Normalizer any type NormalizerVariant interface { diff --git a/typedapi/types/norwegiananalyzer.go b/typedapi/types/norwegiananalyzer.go index 996da49676..f301bf9eda 100644 --- a/typedapi/types/norwegiananalyzer.go +++ b/typedapi/types/norwegiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NorwegianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L248-L253 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L248-L253 type NorwegianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/notfoundaliases.go b/typedapi/types/notfoundaliases.go index f307e6a5ce..4118c2c8a4 100644 --- a/typedapi/types/notfoundaliases.go +++ b/typedapi/types/notfoundaliases.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // NotFoundAliases type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_alias/_types/response.ts#L28-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_alias/_types/response.ts#L29-L37 type NotFoundAliases struct { Error string `json:"error"` NotFoundAliases map[string]IndexAliases `json:"-"` @@ -66,8 +66,19 @@ func (s *NotFoundAliases) UnmarshalJSON(data []byte) error { s.Error = o case "status": - if err := dec.Decode(&s.Status); err != nil { - return fmt.Errorf("%s | %w", "Status", err) + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Status", err) + } + s.Status = value + case float64: + f := int(v) + s.Status = f } default: diff --git a/typedapi/types/numberrangequery.go b/typedapi/types/numberrangequery.go index e4842b4c34..3525d4dfba 100644 --- a/typedapi/types/numberrangequery.go +++ b/typedapi/types/numberrangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // NumberRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L168-L168 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L169-L169 type NumberRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/numericdecayfunction.go b/typedapi/types/numericdecayfunction.go index ad76aa1bbd..6c24d1e0dd 100644 --- a/typedapi/types/numericdecayfunction.go +++ b/typedapi/types/numericdecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -29,7 +29,7 @@ import ( // NumericDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L208-L208 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L210-L210 type NumericDecayFunction struct { DecayFunctionBasedoubledouble map[string]DecayPlacementdoubledouble `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the diff --git a/typedapi/types/numericfielddata.go b/typedapi/types/numericfielddata.go index 9b30a50bb6..090798e5cd 100644 --- a/typedapi/types/numericfielddata.go +++ b/typedapi/types/numericfielddata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // NumericFielddata type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/NumericFielddata.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/NumericFielddata.ts#L22-L24 type NumericFielddata struct { Format numericfielddataformat.NumericFielddataFormat `json:"format"` } diff --git a/typedapi/types/objectproperty.go b/typedapi/types/objectproperty.go index 3c5036ded7..3fcf1e5ac9 100644 --- a/typedapi/types/objectproperty.go +++ b/typedapi/types/objectproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // ObjectProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/complex.ts#L47-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/complex.ts#L47-L51 type ObjectProperty struct { CopyTo []string `json:"copy_to,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` diff --git a/typedapi/types/onehotencodingpreprocessor.go b/typedapi/types/onehotencodingpreprocessor.go index 2ca573c9fb..67c439ebd8 100644 --- a/typedapi/types/onehotencodingpreprocessor.go +++ b/typedapi/types/onehotencodingpreprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // OneHotEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L44-L47 type OneHotEncodingPreprocessor struct { Field string `json:"field"` HotMap map[string]string `json:"hot_map"` diff --git a/typedapi/types/openaiservicesettings.go b/typedapi/types/openaiservicesettings.go index 47b885a26d..ece26f597d 100644 --- a/typedapi/types/openaiservicesettings.go +++ b/typedapi/types/openaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // OpenAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1554-L1596 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1778-L1820 type OpenAIServiceSettings struct { // ApiKey A valid API key of your OpenAI account. // You can find your OpenAI API keys in your OpenAI account under the API keys diff --git a/typedapi/types/openaitasksettings.go b/typedapi/types/openaitasksettings.go index 958d9d0449..2ad2b96dd4 100644 --- a/typedapi/types/openaitasksettings.go +++ b/typedapi/types/openaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,8 +31,19 @@ import ( // OpenAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1598-L1604 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1822-L1839 type OpenAITaskSettings struct { + // Headers Specifies custom HTTP header parameters. + // For example: + // ``` + // + // "headers":{ + // "Custom-Header": "Some-Value", + // "Another-Custom-Header": "Another-Value" + // } + // + // ``` + Headers json.RawMessage `json:"headers,omitempty"` // User For a `completion` or `text_embedding` task, specify the user issuing the // request. // This information can be used for abuse detection. @@ -54,6 +65,11 @@ func (s *OpenAITaskSettings) UnmarshalJSON(data []byte) error { switch t { + case "headers": + if err := dec.Decode(&s.Headers); err != nil { + return fmt.Errorf("%s | %w", "Headers", err) + } + case "user": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/openshiftaiservicesettings.go b/typedapi/types/openshiftaiservicesettings.go new file mode 100644 index 0000000000..7c902221f1 --- /dev/null +++ b/typedapi/types/openshiftaiservicesettings.go @@ -0,0 +1,159 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/openshiftaisimilaritytype" +) + +// OpenShiftAiServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1851-L1883 +type OpenShiftAiServiceSettings struct { + // ApiKey A valid API key for your OpenShift AI endpoint. + // Can be found in `Token authentication` section of model related information. + ApiKey string `json:"api_key"` + // MaxInputTokens For a `text_embedding` task, the maximum number of tokens per input before + // chunking occurs. + MaxInputTokens *int `json:"max_input_tokens,omitempty"` + // ModelId The name of the model to use for the inference task. + // Refer to the hosted model's documentation for the name if needed. + // Service has been tested and confirmed to be working with the following + // models: + // * For `text_embedding` task - `gritlm-7b`. + // * For `completion` and `chat_completion` tasks - `llama-31-8b-instruct`. + // * For `rerank` task - `bge-reranker-v2-m3`. + ModelId *string `json:"model_id,omitempty"` + // RateLimit This setting helps to minimize the number of rate limit errors returned from + // the OpenShift AI API. + // By default, the `openshift_ai` service sets the number of requests allowed + // per minute to 3000. + RateLimit *RateLimitSetting `json:"rate_limit,omitempty"` + // Similarity For a `text_embedding` task, the similarity measure. One of cosine, + // dot_product, l2_norm. + Similarity *openshiftaisimilaritytype.OpenShiftAiSimilarityType `json:"similarity,omitempty"` + // Url The URL of the OpenShift AI hosted model endpoint. + Url string `json:"url"` +} + +func (s *OpenShiftAiServiceSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "api_key": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ApiKey", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ApiKey = o + + case "max_input_tokens": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "MaxInputTokens", err) + } + s.MaxInputTokens = &value + case float64: + f := int(v) + s.MaxInputTokens = &f + } + + case "model_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ModelId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ModelId = &o + + case "rate_limit": + if err := dec.Decode(&s.RateLimit); err != nil { + return fmt.Errorf("%s | %w", "RateLimit", err) + } + + case "similarity": + if err := dec.Decode(&s.Similarity); err != nil { + return fmt.Errorf("%s | %w", "Similarity", err) + } + + case "url": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Url", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Url = o + + } + } + return nil +} + +// NewOpenShiftAiServiceSettings returns a OpenShiftAiServiceSettings. +func NewOpenShiftAiServiceSettings() *OpenShiftAiServiceSettings { + r := &OpenShiftAiServiceSettings{} + + return r +} + +type OpenShiftAiServiceSettingsVariant interface { + OpenShiftAiServiceSettingsCaster() *OpenShiftAiServiceSettings +} + +func (s *OpenShiftAiServiceSettings) OpenShiftAiServiceSettingsCaster() *OpenShiftAiServiceSettings { + return s +} diff --git a/typedapi/types/openshiftaitasksettings.go b/typedapi/types/openshiftaitasksettings.go new file mode 100644 index 0000000000..ed2cf488fa --- /dev/null +++ b/typedapi/types/openshiftaitasksettings.go @@ -0,0 +1,105 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// OpenShiftAiTaskSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1902-L1911 +type OpenShiftAiTaskSettings struct { + // ReturnDocuments For a `rerank` task, whether to return the source documents in the response. + ReturnDocuments *bool `json:"return_documents,omitempty"` + // TopN For a `rerank` task, the number of most relevant documents to return. + TopN *int `json:"top_n,omitempty"` +} + +func (s *OpenShiftAiTaskSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "return_documents": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "ReturnDocuments", err) + } + s.ReturnDocuments = &value + case bool: + s.ReturnDocuments = &v + } + + case "top_n": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "TopN", err) + } + s.TopN = &value + case float64: + f := int(v) + s.TopN = &f + } + + } + } + return nil +} + +// NewOpenShiftAiTaskSettings returns a OpenShiftAiTaskSettings. +func NewOpenShiftAiTaskSettings() *OpenShiftAiTaskSettings { + r := &OpenShiftAiTaskSettings{} + + return r +} + +type OpenShiftAiTaskSettingsVariant interface { + OpenShiftAiTaskSettingsCaster() *OpenShiftAiTaskSettings +} + +func (s *OpenShiftAiTaskSettings) OpenShiftAiTaskSettingsCaster() *OpenShiftAiTaskSettings { + return s +} diff --git a/typedapi/types/operatingsystem.go b/typedapi/types/operatingsystem.go index 8b2e28d142..8a5bd05524 100644 --- a/typedapi/types/operatingsystem.go +++ b/typedapi/types/operatingsystem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // OperatingSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1023-L1029 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1023-L1029 type OperatingSystem struct { Cgroup *Cgroup `json:"cgroup,omitempty"` Cpu *Cpu `json:"cpu,omitempty"` diff --git a/typedapi/types/operatingsystemmemoryinfo.go b/typedapi/types/operatingsystemmemoryinfo.go index 49ca88283a..b4289f0f4a 100644 --- a/typedapi/types/operatingsystemmemoryinfo.go +++ b/typedapi/types/operatingsystemmemoryinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // OperatingSystemMemoryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L715-L763 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L733-L781 type OperatingSystemMemoryInfo struct { // AdjustedTotal Total amount of memory across all selected nodes, but using the value // specified using the `es.total_memory_bytes` system property instead of diff --git a/typedapi/types/operationcontainer.go b/typedapi/types/operationcontainer.go index d4cdb8dd62..36a7ef1dba 100644 --- a/typedapi/types/operationcontainer.go +++ b/typedapi/types/operationcontainer.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // OperationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L158-L180 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/types.ts#L158-L180 type OperationContainer struct { - AdditionalOperationContainerProperty map[string]json.RawMessage `json:"-"` // Create Index the specified document if it does not already exist. // The following line must contain the source data to be indexed. Create *CreateOperation `json:"create,omitempty"` @@ -44,40 +38,9 @@ type OperationContainer struct { Update *UpdateOperation `json:"update,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s OperationContainer) MarshalJSON() ([]byte, error) { - type opt OperationContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalOperationContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalOperationContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewOperationContainer returns a OperationContainer. func NewOperationContainer() *OperationContainer { - r := &OperationContainer{ - AdditionalOperationContainerProperty: make(map[string]json.RawMessage), - } + r := &OperationContainer{} return r } diff --git a/typedapi/types/outlierdetectionparameters.go b/typedapi/types/outlierdetectionparameters.go index 785569d1f4..26a97aa7e2 100644 --- a/typedapi/types/outlierdetectionparameters.go +++ b/typedapi/types/outlierdetectionparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // OutlierDetectionParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L528-L562 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L528-L562 type OutlierDetectionParameters struct { // ComputeFeatureInfluence Specifies whether the feature influence calculation is enabled. ComputeFeatureInfluence *bool `json:"compute_feature_influence,omitempty"` diff --git a/typedapi/types/overallbucket.go b/typedapi/types/overallbucket.go index 3fe3157dc2..eebe3241f9 100644 --- a/typedapi/types/overallbucket.go +++ b/typedapi/types/overallbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // OverallBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Bucket.ts#L129-L144 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Bucket.ts#L130-L145 type OverallBucket struct { // BucketSpan The length of the bucket in seconds. Matches the job with the longest // bucket_span value. diff --git a/typedapi/types/overallbucketjob.go b/typedapi/types/overallbucketjob.go index ef58fa0d7f..8827550e91 100644 --- a/typedapi/types/overallbucketjob.go +++ b/typedapi/types/overallbucketjob.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // OverallBucketJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Bucket.ts#L145-L148 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Bucket.ts#L146-L149 type OverallBucketJob struct { JobId string `json:"job_id"` MaxAnomalyScore Float64 `json:"max_anomaly_score"` diff --git a/typedapi/types/overlapping.go b/typedapi/types/overlapping.go index 50f05916e5..5c56dfcc99 100644 --- a/typedapi/types/overlapping.go +++ b/typedapi/types/overlapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Overlapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L39-L42 type Overlapping struct { IndexPatterns []string `json:"index_patterns"` Name string `json:"name"` diff --git a/typedapi/types/page.go b/typedapi/types/page.go index 218f1f64b5..6ca69dbd9f 100644 --- a/typedapi/types/page.go +++ b/typedapi/types/page.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Page type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Page.ts#L22-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Page.ts#L22-L33 type Page struct { // From Skips the specified number of items. From *int `json:"from,omitempty"` diff --git a/typedapi/types/pagerdutyaction.go b/typedapi/types/pagerdutyaction.go index 12a1c31586..7c889dba3a 100644 --- a/typedapi/types/pagerdutyaction.go +++ b/typedapi/types/pagerdutyaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // PagerDutyAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L54-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L54-L54 type PagerDutyAction struct { Account *string `json:"account,omitempty"` AttachPayload bool `json:"attach_payload"` diff --git a/typedapi/types/pagerdutycontext.go b/typedapi/types/pagerdutycontext.go index d4033e8237..2a00046837 100644 --- a/typedapi/types/pagerdutycontext.go +++ b/typedapi/types/pagerdutycontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // PagerDutyContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L61-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L61-L65 type PagerDutyContext struct { Href *string `json:"href,omitempty"` Src *string `json:"src,omitempty"` diff --git a/typedapi/types/pagerdutyevent.go b/typedapi/types/pagerdutyevent.go index 019a0908fc..d4979c9d01 100644 --- a/typedapi/types/pagerdutyevent.go +++ b/typedapi/types/pagerdutyevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // PagerDutyEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L40-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L40-L52 type PagerDutyEvent struct { Account *string `json:"account,omitempty"` AttachPayload bool `json:"attach_payload"` diff --git a/typedapi/types/pagerdutyeventproxy.go b/typedapi/types/pagerdutyeventproxy.go index f75d05cda4..fe13adcd00 100644 --- a/typedapi/types/pagerdutyeventproxy.go +++ b/typedapi/types/pagerdutyeventproxy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PagerDutyEventProxy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L56-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L56-L59 type PagerDutyEventProxy struct { Host *string `json:"host,omitempty"` Port *int `json:"port,omitempty"` diff --git a/typedapi/types/pagerdutyresult.go b/typedapi/types/pagerdutyresult.go index 74c4cb91f8..d743067cb7 100644 --- a/typedapi/types/pagerdutyresult.go +++ b/typedapi/types/pagerdutyresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PagerDutyResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L78-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L78-L83 type PagerDutyResult struct { Event PagerDutyEvent `json:"event"` Reason *string `json:"reason,omitempty"` diff --git a/typedapi/types/painlesscontextsetup.go b/typedapi/types/painlesscontextsetup.go index 1f7328d93d..aa2531ecbb 100644 --- a/typedapi/types/painlesscontextsetup.go +++ b/typedapi/types/painlesscontextsetup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PainlessContextSetup type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/scripts_painless_execute/types.ts#L27-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/scripts_painless_execute/types.ts#L27-L46 type PainlessContextSetup struct { // Document Document that's temporarily indexed in-memory and accessible from the script. Document json.RawMessage `json:"document,omitempty"` diff --git a/typedapi/types/parentaggregate.go b/typedapi/types/parentaggregate.go index cd1b0e707b..1397d5199f 100644 --- a/typedapi/types/parentaggregate.go +++ b/typedapi/types/parentaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // ParentAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L896-L900 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L968-L972 type ParentAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *ParentAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *ParentAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/parentaggregation.go b/typedapi/types/parentaggregation.go index 1af8bcf2cc..db0c08f5bc 100644 --- a/typedapi/types/parentaggregation.go +++ b/typedapi/types/parentaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ParentAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L662-L667 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L665-L670 type ParentAggregation struct { // Type The child type that should be selected. Type *string `json:"type,omitempty"` diff --git a/typedapi/types/parentidquery.go b/typedapi/types/parentidquery.go index 8917268b84..361186c3c3 100644 --- a/typedapi/types/parentidquery.go +++ b/typedapi/types/parentidquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ParentIdQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/joining.ts#L141-L158 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/joining.ts#L141-L158 type ParentIdQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/parenttaskinfo.go b/typedapi/types/parenttaskinfo.go index b299a04a61..4bb5df172d 100644 --- a/typedapi/types/parenttaskinfo.go +++ b/typedapi/types/parenttaskinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ParentTaskInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/_types/TaskListResponseBase.ts#L45-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/tasks/_types/TaskListResponseBase.ts#L45-L47 type ParentTaskInfo struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` diff --git a/typedapi/types/passthroughinferenceoptions.go b/typedapi/types/passthroughinferenceoptions.go index 3537890f2b..79219896dd 100644 --- a/typedapi/types/passthroughinferenceoptions.go +++ b/typedapi/types/passthroughinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PassThroughInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L239-L246 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L241-L248 type PassThroughInferenceOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/passthroughinferenceupdateoptions.go b/typedapi/types/passthroughinferenceupdateoptions.go index 886f4c3579..370108907e 100644 --- a/typedapi/types/passthroughinferenceupdateoptions.go +++ b/typedapi/types/passthroughinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PassThroughInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L404-L409 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L408-L413 type PassThroughInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/passthroughobjectproperty.go b/typedapi/types/passthroughobjectproperty.go index 171f83a61d..3521f1bde6 100644 --- a/typedapi/types/passthroughobjectproperty.go +++ b/typedapi/types/passthroughobjectproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // PassthroughObjectProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/complex.ts#L53-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/complex.ts#L53-L58 type PassthroughObjectProperty struct { CopyTo []string `json:"copy_to,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` diff --git a/typedapi/types/pathhierarchytokenizer.go b/typedapi/types/pathhierarchytokenizer.go index 00dc6a7b63..e375413545 100644 --- a/typedapi/types/pathhierarchytokenizer.go +++ b/typedapi/types/pathhierarchytokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PathHierarchyTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L97-L104 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L97-L104 type PathHierarchyTokenizer struct { BufferSize Stringifiedinteger `json:"buffer_size,omitempty"` Delimiter *string `json:"delimiter,omitempty"` diff --git a/typedapi/types/patternanalyzer.go b/typedapi/types/patternanalyzer.go index ab74bf6379..8c31e0ac18 100644 --- a/typedapi/types/patternanalyzer.go +++ b/typedapi/types/patternanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PatternAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L332-L365 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L332-L365 type PatternAnalyzer struct { // Flags Java regular expression flags. Flags should be pipe-separated, eg // "CASE_INSENSITIVE|COMMENTS". diff --git a/typedapi/types/patterncapturetokenfilter.go b/typedapi/types/patterncapturetokenfilter.go index 77d893cc4d..98b2d970da 100644 --- a/typedapi/types/patterncapturetokenfilter.go +++ b/typedapi/types/patterncapturetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PatternCaptureTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L374-L380 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L409-L415 type PatternCaptureTokenFilter struct { // Patterns A list of regular expressions to match. Patterns []string `json:"patterns"` diff --git a/typedapi/types/patternreplacecharfilter.go b/typedapi/types/patternreplacecharfilter.go index 58251e484b..107cc01b37 100644 --- a/typedapi/types/patternreplacecharfilter.go +++ b/typedapi/types/patternreplacecharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PatternReplaceCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L57-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/char_filters.ts#L57-L62 type PatternReplaceCharFilter struct { Flags *string `json:"flags,omitempty"` Pattern string `json:"pattern"` diff --git a/typedapi/types/patternreplacetokenfilter.go b/typedapi/types/patternreplacetokenfilter.go index 641aa11b75..875c94c0f4 100644 --- a/typedapi/types/patternreplacetokenfilter.go +++ b/typedapi/types/patternreplacetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PatternReplaceTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L382-L391 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L417-L426 type PatternReplaceTokenFilter struct { // All If `true`, all substrings matching the pattern parameter’s regular expression // are replaced. If `false`, the filter replaces only the first matching diff --git a/typedapi/types/patterntokenizer.go b/typedapi/types/patterntokenizer.go index 782f860795..f3c1549d85 100644 --- a/typedapi/types/patterntokenizer.go +++ b/typedapi/types/patterntokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PatternTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L106-L111 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L106-L111 type PatternTokenizer struct { Flags *string `json:"flags,omitempty"` Group *int `json:"group,omitempty"` diff --git a/typedapi/types/pendingtask.go b/typedapi/types/pendingtask.go index a96d0b6330..be2b1df5d8 100644 --- a/typedapi/types/pendingtask.go +++ b/typedapi/types/pendingtask.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PendingTask type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/pending_tasks/types.ts#L23-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/pending_tasks/types.ts#L23-L47 type PendingTask struct { // Executing Indicates whether the pending tasks are currently executing or not. Executing bool `json:"executing"` diff --git a/typedapi/types/pendingtasksrecord.go b/typedapi/types/pendingtasksrecord.go index c4d8df2c36..bcebb17d77 100644 --- a/typedapi/types/pendingtasksrecord.go +++ b/typedapi/types/pendingtasksrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PendingTasksRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/pending_tasks/types.ts#L20-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/pending_tasks/types.ts#L20-L41 type PendingTasksRecord struct { // InsertOrder The task insertion order. InsertOrder *string `json:"insertOrder,omitempty"` diff --git a/typedapi/types/percentage.go b/typedapi/types/percentage.go index 6bf6f25d05..71ffb9a2bc 100644 --- a/typedapi/types/percentage.go +++ b/typedapi/types/percentage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // float32 // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Numeric.ts#L28-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Numeric.ts#L28-L28 type Percentage any type PercentageVariant interface { diff --git a/typedapi/types/percentagescoreheuristic.go b/typedapi/types/percentagescoreheuristic.go index 892e05497a..f7b3c27cd8 100644 --- a/typedapi/types/percentagescoreheuristic.go +++ b/typedapi/types/percentagescoreheuristic.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // PercentageScoreHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L811-L811 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L814-L814 type PercentageScoreHeuristic struct { } diff --git a/typedapi/types/percentileranksaggregation.go b/typedapi/types/percentileranksaggregation.go index 27bf2f5e2c..bc141a2430 100644 --- a/typedapi/types/percentileranksaggregation.go +++ b/typedapi/types/percentileranksaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PercentileRanksAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L192-L214 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L196-L218 type PercentileRanksAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/percentiles.go b/typedapi/types/percentiles.go index e4ccfe5bf0..def6bade70 100644 --- a/typedapi/types/percentiles.go +++ b/typedapi/types/percentiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // KeyedPercentiles // []ArrayPercentilesItem // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L152-L153 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L157-L158 type Percentiles any diff --git a/typedapi/types/percentilesaggregation.go b/typedapi/types/percentilesaggregation.go index 241ad6ee21..7d9ea6c4d3 100644 --- a/typedapi/types/percentilesaggregation.go +++ b/typedapi/types/percentilesaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PercentilesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L216-L235 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L220-L239 type PercentilesAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -111,8 +111,19 @@ func (s *PercentilesAggregation) UnmarshalJSON(data []byte) error { } case "percents": - if err := dec.Decode(&s.Percents); err != nil { - return fmt.Errorf("%s | %w", "Percents", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(Float64) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Percents", err) + } + + s.Percents = append(s.Percents, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Percents); err != nil { + return fmt.Errorf("%s | %w", "Percents", err) + } } case "script": diff --git a/typedapi/types/percentilesbucketaggregate.go b/typedapi/types/percentilesbucketaggregate.go index 62a2b0840d..14282b8b89 100644 --- a/typedapi/types/percentilesbucketaggregate.go +++ b/typedapi/types/percentilesbucketaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PercentilesBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L180-L181 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L185-L186 type PercentilesBucketAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/percentilesbucketaggregation.go b/typedapi/types/percentilesbucketaggregation.go index 77038f1863..a24ffb4741 100644 --- a/typedapi/types/percentilesbucketaggregation.go +++ b/typedapi/types/percentilesbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // PercentilesBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L389-L397 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L391-L399 type PercentilesBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/percolatequery.go b/typedapi/types/percolatequery.go index c069bc25ec..64bc443e0f 100644 --- a/typedapi/types/percolatequery.go +++ b/typedapi/types/percolatequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PercolateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L205-L245 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L205-L245 type PercolateQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -57,7 +57,7 @@ type PercolateQuery struct { Preference *string `json:"preference,omitempty"` QueryName_ *string `json:"_name,omitempty"` // Routing Routing used to fetch document to percolate. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` // Version The expected version of a stored document to percolate. Version *int64 `json:"version,omitempty"` } @@ -155,8 +155,19 @@ func (s *PercolateQuery) UnmarshalJSON(data []byte) error { s.QueryName_ = &o case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "version": diff --git a/typedapi/types/percolatorproperty.go b/typedapi/types/percolatorproperty.go index 4b57ee9eef..68b0970d20 100644 --- a/typedapi/types/percolatorproperty.go +++ b/typedapi/types/percolatorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // PercolatorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L203-L205 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L204-L206 type PercolatorProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/perpartitioncategorization.go b/typedapi/types/perpartitioncategorization.go index 249939f15e..02e59114b1 100644 --- a/typedapi/types/perpartitioncategorization.go +++ b/typedapi/types/perpartitioncategorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PerPartitionCategorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Analysis.ts#L150-L159 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Analysis.ts#L150-L159 type PerPartitionCategorization struct { // Enabled To enable this setting, you must also set the `partition_field_name` property // to the same value in every detector that uses the keyword `mlcategory`. diff --git a/typedapi/types/perrepositorystats.go b/typedapi/types/perrepositorystats.go index e33801c031..51078e3935 100644 --- a/typedapi/types/perrepositorystats.go +++ b/typedapi/types/perrepositorystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PerRepositoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L665-L670 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L683-L688 type PerRepositoryStats struct { CurrentCounts RepositoryStatsCurrentCounts `json:"current_counts"` OldestStartTime *string `json:"oldest_start_time,omitempty"` diff --git a/typedapi/types/persiananalyzer.go b/typedapi/types/persiananalyzer.go index f5a354dd29..932ab1e685 100644 --- a/typedapi/types/persiananalyzer.go +++ b/typedapi/types/persiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PersianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L255-L259 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L255-L259 type PersianAnalyzer struct { Stopwords StopWords `json:"stopwords,omitempty"` StopwordsPath *string `json:"stopwords_path,omitempty"` diff --git a/typedapi/types/persiannormalizationtokenfilter.go b/typedapi/types/persiannormalizationtokenfilter.go index 3eec821439..a348615044 100644 --- a/typedapi/types/persiannormalizationtokenfilter.go +++ b/typedapi/types/persiannormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PersianNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L527-L529 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L564-L566 type PersianNormalizationTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/persianstemtokenfilter.go b/typedapi/types/persianstemtokenfilter.go index 06b0e29555..4324877e70 100644 --- a/typedapi/types/persianstemtokenfilter.go +++ b/typedapi/types/persianstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PersianStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L571-L573 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L608-L610 type PersianStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/persistenttaskstatus.go b/typedapi/types/persistenttaskstatus.go index 7471214bb4..946f420441 100644 --- a/typedapi/types/persistenttaskstatus.go +++ b/typedapi/types/persistenttaskstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // PersistentTaskStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L56-L58 type PersistentTaskStatus struct { Status shutdownstatus.ShutdownStatus `json:"status"` } diff --git a/typedapi/types/phase.go b/typedapi/types/phase.go index da218e2a72..8af8c1e548 100644 --- a/typedapi/types/phase.go +++ b/typedapi/types/phase.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Phase type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L26-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L26-L29 type Phase struct { Actions *IlmActions `json:"actions,omitempty"` MinAge Duration `json:"min_age,omitempty"` diff --git a/typedapi/types/phases.go b/typedapi/types/phases.go index 9528e6c187..cdbac81617 100644 --- a/typedapi/types/phases.go +++ b/typedapi/types/phases.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Phases type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L31-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L31-L37 type Phases struct { Cold *Phase `json:"cold,omitempty"` Delete *Phase `json:"delete,omitempty"` diff --git a/typedapi/types/phonetictokenfilter.go b/typedapi/types/phonetictokenfilter.go index 89c52039e2..c91ec96672 100644 --- a/typedapi/types/phonetictokenfilter.go +++ b/typedapi/types/phonetictokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // PhoneticTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/phonetic-plugin.ts#L64-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/phonetic-plugin.ts#L64-L72 type PhoneticTokenFilter struct { Encoder phoneticencoder.PhoneticEncoder `json:"encoder"` Languageset []phoneticlanguage.PhoneticLanguage `json:"languageset,omitempty"` diff --git a/typedapi/types/phrasesuggest.go b/typedapi/types/phrasesuggest.go index 7e36a892af..ce07ded4a1 100644 --- a/typedapi/types/phrasesuggest.go +++ b/typedapi/types/phrasesuggest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PhraseSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L58-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L58-L63 type PhraseSuggest struct { Length int `json:"length"` Offset int `json:"offset"` diff --git a/typedapi/types/phrasesuggestcollate.go b/typedapi/types/phrasesuggestcollate.go index ad683f26c8..4922539cde 100644 --- a/typedapi/types/phrasesuggestcollate.go +++ b/typedapi/types/phrasesuggestcollate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestCollate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L334-L347 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L335-L348 type PhraseSuggestCollate struct { // Params Parameters to use if the query is templated. Params map[string]json.RawMessage `json:"params,omitempty"` diff --git a/typedapi/types/phrasesuggestcollatequery.go b/typedapi/types/phrasesuggestcollatequery.go index ec782e050f..99b4f34cf1 100644 --- a/typedapi/types/phrasesuggestcollatequery.go +++ b/typedapi/types/phrasesuggestcollatequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PhraseSuggestCollateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L349-L358 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L350-L359 type PhraseSuggestCollateQuery struct { // Id The search template ID. Id *string `json:"id,omitempty"` diff --git a/typedapi/types/phrasesuggester.go b/typedapi/types/phrasesuggester.go index 16e6470544..0cb79d62ee 100644 --- a/typedapi/types/phrasesuggester.go +++ b/typedapi/types/phrasesuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PhraseSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L360-L418 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L361-L419 type PhraseSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. diff --git a/typedapi/types/phrasesuggesthighlight.go b/typedapi/types/phrasesuggesthighlight.go index 9cdd143fc4..a3eab70b44 100644 --- a/typedapi/types/phrasesuggesthighlight.go +++ b/typedapi/types/phrasesuggesthighlight.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestHighlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L420-L429 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L421-L430 type PhraseSuggestHighlight struct { // PostTag Use in conjunction with `pre_tag` to define the HTML tags to use for the // highlighted text. diff --git a/typedapi/types/phrasesuggestoption.go b/typedapi/types/phrasesuggestoption.go index 1b9a16270c..c3f743b53c 100644 --- a/typedapi/types/phrasesuggestoption.go +++ b/typedapi/types/phrasesuggestoption.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L87-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L87-L92 type PhraseSuggestOption struct { CollateMatch *bool `json:"collate_match,omitempty"` Highlighted *string `json:"highlighted,omitempty"` diff --git a/typedapi/types/pinneddoc.go b/typedapi/types/pinneddoc.go index 74237c124c..11c8cad2c6 100644 --- a/typedapi/types/pinneddoc.go +++ b/typedapi/types/pinneddoc.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PinnedDoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L269-L278 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L269-L278 type PinnedDoc struct { // Id_ The unique document ID. Id_ string `json:"_id"` diff --git a/typedapi/types/pinnedquery.go b/typedapi/types/pinnedquery.go index b75da71d44..7f2f253c3a 100644 --- a/typedapi/types/pinnedquery.go +++ b/typedapi/types/pinnedquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,9 +31,8 @@ import ( // PinnedQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L247-L267 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L247-L267 type PinnedQuery struct { - AdditionalPinnedQueryProperty map[string]json.RawMessage `json:"-"` // Boost Floating point number used to decrease or increase the relevance scores of // the query. // Boost values are relative to the default value of 1.0. @@ -110,58 +109,14 @@ func (s *PinnedQuery) UnmarshalJSON(data []byte) error { } s.QueryName_ = &o - default: - - if key, ok := t.(string); ok { - if s.AdditionalPinnedQueryProperty == nil { - s.AdditionalPinnedQueryProperty = make(map[string]json.RawMessage, 0) - } - raw := new(json.RawMessage) - if err := dec.Decode(&raw); err != nil { - return fmt.Errorf("%s | %w", "AdditionalPinnedQueryProperty", err) - } - s.AdditionalPinnedQueryProperty[key] = *raw - } - } } return nil } -// MarhsalJSON overrides marshalling for types with additional properties -func (s PinnedQuery) MarshalJSON() ([]byte, error) { - type opt PinnedQuery - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalPinnedQueryProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalPinnedQueryProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewPinnedQuery returns a PinnedQuery. func NewPinnedQuery() *PinnedQuery { - r := &PinnedQuery{ - AdditionalPinnedQueryProperty: make(map[string]json.RawMessage), - } + r := &PinnedQuery{} return r } diff --git a/typedapi/types/pinnedretriever.go b/typedapi/types/pinnedretriever.go index bc08230314..ac1da770a0 100644 --- a/typedapi/types/pinnedretriever.go +++ b/typedapi/types/pinnedretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PinnedRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L77-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L78-L84 type PinnedRetriever struct { Docs []SpecifiedDocument `json:"docs,omitempty"` // Filter Query to filter the documents that can match. diff --git a/typedapi/types/pipelineconfig.go b/typedapi/types/pipelineconfig.go index 7e8181a261..9bde9c686e 100644 --- a/typedapi/types/pipelineconfig.go +++ b/typedapi/types/pipelineconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PipelineConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Pipeline.ts#L67-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Pipeline.ts#L99-L113 type PipelineConfig struct { // Description Description of the ingest pipeline. Description *string `json:"description,omitempty"` diff --git a/typedapi/types/pipelinemetadata.go b/typedapi/types/pipelinemetadata.go index ec78cd513e..15fca93226 100644 --- a/typedapi/types/pipelinemetadata.go +++ b/typedapi/types/pipelinemetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PipelineMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/logstash/_types/Pipeline.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/logstash/_types/Pipeline.ts#L23-L26 type PipelineMetadata struct { Type string `json:"type"` Version string `json:"version"` diff --git a/typedapi/types/pipelineprocessor.go b/typedapi/types/pipelineprocessor.go index 02306e383c..4ba66a114e 100644 --- a/typedapi/types/pipelineprocessor.go +++ b/typedapi/types/pipelineprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PipelineProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1285-L1296 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1289-L1300 type PipelineProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/pipelineprocessorresult.go b/typedapi/types/pipelineprocessorresult.go index d5105d771b..a1ce8ec225 100644 --- a/typedapi/types/pipelineprocessorresult.go +++ b/typedapi/types/pipelineprocessorresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // PipelineProcessorResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Simulation.ts#L59-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Simulation.ts#L59-L67 type PipelineProcessorResult struct { Description *string `json:"description,omitempty"` Doc *DocumentSimulation `json:"doc,omitempty"` diff --git a/typedapi/types/pipelinesettings.go b/typedapi/types/pipelinesettings.go index a98c251f19..76d8f2456a 100644 --- a/typedapi/types/pipelinesettings.go +++ b/typedapi/types/pipelinesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PipelineSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/logstash/_types/Pipeline.ts#L28-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/logstash/_types/Pipeline.ts#L28-L55 type PipelineSettings struct { // PipelineBatchDelay When creating pipeline event batches, how long in milliseconds to wait for // each event before dispatching an undersized batch to pipeline workers. diff --git a/typedapi/types/pipeseparatedflagssimplequerystringflag.go b/typedapi/types/pipeseparatedflagssimplequerystringflag.go index 542d271cd1..d0927e3b66 100644 --- a/typedapi/types/pipeseparatedflagssimplequerystringflag.go +++ b/typedapi/types/pipeseparatedflagssimplequerystringflag.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // simplequerystringflag.SimpleQueryStringFlag // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/PipeSeparatedFlags.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_spec_utils/PipeSeparatedFlags.ts#L20-L27 type PipeSeparatedFlagsSimpleQueryStringFlag any type PipeSeparatedFlagsSimpleQueryStringFlagVariant interface { diff --git a/typedapi/types/pivot.go b/typedapi/types/pivot.go index 349480bb97..6f5d6d60a1 100644 --- a/typedapi/types/pivot.go +++ b/typedapi/types/pivot.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Pivot type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L54-L68 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L54-L68 type Pivot struct { // Aggregations Defines how to aggregate the grouped data. The following aggregations are // currently supported: average, bucket diff --git a/typedapi/types/pivotgroupbycontainer.go b/typedapi/types/pivotgroupbycontainer.go index a4805943d5..1ca44a992f 100644 --- a/typedapi/types/pivotgroupbycontainer.go +++ b/typedapi/types/pivotgroupbycontainer.go @@ -16,60 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // PivotGroupByContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L70-L78 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L70-L78 type PivotGroupByContainer struct { - AdditionalPivotGroupByContainerProperty map[string]json.RawMessage `json:"-"` - DateHistogram *DateHistogramAggregation `json:"date_histogram,omitempty"` - GeotileGrid *GeoTileGridAggregation `json:"geotile_grid,omitempty"` - Histogram *HistogramAggregation `json:"histogram,omitempty"` - Terms *TermsAggregation `json:"terms,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s PivotGroupByContainer) MarshalJSON() ([]byte, error) { - type opt PivotGroupByContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalPivotGroupByContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalPivotGroupByContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + DateHistogram *DateHistogramAggregation `json:"date_histogram,omitempty"` + GeotileGrid *GeoTileGridAggregation `json:"geotile_grid,omitempty"` + Histogram *HistogramAggregation `json:"histogram,omitempty"` + Terms *TermsAggregation `json:"terms,omitempty"` } // NewPivotGroupByContainer returns a PivotGroupByContainer. func NewPivotGroupByContainer() *PivotGroupByContainer { - r := &PivotGroupByContainer{ - AdditionalPivotGroupByContainerProperty: make(map[string]json.RawMessage), - } + r := &PivotGroupByContainer{} return r } diff --git a/typedapi/types/pluginsrecord.go b/typedapi/types/pluginsrecord.go index 69f4b05e1e..da1efc5659 100644 --- a/typedapi/types/pluginsrecord.go +++ b/typedapi/types/pluginsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PluginsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/plugins/types.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/plugins/types.ts#L22-L52 type PluginsRecord struct { // Component The component name. Component *string `json:"component,omitempty"` diff --git a/typedapi/types/pluginsstatus.go b/typedapi/types/pluginsstatus.go index 6fb58e1ba2..4033d7ed36 100644 --- a/typedapi/types/pluginsstatus.go +++ b/typedapi/types/pluginsstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // PluginsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L60-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L60-L62 type PluginsStatus struct { Status shutdownstatus.ShutdownStatus `json:"status"` } diff --git a/typedapi/types/pluginstats.go b/typedapi/types/pluginstats.go index 4947de5b5c..06ec16f0d3 100644 --- a/typedapi/types/pluginstats.go +++ b/typedapi/types/pluginstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PluginStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L207-L217 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L207-L217 type PluginStats struct { Classname string `json:"classname"` Description string `json:"description"` diff --git a/typedapi/types/pointintimereference.go b/typedapi/types/pointintimereference.go index ff59c76dbb..2a03691b93 100644 --- a/typedapi/types/pointintimereference.go +++ b/typedapi/types/pointintimereference.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PointInTimeReference type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/PointInTimeReference.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/PointInTimeReference.ts#L23-L26 type PointInTimeReference struct { Id string `json:"id"` KeepAlive Duration `json:"keep_alive,omitempty"` diff --git a/typedapi/types/pointproperty.go b/typedapi/types/pointproperty.go index c16538edff..fa0a57c7b9 100644 --- a/typedapi/types/pointproperty.go +++ b/typedapi/types/pointproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // PointProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/geo.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/geo.ts#L74-L79 type PointProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` diff --git a/typedapi/types/pool.go b/typedapi/types/pool.go index c165e37912..4b5cdf8743 100644 --- a/typedapi/types/pool.go +++ b/typedapi/types/pool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Pool type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L956-L973 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L956-L973 type Pool struct { // MaxInBytes Maximum amount of memory, in bytes, available for use by the heap. MaxInBytes *int64 `json:"max_in_bytes,omitempty"` diff --git a/typedapi/types/porterstemtokenfilter.go b/typedapi/types/porterstemtokenfilter.go index 6cc7033a50..cab3de9108 100644 --- a/typedapi/types/porterstemtokenfilter.go +++ b/typedapi/types/porterstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PorterStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L393-L395 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L428-L430 type PorterStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/portugueseanalyzer.go b/typedapi/types/portugueseanalyzer.go index 59c5f21978..b3f27e371e 100644 --- a/typedapi/types/portugueseanalyzer.go +++ b/typedapi/types/portugueseanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PortugueseAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L261-L266 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L261-L266 type PortugueseAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/postmigrationfeature.go b/typedapi/types/postmigrationfeature.go index 59f9fa5f54..33803ba18b 100644 --- a/typedapi/types/postmigrationfeature.go +++ b/typedapi/types/postmigrationfeature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PostMigrationFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L28-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L28-L30 type PostMigrationFeature struct { FeatureName string `json:"feature_name"` } diff --git a/typedapi/types/predicatetokenfilter.go b/typedapi/types/predicatetokenfilter.go index 23681aeab2..b73b9f335f 100644 --- a/typedapi/types/predicatetokenfilter.go +++ b/typedapi/types/predicatetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // PredicateTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L397-L401 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L432-L436 type PredicateTokenFilter struct { // Script Script containing a condition used to filter incoming tokens. Only tokens // that match this script are included in the output. diff --git a/typedapi/types/predictedvalue.go b/typedapi/types/predictedvalue.go index c84f7b1967..0c1dd2c497 100644 --- a/typedapi/types/predictedvalue.go +++ b/typedapi/types/predictedvalue.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // PredictedValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L476-L476 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L480-L480 type PredictedValue []ScalarValue diff --git a/typedapi/types/prefixquery.go b/typedapi/types/prefixquery.go index 356bb23a34..7a0f5b1dff 100644 --- a/typedapi/types/prefixquery.go +++ b/typedapi/types/prefixquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L98-L120 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L99-L121 type PrefixQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/preprocessor.go b/typedapi/types/preprocessor.go index ec810d2d20..ab0b5a146b 100644 --- a/typedapi/types/preprocessor.go +++ b/typedapi/types/preprocessor.go @@ -16,59 +16,22 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // Preprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L31-L36 type Preprocessor struct { - AdditionalPreprocessorProperty map[string]json.RawMessage `json:"-"` - FrequencyEncoding *FrequencyEncodingPreprocessor `json:"frequency_encoding,omitempty"` - OneHotEncoding *OneHotEncodingPreprocessor `json:"one_hot_encoding,omitempty"` - TargetMeanEncoding *TargetMeanEncodingPreprocessor `json:"target_mean_encoding,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s Preprocessor) MarshalJSON() ([]byte, error) { - type opt Preprocessor - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalPreprocessorProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalPreprocessorProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + FrequencyEncoding *FrequencyEncodingPreprocessor `json:"frequency_encoding,omitempty"` + OneHotEncoding *OneHotEncodingPreprocessor `json:"one_hot_encoding,omitempty"` + TargetMeanEncoding *TargetMeanEncodingPreprocessor `json:"target_mean_encoding,omitempty"` } // NewPreprocessor returns a Preprocessor. func NewPreprocessor() *Preprocessor { - r := &Preprocessor{ - AdditionalPreprocessorProperty: make(map[string]json.RawMessage), - } + r := &Preprocessor{} return r } diff --git a/typedapi/types/pressurememory.go b/typedapi/types/pressurememory.go index 53e48e72cd..5af196fee8 100644 --- a/typedapi/types/pressurememory.go +++ b/typedapi/types/pressurememory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L144-L201 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L144-L201 type PressureMemory struct { // All Memory consumed by indexing requests in the coordinating, primary, or replica // stage. diff --git a/typedapi/types/privileges.go b/typedapi/types/privileges.go index 05f3d99d95..f8a64e5ce6 100644 --- a/typedapi/types/privileges.go +++ b/typedapi/types/privileges.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Privileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges/types.ts#L49-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges/types.ts#L51-L51 type Privileges map[string]bool diff --git a/typedapi/types/privilegesactions.go b/typedapi/types/privilegesactions.go index 1268f44100..44ea953ce1 100644 --- a/typedapi/types/privilegesactions.go +++ b/typedapi/types/privilegesactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PrivilegesActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_privileges/types.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/put_privileges/types.ts#L22-L27 type PrivilegesActions struct { Actions []string `json:"actions"` Application *string `json:"application,omitempty"` diff --git a/typedapi/types/privilegescheck.go b/typedapi/types/privilegescheck.go index 2847a14c65..56cfc13e02 100644 --- a/typedapi/types/privilegescheck.go +++ b/typedapi/types/privilegescheck.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // PrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges_user_profile/types.ts#L30-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges_user_profile/types.ts#L30-L37 type PrivilegesCheck struct { Application []ApplicationPrivilegesCheck `json:"application,omitempty"` // Cluster A list of the cluster privileges that you want to check. diff --git a/typedapi/types/process.go b/typedapi/types/process.go index e659b4c7ab..1dcae2b946 100644 --- a/typedapi/types/process.go +++ b/typedapi/types/process.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Process type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1031-L1053 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1031-L1053 type Process struct { // Cpu Contains CPU statistics for the node. Cpu *Cpu `json:"cpu,omitempty"` diff --git a/typedapi/types/processor.go b/typedapi/types/processor.go index 182b38575e..ba7ef019cb 100644 --- a/typedapi/types/processor.go +++ b/typedapi/types/processor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Processor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L422-L439 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L422-L439 type Processor struct { // Count Number of documents transformed by the processor. Count *int64 `json:"count,omitempty"` diff --git a/typedapi/types/processorcontainer.go b/typedapi/types/processorcontainer.go index 4855371b43..db423c362e 100644 --- a/typedapi/types/processorcontainer.go +++ b/typedapi/types/processorcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -27,7 +27,7 @@ import ( // ProcessorContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L28-L302 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L28-L302 type ProcessorContainer struct { AdditionalProcessorContainerProperty map[string]json.RawMessage `json:"-"` // Append Appends one or more values to an existing array if the field already exists diff --git a/typedapi/types/profile.go b/typedapi/types/profile.go index dc2a4a0423..3ae9f8706d 100644 --- a/typedapi/types/profile.go +++ b/typedapi/types/profile.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Profile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L101-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L101-L103 type Profile struct { Shards []ShardProfile `json:"shards"` } diff --git a/typedapi/types/property.go b/typedapi/types/property.go index df9eb049c2..a27ae0be58 100644 --- a/typedapi/types/property.go +++ b/typedapi/types/property.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -75,7 +75,7 @@ package types // LongRangeProperty // IcuCollationProperty // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/Property.ts#L120-L191 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/Property.ts#L120-L191 type Property any type PropertyVariant interface { diff --git a/typedapi/types/publishedclusterstates.go b/typedapi/types/publishedclusterstates.go index e03de42d2e..e7b4a8881b 100644 --- a/typedapi/types/publishedclusterstates.go +++ b/typedapi/types/publishedclusterstates.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // PublishedClusterStates type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L265-L278 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L265-L278 type PublishedClusterStates struct { // CompatibleDiffs Number of compatible differences between published cluster states. CompatibleDiffs *int64 `json:"compatible_diffs,omitempty"` diff --git a/typedapi/types/pvalueheuristic.go b/typedapi/types/pvalueheuristic.go new file mode 100644 index 0000000000..1f2320b2f4 --- /dev/null +++ b/typedapi/types/pvalueheuristic.go @@ -0,0 +1,105 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// PValueHeuristic type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L820-L834 +type PValueHeuristic struct { + BackgroundIsSuperset *bool `json:"background_is_superset,omitempty"` + // NormalizeAbove Should the results be normalized when above the given value. + // Allows for consistent significance results at various scales. + // Note: `0` is a special value which means no normalization + NormalizeAbove *int64 `json:"normalize_above,omitempty"` +} + +func (s *PValueHeuristic) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "background_is_superset": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "BackgroundIsSuperset", err) + } + s.BackgroundIsSuperset = &value + case bool: + s.BackgroundIsSuperset = &v + } + + case "normalize_above": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "NormalizeAbove", err) + } + s.NormalizeAbove = &value + case float64: + f := int64(v) + s.NormalizeAbove = &f + } + + } + } + return nil +} + +// NewPValueHeuristic returns a PValueHeuristic. +func NewPValueHeuristic() *PValueHeuristic { + r := &PValueHeuristic{} + + return r +} + +type PValueHeuristicVariant interface { + PValueHeuristicCaster() *PValueHeuristic +} + +func (s *PValueHeuristic) PValueHeuristicCaster() *PValueHeuristic { + return s +} diff --git a/typedapi/types/queries.go b/typedapi/types/queries.go index a3ee2410b7..439ed5d5f9 100644 --- a/typedapi/types/queries.go +++ b/typedapi/types/queries.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Queries type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L430-L432 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L437-L439 type Queries struct { Cache *CacheQueries `json:"cache,omitempty"` } diff --git a/typedapi/types/query.go b/typedapi/types/query.go index ad307c0062..dca76c37d3 100644 --- a/typedapi/types/query.go +++ b/typedapi/types/query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Query type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/abstractions.ts#L103-L434 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/abstractions.ts#L103-L434 type Query struct { AdditionalQueryProperty map[string]json.RawMessage `json:"-"` // Bool matches documents matching boolean combinations of other queries. diff --git a/typedapi/types/querybreakdown.go b/typedapi/types/querybreakdown.go index acba87bc82..aea03e52b7 100644 --- a/typedapi/types/querybreakdown.go +++ b/typedapi/types/querybreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // QueryBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L105-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L105-L126 type QueryBreakdown struct { Advance int64 `json:"advance"` AdvanceCount int64 `json:"advance_count"` diff --git a/typedapi/types/querycachestats.go b/typedapi/types/querycachestats.go index 442a01d606..4b2f69c250 100644 --- a/typedapi/types/querycachestats.go +++ b/typedapi/types/querycachestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // QueryCacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L219-L253 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L219-L253 type QueryCacheStats struct { // CacheCount Total number of entries added to the query cache across all shards assigned // to selected nodes. diff --git a/typedapi/types/queryfeatureextractor.go b/typedapi/types/queryfeatureextractor.go index 32ea1221be..b015c9efa9 100644 --- a/typedapi/types/queryfeatureextractor.go +++ b/typedapi/types/queryfeatureextractor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // QueryFeatureExtractor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L98-L105 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L98-L105 type QueryFeatureExtractor struct { DefaultScore *float32 `json:"default_score,omitempty"` FeatureName string `json:"feature_name"` diff --git a/typedapi/types/queryprofile.go b/typedapi/types/queryprofile.go index 021db903b4..cc8385481a 100644 --- a/typedapi/types/queryprofile.go +++ b/typedapi/types/queryprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // QueryProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L128-L134 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L128-L134 type QueryProfile struct { Breakdown QueryBreakdown `json:"breakdown"` Children []QueryProfile `json:"children,omitempty"` diff --git a/typedapi/types/queryrole.go b/typedapi/types/queryrole.go index 056394e57d..abc789cfc1 100644 --- a/typedapi/types/queryrole.go +++ b/typedapi/types/queryrole.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // QueryRole type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_role/types.ts#L103-L109 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_role/types.ts#L103-L109 type QueryRole struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` diff --git a/typedapi/types/queryrule.go b/typedapi/types/queryrule.go index 6faf1b7d68..2a593b4fb7 100644 --- a/typedapi/types/queryrule.go +++ b/typedapi/types/queryrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // QueryRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/_types/QueryRuleset.ts#L36-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/_types/QueryRuleset.ts#L36-L58 type QueryRule struct { // Actions The actions to take when the rule is matched. // The format of this action depends on the rule type. diff --git a/typedapi/types/queryruleactions.go b/typedapi/types/queryruleactions.go index 51e22f2378..b173d6d56d 100644 --- a/typedapi/types/queryruleactions.go +++ b/typedapi/types/queryruleactions.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // QueryRuleActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/_types/QueryRuleset.ts#L110-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/_types/QueryRuleset.ts#L110-L126 type QueryRuleActions struct { // Docs The documents to apply the rule to. // Only one of `ids` or `docs` may be specified and at least one must be diff --git a/typedapi/types/queryrulecriteria.go b/typedapi/types/queryrulecriteria.go index 19987d3b65..ae0d95b802 100644 --- a/typedapi/types/queryrulecriteria.go +++ b/typedapi/types/queryrulecriteria.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // QueryRuleCriteria type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/_types/QueryRuleset.ts#L65-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/_types/QueryRuleset.ts#L65-L93 type QueryRuleCriteria struct { // Metadata The metadata field to match against. // This metadata will be used to match against `match_criteria` sent in the diff --git a/typedapi/types/queryrulesetlistitem.go b/typedapi/types/queryrulesetlistitem.go index 76fc9ac0a2..dd82b3afef 100644 --- a/typedapi/types/queryrulesetlistitem.go +++ b/typedapi/types/queryrulesetlistitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // QueryRulesetListItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/list_rulesets/types.ts#L23-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/list_rulesets/types.ts#L23-L44 type QueryRulesetListItem struct { // RuleCriteriaTypesCounts A map of criteria type (for example, `exact`) to the number of rules of that // type. diff --git a/typedapi/types/queryrulesetmatchedrule.go b/typedapi/types/queryrulesetmatchedrule.go index 9c18d9dd1f..1ff519c575 100644 --- a/typedapi/types/queryrulesetmatchedrule.go +++ b/typedapi/types/queryrulesetmatchedrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // QueryRulesetMatchedRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/test/QueryRulesetTestResponse.ts#L30-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/query_rules/test/QueryRulesetTestResponse.ts#L30-L39 type QueryRulesetMatchedRule struct { // RuleId Rule unique identifier within that ruleset RuleId string `json:"rule_id"` diff --git a/typedapi/types/querystringquery.go b/typedapi/types/querystringquery.go index 2c3b12ccfd..cda792b0dd 100644 --- a/typedapi/types/querystringquery.go +++ b/typedapi/types/querystringquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // QueryStringQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L649-L772 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L650-L773 type QueryStringQuery struct { // AllowLeadingWildcard If `true`, the wildcard characters `*` and `?` are allowed as the first // character of the query string. diff --git a/typedapi/types/queryuser.go b/typedapi/types/queryuser.go index 569aee4976..22ba3078e7 100644 --- a/typedapi/types/queryuser.go +++ b/typedapi/types/queryuser.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // QueryUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_user/types.ts#L103-L105 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_user/types.ts#L103-L105 type QueryUser struct { Email *string `json:"email,omitempty"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/queryvectorbuilder.go b/typedapi/types/queryvectorbuilder.go index 5464bf47f5..d83c4cf5e6 100644 --- a/typedapi/types/queryvectorbuilder.go +++ b/typedapi/types/queryvectorbuilder.go @@ -16,57 +16,20 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // QueryVectorBuilder type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Knn.ts#L89-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Knn.ts#L103-L106 type QueryVectorBuilder struct { - AdditionalQueryVectorBuilderProperty map[string]json.RawMessage `json:"-"` - TextEmbedding *TextEmbedding `json:"text_embedding,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s QueryVectorBuilder) MarshalJSON() ([]byte, error) { - type opt QueryVectorBuilder - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalQueryVectorBuilderProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalQueryVectorBuilderProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + TextEmbedding *TextEmbedding `json:"text_embedding,omitempty"` } // NewQueryVectorBuilder returns a QueryVectorBuilder. func NewQueryVectorBuilder() *QueryVectorBuilder { - r := &QueryVectorBuilder{ - AdditionalQueryVectorBuilderProperty: make(map[string]json.RawMessage), - } + r := &QueryVectorBuilder{} return r } diff --git a/typedapi/types/querywatch.go b/typedapi/types/querywatch.go index c2753cef46..8060b99c8e 100644 --- a/typedapi/types/querywatch.go +++ b/typedapi/types/querywatch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // QueryWatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Watch.ts#L58-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Watch.ts#L58-L64 type QueryWatch struct { Id_ string `json:"_id"` PrimaryTerm_ *int `json:"_primary_term,omitempty"` diff --git a/typedapi/types/questionansweringinferenceoptions.go b/typedapi/types/questionansweringinferenceoptions.go index 8029f482b8..cf7f7060d2 100644 --- a/typedapi/types/questionansweringinferenceoptions.go +++ b/typedapi/types/questionansweringinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // QuestionAnsweringInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L301-L311 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L305-L315 type QuestionAnsweringInferenceOptions struct { // MaxAnswerLength The maximum answer length to consider MaxAnswerLength *int `json:"max_answer_length,omitempty"` diff --git a/typedapi/types/questionansweringinferenceupdateoptions.go b/typedapi/types/questionansweringinferenceupdateoptions.go index 0d2cdbf13d..3cc30dacb8 100644 --- a/typedapi/types/questionansweringinferenceupdateoptions.go +++ b/typedapi/types/questionansweringinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // QuestionAnsweringInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L439-L450 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L443-L454 type QuestionAnsweringInferenceUpdateOptions struct { // MaxAnswerLength The maximum answer length to consider for extraction MaxAnswerLength *int `json:"max_answer_length,omitempty"` diff --git a/typedapi/types/randomsampleraggregation.go b/typedapi/types/randomsampleraggregation.go index 33ada2381a..cc1c52c3c8 100644 --- a/typedapi/types/randomsampleraggregation.go +++ b/typedapi/types/randomsampleraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RandomSamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L749-L769 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L752-L772 type RandomSamplerAggregation struct { // Probability The probability that a document will be included in the aggregated data. // Must be greater than 0, less than 0.5, or exactly 1. diff --git a/typedapi/types/randomscorefunction.go b/typedapi/types/randomscorefunction.go index 4cafe4ace8..174972e2ea 100644 --- a/typedapi/types/randomscorefunction.go +++ b/typedapi/types/randomscorefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RandomScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L144-L147 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L145-L149 type RandomScoreFunction struct { Field *string `json:"field,omitempty"` Seed *string `json:"seed,omitempty"` diff --git a/typedapi/types/rangeaggregate.go b/typedapi/types/rangeaggregate.go index c7ef038900..60a302b79f 100644 --- a/typedapi/types/rangeaggregate.go +++ b/typedapi/types/rangeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L594-L598 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L666-L670 type RangeAggregate struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/rangeaggregation.go b/typedapi/types/rangeaggregation.go index 85e7207aff..cccfd34eb9 100644 --- a/typedapi/types/rangeaggregation.go +++ b/typedapi/types/rangeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L669-L689 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L672-L692 type RangeAggregation struct { // Field The date field whose values are use to build ranges. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/rangebucket.go b/typedapi/types/rangebucket.go index 1321069ee4..e7a049d04f 100644 --- a/typedapi/types/rangebucket.go +++ b/typedapi/types/rangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // RangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L600-L607 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L672-L679 type RangeBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -265,6 +265,13 @@ func (s *RangeBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -293,6 +300,20 @@ func (s *RangeBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/rangequery.go b/typedapi/types/rangequery.go index ef913f24fa..6730f878c9 100644 --- a/typedapi/types/rangequery.go +++ b/typedapi/types/rangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -27,7 +27,7 @@ package types // NumberRangeQuery // TermRangeQuery // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L172-L182 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L173-L183 type RangeQuery any type RangeQueryVariant interface { diff --git a/typedapi/types/rankcontainer.go b/typedapi/types/rankcontainer.go index a3244e5070..363d3faad8 100644 --- a/typedapi/types/rankcontainer.go +++ b/typedapi/types/rankcontainer.go @@ -16,58 +16,21 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // RankContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Rank.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Rank.ts#L22-L28 type RankContainer struct { - AdditionalRankContainerProperty map[string]json.RawMessage `json:"-"` // Rrf The reciprocal rank fusion parameters Rrf *RrfRank `json:"rrf,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s RankContainer) MarshalJSON() ([]byte, error) { - type opt RankContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalRankContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalRankContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewRankContainer returns a RankContainer. func NewRankContainer() *RankContainer { - r := &RankContainer{ - AdditionalRankContainerProperty: make(map[string]json.RawMessage), - } + r := &RankContainer{} return r } diff --git a/typedapi/types/rankeddocument.go b/typedapi/types/rankeddocument.go index eab9113a1b..198c6d1b92 100644 --- a/typedapi/types/rankeddocument.go +++ b/typedapi/types/rankeddocument.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankedDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Results.ts#L91-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Results.ts#L91-L101 type RankedDocument struct { Index int `json:"index"` RelevanceScore float32 `json:"relevance_score"` diff --git a/typedapi/types/rankevalhit.go b/typedapi/types/rankevalhit.go index 3c35777f9f..1f5aa68150 100644 --- a/typedapi/types/rankevalhit.go +++ b/typedapi/types/rankevalhit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankEvalHit type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L144-L148 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L144-L148 type RankEvalHit struct { Id_ string `json:"_id"` Index_ string `json:"_index"` diff --git a/typedapi/types/rankevalhititem.go b/typedapi/types/rankevalhititem.go index f01dcc034f..b6a57c4239 100644 --- a/typedapi/types/rankevalhititem.go +++ b/typedapi/types/rankevalhititem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RankEvalHitItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L139-L142 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L139-L142 type RankEvalHitItem struct { Hit RankEvalHit `json:"hit"` Rating *Float64 `json:"rating,omitempty"` diff --git a/typedapi/types/rankevalmetric.go b/typedapi/types/rankevalmetric.go index 4f3f5ebdcd..fcb09ee325 100644 --- a/typedapi/types/rankevalmetric.go +++ b/typedapi/types/rankevalmetric.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // RankEvalMetric type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L90-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L90-L96 type RankEvalMetric struct { Dcg *RankEvalMetricDiscountedCumulativeGain `json:"dcg,omitempty"` ExpectedReciprocalRank *RankEvalMetricExpectedReciprocalRank `json:"expected_reciprocal_rank,omitempty"` diff --git a/typedapi/types/rankevalmetricdetail.go b/typedapi/types/rankevalmetricdetail.go index 3fe2e08888..74aec7d4e1 100644 --- a/typedapi/types/rankevalmetricdetail.go +++ b/typedapi/types/rankevalmetricdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L128-L137 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L128-L137 type RankEvalMetricDetail struct { // Hits The hits section shows a grouping of the search results with their supplied // ratings diff --git a/typedapi/types/rankevalmetricdiscountedcumulativegain.go b/typedapi/types/rankevalmetricdiscountedcumulativegain.go index 32c8ccbff0..daf5109416 100644 --- a/typedapi/types/rankevalmetricdiscountedcumulativegain.go +++ b/typedapi/types/rankevalmetricdiscountedcumulativegain.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricDiscountedCumulativeGain type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L66-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L66-L77 type RankEvalMetricDiscountedCumulativeGain struct { // K Sets the maximum number of documents retrieved per query. This value will act // in place of the usual size parameter in the query. diff --git a/typedapi/types/rankevalmetricexpectedreciprocalrank.go b/typedapi/types/rankevalmetricexpectedreciprocalrank.go index 744a51dca6..ad9f5991a6 100644 --- a/typedapi/types/rankevalmetricexpectedreciprocalrank.go +++ b/typedapi/types/rankevalmetricexpectedreciprocalrank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricExpectedReciprocalRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L79-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L79-L88 type RankEvalMetricExpectedReciprocalRank struct { // K Sets the maximum number of documents retrieved per query. This value will act // in place of the usual size parameter in the query. diff --git a/typedapi/types/rankevalmetricmeanreciprocalrank.go b/typedapi/types/rankevalmetricmeanreciprocalrank.go index 377fc33a48..95f38e81e3 100644 --- a/typedapi/types/rankevalmetricmeanreciprocalrank.go +++ b/typedapi/types/rankevalmetricmeanreciprocalrank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricMeanReciprocalRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L60-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L60-L64 type RankEvalMetricMeanReciprocalRank struct { // K Sets the maximum number of documents retrieved per query. This value will act // in place of the usual size parameter in the query. diff --git a/typedapi/types/rankevalmetricprecision.go b/typedapi/types/rankevalmetricprecision.go index 8bec79e3cf..7da5c731c7 100644 --- a/typedapi/types/rankevalmetricprecision.go +++ b/typedapi/types/rankevalmetricprecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricPrecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L42-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L42-L52 type RankEvalMetricPrecision struct { // IgnoreUnlabeled Controls how unlabeled documents in the search results are counted. If set to // true, unlabeled documents are ignored and neither count as relevant or diff --git a/typedapi/types/rankevalmetricrecall.go b/typedapi/types/rankevalmetricrecall.go index 8513f2f112..dbf6aac560 100644 --- a/typedapi/types/rankevalmetricrecall.go +++ b/typedapi/types/rankevalmetricrecall.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricRecall type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L54-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L54-L58 type RankEvalMetricRecall struct { // K Sets the maximum number of documents retrieved per query. This value will act // in place of the usual size parameter in the query. diff --git a/typedapi/types/rankevalquery.go b/typedapi/types/rankevalquery.go index 77b8e10e91..d7e99a1618 100644 --- a/typedapi/types/rankevalquery.go +++ b/typedapi/types/rankevalquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankEvalQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L111-L117 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L111-L117 type RankEvalQuery struct { Query Query `json:"query"` Size *int `json:"size,omitempty"` diff --git a/typedapi/types/rankevalrequestitem.go b/typedapi/types/rankevalrequestitem.go index a2bff2c918..e44ec3924d 100644 --- a/typedapi/types/rankevalrequestitem.go +++ b/typedapi/types/rankevalrequestitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RankEvalRequestItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L98-L109 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L98-L109 type RankEvalRequestItem struct { // Id The search request’s ID, used to group result details later. Id string `json:"id"` diff --git a/typedapi/types/rankfeaturefunctionlinear.go b/typedapi/types/rankfeaturefunctionlinear.go index 74fbe2c5d5..fddad4c252 100644 --- a/typedapi/types/rankfeaturefunctionlinear.go +++ b/typedapi/types/rankfeaturefunctionlinear.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // RankFeatureFunctionLinear type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L282-L282 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L282-L282 type RankFeatureFunctionLinear struct { } diff --git a/typedapi/types/rankfeaturefunctionlogarithm.go b/typedapi/types/rankfeaturefunctionlogarithm.go index 83933e7798..8b3679686b 100644 --- a/typedapi/types/rankfeaturefunctionlogarithm.go +++ b/typedapi/types/rankfeaturefunctionlogarithm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionLogarithm type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L284-L289 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L284-L289 type RankFeatureFunctionLogarithm struct { // ScalingFactor Configurable scaling factor. ScalingFactor float32 `json:"scaling_factor"` diff --git a/typedapi/types/rankfeaturefunctionsaturation.go b/typedapi/types/rankfeaturefunctionsaturation.go index 1e249b229d..24e0193d65 100644 --- a/typedapi/types/rankfeaturefunctionsaturation.go +++ b/typedapi/types/rankfeaturefunctionsaturation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionSaturation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L291-L296 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L291-L296 type RankFeatureFunctionSaturation struct { // Pivot Configurable pivot value so that the result will be less than 0.5. Pivot *float32 `json:"pivot,omitempty"` diff --git a/typedapi/types/rankfeaturefunctionsigmoid.go b/typedapi/types/rankfeaturefunctionsigmoid.go index b765511c20..6490f503eb 100644 --- a/typedapi/types/rankfeaturefunctionsigmoid.go +++ b/typedapi/types/rankfeaturefunctionsigmoid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionSigmoid type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L298-L307 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L298-L307 type RankFeatureFunctionSigmoid struct { // Exponent Configurable Exponent. Exponent float32 `json:"exponent"` diff --git a/typedapi/types/rankfeatureproperty.go b/typedapi/types/rankfeatureproperty.go index 9065345644..70a84cd1fd 100644 --- a/typedapi/types/rankfeatureproperty.go +++ b/typedapi/types/rankfeatureproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // RankFeatureProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L207-L210 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L208-L211 type RankFeatureProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/rankfeaturequery.go b/typedapi/types/rankfeaturequery.go index 6ea25caf57..863d13c59e 100644 --- a/typedapi/types/rankfeaturequery.go +++ b/typedapi/types/rankfeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RankFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L309-L335 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L309-L335 type RankFeatureQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/rankfeaturesproperty.go b/typedapi/types/rankfeaturesproperty.go index 846d322b9f..7c907b1219 100644 --- a/typedapi/types/rankfeaturesproperty.go +++ b/typedapi/types/rankfeaturesproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // RankFeaturesProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L212-L215 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L213-L216 type RankFeaturesProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/rankvectorproperty.go b/typedapi/types/rankvectorproperty.go index 48796a5997..0234d5f806 100644 --- a/typedapi/types/rankvectorproperty.go +++ b/typedapi/types/rankvectorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // RankVectorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L217-L224 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L218-L225 type RankVectorProperty struct { Dims *int `json:"dims,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` diff --git a/typedapi/types/raretermsaggregation.go b/typedapi/types/raretermsaggregation.go index 24cfccded7..f02d8c0455 100644 --- a/typedapi/types/raretermsaggregation.go +++ b/typedapi/types/raretermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RareTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L706-L739 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L709-L742 type RareTermsAggregation struct { // Exclude Terms that should be excluded from the aggregation. Exclude []string `json:"exclude,omitempty"` diff --git a/typedapi/types/rateaggregate.go b/typedapi/types/rateaggregate.go index 981abafbe6..42b02fa9a3 100644 --- a/typedapi/types/rateaggregate.go +++ b/typedapi/types/rateaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RateAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L849-L856 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L921-L928 type RateAggregate struct { Meta Metadata `json:"meta,omitempty"` Value Float64 `json:"value"` diff --git a/typedapi/types/rateaggregation.go b/typedapi/types/rateaggregation.go index ce7a9f1e12..2b750451c4 100644 --- a/typedapi/types/rateaggregation.go +++ b/typedapi/types/rateaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // RateAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L262-L273 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L266-L277 type RateAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/ratelimitsetting.go b/typedapi/types/ratelimitsetting.go index 073315fa9e..cbfcf30d95 100644 --- a/typedapi/types/ratelimitsetting.go +++ b/typedapi/types/ratelimitsetting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RateLimitSetting type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Services.ts#L323-L349 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Services.ts#L404-L433 type RateLimitSetting struct { // RequestsPerMinute The number of requests allowed per minute. // By default, the number of requests allowed per minute is set by each service @@ -43,14 +43,17 @@ type RateLimitSetting struct { // * `azureopenai` service and task type `text_embedding`: `1440` // * `azureopenai` service and task type `completion`: `120` // * `cohere` service: `10000` + // * `contextualai` service: `1000` // * `elastic` service and task type `chat_completion`: `240` // * `googleaistudio` service: `360` // * `googlevertexai` service: `30000` // * `hugging_face` service: `3000` // * `jinaai` service: `2000` + // * `llama` service: `3000` // * `mistral` service: `240` // * `openai` service and task type `text_embedding`: `3000` // * `openai` service and task type `completion`: `500` + // * `openshift_ai` service: `3000` // * `voyageai` service: `2000` // * `watsonxai` service: `120` RequestsPerMinute *int `json:"requests_per_minute,omitempty"` diff --git a/typedapi/types/rawdocument.go b/typedapi/types/rawdocument.go new file mode 100644 index 0000000000..9fac452af5 --- /dev/null +++ b/typedapi/types/rawdocument.go @@ -0,0 +1,418 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RawDocument type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_sample/_types/RawDocument.ts#L24-L33 +type RawDocument struct { + // Index Name of the index for this raw document. + Index string `json:"index"` + // Source The original raw source. + Source map[string]Property `json:"source"` +} + +func (s *RawDocument) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "index": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Index", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Index = o + + case "source": + if s.Source == nil { + s.Source = make(map[string]Property, 0) + } + refs := make(map[string]json.RawMessage, 0) + dec.Decode(&refs) + for key, message := range refs { + kind := make(map[string]any) + buf := bytes.NewReader(message) + localDec := json.NewDecoder(buf) + localDec.Decode(&kind) + buf.Seek(0, io.SeekStart) + if _, ok := kind["type"]; !ok { + kind["type"] = "object" + } + switch kind["type"] { + case "binary": + oo := NewBinaryProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "boolean": + oo := NewBooleanProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "{dynamic_type}": + oo := NewDynamicProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "join": + oo := NewJoinProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "keyword": + oo := NewKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "match_only_text": + oo := NewMatchOnlyTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "percolator": + oo := NewPercolatorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "rank_feature": + oo := NewRankFeatureProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "rank_features": + oo := NewRankFeaturesProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "search_as_you_type": + oo := NewSearchAsYouTypeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "text": + oo := NewTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "version": + oo := NewVersionProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "wildcard": + oo := NewWildcardProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "date_nanos": + oo := NewDateNanosProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "date": + oo := NewDateProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "aggregate_metric_double": + oo := NewAggregateMetricDoubleProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "dense_vector": + oo := NewDenseVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "flattened": + oo := NewFlattenedProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "nested": + oo := NewNestedProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "object": + oo := NewObjectProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "passthrough": + oo := NewPassthroughObjectProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "semantic_text": + oo := NewSemanticTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "sparse_vector": + oo := NewSparseVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "completion": + oo := NewCompletionProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "constant_keyword": + oo := NewConstantKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "counted_keyword": + oo := NewCountedKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "alias": + oo := NewFieldAliasProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "histogram": + oo := NewHistogramProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "ip": + oo := NewIpProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "murmur3": + oo := NewMurmur3HashProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "token_count": + oo := NewTokenCountProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "geo_point": + oo := NewGeoPointProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "geo_shape": + oo := NewGeoShapeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "point": + oo := NewPointProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "shape": + oo := NewShapeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "byte": + oo := NewByteNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "double": + oo := NewDoubleNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "float": + oo := NewFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "half_float": + oo := NewHalfFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "integer": + oo := NewIntegerNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "long": + oo := NewLongNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "scaled_float": + oo := NewScaledFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "short": + oo := NewShortNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "unsigned_long": + oo := NewUnsignedLongNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "date_range": + oo := NewDateRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "double_range": + oo := NewDoubleRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "float_range": + oo := NewFloatRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "integer_range": + oo := NewIntegerRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "ip_range": + oo := NewIpRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "long_range": + oo := NewLongRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + case "icu_collation_keyword": + oo := NewIcuCollationProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Source | %w", err) + } + s.Source[key] = oo + default: + oo := new(Property) + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("new(Property) | %w", err) + } + s.Source[key] = oo + } + } + + } + } + return nil +} + +// NewRawDocument returns a RawDocument. +func NewRawDocument() *RawDocument { + r := &RawDocument{ + Source: make(map[string]Property), + } + + return r +} diff --git a/typedapi/types/readblobdetails.go b/typedapi/types/readblobdetails.go index 5ba218c3ae..f64582f016 100644 --- a/typedapi/types/readblobdetails.go +++ b/typedapi/types/readblobdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReadBlobDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L204-L248 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L204-L248 type ReadBlobDetails struct { // BeforeWriteComplete Indicates whether the read operation may have started before the write // operation was complete. diff --git a/typedapi/types/readexception.go b/typedapi/types/readexception.go index ff572275b4..0f7df695f1 100644 --- a/typedapi/types/readexception.go +++ b/typedapi/types/readexception.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReadException type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/_types/FollowIndexStats.ts#L111-L118 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ccr/_types/FollowIndexStats.ts#L112-L119 type ReadException struct { // Exception The exception that caused the read to fail. Exception ErrorCause `json:"exception"` diff --git a/typedapi/types/readonlyurlrepository.go b/typedapi/types/readonlyurlrepository.go index d6402f6658..1c9f3b4040 100644 --- a/typedapi/types/readonlyurlrepository.go +++ b/typedapi/types/readonlyurlrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ReadOnlyUrlRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L92-L102 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L92-L102 type ReadOnlyUrlRepository struct { // Settings The repository settings. Settings ReadOnlyUrlRepositorySettings `json:"settings"` diff --git a/typedapi/types/readonlyurlrepositorysettings.go b/typedapi/types/readonlyurlrepositorysettings.go index 3eeb94912c..a36662db5c 100644 --- a/typedapi/types/readonlyurlrepositorysettings.go +++ b/typedapi/types/readonlyurlrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReadOnlyUrlRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L377-L412 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L377-L412 type ReadOnlyUrlRepositorySettings struct { // ChunkSize Big files can be broken down into multiple smaller blobs in the blob store // during snapshotting. diff --git a/typedapi/types/readsummaryinfo.go b/typedapi/types/readsummaryinfo.go index fe66b7f19d..5a04c63afb 100644 --- a/typedapi/types/readsummaryinfo.go +++ b/typedapi/types/readsummaryinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReadSummaryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L115-L160 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L115-L160 type ReadSummaryInfo struct { // Count The number of read operations performed in the test. Count int `json:"count"` diff --git a/typedapi/types/realmcache.go b/typedapi/types/realmcache.go index 3299ef367d..19ff0343be 100644 --- a/typedapi/types/realmcache.go +++ b/typedapi/types/realmcache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RealmCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L276-L278 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L276-L278 type RealmCache struct { Size int64 `json:"size"` } diff --git a/typedapi/types/realminfo.go b/typedapi/types/realminfo.go index e57855fa82..cdf3b858ef 100644 --- a/typedapi/types/realminfo.go +++ b/typedapi/types/realminfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RealmInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RealmInfo.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/RealmInfo.ts#L22-L25 type RealmInfo struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/recording.go b/typedapi/types/recording.go index edc2151847..c900fecb8a 100644 --- a/typedapi/types/recording.go +++ b/typedapi/types/recording.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Recording type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L227-L232 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L227-L232 type Recording struct { CumulativeExecutionCount *int64 `json:"cumulative_execution_count,omitempty"` CumulativeExecutionTime Duration `json:"cumulative_execution_time,omitempty"` diff --git a/typedapi/types/recoverybytes.go b/typedapi/types/recoverybytes.go index 94ee7be29c..f1581051aa 100644 --- a/typedapi/types/recoverybytes.go +++ b/typedapi/types/recoverybytes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RecoveryBytes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L38-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L38-L48 type RecoveryBytes struct { Percent Percentage `json:"percent"` Recovered ByteSize `json:"recovered,omitempty"` diff --git a/typedapi/types/recoveryfiles.go b/typedapi/types/recoveryfiles.go index 47ba6493e5..729eb14b36 100644 --- a/typedapi/types/recoveryfiles.go +++ b/typedapi/types/recoveryfiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RecoveryFiles type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L56-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L56-L62 type RecoveryFiles struct { Details []FileDetails `json:"details,omitempty"` Percent Percentage `json:"percent"` diff --git a/typedapi/types/recoveryindexstatus.go b/typedapi/types/recoveryindexstatus.go index 8fd844f95b..2ffc059868 100644 --- a/typedapi/types/recoveryindexstatus.go +++ b/typedapi/types/recoveryindexstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RecoveryIndexStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L64-L74 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L64-L74 type RecoveryIndexStatus struct { Bytes *RecoveryBytes `json:"bytes,omitempty"` Files RecoveryFiles `json:"files"` diff --git a/typedapi/types/recoveryorigin.go b/typedapi/types/recoveryorigin.go index fc2d9332a8..1ce82505db 100644 --- a/typedapi/types/recoveryorigin.go +++ b/typedapi/types/recoveryorigin.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RecoveryOrigin type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L76-L89 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L76-L89 type RecoveryOrigin struct { BootstrapNewHistoryUuid *bool `json:"bootstrap_new_history_uuid,omitempty"` Host *string `json:"host,omitempty"` diff --git a/typedapi/types/recoveryrecord.go b/typedapi/types/recoveryrecord.go index 40c8f54c23..20939de445 100644 --- a/typedapi/types/recoveryrecord.go +++ b/typedapi/types/recoveryrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RecoveryRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/recovery/types.ts#L24-L155 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/recovery/types.ts#L24-L155 type RecoveryRecord struct { // Bytes The number of bytes to recover. Bytes *string `json:"bytes,omitempty"` diff --git a/typedapi/types/recoverystartstatus.go b/typedapi/types/recoverystartstatus.go index 9381114859..b82177a8fb 100644 --- a/typedapi/types/recoverystartstatus.go +++ b/typedapi/types/recoverystartstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RecoveryStartStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L91-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L91-L96 type RecoveryStartStatus struct { CheckIndexTime Duration `json:"check_index_time,omitempty"` CheckIndexTimeInMillis int64 `json:"check_index_time_in_millis"` diff --git a/typedapi/types/recoverystats.go b/typedapi/types/recoverystats.go index 0f0b78ce0a..95e3882b3e 100644 --- a/typedapi/types/recoverystats.go +++ b/typedapi/types/recoverystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RecoveryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L255-L260 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L255-L260 type RecoveryStats struct { CurrentAsSource int64 `json:"current_as_source"` CurrentAsTarget int64 `json:"current_as_target"` diff --git a/typedapi/types/recoverystatus.go b/typedapi/types/recoverystatus.go index 46dd815ddb..ba19e307b0 100644 --- a/typedapi/types/recoverystatus.go +++ b/typedapi/types/recoverystatus.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // RecoveryStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L98-L100 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L98-L100 type RecoveryStatus struct { Shards []ShardRecovery `json:"shards"` } diff --git a/typedapi/types/redact.go b/typedapi/types/redact.go index 5bcc108c5c..cb0a83f34b 100644 --- a/typedapi/types/redact.go +++ b/typedapi/types/redact.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Redact type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Simulation.ts#L38-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Simulation.ts#L38-L43 type Redact struct { // IsRedacted_ indicates if document has been redacted IsRedacted_ bool `json:"_is_redacted"` diff --git a/typedapi/types/redactprocessor.go b/typedapi/types/redactprocessor.go index 960e16e44e..70af1e1a74 100644 --- a/typedapi/types/redactprocessor.go +++ b/typedapi/types/redactprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RedactProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1298-L1339 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1302-L1343 type RedactProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/refreshstats.go b/typedapi/types/refreshstats.go index 6be8ab5e6f..8dd85beb58 100644 --- a/typedapi/types/refreshstats.go +++ b/typedapi/types/refreshstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RefreshStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L262-L269 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L262-L269 type RefreshStats struct { ExternalTotal int64 `json:"external_total"` ExternalTotalTimeInMillis int64 `json:"external_total_time_in_millis"` diff --git a/typedapi/types/regexoptions.go b/typedapi/types/regexoptions.go index 06c5017fae..f618bff94a 100644 --- a/typedapi/types/regexoptions.go +++ b/typedapi/types/regexoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RegexOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L184-L195 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L184-L196 type RegexOptions struct { // Flags Optional operators for the regular expression. Flags *string `json:"flags,omitempty"` diff --git a/typedapi/types/regexpquery.go b/typedapi/types/regexpquery.go index 5e8c851b4a..4c413fd504 100644 --- a/typedapi/types/regexpquery.go +++ b/typedapi/types/regexpquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RegexpQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L199-L232 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L200-L233 type RegexpQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/regexvalidation.go b/typedapi/types/regexvalidation.go index 87da2848df..e1adcb1b4b 100644 --- a/typedapi/types/regexvalidation.go +++ b/typedapi/types/regexvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RegexValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L78-L81 type RegexValidation struct { Constraint string `json:"constraint"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/registereddomainprocessor.go b/typedapi/types/registereddomainprocessor.go index 3aaf8bea48..0334ab8100 100644 --- a/typedapi/types/registereddomainprocessor.go +++ b/typedapi/types/registereddomainprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RegisteredDomainProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1341-L1357 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1345-L1361 type RegisteredDomainProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/regressioninferenceoptions.go b/typedapi/types/regressioninferenceoptions.go index 4b6555fd22..10701e72a8 100644 --- a/typedapi/types/regressioninferenceoptions.go +++ b/typedapi/types/regressioninferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RegressionInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L107-L116 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L107-L116 type RegressionInferenceOptions struct { // NumTopFeatureImportanceValues Specifies the maximum number of feature importance values per document. NumTopFeatureImportanceValues *int `json:"num_top_feature_importance_values,omitempty"` diff --git a/typedapi/types/reindexdestination.go b/typedapi/types/reindexdestination.go index f8b48dbb0f..a025a4f38a 100644 --- a/typedapi/types/reindexdestination.go +++ b/typedapi/types/reindexdestination.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // ReindexDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex/types.ts#L39-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/reindex/types.ts#L39-L67 type ReindexDestination struct { // Index The name of the data stream, index, or index alias you are copying to. Index string `json:"index"` @@ -54,7 +54,7 @@ type ReindexDestination struct { // set to `null`. // If it is `=value`, the routing on the bulk request sent for each match is set // to all value specified after the equals sign (`=`). - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` // VersionType The versioning to use for the indexing operation. VersionType *versiontype.VersionType `json:"version_type,omitempty"` } @@ -97,8 +97,19 @@ func (s *ReindexDestination) UnmarshalJSON(data []byte) error { s.Pipeline = &o case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "version_type": diff --git a/typedapi/types/reindexnode.go b/typedapi/types/reindexnode.go index d70ade0f09..d07fdc2d7c 100644 --- a/typedapi/types/reindexnode.go +++ b/typedapi/types/reindexnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // ReindexNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex_rethrottle/types.ts#L33-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/reindex_rethrottle/types.ts#L33-L35 type ReindexNode struct { Attributes map[string]string `json:"attributes"` Host string `json:"host"` diff --git a/typedapi/types/reindexsource.go b/typedapi/types/reindexsource.go index 544b5a8193..40ccf08568 100644 --- a/typedapi/types/reindexsource.go +++ b/typedapi/types/reindexsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReindexSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex/types.ts#L69-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/reindex/types.ts#L69-L110 type ReindexSource struct { // Index The name of the data stream, index, or alias you are copying from. // It accepts a comma-separated list to reindex from multiple sources. @@ -62,7 +62,7 @@ type ReindexSource struct { Sort []SortCombinations `json:"sort,omitempty"` // SourceFields_ If `true`, reindex all source fields. // Set it to a list to reindex select fields. - SourceFields_ []string `json:"_source,omitempty"` + SourceFields_ SourceConfig `json:"_source,omitempty"` } func (s *ReindexSource) UnmarshalJSON(data []byte) error { @@ -149,17 +149,37 @@ func (s *ReindexSource) UnmarshalJSON(data []byte) error { } case "_source": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + message := json.RawMessage{} + if err := dec.Decode(&message); err != nil { + return fmt.Errorf("%s | %w", "SourceFields_", err) + } + keyDec := json.NewDecoder(bytes.NewReader(message)) + sourcefields__field: + for { + t, err := keyDec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } return fmt.Errorf("%s | %w", "SourceFields_", err) } - s.SourceFields_ = append(s.SourceFields_, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.SourceFields_); err != nil { + switch t { + + case "exclude_vectors", "excludes", "includes": + o := NewSourceFilter() + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "SourceFields_", err) + } + s.SourceFields_ = o + break sourcefields__field + + } + } + if s.SourceFields_ == nil { + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&s.SourceFields_); err != nil { return fmt.Errorf("%s | %w", "SourceFields_", err) } } diff --git a/typedapi/types/reindexstatus.go b/typedapi/types/reindexstatus.go index f84ee47693..fe6115fc9d 100644 --- a/typedapi/types/reindexstatus.go +++ b/typedapi/types/reindexstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReindexStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex_rethrottle/types.ts#L37-L85 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/reindex_rethrottle/types.ts#L37-L85 type ReindexStatus struct { // Batches The number of scroll responses pulled back by the reindex. Batches int64 `json:"batches"` diff --git a/typedapi/types/reindextask.go b/typedapi/types/reindextask.go index a6af4d1d5a..650025ec03 100644 --- a/typedapi/types/reindextask.go +++ b/typedapi/types/reindextask.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReindexTask type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex_rethrottle/types.ts#L87-L98 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/reindex_rethrottle/types.ts#L87-L98 type ReindexTask struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` diff --git a/typedapi/types/reloaddetails.go b/typedapi/types/reloaddetails.go index ac63bd4ab2..09b0b0b63f 100644 --- a/typedapi/types/reloaddetails.go +++ b/typedapi/types/reloaddetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReloadDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/reload_search_analyzers/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/reload_search_analyzers/types.ts#L27-L31 type ReloadDetails struct { Index string `json:"index"` ReloadedAnalyzers []string `json:"reloaded_analyzers"` diff --git a/typedapi/types/reloadresult.go b/typedapi/types/reloadresult.go index d496a730d6..1c3743652c 100644 --- a/typedapi/types/reloadresult.go +++ b/typedapi/types/reloadresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ReloadResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/reload_search_analyzers/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/reload_search_analyzers/types.ts#L22-L25 type ReloadResult struct { ReloadDetails []ReloadDetails `json:"reload_details"` Shards_ ShardStatistics `json:"_shards"` diff --git a/typedapi/types/relocationfailureinfo.go b/typedapi/types/relocationfailureinfo.go index d22fe1380e..55014cef8d 100644 --- a/typedapi/types/relocationfailureinfo.go +++ b/typedapi/types/relocationfailureinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RelocationFailureInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Node.ts#L67-L69 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Node.ts#L67-L69 type RelocationFailureInfo struct { FailedAttempts int `json:"failed_attempts"` } diff --git a/typedapi/types/remoteclusterinfo.go b/typedapi/types/remoteclusterinfo.go index bfd9d647a9..44b3d61fc2 100644 --- a/typedapi/types/remoteclusterinfo.go +++ b/typedapi/types/remoteclusterinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RemoteClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L786-L817 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L804-L835 type RemoteClusterInfo struct { // ClusterUuid The UUID of the remote cluster. ClusterUuid string `json:"cluster_uuid"` diff --git a/typedapi/types/remoteclusterprivileges.go b/typedapi/types/remoteclusterprivileges.go index 9441014afb..d8fe5855f7 100644 --- a/typedapi/types/remoteclusterprivileges.go +++ b/typedapi/types/remoteclusterprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // RemoteClusterPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L280-L292 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L280-L292 type RemoteClusterPrivileges struct { // Clusters A list of cluster aliases to which the permissions in this entry apply. Clusters []string `json:"clusters"` diff --git a/typedapi/types/remoteindicesprivileges.go b/typedapi/types/remoteindicesprivileges.go index f30658d373..93903d0a25 100644 --- a/typedapi/types/remoteindicesprivileges.go +++ b/typedapi/types/remoteindicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RemoteIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L246-L278 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L246-L278 type RemoteIndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited diff --git a/typedapi/types/remotesource.go b/typedapi/types/remotesource.go index c357c53ef7..3181424c80 100644 --- a/typedapi/types/remotesource.go +++ b/typedapi/types/remotesource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,12 +26,18 @@ import ( "errors" "fmt" "io" + "strconv" ) // RemoteSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex/types.ts#L112-L140 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/reindex/types.ts#L112-L148 type RemoteSource struct { + // ApiKey The API key to use for authentication with the remote host (as an alternative + // to basic auth when the remote cluster is in Elastic Cloud). + // (It is not permitted to set this and also to set an `Authorization` header + // via `headers`.) + ApiKey *string `json:"api_key,omitempty"` // ConnectTimeout The remote connection timeout. ConnectTimeout Duration `json:"connect_timeout,omitempty"` // Headers An object containing the headers of the request. @@ -39,11 +45,13 @@ type RemoteSource struct { // Host The URL for the remote instance of Elasticsearch that you want to index from. // This information is required when you're indexing from remote. Host string `json:"host"` - // Password The password to use for authentication with the remote host. + // Password The password to use for authentication with the remote host (required when + // using basic auth). Password *string `json:"password,omitempty"` // SocketTimeout The remote socket read timeout. SocketTimeout Duration `json:"socket_timeout,omitempty"` - // Username The username to use for authentication with the remote host. + // Username The username to use for authentication with the remote host (required when + // using basic auth). Username *string `json:"username,omitempty"` } @@ -62,6 +70,18 @@ func (s *RemoteSource) UnmarshalJSON(data []byte) error { switch t { + case "api_key": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ApiKey", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ApiKey = &o + case "connect_timeout": if err := dec.Decode(&s.ConnectTimeout); err != nil { return fmt.Errorf("%s | %w", "ConnectTimeout", err) diff --git a/typedapi/types/remoteuserindicesprivileges.go b/typedapi/types/remoteuserindicesprivileges.go index af5c3a0c12..db434e8ae4 100644 --- a/typedapi/types/remoteuserindicesprivileges.go +++ b/typedapi/types/remoteuserindicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RemoteUserIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L318-L341 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L318-L341 type RemoteUserIndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited diff --git a/typedapi/types/removeaction.go b/typedapi/types/removeaction.go index 4165cce268..3765b75d0d 100644 --- a/typedapi/types/removeaction.go +++ b/typedapi/types/removeaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RemoveAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/types.ts#L97-L122 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/update_aliases/types.ts#L97-L122 type RemoveAction struct { // Alias Alias for the action. // Index alias names support date math. diff --git a/typedapi/types/removeclusterserver.go b/typedapi/types/removeclusterserver.go index b0dc6b8f77..054ca2ae64 100644 --- a/typedapi/types/removeclusterserver.go +++ b/typedapi/types/removeclusterserver.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RemoveClusterServer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/types.ts#L74-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/info/types.ts#L74-L77 type RemoveClusterServer struct { BoundAddress []string `json:"bound_address"` PublishAddress string `json:"publish_address"` diff --git a/typedapi/types/removeduplicatestokenfilter.go b/typedapi/types/removeduplicatestokenfilter.go index 037463ac03..e7e356da07 100644 --- a/typedapi/types/removeduplicatestokenfilter.go +++ b/typedapi/types/removeduplicatestokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RemoveDuplicatesTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L403-L405 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L438-L440 type RemoveDuplicatesTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/removeindexaction.go b/typedapi/types/removeindexaction.go index 396204c5cd..3438cfc4e6 100644 --- a/typedapi/types/removeindexaction.go +++ b/typedapi/types/removeindexaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RemoveIndexAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/types.ts#L124-L139 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/update_aliases/types.ts#L124-L139 type RemoveIndexAction struct { // Index Data stream or index for the action. // Supports wildcards (`*`). diff --git a/typedapi/types/removeindicesblockstatus.go b/typedapi/types/removeindicesblockstatus.go index 73a2ccccf5..804d94c5e2 100644 --- a/typedapi/types/removeindicesblockstatus.go +++ b/typedapi/types/removeindicesblockstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RemoveIndicesBlockStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/remove_block/IndicesRemoveBlockResponse.ts#L30-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/remove_block/IndicesRemoveBlockResponse.ts#L30-L34 type RemoveIndicesBlockStatus struct { Exception *ErrorCause `json:"exception,omitempty"` Name string `json:"name"` diff --git a/typedapi/types/removeprocessor.go b/typedapi/types/removeprocessor.go index 4b70231e92..fa1014731e 100644 --- a/typedapi/types/removeprocessor.go +++ b/typedapi/types/removeprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RemoveProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1359-L1373 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1363-L1377 type RemoveProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/renameprocessor.go b/typedapi/types/renameprocessor.go index 4f53726e42..7caa2027ed 100644 --- a/typedapi/types/renameprocessor.go +++ b/typedapi/types/renameprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RenameProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1375-L1391 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1379-L1395 type RenameProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/replicationaccess.go b/typedapi/types/replicationaccess.go index eeea7fbbe6..dc005b003f 100644 --- a/typedapi/types/replicationaccess.go +++ b/typedapi/types/replicationaccess.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReplicationAccess type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L444-L454 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L444-L454 type ReplicationAccess struct { // AllowRestrictedIndices This needs to be set to true if the patterns in the names field should cover // system indices. diff --git a/typedapi/types/reportingemailattachment.go b/typedapi/types/reportingemailattachment.go index 5ee5851add..27b537f7fa 100644 --- a/typedapi/types/reportingemailattachment.go +++ b/typedapi/types/reportingemailattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReportingEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L224-L232 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L224-L232 type ReportingEmailAttachment struct { Inline *bool `json:"inline,omitempty"` Interval Duration `json:"interval,omitempty"` diff --git a/typedapi/types/repositoriesrecord.go b/typedapi/types/repositoriesrecord.go index cdc652a897..e2e9d21623 100644 --- a/typedapi/types/repositoriesrecord.go +++ b/typedapi/types/repositoriesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RepositoriesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/repositories/types.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/repositories/types.ts#L20-L31 type RepositoriesRecord struct { // Id The unique repository identifier. Id *string `json:"id,omitempty"` diff --git a/typedapi/types/repository.go b/typedapi/types/repository.go index ea43e439f6..f33b9946fb 100644 --- a/typedapi/types/repository.go +++ b/typedapi/types/repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -29,7 +29,7 @@ package types // ReadOnlyUrlRepository // SourceOnlyRepository // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L24-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L24-L34 type Repository any type RepositoryVariant interface { diff --git a/typedapi/types/repositoryintegrityindicator.go b/typedapi/types/repositoryintegrityindicator.go index 0c623f8de3..847c0adfd0 100644 --- a/typedapi/types/repositoryintegrityindicator.go +++ b/typedapi/types/repositoryintegrityindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RepositoryIntegrityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L138-L142 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L138-L142 type RepositoryIntegrityIndicator struct { Details *RepositoryIntegrityIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/repositoryintegrityindicatordetails.go b/typedapi/types/repositoryintegrityindicatordetails.go index 0958d6f095..9f984b9c25 100644 --- a/typedapi/types/repositoryintegrityindicatordetails.go +++ b/typedapi/types/repositoryintegrityindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RepositoryIntegrityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L143-L147 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L143-L147 type RepositoryIntegrityIndicatorDetails struct { Corrupted []string `json:"corrupted,omitempty"` CorruptedRepositories *int64 `json:"corrupted_repositories,omitempty"` diff --git a/typedapi/types/repositorylocation.go b/typedapi/types/repositorylocation.go index e8ff0c7e5a..59e48229d0 100644 --- a/typedapi/types/repositorylocation.go +++ b/typedapi/types/repositorylocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RepositoryLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/RepositoryMeteringInformation.ts#L68-L74 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/RepositoryMeteringInformation.ts#L68-L74 type RepositoryLocation struct { BasePath string `json:"base_path"` // Bucket Bucket name (GCP, S3) diff --git a/typedapi/types/repositorymeteringinformation.go b/typedapi/types/repositorymeteringinformation.go index 0bdd2a01df..d921ff59dd 100644 --- a/typedapi/types/repositorymeteringinformation.go +++ b/typedapi/types/repositorymeteringinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RepositoryMeteringInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/RepositoryMeteringInformation.ts#L24-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/RepositoryMeteringInformation.ts#L24-L66 type RepositoryMeteringInformation struct { // Archived A flag that tells whether or not this object has been archived. When a // repository is closed or updated the diff --git a/typedapi/types/repositorystatscurrentcounts.go b/typedapi/types/repositorystatscurrentcounts.go index 941661696f..a93be0e5a6 100644 --- a/typedapi/types/repositorystatscurrentcounts.go +++ b/typedapi/types/repositorystatscurrentcounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RepositoryStatsCurrentCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L672-L680 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L690-L698 type RepositoryStatsCurrentCounts struct { ActiveDeletions int `json:"active_deletions"` Clones int `json:"clones"` diff --git a/typedapi/types/repositorystatsshards.go b/typedapi/types/repositorystatsshards.go index edd212ff91..32a4de661e 100644 --- a/typedapi/types/repositorystatsshards.go +++ b/typedapi/types/repositorystatsshards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RepositoryStatsShards type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L682-L687 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L700-L705 type RepositoryStatsShards struct { Complete int `json:"complete"` Incomplete int `json:"incomplete"` diff --git a/typedapi/types/requestcachestats.go b/typedapi/types/requestcachestats.go index 2b54388de1..e459d60dda 100644 --- a/typedapi/types/requestcachestats.go +++ b/typedapi/types/requestcachestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RequestCacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L271-L277 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L271-L277 type RequestCacheStats struct { Evictions int64 `json:"evictions"` HitCount int64 `json:"hit_count"` diff --git a/typedapi/types/requestchatcompletion.go b/typedapi/types/requestchatcompletion.go index c526aa0d70..9c83478ed5 100644 --- a/typedapi/types/requestchatcompletion.go +++ b/typedapi/types/requestchatcompletion.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RequestChatCompletion type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L25-L97 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L25-L97 type RequestChatCompletion struct { // MaxCompletionTokens The upper bound limit for the number of tokens that can be generated for a // completion request. @@ -42,7 +42,8 @@ type RequestChatCompletion struct { // only be copied from the response to a previous completion request, such that // the messages array is built up throughout a conversation. Messages []Message `json:"messages"` - // Model The ID of the model to use. + // Model The ID of the model to use. By default, the model ID is set to the value + // included when creating the inference endpoint. Model *string `json:"model,omitempty"` // Stop A sequence of strings to control when the model should stop generating // additional tokens. diff --git a/typedapi/types/requestcounts.go b/typedapi/types/requestcounts.go index ebe6451773..75282d6491 100644 --- a/typedapi/types/requestcounts.go +++ b/typedapi/types/requestcounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RequestCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/RepositoryMeteringInformation.ts#L76-L103 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/RepositoryMeteringInformation.ts#L76-L103 type RequestCounts struct { // GetBlob Number of Get Blob requests (Azure) GetBlob *int64 `json:"GetBlob,omitempty"` diff --git a/typedapi/types/requestitem.go b/typedapi/types/requestitem.go index bd317e4f00..9e0f18a175 100644 --- a/typedapi/types/requestitem.go +++ b/typedapi/types/requestitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // MultisearchHeader // TemplateConfig // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch_template/types.ts#L26-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch_template/types.ts#L26-L27 type RequestItem any type RequestItemVariant interface { diff --git a/typedapi/types/reroutedecision.go b/typedapi/types/reroutedecision.go index b97312f40d..20d8aec729 100644 --- a/typedapi/types/reroutedecision.go +++ b/typedapi/types/reroutedecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RerouteDecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L86-L90 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/types.ts#L86-L90 type RerouteDecision struct { Decider string `json:"decider"` Decision string `json:"decision"` diff --git a/typedapi/types/rerouteexplanation.go b/typedapi/types/rerouteexplanation.go index 6f4cdbcf44..e286daca79 100644 --- a/typedapi/types/rerouteexplanation.go +++ b/typedapi/types/rerouteexplanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RerouteExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L92-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/types.ts#L92-L96 type RerouteExplanation struct { Command string `json:"command"` Decisions []RerouteDecision `json:"decisions"` diff --git a/typedapi/types/rerouteparameters.go b/typedapi/types/rerouteparameters.go index 417a4ad679..fbee1ba03a 100644 --- a/typedapi/types/rerouteparameters.go +++ b/typedapi/types/rerouteparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RerouteParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L98-L105 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/reroute/types.ts#L98-L105 type RerouteParameters struct { AllowPrimary bool `json:"allow_primary"` FromNode *string `json:"from_node,omitempty"` diff --git a/typedapi/types/rerouteprocessor.go b/typedapi/types/rerouteprocessor.go index 51a158d88d..2adc95e574 100644 --- a/typedapi/types/rerouteprocessor.go +++ b/typedapi/types/rerouteprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RerouteProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1393-L1421 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1397-L1425 type RerouteProcessor struct { // Dataset Field references or a static value for the dataset part of the data stream // name. diff --git a/typedapi/types/rescore.go b/typedapi/types/rescore.go index dee6b6998f..285de6bb7d 100644 --- a/typedapi/types/rescore.go +++ b/typedapi/types/rescore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,11 +31,12 @@ import ( // Rescore type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/rescoring.ts#L25-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/rescoring.ts#L26-L41 type Rescore struct { AdditionalRescoreProperty map[string]json.RawMessage `json:"-"` LearningToRank *LearningToRank `json:"learning_to_rank,omitempty"` Query *RescoreQuery `json:"query,omitempty"` + Script *ScriptRescore `json:"script,omitempty"` WindowSize *int `json:"window_size,omitempty"` } @@ -64,6 +65,11 @@ func (s *Rescore) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Query", err) } + case "script": + if err := dec.Decode(&s.Script); err != nil { + return fmt.Errorf("%s | %w", "Script", err) + } + case "window_size": var tmp any diff --git a/typedapi/types/rescorequery.go b/typedapi/types/rescorequery.go index 030f8ccd55..fb959ca9e4 100644 --- a/typedapi/types/rescorequery.go +++ b/typedapi/types/rescorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RescoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/rescoring.ts#L40-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/rescoring.ts#L43-L65 type RescoreQuery struct { // Query The query to use for rescoring. // This query is only run on the Top-K results returned by the `query` and diff --git a/typedapi/types/rescorerretriever.go b/typedapi/types/rescorerretriever.go index 9d9acb3cb8..be6d0a7bdd 100644 --- a/typedapi/types/rescorerretriever.go +++ b/typedapi/types/rescorerretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RescorerRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L62-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L63-L67 type RescorerRetriever struct { // Filter Query to filter the documents that can match. Filter []Query `json:"filter,omitempty"` diff --git a/typedapi/types/rescorevector.go b/typedapi/types/rescorevector.go index 3432da68eb..42dbf7c454 100644 --- a/typedapi/types/rescorevector.go +++ b/typedapi/types/rescorevector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RescoreVector type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Knn.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Knn.ts#L30-L33 type RescoreVector struct { // Oversample Applies the specified oversample factor to k on the approximate kNN search Oversample float32 `json:"oversample"` diff --git a/typedapi/types/reservedsize.go b/typedapi/types/reservedsize.go index ef55b2be1b..4b69e0dcca 100644 --- a/typedapi/types/reservedsize.go +++ b/typedapi/types/reservedsize.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ReservedSize type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L72-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L72-L77 type ReservedSize struct { NodeId string `json:"node_id"` Path string `json:"path"` diff --git a/typedapi/types/resolveclusterinfo.go b/typedapi/types/resolveclusterinfo.go index d0429a958f..8f342479d2 100644 --- a/typedapi/types/resolveclusterinfo.go +++ b/typedapi/types/resolveclusterinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ResolveClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L29-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L29-L55 type ResolveClusterInfo struct { // Connected Whether the remote cluster is connected to the local (querying) cluster. Connected bool `json:"connected"` diff --git a/typedapi/types/resolveindexaliasitem.go b/typedapi/types/resolveindexaliasitem.go index 6aaf1b6fae..f27eba464f 100644 --- a/typedapi/types/resolveindexaliasitem.go +++ b/typedapi/types/resolveindexaliasitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ResolveIndexAliasItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/resolve_index/ResolveIndexResponse.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/resolve_index/ResolveIndexResponse.ts#L39-L42 type ResolveIndexAliasItem struct { Indices []string `json:"indices"` Name string `json:"name"` diff --git a/typedapi/types/resolveindexdatastreamsitem.go b/typedapi/types/resolveindexdatastreamsitem.go index 478f7afa96..c1e81ebb96 100644 --- a/typedapi/types/resolveindexdatastreamsitem.go +++ b/typedapi/types/resolveindexdatastreamsitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ResolveIndexDataStreamsItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/resolve_index/ResolveIndexResponse.ts#L42-L46 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/resolve_index/ResolveIndexResponse.ts#L44-L48 type ResolveIndexDataStreamsItem struct { BackingIndices []string `json:"backing_indices"` Name string `json:"name"` diff --git a/typedapi/types/resolveindexitem.go b/typedapi/types/resolveindexitem.go index 7a08e0de7a..ed9ba2f5f6 100644 --- a/typedapi/types/resolveindexitem.go +++ b/typedapi/types/resolveindexitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,16 +26,19 @@ import ( "errors" "fmt" "io" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/indexmode" ) // ResolveIndexItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/resolve_index/ResolveIndexResponse.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/resolve_index/ResolveIndexResponse.ts#L31-L37 type ResolveIndexItem struct { - Aliases []string `json:"aliases,omitempty"` - Attributes []string `json:"attributes"` - DataStream *string `json:"data_stream,omitempty"` - Name string `json:"name"` + Aliases []string `json:"aliases,omitempty"` + Attributes []string `json:"attributes"` + DataStream *string `json:"data_stream,omitempty"` + Mode *indexmode.IndexMode `json:"mode,omitempty"` + Name string `json:"name"` } func (s *ResolveIndexItem) UnmarshalJSON(data []byte) error { @@ -68,6 +71,11 @@ func (s *ResolveIndexItem) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "DataStream", err) } + case "mode": + if err := dec.Decode(&s.Mode); err != nil { + return fmt.Errorf("%s | %w", "Mode", err) + } + case "name": if err := dec.Decode(&s.Name); err != nil { return fmt.Errorf("%s | %w", "Name", err) diff --git a/typedapi/types/resourceprivileges.go b/typedapi/types/resourceprivileges.go index 03533aced2..4f4dd7c2d7 100644 --- a/typedapi/types/resourceprivileges.go +++ b/typedapi/types/resourceprivileges.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ResourcePrivileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges/types.ts#L48-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/has_privileges/types.ts#L50-L50 type ResourcePrivileges map[string]Privileges diff --git a/typedapi/types/responseitem.go b/typedapi/types/responseitem.go index 0b824fb730..074a77203d 100644 --- a/typedapi/types/responseitem.go +++ b/typedapi/types/responseitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ResponseItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L37-L84 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/types.ts#L37-L84 type ResponseItem struct { // Error Additional information about the failed operation. // The property is returned only for failed operations. diff --git a/typedapi/types/restriction.go b/typedapi/types/restriction.go index ed2e604fea..3f1eda148b 100644 --- a/typedapi/types/restriction.go +++ b/typedapi/types/restriction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // Restriction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleDescriptor.ts#L135-L141 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/RoleDescriptor.ts#L135-L141 type Restriction struct { // Workflows A list of workflows to which the API key is restricted. // NOTE: In order to use a role restriction, an API key must be created with a diff --git a/typedapi/types/retention.go b/typedapi/types/retention.go index 87baad5b3a..0934b36429 100644 --- a/typedapi/types/retention.go +++ b/typedapi/types/retention.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Retention type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/_types/SnapshotLifecycle.ts#L94-L107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/_types/SnapshotLifecycle.ts#L94-L107 type Retention struct { // ExpireAfter Time period after which a snapshot is considered expired and eligible for // deletion. SLM deletes expired snapshots based on the slm.retention_schedule. diff --git a/typedapi/types/retentionlease.go b/typedapi/types/retentionlease.go index fe7e6a8c76..b7be8499eb 100644 --- a/typedapi/types/retentionlease.go +++ b/typedapi/types/retentionlease.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RetentionLease type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L66-L68 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L66-L68 type RetentionLease struct { Period Duration `json:"period"` } diff --git a/typedapi/types/retentionpolicy.go b/typedapi/types/retentionpolicy.go index ad925a4760..4f5cc58292 100644 --- a/typedapi/types/retentionpolicy.go +++ b/typedapi/types/retentionpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RetentionPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L88-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L88-L96 type RetentionPolicy struct { // Field The date field that is used to calculate the age of the document. Field string `json:"field"` diff --git a/typedapi/types/retentionpolicycontainer.go b/typedapi/types/retentionpolicycontainer.go index becee54174..16a6280729 100644 --- a/typedapi/types/retentionpolicycontainer.go +++ b/typedapi/types/retentionpolicycontainer.go @@ -16,58 +16,21 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // RetentionPolicyContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L80-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L80-L86 type RetentionPolicyContainer struct { - AdditionalRetentionPolicyContainerProperty map[string]json.RawMessage `json:"-"` // Time Specifies that the transform uses a time field to set the retention policy. Time *RetentionPolicy `json:"time,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s RetentionPolicyContainer) MarshalJSON() ([]byte, error) { - type opt RetentionPolicyContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalRetentionPolicyContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalRetentionPolicyContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewRetentionPolicyContainer returns a RetentionPolicyContainer. func NewRetentionPolicyContainer() *RetentionPolicyContainer { - r := &RetentionPolicyContainer{ - AdditionalRetentionPolicyContainerProperty: make(map[string]json.RawMessage), - } + r := &RetentionPolicyContainer{} return r } diff --git a/typedapi/types/retries.go b/typedapi/types/retries.go index 8355c4b011..00bb75b934 100644 --- a/typedapi/types/retries.go +++ b/typedapi/types/retries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Retries type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retries.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retries.ts#L22-L31 type Retries struct { // Bulk The number of bulk actions retried. Bulk int64 `json:"bulk"` diff --git a/typedapi/types/retrievercontainer.go b/typedapi/types/retrievercontainer.go index 87af7846dd..4b22a3a351 100644 --- a/typedapi/types/retrievercontainer.go +++ b/typedapi/types/retrievercontainer.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // RetrieverContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L28-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L29-L52 type RetrieverContainer struct { - AdditionalRetrieverContainerProperty map[string]json.RawMessage `json:"-"` // Knn A retriever that replaces the functionality of a knn search. Knn *KnnRetriever `json:"knn,omitempty"` // Linear A retriever that supports the combination of different retrievers through a @@ -51,40 +45,9 @@ type RetrieverContainer struct { TextSimilarityReranker *TextSimilarityReranker `json:"text_similarity_reranker,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s RetrieverContainer) MarshalJSON() ([]byte, error) { - type opt RetrieverContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalRetrieverContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalRetrieverContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewRetrieverContainer returns a RetrieverContainer. func NewRetrieverContainer() *RetrieverContainer { - r := &RetrieverContainer{ - AdditionalRetrieverContainerProperty: make(map[string]json.RawMessage), - } + r := &RetrieverContainer{} return r } @@ -96,3 +59,8 @@ type RetrieverContainerVariant interface { func (s *RetrieverContainer) RetrieverContainerCaster() *RetrieverContainer { return s } + +func (s *RetrieverContainer) RRFRetrieverEntryCaster() *RRFRetrieverEntry { + o := RRFRetrieverEntry(s) + return &o +} diff --git a/typedapi/types/reversenestedaggregate.go b/typedapi/types/reversenestedaggregate.go index d72eabe3b8..505122c7fc 100644 --- a/typedapi/types/reversenestedaggregate.go +++ b/typedapi/types/reversenestedaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // ReverseNestedAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L540-L544 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L612-L616 type ReverseNestedAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *ReverseNestedAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *ReverseNestedAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/reversenestedaggregation.go b/typedapi/types/reversenestedaggregation.go index 8f7c410889..93bfe0d94c 100644 --- a/typedapi/types/reversenestedaggregation.go +++ b/typedapi/types/reversenestedaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ReverseNestedAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L741-L747 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L744-L750 type ReverseNestedAggregation struct { // Path Defines the nested object field that should be joined back to. // The default is empty, which means that it joins back to the root/main diff --git a/typedapi/types/reversetokenfilter.go b/typedapi/types/reversetokenfilter.go index 00c69fd1f9..0b7becde08 100644 --- a/typedapi/types/reversetokenfilter.go +++ b/typedapi/types/reversetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ReverseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L407-L409 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L442-L444 type ReverseTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/role.go b/typedapi/types/role.go index 9cc48cdcb1..03529376b7 100644 --- a/typedapi/types/role.go +++ b/typedapi/types/role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // Role type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_role/types.ts#L32-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_role/types.ts#L32-L54 type Role struct { Applications []ApplicationPrivileges `json:"applications"` Cluster []clusterprivilege.ClusterPrivilege `json:"cluster"` diff --git a/typedapi/types/roledescriptor.go b/typedapi/types/roledescriptor.go index c7bbfb1ddc..c8658d7c6f 100644 --- a/typedapi/types/roledescriptor.go +++ b/typedapi/types/roledescriptor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RoleDescriptor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleDescriptor.ts#L33-L83 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/RoleDescriptor.ts#L33-L83 type RoleDescriptor struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` diff --git a/typedapi/types/roledescriptorread.go b/typedapi/types/roledescriptorread.go index 119144622f..82e39be4bc 100644 --- a/typedapi/types/roledescriptorread.go +++ b/typedapi/types/roledescriptorread.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RoleDescriptorRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleDescriptor.ts#L85-L133 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/RoleDescriptor.ts#L85-L133 type RoleDescriptorRead struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` diff --git a/typedapi/types/roledescriptorwrapper.go b/typedapi/types/roledescriptorwrapper.go index bd41ad0610..a04b49a0d1 100644 --- a/typedapi/types/roledescriptorwrapper.go +++ b/typedapi/types/roledescriptorwrapper.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // RoleDescriptorWrapper type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_service_accounts/types.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_service_accounts/types.ts#L22-L24 type RoleDescriptorWrapper struct { RoleDescriptor RoleDescriptorRead `json:"role_descriptor"` } diff --git a/typedapi/types/rolemappingrule.go b/typedapi/types/rolemappingrule.go index 86d08497d9..58eed919e6 100644 --- a/typedapi/types/rolemappingrule.go +++ b/typedapi/types/rolemappingrule.go @@ -16,60 +16,24 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // RoleMappingRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleMappingRule.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/RoleMappingRule.ts#L23-L31 type RoleMappingRule struct { - AdditionalRoleMappingRuleProperty map[string]json.RawMessage `json:"-"` - All []RoleMappingRule `json:"all,omitempty"` - Any []RoleMappingRule `json:"any,omitempty"` - Except *RoleMappingRule `json:"except,omitempty"` - Field map[string][]FieldValue `json:"field,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s RoleMappingRule) MarshalJSON() ([]byte, error) { - type opt RoleMappingRule - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalRoleMappingRuleProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalRoleMappingRuleProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + All []RoleMappingRule `json:"all,omitempty"` + Any []RoleMappingRule `json:"any,omitempty"` + Except *RoleMappingRule `json:"except,omitempty"` + Field map[string][]FieldValue `json:"field,omitempty"` } // NewRoleMappingRule returns a RoleMappingRule. func NewRoleMappingRule() *RoleMappingRule { r := &RoleMappingRule{ - AdditionalRoleMappingRuleProperty: make(map[string]json.RawMessage), - Field: make(map[string][]FieldValue), + Field: make(map[string][]FieldValue), } return r diff --git a/typedapi/types/rolequerycontainer.go b/typedapi/types/rolequerycontainer.go index fc85f8161f..aa99dc38ef 100644 --- a/typedapi/types/rolequerycontainer.go +++ b/typedapi/types/rolequerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RoleQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_role/types.ts#L37-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_role/types.ts#L37-L101 type RoleQueryContainer struct { AdditionalRoleQueryContainerProperty map[string]json.RawMessage `json:"-"` // Bool matches roles matching boolean combinations of other queries. diff --git a/typedapi/types/rolesstats.go b/typedapi/types/rolesstats.go new file mode 100644 index 0000000000..5275c5656a --- /dev/null +++ b/typedapi/types/rolesstats.go @@ -0,0 +1,36 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// RolesStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/NodeSecurityStats.ts#L29-L34 +type RolesStats struct { + // Dls Document-level security (DLS) statistics. + Dls SecurityRolesDls `json:"dls"` +} + +// NewRolesStats returns a RolesStats. +func NewRolesStats() *RolesStats { + r := &RolesStats{} + + return r +} diff --git a/typedapi/types/roletemplate.go b/typedapi/types/roletemplate.go index bcffe876c7..9753170578 100644 --- a/typedapi/types/roletemplate.go +++ b/typedapi/types/roletemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // RoleTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleTemplate.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/RoleTemplate.ts#L28-L31 type RoleTemplate struct { Format *templateformat.TemplateFormat `json:"format,omitempty"` Template Script `json:"template"` diff --git a/typedapi/types/roletemplateinlinequery.go b/typedapi/types/roletemplateinlinequery.go index 18db808937..f7e0ab9ae3 100644 --- a/typedapi/types/roletemplateinlinequery.go +++ b/typedapi/types/roletemplateinlinequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // Query // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L385-L386 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L385-L386 type RoleTemplateInlineQuery any type RoleTemplateInlineQueryVariant interface { diff --git a/typedapi/types/roletemplatequery.go b/typedapi/types/roletemplatequery.go index 59c0b386a7..94f68f501f 100644 --- a/typedapi/types/roletemplatequery.go +++ b/typedapi/types/roletemplatequery.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // RoleTemplateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L353-L363 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L353-L363 type RoleTemplateQuery struct { // Template When you create a role, you can specify a query that defines the document // level security permissions. You can optionally diff --git a/typedapi/types/roletemplatescript.go b/typedapi/types/roletemplatescript.go index 3895a626ac..803144e408 100644 --- a/typedapi/types/roletemplatescript.go +++ b/typedapi/types/roletemplatescript.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // RoleTemplateScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L365-L383 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L365-L383 type RoleTemplateScript struct { // Id The `id` for a stored script. Id *string `json:"id,omitempty"` diff --git a/typedapi/types/rolloveraction.go b/typedapi/types/rolloveraction.go index ffcc610adc..2ff935af63 100644 --- a/typedapi/types/rolloveraction.go +++ b/typedapi/types/rolloveraction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,12 +31,14 @@ import ( // RolloverAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L99-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L99-L113 type RolloverAction struct { MaxAge Duration `json:"max_age,omitempty"` MaxDocs *int64 `json:"max_docs,omitempty"` MaxPrimaryShardDocs *int64 `json:"max_primary_shard_docs,omitempty"` MaxPrimaryShardSize ByteSize `json:"max_primary_shard_size,omitempty"` + // MaxSize The `max_size` condition has been deprecated in 9.3.0 and + // `max_primary_shard_size` should be used instead MaxSize ByteSize `json:"max_size,omitempty"` MinAge Duration `json:"min_age,omitempty"` MinDocs *int64 `json:"min_docs,omitempty"` diff --git a/typedapi/types/rolloverconditions.go b/typedapi/types/rolloverconditions.go index ea81b8174c..60ebf2ace7 100644 --- a/typedapi/types/rolloverconditions.go +++ b/typedapi/types/rolloverconditions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RolloverConditions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/rollover/types.ts#L24-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/rollover/types.ts#L24-L43 type RolloverConditions struct { MaxAge Duration `json:"max_age,omitempty"` MaxAgeMillis *int64 `json:"max_age_millis,omitempty"` @@ -39,6 +39,8 @@ type RolloverConditions struct { MaxPrimaryShardDocs *int64 `json:"max_primary_shard_docs,omitempty"` MaxPrimaryShardSize ByteSize `json:"max_primary_shard_size,omitempty"` MaxPrimaryShardSizeBytes *int64 `json:"max_primary_shard_size_bytes,omitempty"` + // MaxSize The `max_size` condition has been deprecated in 9.3.0 and + // `max_primary_shard_size` should be used instead MaxSize ByteSize `json:"max_size,omitempty"` MaxSizeBytes *int64 `json:"max_size_bytes,omitempty"` MinAge Duration `json:"min_age,omitempty"` diff --git a/typedapi/types/rollupcapabilities.go b/typedapi/types/rollupcapabilities.go index b89e9a4eb6..56a7e56f96 100644 --- a/typedapi/types/rollupcapabilities.go +++ b/typedapi/types/rollupcapabilities.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // RollupCapabilities type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_rollup_caps/types.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_rollup_caps/types.ts#L24-L29 type RollupCapabilities struct { // RollupJobs There can be multiple, independent jobs configured for a single index or // index pattern. Each of these jobs may have different configurations, so the diff --git a/typedapi/types/rollupcapabilitysummary.go b/typedapi/types/rollupcapabilitysummary.go index 12ac3172c5..eb455b94fc 100644 --- a/typedapi/types/rollupcapabilitysummary.go +++ b/typedapi/types/rollupcapabilitysummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RollupCapabilitySummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_rollup_caps/types.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_rollup_caps/types.ts#L31-L36 type RollupCapabilitySummary struct { Fields map[string][]RollupFieldSummary `json:"fields"` IndexPattern string `json:"index_pattern"` diff --git a/typedapi/types/rollupfieldsummary.go b/typedapi/types/rollupfieldsummary.go index 296a351632..b44cb2b292 100644 --- a/typedapi/types/rollupfieldsummary.go +++ b/typedapi/types/rollupfieldsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RollupFieldSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_rollup_caps/types.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_rollup_caps/types.ts#L38-L42 type RollupFieldSummary struct { Agg string `json:"agg"` CalendarInterval Duration `json:"calendar_interval,omitempty"` diff --git a/typedapi/types/rollupjob.go b/typedapi/types/rollupjob.go index 59021f5db7..fb05a4f3c4 100644 --- a/typedapi/types/rollupjob.go +++ b/typedapi/types/rollupjob.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // RollupJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_jobs/types.ts#L28-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_jobs/types.ts#L28-L43 type RollupJob struct { // Config The rollup job configuration. Config RollupJobConfiguration `json:"config"` diff --git a/typedapi/types/rollupjobconfiguration.go b/typedapi/types/rollupjobconfiguration.go index e3a6006668..d03b7b8abb 100644 --- a/typedapi/types/rollupjobconfiguration.go +++ b/typedapi/types/rollupjobconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RollupJobConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_jobs/types.ts#L45-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_jobs/types.ts#L45-L54 type RollupJobConfiguration struct { Cron string `json:"cron"` Groups Groupings `json:"groups"` diff --git a/typedapi/types/rollupjobstats.go b/typedapi/types/rollupjobstats.go index 87a0fae3ee..283073ea53 100644 --- a/typedapi/types/rollupjobstats.go +++ b/typedapi/types/rollupjobstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RollupJobStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_jobs/types.ts#L56-L69 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_jobs/types.ts#L56-L69 type RollupJobStats struct { DocumentsProcessed int64 `json:"documents_processed"` IndexFailures int64 `json:"index_failures"` diff --git a/typedapi/types/rollupjobstatus.go b/typedapi/types/rollupjobstatus.go index f75820a968..52e967d1f1 100644 --- a/typedapi/types/rollupjobstatus.go +++ b/typedapi/types/rollupjobstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RollupJobStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_jobs/types.ts#L71-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_jobs/types.ts#L71-L75 type RollupJobStatus struct { CurrentPosition map[string]json.RawMessage `json:"current_position,omitempty"` JobState indexingjobstate.IndexingJobState `json:"job_state"` diff --git a/typedapi/types/rollupjobsummary.go b/typedapi/types/rollupjobsummary.go index a77326a95d..4d7e2da987 100644 --- a/typedapi/types/rollupjobsummary.go +++ b/typedapi/types/rollupjobsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RollupJobSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_rollup_index_caps/types.ts#L28-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_rollup_index_caps/types.ts#L28-L33 type RollupJobSummary struct { Fields map[string][]RollupJobSummaryField `json:"fields"` IndexPattern string `json:"index_pattern"` diff --git a/typedapi/types/rollupjobsummaryfield.go b/typedapi/types/rollupjobsummaryfield.go index c35c73597a..15de3de8be 100644 --- a/typedapi/types/rollupjobsummaryfield.go +++ b/typedapi/types/rollupjobsummaryfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RollupJobSummaryField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/get_rollup_index_caps/types.ts#L35-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/get_rollup_index_caps/types.ts#L35-L39 type RollupJobSummaryField struct { Agg string `json:"agg"` CalendarInterval Duration `json:"calendar_interval,omitempty"` diff --git a/typedapi/types/romaniananalyzer.go b/typedapi/types/romaniananalyzer.go index e69c12778c..ba6d0705ca 100644 --- a/typedapi/types/romaniananalyzer.go +++ b/typedapi/types/romaniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RomanianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L268-L273 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L268-L273 type RomanianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/routing.go b/typedapi/types/routing.go new file mode 100644 index 0000000000..0597f04c11 --- /dev/null +++ b/typedapi/types/routing.go @@ -0,0 +1,30 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// Routing type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L68-L68 +type Routing []string + +type RoutingVariant interface { + RoutingCaster() *Routing +} diff --git a/typedapi/types/routingfield.go b/typedapi/types/routingfield.go index 05bc1c082a..b0ce99c277 100644 --- a/typedapi/types/routingfield.go +++ b/typedapi/types/routingfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RoutingField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/meta-fields.ts#L50-L52 type RoutingField struct { Required bool `json:"required"` } diff --git a/typedapi/types/rrfrank.go b/typedapi/types/rrfrank.go index 8354fc19e6..eec68dc7ce 100644 --- a/typedapi/types/rrfrank.go +++ b/typedapi/types/rrfrank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RrfRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Rank.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Rank.ts#L32-L37 type RrfRank struct { // RankConstant How much influence documents in individual result sets per query have over // the final ranked result set diff --git a/typedapi/types/rrfretriever.go b/typedapi/types/rrfretriever.go index 400ed65746..9e291e4682 100644 --- a/typedapi/types/rrfretriever.go +++ b/typedapi/types/rrfretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RRFRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L135-L144 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L162-L171 type RRFRetriever struct { Fields []string `json:"fields,omitempty"` // Filter Query to filter the documents that can match. @@ -48,8 +48,9 @@ type RRFRetriever struct { // RankWindowSize This value determines the size of the individual result sets per query. RankWindowSize *int `json:"rank_window_size,omitempty"` // Retrievers A list of child retrievers to specify which sets of returned top documents - // will have the RRF formula applied to them. - Retrievers []RetrieverContainer `json:"retrievers"` + // will have the RRF formula applied to them. Each retriever can optionally + // include a weight parameter. + Retrievers []RRFRetrieverEntry `json:"retrievers"` } func (s *RRFRetriever) UnmarshalJSON(data []byte) error { @@ -161,9 +162,52 @@ func (s *RRFRetriever) UnmarshalJSON(data []byte) error { } case "retrievers": - if err := dec.Decode(&s.Retrievers); err != nil { + messageArray := []json.RawMessage{} + if err := dec.Decode(&messageArray); err != nil { return fmt.Errorf("%s | %w", "Retrievers", err) } + retrievers_field: + for _, message := range messageArray { + keyDec := json.NewDecoder(bytes.NewReader(message)) + for { + t, err := keyDec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return fmt.Errorf("%s | %w", "Retrievers", err) + } + + switch t { + + case "knn", "linear", "pinned", "rescorer", "rrf", "rule", "standard", "text_similarity_reranker": + o := NewRetrieverContainer() + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Retrievers", err) + } + s.Retrievers = append(s.Retrievers, o) + continue retrievers_field + + case "retriever", "weight": + o := NewRRFRetrieverComponent() + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Retrievers", err) + } + s.Retrievers = append(s.Retrievers, o) + continue retrievers_field + + } + } + + var o any + localDec := json.NewDecoder(bytes.NewReader(message)) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Retrievers", err) + } + s.Retrievers = append(s.Retrievers, o) + } } } diff --git a/typedapi/types/rrfretrievercomponent.go b/typedapi/types/rrfretrievercomponent.go new file mode 100644 index 0000000000..d6e15a71f0 --- /dev/null +++ b/typedapi/types/rrfretrievercomponent.go @@ -0,0 +1,103 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RRFRetrieverComponent type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L143-L154 +type RRFRetrieverComponent struct { + // Retriever The nested retriever configuration. + Retriever RetrieverContainer `json:"retriever"` + // Weight Weight multiplier for this retriever's contribution to the RRF score. Higher + // values increase influence. Defaults to 1.0 if not specified. Must be + // non-negative. + Weight *float32 `json:"weight,omitempty"` +} + +func (s *RRFRetrieverComponent) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "retriever": + if err := dec.Decode(&s.Retriever); err != nil { + return fmt.Errorf("%s | %w", "Retriever", err) + } + + case "weight": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 32) + if err != nil { + return fmt.Errorf("%s | %w", "Weight", err) + } + f := float32(value) + s.Weight = &f + case float64: + f := float32(v) + s.Weight = &f + } + + } + } + return nil +} + +// NewRRFRetrieverComponent returns a RRFRetrieverComponent. +func NewRRFRetrieverComponent() *RRFRetrieverComponent { + r := &RRFRetrieverComponent{} + + return r +} + +type RRFRetrieverComponentVariant interface { + RRFRetrieverComponentCaster() *RRFRetrieverComponent +} + +func (s *RRFRetrieverComponent) RRFRetrieverComponentCaster() *RRFRetrieverComponent { + return s +} + +func (s *RRFRetrieverComponent) RRFRetrieverEntryCaster() *RRFRetrieverEntry { + o := RRFRetrieverEntry(s) + return &o +} diff --git a/typedapi/types/rrfretrieverentry.go b/typedapi/types/rrfretrieverentry.go new file mode 100644 index 0000000000..92fd2bdedd --- /dev/null +++ b/typedapi/types/rrfretrieverentry.go @@ -0,0 +1,33 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// RRFRetrieverEntry holds the union for the following types: +// +// RetrieverContainer +// RRFRetrieverComponent +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L156-L160 +type RRFRetrieverEntry any + +type RRFRetrieverEntryVariant interface { + RRFRetrieverEntryCaster() *RRFRetrieverEntry +} diff --git a/typedapi/types/rulecondition.go b/typedapi/types/rulecondition.go index aba3894542..233b544ee3 100644 --- a/typedapi/types/rulecondition.go +++ b/typedapi/types/rulecondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // RuleCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Rule.ts#L52-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Rule.ts#L52-L65 type RuleCondition struct { // AppliesTo Specifies the result property to which the condition applies. If your // detector uses `lat_long`, `metric`, `rare`, or `freq_rare` functions, you can diff --git a/typedapi/types/rulequery.go b/typedapi/types/rulequery.go index 1e1e6995fe..0340a5ea8d 100644 --- a/typedapi/types/rulequery.go +++ b/typedapi/types/rulequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RuleQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L398-L406 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L398-L406 type RuleQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/ruleretriever.go b/typedapi/types/ruleretriever.go index ddea9c6df7..208c09f172 100644 --- a/typedapi/types/ruleretriever.go +++ b/typedapi/types/ruleretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RuleRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L159-L168 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L192-L201 type RuleRetriever struct { // Filter Query to filter the documents that can match. Filter []Query `json:"filter,omitempty"` diff --git a/typedapi/types/runningstatesearchinterval.go b/typedapi/types/runningstatesearchinterval.go index 9af54f8035..baf8917852 100644 --- a/typedapi/types/runningstatesearchinterval.go +++ b/typedapi/types/runningstatesearchinterval.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RunningStateSearchInterval type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Datafeed.ts#L226-L243 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Datafeed.ts#L230-L247 type RunningStateSearchInterval struct { // End The end time. End Duration `json:"end,omitempty"` diff --git a/typedapi/types/runtimefield.go b/typedapi/types/runtimefield.go index 05399f8c06..2ba6f5ce08 100644 --- a/typedapi/types/runtimefield.go +++ b/typedapi/types/runtimefield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // RuntimeField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/RuntimeFields.ts#L26-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/RuntimeFields.ts#L26-L50 type RuntimeField struct { // FetchFields For type `lookup` FetchFields []RuntimeFieldFetchFields `json:"fetch_fields,omitempty"` diff --git a/typedapi/types/runtimefieldfetchfields.go b/typedapi/types/runtimefieldfetchfields.go index e36598a172..ac50a64ee8 100644 --- a/typedapi/types/runtimefieldfetchfields.go +++ b/typedapi/types/runtimefieldfetchfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RuntimeFieldFetchFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/RuntimeFields.ts#L56-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/RuntimeFields.ts#L56-L60 type RuntimeFieldFetchFields struct { Field string `json:"field"` Format *string `json:"format,omitempty"` diff --git a/typedapi/types/runtimefields.go b/typedapi/types/runtimefields.go index f7b471bdc4..e486657e35 100644 --- a/typedapi/types/runtimefields.go +++ b/typedapi/types/runtimefields.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // RuntimeFields type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/RuntimeFields.ts#L24-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/RuntimeFields.ts#L24-L24 type RuntimeFields map[string]RuntimeField type RuntimeFieldsVariant interface { diff --git a/typedapi/types/runtimefieldstype.go b/typedapi/types/runtimefieldstype.go index 1c86011cb1..5775ccf65d 100644 --- a/typedapi/types/runtimefieldstype.go +++ b/typedapi/types/runtimefieldstype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RuntimeFieldsType type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L289-L304 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L289-L304 type RuntimeFieldsType struct { CharsMax int64 `json:"chars_max"` CharsTotal int64 `json:"chars_total"` diff --git a/typedapi/types/russiananalyzer.go b/typedapi/types/russiananalyzer.go index a0f076cf3d..5f61642c9b 100644 --- a/typedapi/types/russiananalyzer.go +++ b/typedapi/types/russiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // RussianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L275-L280 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L275-L280 type RussianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/russianstemtokenfilter.go b/typedapi/types/russianstemtokenfilter.go index c3dc05df7e..f5fd333b2d 100644 --- a/typedapi/types/russianstemtokenfilter.go +++ b/typedapi/types/russianstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // RussianStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L567-L569 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L604-L606 type RussianStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/s3repository.go b/typedapi/types/s3repository.go index cccd36d41e..52fac6748f 100644 --- a/typedapi/types/s3repository.go +++ b/typedapi/types/s3repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // S3Repository type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L64-L78 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L64-L78 type S3Repository struct { // Settings The repository settings. // diff --git a/typedapi/types/s3repositorysettings.go b/typedapi/types/s3repositorysettings.go index 287918bd5d..563e02b758 100644 --- a/typedapi/types/s3repositorysettings.go +++ b/typedapi/types/s3repositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // S3RepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L237-L346 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L237-L346 type S3RepositorySettings struct { // BasePath The path to the repository data within its bucket. // It defaults to an empty string, meaning that the repository is at the root of diff --git a/typedapi/types/samplediversity.go b/typedapi/types/samplediversity.go index 7e2a9ab9cf..c36dc2826b 100644 --- a/typedapi/types/samplediversity.go +++ b/typedapi/types/samplediversity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SampleDiversity type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/_types/ExploreControls.ts#L51-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/graph/_types/ExploreControls.ts#L51-L54 type SampleDiversity struct { Field string `json:"field"` MaxDocsPerValue int `json:"max_docs_per_value"` diff --git a/typedapi/types/sampleraggregate.go b/typedapi/types/sampleraggregate.go index 7b704d6961..c5169558b0 100644 --- a/typedapi/types/sampleraggregate.go +++ b/typedapi/types/sampleraggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // SamplerAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L558-L559 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L630-L631 type SamplerAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *SamplerAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *SamplerAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/sampleraggregation.go b/typedapi/types/sampleraggregation.go index bab6683b36..228226cec3 100644 --- a/typedapi/types/sampleraggregation.go +++ b/typedapi/types/sampleraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L771-L780 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L774-L783 type SamplerAggregation struct { // ShardSize Limits how many top-scoring documents are collected in the sample processed // on each shard. diff --git a/typedapi/types/samplingconfiguration.go b/typedapi/types/samplingconfiguration.go new file mode 100644 index 0000000000..7ba1d1081c --- /dev/null +++ b/typedapi/types/samplingconfiguration.go @@ -0,0 +1,187 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SamplingConfiguration type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/SampleConfiguration.ts#L24-L64 +type SamplingConfiguration struct { + // CreationTime The time when the sampling configuration was created. + CreationTime DateTime `json:"creation_time,omitempty"` + // CreationTimeInMillis The time when the sampling configuration was created, in milliseconds since + // epoch. + CreationTimeInMillis int64 `json:"creation_time_in_millis"` + // If An optional condition script that sampled documents must satisfy. + If *string `json:"if,omitempty"` + // MaxSamples The maximum number of documents to sample. + MaxSamples int `json:"max_samples"` + // MaxSize The maximum total size of sampled documents. + MaxSize ByteSize `json:"max_size,omitempty"` + // MaxSizeInBytes The maximum total size of sampled documents in bytes. + MaxSizeInBytes int64 `json:"max_size_in_bytes"` + // Rate The fraction of documents to sample between 0 and 1. + Rate Float64 `json:"rate"` + // TimeToLive The duration for which the sampled documents should be retained. + TimeToLive Duration `json:"time_to_live,omitempty"` + // TimeToLiveInMillis The duration for which the sampled documents should be retained, in + // milliseconds. + TimeToLiveInMillis int64 `json:"time_to_live_in_millis"` +} + +func (s *SamplingConfiguration) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "creation_time": + if err := dec.Decode(&s.CreationTime); err != nil { + return fmt.Errorf("%s | %w", "CreationTime", err) + } + + case "creation_time_in_millis": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "CreationTimeInMillis", err) + } + s.CreationTimeInMillis = value + case float64: + f := int64(v) + s.CreationTimeInMillis = f + } + + case "if": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "If", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.If = &o + + case "max_samples": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "MaxSamples", err) + } + s.MaxSamples = value + case float64: + f := int(v) + s.MaxSamples = f + } + + case "max_size": + if err := dec.Decode(&s.MaxSize); err != nil { + return fmt.Errorf("%s | %w", "MaxSize", err) + } + + case "max_size_in_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "MaxSizeInBytes", err) + } + s.MaxSizeInBytes = value + case float64: + f := int64(v) + s.MaxSizeInBytes = f + } + + case "rate": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "Rate", err) + } + f := Float64(value) + s.Rate = f + case float64: + f := Float64(v) + s.Rate = f + } + + case "time_to_live": + if err := dec.Decode(&s.TimeToLive); err != nil { + return fmt.Errorf("%s | %w", "TimeToLive", err) + } + + case "time_to_live_in_millis": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "TimeToLiveInMillis", err) + } + s.TimeToLiveInMillis = value + case float64: + f := int64(v) + s.TimeToLiveInMillis = f + } + + } + } + return nil +} + +// NewSamplingConfiguration returns a SamplingConfiguration. +func NewSamplingConfiguration() *SamplingConfiguration { + r := &SamplingConfiguration{} + + return r +} diff --git a/typedapi/types/scalarvalue.go b/typedapi/types/scalarvalue.go index 43e7f5b564..ec0d7b1e3b 100644 --- a/typedapi/types/scalarvalue.go +++ b/typedapi/types/scalarvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -28,7 +28,7 @@ package types // bool // nil // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L33-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L33-L37 type ScalarValue any type ScalarValueVariant interface { diff --git a/typedapi/types/scaledfloatnumberproperty.go b/typedapi/types/scaledfloatnumberproperty.go index da88653fc8..005eda1922 100644 --- a/typedapi/types/scaledfloatnumberproperty.go +++ b/typedapi/types/scaledfloatnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // ScaledFloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L197-L201 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L198-L202 type ScaledFloatNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/scandinavianfoldingtokenfilter.go b/typedapi/types/scandinavianfoldingtokenfilter.go index 5e2766dc81..a9893b71d4 100644 --- a/typedapi/types/scandinavianfoldingtokenfilter.go +++ b/typedapi/types/scandinavianfoldingtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ScandinavianFoldingTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L531-L533 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L568-L570 type ScandinavianFoldingTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/scandinaviannormalizationtokenfilter.go b/typedapi/types/scandinaviannormalizationtokenfilter.go index 99677bf441..3047640331 100644 --- a/typedapi/types/scandinaviannormalizationtokenfilter.go +++ b/typedapi/types/scandinaviannormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ScandinavianNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L535-L537 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L572-L574 type ScandinavianNormalizationTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/schedulecontainer.go b/typedapi/types/schedulecontainer.go index e0b9e5f56e..f615288043 100644 --- a/typedapi/types/schedulecontainer.go +++ b/typedapi/types/schedulecontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,17 +31,16 @@ import ( // ScheduleContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L80-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L80-L92 type ScheduleContainer struct { - AdditionalScheduleContainerProperty map[string]json.RawMessage `json:"-"` - Cron *string `json:"cron,omitempty"` - Daily *DailySchedule `json:"daily,omitempty"` - Hourly *HourlySchedule `json:"hourly,omitempty"` - Interval Duration `json:"interval,omitempty"` - Monthly []TimeOfMonth `json:"monthly,omitempty"` - Timezone *string `json:"timezone,omitempty"` - Weekly []TimeOfWeek `json:"weekly,omitempty"` - Yearly []TimeOfYear `json:"yearly,omitempty"` + Cron *string `json:"cron,omitempty"` + Daily *DailySchedule `json:"daily,omitempty"` + Hourly *HourlySchedule `json:"hourly,omitempty"` + Interval Duration `json:"interval,omitempty"` + Monthly []TimeOfMonth `json:"monthly,omitempty"` + Timezone *string `json:"timezone,omitempty"` + Weekly []TimeOfWeek `json:"weekly,omitempty"` + Yearly []TimeOfYear `json:"yearly,omitempty"` } func (s *ScheduleContainer) UnmarshalJSON(data []byte) error { @@ -139,58 +138,14 @@ func (s *ScheduleContainer) UnmarshalJSON(data []byte) error { } } - default: - - if key, ok := t.(string); ok { - if s.AdditionalScheduleContainerProperty == nil { - s.AdditionalScheduleContainerProperty = make(map[string]json.RawMessage, 0) - } - raw := new(json.RawMessage) - if err := dec.Decode(&raw); err != nil { - return fmt.Errorf("%s | %w", "AdditionalScheduleContainerProperty", err) - } - s.AdditionalScheduleContainerProperty[key] = *raw - } - } } return nil } -// MarhsalJSON overrides marshalling for types with additional properties -func (s ScheduleContainer) MarshalJSON() ([]byte, error) { - type opt ScheduleContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalScheduleContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalScheduleContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewScheduleContainer returns a ScheduleContainer. func NewScheduleContainer() *ScheduleContainer { - r := &ScheduleContainer{ - AdditionalScheduleContainerProperty: make(map[string]json.RawMessage), - } + r := &ScheduleContainer{} return r } diff --git a/typedapi/types/scheduletimeofday.go b/typedapi/types/scheduletimeofday.go index 481414f7bb..36ea8582f3 100644 --- a/typedapi/types/scheduletimeofday.go +++ b/typedapi/types/scheduletimeofday.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // HourAndMinute // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L99-L104 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L99-L104 type ScheduleTimeOfDay any type ScheduleTimeOfDayVariant interface { diff --git a/typedapi/types/scheduletriggerevent.go b/typedapi/types/scheduletriggerevent.go index b9aea39f2e..141fdc97a6 100644 --- a/typedapi/types/scheduletriggerevent.go +++ b/typedapi/types/scheduletriggerevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ScheduleTriggerEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L94-L97 type ScheduleTriggerEvent struct { ScheduledTime DateTime `json:"scheduled_time"` TriggeredTime DateTime `json:"triggered_time,omitempty"` diff --git a/typedapi/types/schedulingconfiguration.go b/typedapi/types/schedulingconfiguration.go index f5b0541cb8..bdb8c22226 100644 --- a/typedapi/types/schedulingconfiguration.go +++ b/typedapi/types/schedulingconfiguration.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SchedulingConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L246-L250 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L246-L250 type SchedulingConfiguration struct { AccessControl *ConnectorScheduling `json:"access_control,omitempty"` Full *ConnectorScheduling `json:"full,omitempty"` diff --git a/typedapi/types/scoresort.go b/typedapi/types/scoresort.go index e3e0634ef8..3bf6859aff 100644 --- a/typedapi/types/scoresort.go +++ b/typedapi/types/scoresort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // ScoreSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L54-L56 type ScoreSort struct { Order *sortorder.SortOrder `json:"order,omitempty"` } diff --git a/typedapi/types/script.go b/typedapi/types/script.go index fc0bdd80b0..d5ff5a1a1d 100644 --- a/typedapi/types/script.go +++ b/typedapi/types/script.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // Script type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L65-L89 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Scripting.ts#L65-L89 type Script struct { // Id The `id` for a stored script. Id *string `json:"id,omitempty"` diff --git a/typedapi/types/scriptcache.go b/typedapi/types/scriptcache.go index 3d1b13ec42..1bfe4af13d 100644 --- a/typedapi/types/scriptcache.go +++ b/typedapi/types/scriptcache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ScriptCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1109-L1123 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1109-L1123 type ScriptCache struct { // CacheEvictions Total number of times the script cache has evicted old data. CacheEvictions *int64 `json:"cache_evictions,omitempty"` diff --git a/typedapi/types/scriptcondition.go b/typedapi/types/scriptcondition.go index d6e69f6ece..0dd4b0847c 100644 --- a/typedapi/types/scriptcondition.go +++ b/typedapi/types/scriptcondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ScriptCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L80-L88 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Conditions.ts#L80-L88 type ScriptCondition struct { Id *string `json:"id,omitempty"` Lang *scriptlanguage.ScriptLanguage `json:"lang,omitempty"` diff --git a/typedapi/types/scriptedheuristic.go b/typedapi/types/scriptedheuristic.go index 80f9edd051..b235b6ffc4 100644 --- a/typedapi/types/scriptedheuristic.go +++ b/typedapi/types/scriptedheuristic.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ScriptedHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L813-L815 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L816-L818 type ScriptedHeuristic struct { Script Script `json:"script"` } diff --git a/typedapi/types/scriptedmetricaggregate.go b/typedapi/types/scriptedmetricaggregate.go index a3d0c6aef2..b7f64ce993 100644 --- a/typedapi/types/scriptedmetricaggregate.go +++ b/typedapi/types/scriptedmetricaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ScriptedMetricAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L741-L747 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L813-L819 type ScriptedMetricAggregate struct { Meta Metadata `json:"meta,omitempty"` Value json.RawMessage `json:"value,omitempty"` diff --git a/typedapi/types/scriptedmetricaggregation.go b/typedapi/types/scriptedmetricaggregation.go index a0964795ef..0e79dcdc16 100644 --- a/typedapi/types/scriptedmetricaggregation.go +++ b/typedapi/types/scriptedmetricaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ScriptedMetricAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L286-L312 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L290-L316 type ScriptedMetricAggregation struct { // CombineScript Runs once on each shard after document collection is complete. // Allows the aggregation to consolidate the state returned from each shard. diff --git a/typedapi/types/scriptfield.go b/typedapi/types/scriptfield.go index b34fb08ac4..3681ec8658 100644 --- a/typedapi/types/scriptfield.go +++ b/typedapi/types/scriptfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ScriptField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L91-L94 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Scripting.ts#L91-L94 type ScriptField struct { IgnoreFailure *bool `json:"ignore_failure,omitempty"` Script Script `json:"script"` diff --git a/typedapi/types/scripting.go b/typedapi/types/scripting.go index 72976804a5..b9131be5c0 100644 --- a/typedapi/types/scripting.go +++ b/typedapi/types/scripting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Scripting type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1055-L1073 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1055-L1073 type Scripting struct { // CacheEvictions Total number of times the script cache has evicted old data. CacheEvictions *int64 `json:"cache_evictions,omitempty"` diff --git a/typedapi/types/scriptprocessor.go b/typedapi/types/scriptprocessor.go index b1b40e996b..b9d6411ac7 100644 --- a/typedapi/types/scriptprocessor.go +++ b/typedapi/types/scriptprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ScriptProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1423-L1443 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1427-L1447 type ScriptProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/scriptquery.go b/typedapi/types/scriptquery.go index 89419dc124..59ba5ec282 100644 --- a/typedapi/types/scriptquery.go +++ b/typedapi/types/scriptquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ScriptQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L337-L346 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L337-L346 type ScriptQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/scriptrescore.go b/typedapi/types/scriptrescore.go new file mode 100644 index 0000000000..c8d5303476 --- /dev/null +++ b/typedapi/types/scriptrescore.go @@ -0,0 +1,43 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// ScriptRescore type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/rescoring.ts#L102-L104 +type ScriptRescore struct { + Script Script `json:"script"` +} + +// NewScriptRescore returns a ScriptRescore. +func NewScriptRescore() *ScriptRescore { + r := &ScriptRescore{} + + return r +} + +type ScriptRescoreVariant interface { + ScriptRescoreCaster() *ScriptRescore +} + +func (s *ScriptRescore) ScriptRescoreCaster() *ScriptRescore { + return s +} diff --git a/typedapi/types/scriptscorefunction.go b/typedapi/types/scriptscorefunction.go index 889872f362..372c88c5ee 100644 --- a/typedapi/types/scriptscorefunction.go +++ b/typedapi/types/scriptscorefunction.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ScriptScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L137-L142 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L138-L143 type ScriptScoreFunction struct { // Script A script that computes a score. Script Script `json:"script"` diff --git a/typedapi/types/scriptscorequery.go b/typedapi/types/scriptscorequery.go index 38b0481bfd..29d8f53271 100644 --- a/typedapi/types/scriptscorequery.go +++ b/typedapi/types/scriptscorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ScriptScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L348-L365 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L348-L365 type ScriptScoreQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/scriptsort.go b/typedapi/types/scriptsort.go index 0bf459b213..0d39b99b02 100644 --- a/typedapi/types/scriptsort.go +++ b/typedapi/types/scriptsort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -28,7 +28,7 @@ import ( // ScriptSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L72-L78 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L72-L78 type ScriptSort struct { Mode *sortmode.SortMode `json:"mode,omitempty"` Nested *NestedSortValue `json:"nested,omitempty"` diff --git a/typedapi/types/scriptsource.go b/typedapi/types/scriptsource.go index d154777dd7..52826bad1f 100644 --- a/typedapi/types/scriptsource.go +++ b/typedapi/types/scriptsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // SearchRequestBody // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L48-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Scripting.ts#L48-L49 type ScriptSource any type ScriptSourceVariant interface { diff --git a/typedapi/types/scripttransform.go b/typedapi/types/scripttransform.go index a05e70340f..98fd243905 100644 --- a/typedapi/types/scripttransform.go +++ b/typedapi/types/scripttransform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ScriptTransform type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Transform.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Transform.ts#L37-L45 type ScriptTransform struct { Id *string `json:"id,omitempty"` Lang *string `json:"lang,omitempty"` diff --git a/typedapi/types/scrollids.go b/typedapi/types/scrollids.go index 4b22cdacda..5a2ee8b511 100644 --- a/typedapi/types/scrollids.go +++ b/typedapi/types/scrollids.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ScrollIds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L50-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L50-L50 type ScrollIds []string type ScrollIdsVariant interface { diff --git a/typedapi/types/searchablesnapshotaction.go b/typedapi/types/searchablesnapshotaction.go index 59a745666a..ae8b0b34eb 100644 --- a/typedapi/types/searchablesnapshotaction.go +++ b/typedapi/types/searchablesnapshotaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SearchableSnapshotAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L128-L131 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L131-L134 type SearchableSnapshotAction struct { ForceMergeIndex *bool `json:"force_merge_index,omitempty"` SnapshotRepository string `json:"snapshot_repository"` diff --git a/typedapi/types/searchablesnapshots.go b/typedapi/types/searchablesnapshots.go index cc72da090f..504f8e4274 100644 --- a/typedapi/types/searchablesnapshots.go +++ b/typedapi/types/searchablesnapshots.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SearchableSnapshots type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L434-L438 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L467-L471 type SearchableSnapshots struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/searchaccess.go b/typedapi/types/searchaccess.go index c71abbdcbc..db694ee21e 100644 --- a/typedapi/types/searchaccess.go +++ b/typedapi/types/searchaccess.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SearchAccess type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L456-L476 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L456-L476 type SearchAccess struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited diff --git a/typedapi/types/searchapplication.go b/typedapi/types/searchapplication.go index da961eb435..a370888ce9 100644 --- a/typedapi/types/searchapplication.go +++ b/typedapi/types/searchapplication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SearchApplication type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/_types/SearchApplication.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/_types/SearchApplication.ts#L24-L33 type SearchApplication struct { // AnalyticsCollectionName Analytics collection associated to the Search Application. AnalyticsCollectionName *string `json:"analytics_collection_name,omitempty"` diff --git a/typedapi/types/searchapplicationparameters.go b/typedapi/types/searchapplicationparameters.go index e87dfbf5c6..a7855acf1a 100644 --- a/typedapi/types/searchapplicationparameters.go +++ b/typedapi/types/searchapplicationparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SearchApplicationParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/_types/SearchApplicationParameters.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/_types/SearchApplicationParameters.ts#L23-L36 type SearchApplicationParameters struct { // AnalyticsCollectionName Analytics collection associated to the Search Application. AnalyticsCollectionName *string `json:"analytics_collection_name,omitempty"` diff --git a/typedapi/types/searchapplicationtemplate.go b/typedapi/types/searchapplicationtemplate.go index fc8e7aa08e..e2f4912a9a 100644 --- a/typedapi/types/searchapplicationtemplate.go +++ b/typedapi/types/searchapplicationtemplate.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SearchApplicationTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/_types/SearchApplicationTemplate.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/search_application/_types/SearchApplicationTemplate.ts#L22-L27 type SearchApplicationTemplate struct { // Script The associated mustache template. Script Script `json:"script"` diff --git a/typedapi/types/searchasyoutypeproperty.go b/typedapi/types/searchasyoutypeproperty.go index 8021457ed1..9551c891dc 100644 --- a/typedapi/types/searchasyoutypeproperty.go +++ b/typedapi/types/searchasyoutypeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // SearchAsYouTypeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L263-L274 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L276-L287 type SearchAsYouTypeProperty struct { Analyzer *string `json:"analyzer,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/searchidle.go b/typedapi/types/searchidle.go index 4bccb51384..88e59a93a5 100644 --- a/typedapi/types/searchidle.go +++ b/typedapi/types/searchidle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SearchIdle type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L255-L258 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L261-L264 type SearchIdle struct { After Duration `json:"after,omitempty"` } diff --git a/typedapi/types/searchinput.go b/typedapi/types/searchinput.go index b915fdc472..c3244517bf 100644 --- a/typedapi/types/searchinput.go +++ b/typedapi/types/searchinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SearchInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L109-L113 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L109-L113 type SearchInput struct { Extract []string `json:"extract,omitempty"` Request SearchInputRequestDefinition `json:"request"` diff --git a/typedapi/types/searchinputrequestbody.go b/typedapi/types/searchinputrequestbody.go index 3ecbaa7077..a94c8f0ca2 100644 --- a/typedapi/types/searchinputrequestbody.go +++ b/typedapi/types/searchinputrequestbody.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SearchInputRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L144-L146 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L144-L146 type SearchInputRequestBody struct { Query Query `json:"query"` } diff --git a/typedapi/types/searchinputrequestdefinition.go b/typedapi/types/searchinputrequestdefinition.go index 50c7f674f4..41fa89cb21 100644 --- a/typedapi/types/searchinputrequestdefinition.go +++ b/typedapi/types/searchinputrequestdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SearchInputRequestDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L115-L122 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L115-L122 type SearchInputRequestDefinition struct { Body *SearchInputRequestBody `json:"body,omitempty"` Indices []string `json:"indices,omitempty"` diff --git a/typedapi/types/searchprofile.go b/typedapi/types/searchprofile.go index 73ec77a8af..383c5109cb 100644 --- a/typedapi/types/searchprofile.go +++ b/typedapi/types/searchprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SearchProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L136-L140 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L136-L140 type SearchProfile struct { Collector []Collector `json:"collector"` Query []QueryProfile `json:"query"` diff --git a/typedapi/types/searchrequestbody.go b/typedapi/types/searchrequestbody.go index ae3ca293bf..5209f56afc 100644 --- a/typedapi/types/searchrequestbody.go +++ b/typedapi/types/searchrequestbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SearchRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/SearchRequestBody.ts#L42-L242 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/SearchRequestBody.ts#L42-L242 type SearchRequestBody struct { // Aggregations Defines the aggregations that are run as part of the search request. Aggregations map[string]Aggregations `json:"aggregations,omitempty"` diff --git a/typedapi/types/searchshardsnodeattributes.go b/typedapi/types/searchshardsnodeattributes.go index 612313ad4d..70c75e9f6c 100644 --- a/typedapi/types/searchshardsnodeattributes.go +++ b/typedapi/types/searchshardsnodeattributes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SearchShardsNodeAttributes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_shards/SearchShardsResponse.ts#L42-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search_shards/SearchShardsResponse.ts#L42-L60 type SearchShardsNodeAttributes struct { // Attributes Lists node attributes. Attributes map[string]string `json:"attributes"` diff --git a/typedapi/types/searchstats.go b/typedapi/types/searchstats.go index 37742f61bf..8bab956f6b 100644 --- a/typedapi/types/searchstats.go +++ b/typedapi/types/searchstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SearchStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L279-L299 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L279-L299 type SearchStats struct { FetchCurrent int64 `json:"fetch_current"` FetchTime Duration `json:"fetch_time,omitempty"` diff --git a/typedapi/types/searchtemplaterequestbody.go b/typedapi/types/searchtemplaterequestbody.go index 032fb8ea1e..2ddac336ed 100644 --- a/typedapi/types/searchtemplaterequestbody.go +++ b/typedapi/types/searchtemplaterequestbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SearchTemplateRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L125-L142 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L125-L142 type SearchTemplateRequestBody struct { Explain *bool `json:"explain,omitempty"` // Id ID of the search template to use. If no source is specified, diff --git a/typedapi/types/searchtransform.go b/typedapi/types/searchtransform.go index da3475a9a6..d2ce784634 100644 --- a/typedapi/types/searchtransform.go +++ b/typedapi/types/searchtransform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SearchTransform type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Transform.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Transform.ts#L47-L50 type SearchTransform struct { Request SearchInputRequestDefinition `json:"request"` Timeout Duration `json:"timeout"` diff --git a/typedapi/types/searchusagestats.go b/typedapi/types/searchusagestats.go index 797d0f045b..2c13d261b1 100644 --- a/typedapi/types/searchusagestats.go +++ b/typedapi/types/searchusagestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,13 +31,14 @@ import ( // SearchUsageStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L149-L155 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L149-L157 type SearchUsageStats struct { - Queries map[string]int64 `json:"queries"` - Rescorers map[string]int64 `json:"rescorers"` - Retrievers map[string]int64 `json:"retrievers"` - Sections map[string]int64 `json:"sections"` - Total int64 `json:"total"` + Extended ExtendedSearchUsage `json:"extended"` + Queries map[string]int64 `json:"queries"` + Rescorers map[string]int64 `json:"rescorers"` + Retrievers map[string]int64 `json:"retrievers"` + Sections map[string]int64 `json:"sections"` + Total int64 `json:"total"` } func (s *SearchUsageStats) UnmarshalJSON(data []byte) error { @@ -55,6 +56,11 @@ func (s *SearchUsageStats) UnmarshalJSON(data []byte) error { switch t { + case "extended": + if err := dec.Decode(&s.Extended); err != nil { + return fmt.Errorf("%s | %w", "Extended", err) + } + case "queries": if s.Queries == nil { s.Queries = make(map[string]int64, 0) diff --git a/typedapi/types/security.go b/typedapi/types/security.go index 4157c501d5..f5d9c50be1 100644 --- a/typedapi/types/security.go +++ b/typedapi/types/security.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Security type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L440-L453 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L473-L486 type Security struct { Anonymous FeatureToggle `json:"anonymous"` ApiKeyService FeatureToggle `json:"api_key_service"` diff --git a/typedapi/types/securityrolemapping.go b/typedapi/types/securityrolemapping.go index a3869190aa..8de4504afd 100644 --- a/typedapi/types/securityrolemapping.go +++ b/typedapi/types/securityrolemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SecurityRoleMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleMapping.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/RoleMapping.ts#L25-L33 type SecurityRoleMapping struct { Enabled bool `json:"enabled"` Metadata Metadata `json:"metadata"` diff --git a/typedapi/types/securityroles.go b/typedapi/types/securityroles.go index 16a7073e06..94ed7ed030 100644 --- a/typedapi/types/securityroles.go +++ b/typedapi/types/securityroles.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SecurityRoles type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L306-L310 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L306-L310 type SecurityRoles struct { Dls SecurityRolesDls `json:"dls"` File SecurityRolesFile `json:"file"` diff --git a/typedapi/types/securityrolesdls.go b/typedapi/types/securityrolesdls.go index eb78519e1d..87afce6772 100644 --- a/typedapi/types/securityrolesdls.go +++ b/typedapi/types/securityrolesdls.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SecurityRolesDls type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L318-L320 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L318-L320 type SecurityRolesDls struct { BitSetCache SecurityRolesDlsBitSetCache `json:"bit_set_cache"` } diff --git a/typedapi/types/securityrolesdlsbitsetcache.go b/typedapi/types/securityrolesdlsbitsetcache.go index 3e4a473ec8..bcc509fa1c 100644 --- a/typedapi/types/securityrolesdlsbitsetcache.go +++ b/typedapi/types/securityrolesdlsbitsetcache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,11 +31,24 @@ import ( // SecurityRolesDlsBitSetCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L322-L326 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L322-L359 type SecurityRolesDlsBitSetCache struct { - Count int `json:"count"` - Memory ByteSize `json:"memory,omitempty"` - MemoryInBytes uint64 `json:"memory_in_bytes"` + // Count Number of entries in the cache. + Count int `json:"count"` + // Evictions Total number of cache evictions. + Evictions int64 `json:"evictions"` + // Hits Total number of cache hits. + Hits int64 `json:"hits"` + // HitsTimeInMillis Total combined time spent in cache for hits in milliseconds. + HitsTimeInMillis int64 `json:"hits_time_in_millis"` + // Memory Human-readable amount of memory taken up by the cache. + Memory ByteSize `json:"memory,omitempty"` + // MemoryInBytes Memory taken up by the cache in bytes. + MemoryInBytes uint64 `json:"memory_in_bytes"` + // Misses Total number of cache misses. + Misses int64 `json:"misses"` + // MissesTimeInMillis Total combined time spent in cache for misses in milliseconds. + MissesTimeInMillis int64 `json:"misses_time_in_millis"` } func (s *SecurityRolesDlsBitSetCache) UnmarshalJSON(data []byte) error { @@ -69,6 +82,41 @@ func (s *SecurityRolesDlsBitSetCache) UnmarshalJSON(data []byte) error { s.Count = f } + case "evictions": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "Evictions", err) + } + s.Evictions = value + case float64: + f := int64(v) + s.Evictions = f + } + + case "hits": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "Hits", err) + } + s.Hits = value + case float64: + f := int64(v) + s.Hits = f + } + + case "hits_time_in_millis": + if err := dec.Decode(&s.HitsTimeInMillis); err != nil { + return fmt.Errorf("%s | %w", "HitsTimeInMillis", err) + } + case "memory": if err := dec.Decode(&s.Memory); err != nil { return fmt.Errorf("%s | %w", "Memory", err) @@ -79,6 +127,26 @@ func (s *SecurityRolesDlsBitSetCache) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "MemoryInBytes", err) } + case "misses": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "Misses", err) + } + s.Misses = value + case float64: + f := int64(v) + s.Misses = f + } + + case "misses_time_in_millis": + if err := dec.Decode(&s.MissesTimeInMillis); err != nil { + return fmt.Errorf("%s | %w", "MissesTimeInMillis", err) + } + } } return nil diff --git a/typedapi/types/securityrolesfile.go b/typedapi/types/securityrolesfile.go index bdd22e8361..b520b67974 100644 --- a/typedapi/types/securityrolesfile.go +++ b/typedapi/types/securityrolesfile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SecurityRolesFile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L328-L332 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L361-L365 type SecurityRolesFile struct { Dls bool `json:"dls"` Fls bool `json:"fls"` diff --git a/typedapi/types/securityrolesnative.go b/typedapi/types/securityrolesnative.go index f5d74c3d34..f620bf40a4 100644 --- a/typedapi/types/securityrolesnative.go +++ b/typedapi/types/securityrolesnative.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SecurityRolesNative type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L312-L316 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L312-L316 type SecurityRolesNative struct { Dls bool `json:"dls"` Fls bool `json:"fls"` diff --git a/typedapi/types/securitysettings.go b/typedapi/types/securitysettings.go index 5045a8dd06..1ce3a54808 100644 --- a/typedapi/types/securitysettings.go +++ b/typedapi/types/securitysettings.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SecuritySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/SecuritySettings.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/SecuritySettings.ts#L22-L24 type SecuritySettings struct { Index *IndexSettings `json:"index,omitempty"` } diff --git a/typedapi/types/segment.go b/typedapi/types/segment.go index 5c1bf38b98..33e938170d 100644 --- a/typedapi/types/segment.go +++ b/typedapi/types/segment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Segment type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/segments/types.ts#L28-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/segments/types.ts#L28-L38 type Segment struct { Attributes map[string]string `json:"attributes"` Committed bool `json:"committed"` diff --git a/typedapi/types/segmentsrecord.go b/typedapi/types/segmentsrecord.go index 4e761a5f6b..5dc17107ee 100644 --- a/typedapi/types/segmentsrecord.go +++ b/typedapi/types/segmentsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SegmentsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/segments/types.ts#L22-L107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/segments/types.ts#L22-L107 type SegmentsRecord struct { // Committed If `true`, the segment is synced to disk. // Segments that are synced can survive a hard reboot. diff --git a/typedapi/types/segmentsstats.go b/typedapi/types/segmentsstats.go index 0314ec2862..6dcadd8651 100644 --- a/typedapi/types/segmentsstats.go +++ b/typedapi/types/segmentsstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SegmentsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L301-L396 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L301-L396 type SegmentsStats struct { // Count Total number of segments across all shards assigned to selected nodes. Count int `json:"count"` diff --git a/typedapi/types/selectoption.go b/typedapi/types/selectoption.go index 2f9089ebf5..ec2bb0d249 100644 --- a/typedapi/types/selectoption.go +++ b/typedapi/types/selectoption.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SelectOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L25-L28 type SelectOption struct { Label string `json:"label"` Value ScalarValue `json:"value"` diff --git a/typedapi/types/semanticquery.go b/typedapi/types/semanticquery.go index bc62b6c6a3..bc2324d906 100644 --- a/typedapi/types/semanticquery.go +++ b/typedapi/types/semanticquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SemanticQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/SemanticQuery.ts#L22-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/SemanticQuery.ts#L22-L30 type SemanticQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/semantictextindexoptions.go b/typedapi/types/semantictextindexoptions.go new file mode 100644 index 0000000000..368f619d3b --- /dev/null +++ b/typedapi/types/semantictextindexoptions.go @@ -0,0 +1,44 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// SemanticTextIndexOptions type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/SemanticTextIndexOptions.ts#L23-L26 +type SemanticTextIndexOptions struct { + DenseVector *DenseVectorIndexOptions `json:"dense_vector,omitempty"` + SparseVector *SparseVectorIndexOptions `json:"sparse_vector,omitempty"` +} + +// NewSemanticTextIndexOptions returns a SemanticTextIndexOptions. +func NewSemanticTextIndexOptions() *SemanticTextIndexOptions { + r := &SemanticTextIndexOptions{} + + return r +} + +type SemanticTextIndexOptionsVariant interface { + SemanticTextIndexOptionsCaster() *SemanticTextIndexOptions +} + +func (s *SemanticTextIndexOptions) SemanticTextIndexOptionsCaster() *SemanticTextIndexOptions { + return s +} diff --git a/typedapi/types/semantictextproperty.go b/typedapi/types/semantictextproperty.go index 576c57120a..b32c205f3b 100644 --- a/typedapi/types/semantictextproperty.go +++ b/typedapi/types/semantictextproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SemanticTextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L238-L261 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L239-L274 type SemanticTextProperty struct { // ChunkingSettings Settings for chunking text into smaller passages. If specified, these will // override the @@ -38,6 +38,15 @@ type SemanticTextProperty struct { // inference_id. If chunking settings are updated, // they will not be applied to existing documents until they are reindexed. ChunkingSettings *ChunkingSettings `json:"chunking_settings,omitempty"` + // Fields Multi-fields allow the same string value to be indexed in multiple ways for + // different purposes, such as one + // field for search and a multi-field for sorting and aggregations, or the same + // string value analyzed by different analyzers. + Fields map[string]Property `json:"fields,omitempty"` + // IndexOptions Settings for index_options that override any defaults used by semantic_text, + // for example + // specific quantization settings. + IndexOptions *SemanticTextIndexOptions `json:"index_options,omitempty"` // InferenceId Inference endpoint that will be used to generate embeddings for the field. // This parameter cannot be updated. Use the Create inference API to create the // endpoint. @@ -74,6 +83,348 @@ func (s *SemanticTextProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "ChunkingSettings", err) } + case "fields": + if s.Fields == nil { + s.Fields = make(map[string]Property, 0) + } + refs := make(map[string]json.RawMessage, 0) + dec.Decode(&refs) + for key, message := range refs { + kind := make(map[string]any) + buf := bytes.NewReader(message) + localDec := json.NewDecoder(buf) + localDec.Decode(&kind) + buf.Seek(0, io.SeekStart) + if _, ok := kind["type"]; !ok { + kind["type"] = "object" + } + switch kind["type"] { + case "binary": + oo := NewBinaryProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "boolean": + oo := NewBooleanProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "{dynamic_type}": + oo := NewDynamicProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "join": + oo := NewJoinProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "keyword": + oo := NewKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "match_only_text": + oo := NewMatchOnlyTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "percolator": + oo := NewPercolatorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "rank_feature": + oo := NewRankFeatureProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "rank_features": + oo := NewRankFeaturesProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "search_as_you_type": + oo := NewSearchAsYouTypeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "text": + oo := NewTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "version": + oo := NewVersionProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "wildcard": + oo := NewWildcardProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "date_nanos": + oo := NewDateNanosProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "date": + oo := NewDateProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "aggregate_metric_double": + oo := NewAggregateMetricDoubleProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "dense_vector": + oo := NewDenseVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "flattened": + oo := NewFlattenedProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "nested": + oo := NewNestedProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "object": + oo := NewObjectProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "passthrough": + oo := NewPassthroughObjectProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "semantic_text": + oo := NewSemanticTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "sparse_vector": + oo := NewSparseVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "completion": + oo := NewCompletionProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "constant_keyword": + oo := NewConstantKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "counted_keyword": + oo := NewCountedKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "alias": + oo := NewFieldAliasProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "histogram": + oo := NewHistogramProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "ip": + oo := NewIpProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "murmur3": + oo := NewMurmur3HashProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "token_count": + oo := NewTokenCountProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "geo_point": + oo := NewGeoPointProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "geo_shape": + oo := NewGeoShapeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "point": + oo := NewPointProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "shape": + oo := NewShapeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "byte": + oo := NewByteNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "double": + oo := NewDoubleNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "float": + oo := NewFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "half_float": + oo := NewHalfFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "integer": + oo := NewIntegerNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "long": + oo := NewLongNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "scaled_float": + oo := NewScaledFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "short": + oo := NewShortNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "unsigned_long": + oo := NewUnsignedLongNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "date_range": + oo := NewDateRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "double_range": + oo := NewDoubleRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "float_range": + oo := NewFloatRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "integer_range": + oo := NewIntegerRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "ip_range": + oo := NewIpRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "long_range": + oo := NewLongRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "icu_collation_keyword": + oo := NewIcuCollationProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + default: + oo := new(Property) + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("new(Property) | %w", err) + } + s.Fields[key] = oo + } + } + + case "index_options": + if err := dec.Decode(&s.IndexOptions); err != nil { + return fmt.Errorf("%s | %w", "IndexOptions", err) + } + case "inference_id": if err := dec.Decode(&s.InferenceId); err != nil { return fmt.Errorf("%s | %w", "InferenceId", err) @@ -107,6 +458,8 @@ func (s SemanticTextProperty) MarshalJSON() ([]byte, error) { type innerSemanticTextProperty SemanticTextProperty tmp := innerSemanticTextProperty{ ChunkingSettings: s.ChunkingSettings, + Fields: s.Fields, + IndexOptions: s.IndexOptions, InferenceId: s.InferenceId, Meta: s.Meta, SearchInferenceId: s.SearchInferenceId, @@ -121,7 +474,8 @@ func (s SemanticTextProperty) MarshalJSON() ([]byte, error) { // NewSemanticTextProperty returns a SemanticTextProperty. func NewSemanticTextProperty() *SemanticTextProperty { r := &SemanticTextProperty{ - Meta: make(map[string]string), + Fields: make(map[string]Property), + Meta: make(map[string]string), } return r diff --git a/typedapi/types/serbiananalyzer.go b/typedapi/types/serbiananalyzer.go index d9917c892d..9371696a7d 100644 --- a/typedapi/types/serbiananalyzer.go +++ b/typedapi/types/serbiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SerbianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L282-L287 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L282-L287 type SerbianAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/serbiannormalizationtokenfilter.go b/typedapi/types/serbiannormalizationtokenfilter.go index 72676c53dd..96494631f5 100644 --- a/typedapi/types/serbiannormalizationtokenfilter.go +++ b/typedapi/types/serbiannormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SerbianNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L539-L541 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L576-L578 type SerbianNormalizationTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/serialdifferencingaggregation.go b/typedapi/types/serialdifferencingaggregation.go index 236017a6a8..fc19b9dc88 100644 --- a/typedapi/types/serialdifferencingaggregation.go +++ b/typedapi/types/serialdifferencingaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SerialDifferencingAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L399-L408 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L401-L410 type SerialDifferencingAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/serializedclusterstate.go b/typedapi/types/serializedclusterstate.go index bc944d159e..de12edcd44 100644 --- a/typedapi/types/serializedclusterstate.go +++ b/typedapi/types/serializedclusterstate.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SerializedClusterState type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L234-L240 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L234-L240 type SerializedClusterState struct { Diffs *SerializedClusterStateDetail `json:"diffs,omitempty"` // FullStates Number of published cluster states. diff --git a/typedapi/types/serializedclusterstatedetail.go b/typedapi/types/serializedclusterstatedetail.go index 9fef258e8c..7246ea437d 100644 --- a/typedapi/types/serializedclusterstatedetail.go +++ b/typedapi/types/serializedclusterstatedetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SerializedClusterStateDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L242-L248 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L242-L248 type SerializedClusterStateDetail struct { CompressedSize *string `json:"compressed_size,omitempty"` CompressedSizeInBytes *int64 `json:"compressed_size_in_bytes,omitempty"` diff --git a/typedapi/types/servicetoken.go b/typedapi/types/servicetoken.go index e803a7ede3..5c8490c8cd 100644 --- a/typedapi/types/servicetoken.go +++ b/typedapi/types/servicetoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ServiceToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/create_service_token/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/create_service_token/types.ts#L22-L25 type ServiceToken struct { Name string `json:"name"` Value string `json:"value"` diff --git a/typedapi/types/setpriorityaction.go b/typedapi/types/setpriorityaction.go index e5fac5e7bf..8ff2ed7752 100644 --- a/typedapi/types/setpriorityaction.go +++ b/typedapi/types/setpriorityaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SetPriorityAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L95-L97 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L95-L97 type SetPriorityAction struct { Priority *int `json:"priority,omitempty"` } diff --git a/typedapi/types/setprocessor.go b/typedapi/types/setprocessor.go index a90964019a..5b4f485bcf 100644 --- a/typedapi/types/setprocessor.go +++ b/typedapi/types/setprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SetProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1445-L1479 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1449-L1483 type SetProcessor struct { // CopyFrom The origin field which will be copied to `field`, cannot set `value` // simultaneously. diff --git a/typedapi/types/setsecurityuserprocessor.go b/typedapi/types/setsecurityuserprocessor.go index 77753e131b..aa213a6041 100644 --- a/typedapi/types/setsecurityuserprocessor.go +++ b/typedapi/types/setsecurityuserprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SetSecurityUserProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1481-L1490 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1485-L1494 type SetSecurityUserProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/settings.go b/typedapi/types/settings.go index 2fc9ffb3a3..0ef503f9c1 100644 --- a/typedapi/types/settings.go +++ b/typedapi/types/settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Settings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L98-L144 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L98-L154 type Settings struct { // AlignCheckpoints Specifies whether the transform checkpoint ranges should be optimized for // performance. Such optimization can align @@ -66,6 +66,16 @@ type Settings struct { // retries other than infinite fails in // validation. Unattended *bool `json:"unattended,omitempty"` + // UsePointInTime Specifies whether the transform checkpoint will use the Point In Time API + // while searching over the source index. + // In general, Point In Time is an optimization that will reduce pressure on the + // source index by reducing the amount + // of refreshes and merges, but it can be expensive if a large number of Point + // In Times are opened and closed for a + // given index. The benefits and impact depend on the data being searched, the + // ingest rate into the source index, and + // the amount of other consumers searching the same source index. + UsePointInTime *bool `json:"use_point_in_time,omitempty"` } func (s *Settings) UnmarshalJSON(data []byte) error { @@ -171,6 +181,20 @@ func (s *Settings) UnmarshalJSON(data []byte) error { s.Unattended = &v } + case "use_point_in_time": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "UsePointInTime", err) + } + s.UsePointInTime = &value + case bool: + s.UsePointInTime = &v + } + } } return nil diff --git a/typedapi/types/settingsanalyze.go b/typedapi/types/settingsanalyze.go index 528a245ba7..d2d7e1caa0 100644 --- a/typedapi/types/settingsanalyze.go +++ b/typedapi/types/settingsanalyze.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SettingsAnalyze type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L245-L248 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L251-L254 type SettingsAnalyze struct { MaxTokenCount Stringifiedinteger `json:"max_token_count,omitempty"` } diff --git a/typedapi/types/settingshighlight.go b/typedapi/types/settingshighlight.go index b2dcaa0f8b..72cb9421e1 100644 --- a/typedapi/types/settingshighlight.go +++ b/typedapi/types/settingshighlight.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SettingsHighlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L240-L243 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L246-L249 type SettingsHighlight struct { MaxAnalyzedOffset *int `json:"max_analyzed_offset,omitempty"` } diff --git a/typedapi/types/settingsquerystring.go b/typedapi/types/settingsquerystring.go index 58a9ab8a12..ede426091f 100644 --- a/typedapi/types/settingsquerystring.go +++ b/typedapi/types/settingsquerystring.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SettingsQueryString type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L260-L262 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L266-L268 type SettingsQueryString struct { Lenient Stringifiedboolean `json:"lenient"` } diff --git a/typedapi/types/settingssearch.go b/typedapi/types/settingssearch.go index e214808558..1a490d4701 100644 --- a/typedapi/types/settingssearch.go +++ b/typedapi/types/settingssearch.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SettingsSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L250-L253 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L256-L259 type SettingsSearch struct { Idle *SearchIdle `json:"idle,omitempty"` Slowlog *SlowlogSettings `json:"slowlog,omitempty"` diff --git a/typedapi/types/settingssimilarity.go b/typedapi/types/settingssimilarity.go index efbc205a3c..177804e2db 100644 --- a/typedapi/types/settingssimilarity.go +++ b/typedapi/types/settingssimilarity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ package types // SettingsSimilarityLmj // SettingsSimilarityScripted // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L180-L192 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L186-L198 type SettingsSimilarity any type SettingsSimilarityVariant interface { diff --git a/typedapi/types/settingssimilaritybm25.go b/typedapi/types/settingssimilaritybm25.go index 174479ee09..52f435bbe3 100644 --- a/typedapi/types/settingssimilaritybm25.go +++ b/typedapi/types/settingssimilaritybm25.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityBm25 type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L198-L203 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L204-L209 type SettingsSimilarityBm25 struct { B *Float64 `json:"b,omitempty"` DiscountOverlaps *bool `json:"discount_overlaps,omitempty"` diff --git a/typedapi/types/settingssimilarityboolean.go b/typedapi/types/settingssimilarityboolean.go index 9beb173c7a..d46fbe344c 100644 --- a/typedapi/types/settingssimilarityboolean.go +++ b/typedapi/types/settingssimilarityboolean.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // SettingsSimilarityBoolean type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L194-L196 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L200-L202 type SettingsSimilarityBoolean struct { Type string `json:"type,omitempty"` } diff --git a/typedapi/types/settingssimilaritydfi.go b/typedapi/types/settingssimilaritydfi.go index ff4967f00e..a458a138a0 100644 --- a/typedapi/types/settingssimilaritydfi.go +++ b/typedapi/types/settingssimilaritydfi.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -28,7 +28,7 @@ import ( // SettingsSimilarityDfi type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L205-L208 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L211-L214 type SettingsSimilarityDfi struct { IndependenceMeasure dfiindependencemeasure.DFIIndependenceMeasure `json:"independence_measure"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/settingssimilaritydfr.go b/typedapi/types/settingssimilaritydfr.go index b1f581003c..a67046e908 100644 --- a/typedapi/types/settingssimilaritydfr.go +++ b/typedapi/types/settingssimilaritydfr.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SettingsSimilarityDfr type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L210-L215 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L216-L221 type SettingsSimilarityDfr struct { AfterEffect dfraftereffect.DFRAfterEffect `json:"after_effect"` BasicModel dfrbasicmodel.DFRBasicModel `json:"basic_model"` diff --git a/typedapi/types/settingssimilarityib.go b/typedapi/types/settingssimilarityib.go index 6c28d67e3b..714b337ba9 100644 --- a/typedapi/types/settingssimilarityib.go +++ b/typedapi/types/settingssimilarityib.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SettingsSimilarityIb type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L217-L222 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L223-L228 type SettingsSimilarityIb struct { Distribution ibdistribution.IBDistribution `json:"distribution"` Lambda iblambda.IBLambda `json:"lambda"` diff --git a/typedapi/types/settingssimilaritylmd.go b/typedapi/types/settingssimilaritylmd.go index 62fd8102bf..41039644c3 100644 --- a/typedapi/types/settingssimilaritylmd.go +++ b/typedapi/types/settingssimilaritylmd.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityLmd type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L224-L227 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L230-L233 type SettingsSimilarityLmd struct { Mu *Float64 `json:"mu,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/settingssimilaritylmj.go b/typedapi/types/settingssimilaritylmj.go index bd39bffded..d5752c8503 100644 --- a/typedapi/types/settingssimilaritylmj.go +++ b/typedapi/types/settingssimilaritylmj.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityLmj type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L229-L232 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L235-L238 type SettingsSimilarityLmj struct { Lambda *Float64 `json:"lambda,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/settingssimilarityscripted.go b/typedapi/types/settingssimilarityscripted.go index fd08407909..321859cf56 100644 --- a/typedapi/types/settingssimilarityscripted.go +++ b/typedapi/types/settingssimilarityscripted.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // SettingsSimilarityScripted type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L234-L238 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L240-L244 type SettingsSimilarityScripted struct { Script Script `json:"script"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/shapefieldquery.go b/typedapi/types/shapefieldquery.go index ba67693d0c..5bc436060e 100644 --- a/typedapi/types/shapefieldquery.go +++ b/typedapi/types/shapefieldquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // ShapeFieldQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L383-L396 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L383-L396 type ShapeFieldQuery struct { // IndexedShape Queries using a pre-indexed shape. IndexedShape *FieldLookup `json:"indexed_shape,omitempty"` diff --git a/typedapi/types/shapeproperty.go b/typedapi/types/shapeproperty.go index cd132c59d4..dafa97ba2d 100644 --- a/typedapi/types/shapeproperty.go +++ b/typedapi/types/shapeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // ShapeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/geo.ts#L81-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/geo.ts#L81-L93 type ShapeProperty struct { Coerce *bool `json:"coerce,omitempty"` CopyTo []string `json:"copy_to,omitempty"` diff --git a/typedapi/types/shapequery.go b/typedapi/types/shapequery.go index efe2415e2a..1eda4fd585 100644 --- a/typedapi/types/shapequery.go +++ b/typedapi/types/shapequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShapeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L367-L381 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L367-L381 type ShapeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/shardcommit.go b/typedapi/types/shardcommit.go index 3bfe944043..22645c7b7f 100644 --- a/typedapi/types/shardcommit.go +++ b/typedapi/types/shardcommit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardCommit type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L112-L117 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L112-L117 type ShardCommit struct { Generation int `json:"generation"` Id string `json:"id"` diff --git a/typedapi/types/shardfailure.go b/typedapi/types/shardfailure.go index 04800a50f5..201919d89e 100644 --- a/typedapi/types/shardfailure.go +++ b/typedapi/types/shardfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,13 +31,14 @@ import ( // ShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Errors.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Errors.ts#L52-L62 type ShardFailure struct { - Index *string `json:"index,omitempty"` - Node *string `json:"node,omitempty"` - Reason ErrorCause `json:"reason"` - Shard int `json:"shard"` - Status *string `json:"status,omitempty"` + Index *string `json:"index,omitempty"` + Node *string `json:"node,omitempty"` + Primary *bool `json:"primary,omitempty"` + Reason ErrorCause `json:"reason"` + Shard *int `json:"shard,omitempty"` + Status *string `json:"status,omitempty"` } func (s *ShardFailure) UnmarshalJSON(data []byte) error { @@ -55,12 +56,12 @@ func (s *ShardFailure) UnmarshalJSON(data []byte) error { switch t { - case "index": + case "index", "_index": if err := dec.Decode(&s.Index); err != nil { return fmt.Errorf("%s | %w", "Index", err) } - case "node": + case "node", "_node": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { return fmt.Errorf("%s | %w", "Node", err) @@ -72,12 +73,26 @@ func (s *ShardFailure) UnmarshalJSON(data []byte) error { } s.Node = &o + case "primary": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "Primary", err) + } + s.Primary = &value + case bool: + s.Primary = &v + } + case "reason": if err := dec.Decode(&s.Reason); err != nil { return fmt.Errorf("%s | %w", "Reason", err) } - case "shard": + case "shard", "_shard": var tmp any dec.Decode(&tmp) @@ -87,10 +102,10 @@ func (s *ShardFailure) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Shard", err) } - s.Shard = value + s.Shard = &value case float64: f := int(v) - s.Shard = f + s.Shard = &f } case "status": diff --git a/typedapi/types/shardfilesizeinfo.go b/typedapi/types/shardfilesizeinfo.go index 42dd48a21c..c47af7032b 100644 --- a/typedapi/types/shardfilesizeinfo.go +++ b/typedapi/types/shardfilesizeinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardFileSizeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L124-L131 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L124-L131 type ShardFileSizeInfo struct { AverageSizeInBytes *int64 `json:"average_size_in_bytes,omitempty"` Count *int64 `json:"count,omitempty"` diff --git a/typedapi/types/shardhealthstats.go b/typedapi/types/shardhealthstats.go index e709d0f7c8..c1bfdfdeb8 100644 --- a/typedapi/types/shardhealthstats.go +++ b/typedapi/types/shardhealthstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ShardHealthStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/health/types.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/health/types.ts#L37-L45 type ShardHealthStats struct { ActiveShards int `json:"active_shards"` InitializingShards int `json:"initializing_shards"` diff --git a/typedapi/types/shardlease.go b/typedapi/types/shardlease.go index 55d093705d..df5f71b203 100644 --- a/typedapi/types/shardlease.go +++ b/typedapi/types/shardlease.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardLease type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L133-L138 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L133-L138 type ShardLease struct { Id string `json:"id"` RetainingSeqNo int64 `json:"retaining_seq_no"` diff --git a/typedapi/types/shardmigrationstatus.go b/typedapi/types/shardmigrationstatus.go index 496ec123da..15b5563659 100644 --- a/typedapi/types/shardmigrationstatus.go +++ b/typedapi/types/shardmigrationstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // ShardMigrationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L52-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L52-L54 type ShardMigrationStatus struct { Status shutdownstatus.ShutdownStatus `json:"status"` } diff --git a/typedapi/types/shardpath.go b/typedapi/types/shardpath.go index 9ca91e0d0b..1eb156e618 100644 --- a/typedapi/types/shardpath.go +++ b/typedapi/types/shardpath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardPath type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L140-L144 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L140-L144 type ShardPath struct { DataPath string `json:"data_path"` IsCustomDataPath bool `json:"is_custom_data_path"` diff --git a/typedapi/types/shardprofile.go b/typedapi/types/shardprofile.go index bf08cf0a7e..6bd5899b46 100644 --- a/typedapi/types/shardprofile.go +++ b/typedapi/types/shardprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/profile.ts#L142-L152 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/profile.ts#L142-L152 type ShardProfile struct { Aggregations []AggregationProfile `json:"aggregations"` Cluster string `json:"cluster"` diff --git a/typedapi/types/shardquerycache.go b/typedapi/types/shardquerycache.go index 4ebecc79f6..a97fae9068 100644 --- a/typedapi/types/shardquerycache.go +++ b/typedapi/types/shardquerycache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardQueryCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L146-L154 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L146-L154 type ShardQueryCache struct { CacheCount int64 `json:"cache_count"` CacheSize int64 `json:"cache_size"` diff --git a/typedapi/types/shardrecovery.go b/typedapi/types/shardrecovery.go index 92cef7c474..300d5727a6 100644 --- a/typedapi/types/shardrecovery.go +++ b/typedapi/types/shardrecovery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardRecovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L118-L135 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L118-L135 type ShardRecovery struct { Id int64 `json:"id"` Index RecoveryIndexStatus `json:"index"` diff --git a/typedapi/types/shardretentionleases.go b/typedapi/types/shardretentionleases.go index d4eb2d5cef..6e0bfc6bbe 100644 --- a/typedapi/types/shardretentionleases.go +++ b/typedapi/types/shardretentionleases.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardRetentionLeases type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L156-L160 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L156-L160 type ShardRetentionLeases struct { Leases []ShardLease `json:"leases"` PrimaryTerm int64 `json:"primary_term"` diff --git a/typedapi/types/shardrouting.go b/typedapi/types/shardrouting.go index c90a378d7d..b46f86b1a2 100644 --- a/typedapi/types/shardrouting.go +++ b/typedapi/types/shardrouting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ShardRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L162-L167 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L162-L167 type ShardRouting struct { Node string `json:"node"` Primary bool `json:"primary"` diff --git a/typedapi/types/shardsavailabilityindicator.go b/typedapi/types/shardsavailabilityindicator.go index 47e5d638b4..ae98ad3cd8 100644 --- a/typedapi/types/shardsavailabilityindicator.go +++ b/typedapi/types/shardsavailabilityindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ShardsAvailabilityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L107-L111 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L107-L111 type ShardsAvailabilityIndicator struct { Details *ShardsAvailabilityIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/shardsavailabilityindicatordetails.go b/typedapi/types/shardsavailabilityindicatordetails.go index 81619d3f66..d165ffa440 100644 --- a/typedapi/types/shardsavailabilityindicatordetails.go +++ b/typedapi/types/shardsavailabilityindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardsAvailabilityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L112-L123 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L112-L123 type ShardsAvailabilityIndicatorDetails struct { CreatingPrimaries int64 `json:"creating_primaries"` CreatingReplicas int64 `json:"creating_replicas"` diff --git a/typedapi/types/shardscapacityindicator.go b/typedapi/types/shardscapacityindicator.go index 23d4d3812a..a192f23910 100644 --- a/typedapi/types/shardscapacityindicator.go +++ b/typedapi/types/shardscapacityindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // ShardsCapacityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L192-L196 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L192-L196 type ShardsCapacityIndicator struct { Details *ShardsCapacityIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/shardscapacityindicatordetails.go b/typedapi/types/shardscapacityindicatordetails.go index c1217f8e94..b715b8e263 100644 --- a/typedapi/types/shardscapacityindicatordetails.go +++ b/typedapi/types/shardscapacityindicatordetails.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ShardsCapacityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L198-L201 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L198-L201 type ShardsCapacityIndicatorDetails struct { Data ShardsCapacityIndicatorTierDetail `json:"data"` Frozen ShardsCapacityIndicatorTierDetail `json:"frozen"` diff --git a/typedapi/types/shardscapacityindicatortierdetail.go b/typedapi/types/shardscapacityindicatortierdetail.go index b1fec9a3f0..2d4f0c0090 100644 --- a/typedapi/types/shardscapacityindicatortierdetail.go +++ b/typedapi/types/shardscapacityindicatortierdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardsCapacityIndicatorTierDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L203-L206 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L203-L206 type ShardsCapacityIndicatorTierDetail struct { CurrentUsedShards *int `json:"current_used_shards,omitempty"` MaxShardsInCluster int `json:"max_shards_in_cluster"` diff --git a/typedapi/types/shardsegmentrouting.go b/typedapi/types/shardsegmentrouting.go index 1629b19b78..ec1c782299 100644 --- a/typedapi/types/shardsegmentrouting.go +++ b/typedapi/types/shardsegmentrouting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardSegmentRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/segments/types.ts#L40-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/segments/types.ts#L40-L44 type ShardSegmentRouting struct { Node string `json:"node"` Primary bool `json:"primary"` diff --git a/typedapi/types/shardsequencenumber.go b/typedapi/types/shardsequencenumber.go index 2759afabd7..d743a838a1 100644 --- a/typedapi/types/shardsequencenumber.go +++ b/typedapi/types/shardsequencenumber.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardSequenceNumber type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L176-L180 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L176-L180 type ShardSequenceNumber struct { GlobalCheckpoint int64 `json:"global_checkpoint"` LocalCheckpoint int64 `json:"local_checkpoint"` diff --git a/typedapi/types/shardsrecord.go b/typedapi/types/shardsrecord.go index def5388016..0d60791459 100644 --- a/typedapi/types/shardsrecord.go +++ b/typedapi/types/shardsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/shards/types.ts#L20-L427 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/shards/types.ts#L20-L427 type ShardsRecord struct { // BulkAvgSizeInBytes The average size in bytes of shard bulk operations. BulkAvgSizeInBytes *string `json:"bulk.avg_size_in_bytes,omitempty"` diff --git a/typedapi/types/shardssegment.go b/typedapi/types/shardssegment.go index a3aca47bad..dbd0f5021b 100644 --- a/typedapi/types/shardssegment.go +++ b/typedapi/types/shardssegment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardsSegment type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/segments/types.ts#L46-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/segments/types.ts#L46-L51 type ShardsSegment struct { NumCommittedSegments int `json:"num_committed_segments"` NumSearchSegments int `json:"num_search_segments"` diff --git a/typedapi/types/shardsstatssummary.go b/typedapi/types/shardsstatssummary.go index cf3f408494..196f804e87 100644 --- a/typedapi/types/shardsstatssummary.go +++ b/typedapi/types/shardsstatssummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ShardsStatsSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotShardsStatus.ts#L29-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotShardsStatus.ts#L29-L35 type ShardsStatsSummary struct { Incremental ShardsStatsSummaryItem `json:"incremental"` StartTimeInMillis int64 `json:"start_time_in_millis"` diff --git a/typedapi/types/shardsstatssummaryitem.go b/typedapi/types/shardsstatssummaryitem.go index e51c049c41..2a869cd690 100644 --- a/typedapi/types/shardsstatssummaryitem.go +++ b/typedapi/types/shardsstatssummaryitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardsStatsSummaryItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotShardsStatus.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotShardsStatus.ts#L37-L40 type ShardsStatsSummaryItem struct { FileCount int64 `json:"file_count"` SizeInBytes int64 `json:"size_in_bytes"` diff --git a/typedapi/types/shardstatistics.go b/typedapi/types/shardstatistics.go index e5de7bb349..25ac108511 100644 --- a/typedapi/types/shardstatistics.go +++ b/typedapi/types/shardstatistics.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ShardStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L54-L69 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L54-L69 type ShardStatistics struct { // Failed The number of shards the operation or search attempted to run on but failed. Failed uint `json:"failed"` diff --git a/typedapi/types/shardstore.go b/typedapi/types/shardstore.go index 0498f9538d..aa478915a7 100644 --- a/typedapi/types/shardstore.go +++ b/typedapi/types/shardstore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // ShardStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shard_stores/types.ts#L29-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shard_stores/types.ts#L29-L36 type ShardStore struct { Allocation shardstoreallocation.ShardStoreAllocation `json:"allocation"` AllocationId *string `json:"allocation_id,omitempty"` diff --git a/typedapi/types/shardstoreexception.go b/typedapi/types/shardstoreexception.go index d9dbc4a795..faa1b6695b 100644 --- a/typedapi/types/shardstoreexception.go +++ b/typedapi/types/shardstoreexception.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardStoreException type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shard_stores/types.ts#L53-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shard_stores/types.ts#L53-L56 type ShardStoreException struct { Reason string `json:"reason"` Type string `json:"type"` diff --git a/typedapi/types/shardstoreindex.go b/typedapi/types/shardstoreindex.go index e8e7d3d819..b112a3ad4b 100644 --- a/typedapi/types/shardstoreindex.go +++ b/typedapi/types/shardstoreindex.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ShardStoreIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_shards/SearchShardsResponse.ts#L62-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search_shards/SearchShardsResponse.ts#L62-L65 type ShardStoreIndex struct { Aliases []string `json:"aliases,omitempty"` Filter *Query `json:"filter,omitempty"` diff --git a/typedapi/types/shardstorenode.go b/typedapi/types/shardstorenode.go index 83a7cd0b39..1898bc0c57 100644 --- a/typedapi/types/shardstorenode.go +++ b/typedapi/types/shardstorenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardStoreNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shard_stores/types.ts#L38-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shard_stores/types.ts#L38-L45 type ShardStoreNode struct { Attributes map[string]string `json:"attributes"` EphemeralId *string `json:"ephemeral_id,omitempty"` diff --git a/typedapi/types/shardstorewrapper.go b/typedapi/types/shardstorewrapper.go index e2a7a21ff4..39cc13ed70 100644 --- a/typedapi/types/shardstorewrapper.go +++ b/typedapi/types/shardstorewrapper.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // ShardStoreWrapper type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/shard_stores/types.ts#L58-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/shard_stores/types.ts#L58-L60 type ShardStoreWrapper struct { Stores []ShardStore `json:"stores"` } diff --git a/typedapi/types/shardstotalstats.go b/typedapi/types/shardstotalstats.go index 00c89cc6f5..e6663a762a 100644 --- a/typedapi/types/shardstotalstats.go +++ b/typedapi/types/shardstotalstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShardsTotalStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L182-L184 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/stats/types.ts#L182-L184 type ShardsTotalStats struct { TotalCount int64 `json:"total_count"` } diff --git a/typedapi/types/shared.go b/typedapi/types/shared.go index 8b034ae0db..b62cc51124 100644 --- a/typedapi/types/shared.go +++ b/typedapi/types/shared.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Shared type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/searchable_snapshots/cache_stats/Response.ts#L34-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/searchable_snapshots/cache_stats/Response.ts#L34-L43 type Shared struct { BytesReadInBytes ByteSize `json:"bytes_read_in_bytes"` BytesWrittenInBytes ByteSize `json:"bytes_written_in_bytes"` diff --git a/typedapi/types/sharedfilesystemrepository.go b/typedapi/types/sharedfilesystemrepository.go index cf804ecb07..5d69f3ed33 100644 --- a/typedapi/types/sharedfilesystemrepository.go +++ b/typedapi/types/sharedfilesystemrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SharedFileSystemRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L80-L90 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L80-L90 type SharedFileSystemRepository struct { // Settings The repository settings. Settings SharedFileSystemRepositorySettings `json:"settings"` diff --git a/typedapi/types/sharedfilesystemrepositorysettings.go b/typedapi/types/sharedfilesystemrepositorysettings.go index 4af3b7b7a7..14986245a0 100644 --- a/typedapi/types/sharedfilesystemrepositorysettings.go +++ b/typedapi/types/sharedfilesystemrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SharedFileSystemRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L348-L375 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L348-L375 type SharedFileSystemRepositorySettings struct { // ChunkSize Big files can be broken down into multiple smaller blobs in the blob store // during snapshotting. diff --git a/typedapi/types/shingletokenfilter.go b/typedapi/types/shingletokenfilter.go index 3abc665cc7..e1f5df5fa6 100644 --- a/typedapi/types/shingletokenfilter.go +++ b/typedapi/types/shingletokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShingleTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L109-L123 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L115-L129 type ShingleTokenFilter struct { // FillerToken String used in shingles as a replacement for empty positions that do not // contain a token. This filler token is only used in shingles, not original diff --git a/typedapi/types/shortnumberproperty.go b/typedapi/types/shortnumberproperty.go index 9300b08c54..780fb4a118 100644 --- a/typedapi/types/shortnumberproperty.go +++ b/typedapi/types/shortnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // ShortNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L182-L185 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L183-L186 type ShortNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/shrinkaction.go b/typedapi/types/shrinkaction.go index b668e80db7..0d5c25087f 100644 --- a/typedapi/types/shrinkaction.go +++ b/typedapi/types/shrinkaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ShrinkAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L117-L121 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L120-L124 type ShrinkAction struct { AllowWriteAfterShrink *bool `json:"allow_write_after_shrink,omitempty"` MaxPrimaryShardSize ByteSize `json:"max_primary_shard_size,omitempty"` diff --git a/typedapi/types/significantlongtermsaggregate.go b/typedapi/types/significantlongtermsaggregate.go index b7de1047b1..3097376304 100644 --- a/typedapi/types/significantlongtermsaggregate.go +++ b/typedapi/types/significantlongtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SignificantLongTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L670-L672 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L742-L744 type SignificantLongTermsAggregate struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsSignificantLongTermsBucket `json:"buckets"` diff --git a/typedapi/types/significantlongtermsbucket.go b/typedapi/types/significantlongtermsbucket.go index 16448df199..35741ac69c 100644 --- a/typedapi/types/significantlongtermsbucket.go +++ b/typedapi/types/significantlongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // SignificantLongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L679-L682 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L751-L754 type SignificantLongTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` BgCount int64 `json:"bg_count"` @@ -253,6 +253,13 @@ func (s *SignificantLongTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -281,6 +288,20 @@ func (s *SignificantLongTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/significantstringtermsaggregate.go b/typedapi/types/significantstringtermsaggregate.go index daa5162a3d..dd9274cecc 100644 --- a/typedapi/types/significantstringtermsaggregate.go +++ b/typedapi/types/significantstringtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SignificantStringTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L684-L686 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L756-L758 type SignificantStringTermsAggregate struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsSignificantStringTermsBucket `json:"buckets"` diff --git a/typedapi/types/significantstringtermsbucket.go b/typedapi/types/significantstringtermsbucket.go index e5248c91af..90d612cefc 100644 --- a/typedapi/types/significantstringtermsbucket.go +++ b/typedapi/types/significantstringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // SignificantStringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L688-L690 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L760-L762 type SignificantStringTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` BgCount int64 `json:"bg_count"` @@ -237,6 +237,13 @@ func (s *SignificantStringTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -265,6 +272,20 @@ func (s *SignificantStringTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/significanttermsaggregation.go b/typedapi/types/significanttermsaggregation.go index a045da1d26..58f3dd0c58 100644 --- a/typedapi/types/significanttermsaggregation.go +++ b/typedapi/types/significanttermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SignificantTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L817-L884 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L836-L913 type SignificantTermsAggregation struct { // BackgroundFilter A background filter that can be used to focus in on significant terms within // a narrower context, instead of the entire index. @@ -60,6 +60,18 @@ type SignificantTermsAggregation struct { // MutualInformation Use mutual information as described in "Information Retrieval", Manning et // al., Chapter 13.5.1, as the significance score. MutualInformation *MutualInformationHeuristic `json:"mutual_information,omitempty"` + // PValue Significant terms heuristic that calculates the p-value between the term + // existing in foreground and background sets. + // + // The p-value is the probability of obtaining test results at least as extreme + // as + // the results actually observed, under the assumption that the null hypothesis + // is + // correct. The p-value is calculated assuming that the foreground set and the + // background set are independent https://en.wikipedia.org/wiki/Bernoulli_trial, + // with the null + // hypothesis that the probabilities are the same. + PValue *PValueHeuristic `json:"p_value,omitempty"` // Percentage A simple calculation of the number of documents in the foreground sample with // a term divided by the number of documents in the background with the term. Percentage *PercentageScoreHeuristic `json:"percentage,omitempty"` @@ -195,6 +207,11 @@ func (s *SignificantTermsAggregation) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "MutualInformation", err) } + case "p_value": + if err := dec.Decode(&s.PValue); err != nil { + return fmt.Errorf("%s | %w", "PValue", err) + } + case "percentage": if err := dec.Decode(&s.Percentage); err != nil { return fmt.Errorf("%s | %w", "Percentage", err) diff --git a/typedapi/types/significanttextaggregation.go b/typedapi/types/significanttextaggregation.go index a849d4f865..937944283f 100644 --- a/typedapi/types/significanttextaggregation.go +++ b/typedapi/types/significanttextaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SignificantTextAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L886-L961 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L915-L990 type SignificantTextAggregation struct { // BackgroundFilter A background filter that can be used to focus in on significant terms within // a narrower context, instead of the entire index. diff --git a/typedapi/types/simpleanalyzer.go b/typedapi/types/simpleanalyzer.go index 5d85365421..00fe5e26a8 100644 --- a/typedapi/types/simpleanalyzer.go +++ b/typedapi/types/simpleanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SimpleAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L367-L371 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L367-L371 type SimpleAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/simplemovingaverageaggregation.go b/typedapi/types/simplemovingaverageaggregation.go index 59aaaa2bdc..250e218393 100644 --- a/typedapi/types/simplemovingaverageaggregation.go +++ b/typedapi/types/simplemovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SimpleMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L273-L276 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L275-L278 type SimpleMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/simplepatternsplittokenizer.go b/typedapi/types/simplepatternsplittokenizer.go index 1b78d68133..00803cda17 100644 --- a/typedapi/types/simplepatternsplittokenizer.go +++ b/typedapi/types/simplepatternsplittokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SimplePatternSplitTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L118-L121 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L118-L121 type SimplePatternSplitTokenizer struct { Pattern *string `json:"pattern,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/simplepatterntokenizer.go b/typedapi/types/simplepatterntokenizer.go index 7b6b83df8a..3b87ac4fbb 100644 --- a/typedapi/types/simplepatterntokenizer.go +++ b/typedapi/types/simplepatterntokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SimplePatternTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L113-L116 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L113-L116 type SimplePatternTokenizer struct { Pattern *string `json:"pattern,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/simplequerystringflags.go b/typedapi/types/simplequerystringflags.go index 795cfcd8a6..92da9cf9b9 100644 --- a/typedapi/types/simplequerystringflags.go +++ b/typedapi/types/simplequerystringflags.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SimpleQueryStringFlags type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L774-L778 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L775-L779 type SimpleQueryStringFlags PipeSeparatedFlagsSimpleQueryStringFlag type SimpleQueryStringFlagsVariant interface { diff --git a/typedapi/types/simplequerystringquery.go b/typedapi/types/simplequerystringquery.go index 3de603156d..ae9cf5b9a3 100644 --- a/typedapi/types/simplequerystringquery.go +++ b/typedapi/types/simplequerystringquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SimpleQueryStringQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L837-L905 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/fulltext.ts#L838-L906 type SimpleQueryStringQuery struct { // AnalyzeWildcard If `true`, the query attempts to analyze wildcard terms in the query string. AnalyzeWildcard *bool `json:"analyze_wildcard,omitempty"` diff --git a/typedapi/types/simplevalueaggregate.go b/typedapi/types/simplevalueaggregate.go index b399fd57c6..d70c23971f 100644 --- a/typedapi/types/simplevalueaggregate.go +++ b/typedapi/types/simplevalueaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SimpleValueAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L238-L239 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L243-L244 type SimpleValueAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to diff --git a/typedapi/types/simulatedactions.go b/typedapi/types/simulatedactions.go index cad6d0f9be..c71d60458a 100644 --- a/typedapi/types/simulatedactions.go +++ b/typedapi/types/simulatedactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SimulatedActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L90-L94 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L90-L94 type SimulatedActions struct { Actions []string `json:"actions"` All *SimulatedActions `json:"all,omitempty"` diff --git a/typedapi/types/simulatedocumentresult.go b/typedapi/types/simulatedocumentresult.go index 7a6de1046f..a9c2bdcc49 100644 --- a/typedapi/types/simulatedocumentresult.go +++ b/typedapi/types/simulatedocumentresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SimulateDocumentResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Simulation.ts#L45-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Simulation.ts#L45-L49 type SimulateDocumentResult struct { Doc *DocumentSimulation `json:"doc,omitempty"` Error *ErrorCause `json:"error,omitempty"` diff --git a/typedapi/types/simulateingestdocumentresult.go b/typedapi/types/simulateingestdocumentresult.go index 8b36fe3ad7..4574b225d1 100644 --- a/typedapi/types/simulateingestdocumentresult.go +++ b/typedapi/types/simulateingestdocumentresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SimulateIngestDocumentResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/simulate/ingest/SimulateIngestResponse.ts#L31-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/simulate/ingest/SimulateIngestResponse.ts#L32-L34 type SimulateIngestDocumentResult struct { Doc *IngestDocumentSimulation `json:"doc,omitempty"` } diff --git a/typedapi/types/sizefield.go b/typedapi/types/sizefield.go index 7e4adc2f3c..db0f1d774d 100644 --- a/typedapi/types/sizefield.go +++ b/typedapi/types/sizefield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SizeField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/meta-fields.ts#L54-L56 type SizeField struct { Enabled bool `json:"enabled"` } diff --git a/typedapi/types/sizehttphistogram.go b/typedapi/types/sizehttphistogram.go index be0d2f1cfc..cad81b73f9 100644 --- a/typedapi/types/sizehttphistogram.go +++ b/typedapi/types/sizehttphistogram.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SizeHttpHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L716-L720 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L716-L720 type SizeHttpHistogram struct { Count int64 `json:"count"` GeBytes *int64 `json:"ge_bytes,omitempty"` diff --git a/typedapi/types/slackaction.go b/typedapi/types/slackaction.go index 99cb52d295..d3d1f447a4 100644 --- a/typedapi/types/slackaction.go +++ b/typedapi/types/slackaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SlackAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L91-L94 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L91-L94 type SlackAction struct { Account *string `json:"account,omitempty"` Message SlackMessage `json:"message"` diff --git a/typedapi/types/slackattachment.go b/typedapi/types/slackattachment.go index 4c32eca718..702c5462f8 100644 --- a/typedapi/types/slackattachment.go +++ b/typedapi/types/slackattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SlackAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L101-L117 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L101-L117 type SlackAttachment struct { AuthorIcon *string `json:"author_icon,omitempty"` AuthorLink *string `json:"author_link,omitempty"` diff --git a/typedapi/types/slackattachmentfield.go b/typedapi/types/slackattachmentfield.go index 7d3875c39a..ba8a3c8837 100644 --- a/typedapi/types/slackattachmentfield.go +++ b/typedapi/types/slackattachmentfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SlackAttachmentField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L119-L123 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L119-L123 type SlackAttachmentField struct { Int bool `json:"short"` Title string `json:"title"` diff --git a/typedapi/types/slackdynamicattachment.go b/typedapi/types/slackdynamicattachment.go index 567a3c9976..d591d09d4b 100644 --- a/typedapi/types/slackdynamicattachment.go +++ b/typedapi/types/slackdynamicattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SlackDynamicAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L125-L128 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L125-L128 type SlackDynamicAttachment struct { AttachmentTemplate SlackAttachment `json:"attachment_template"` ListPath string `json:"list_path"` diff --git a/typedapi/types/slackmessage.go b/typedapi/types/slackmessage.go index 0ba15772cd..73db9e7156 100644 --- a/typedapi/types/slackmessage.go +++ b/typedapi/types/slackmessage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SlackMessage type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L130-L137 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L130-L137 type SlackMessage struct { Attachments []SlackAttachment `json:"attachments"` DynamicAttachments *SlackDynamicAttachment `json:"dynamic_attachments,omitempty"` diff --git a/typedapi/types/slackresult.go b/typedapi/types/slackresult.go index 43232c0d0e..736d0dc542 100644 --- a/typedapi/types/slackresult.go +++ b/typedapi/types/slackresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SlackResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L96-L99 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L96-L99 type SlackResult struct { Account *string `json:"account,omitempty"` Message SlackMessage `json:"message"` diff --git a/typedapi/types/slicedscroll.go b/typedapi/types/slicedscroll.go index 2a41336411..9fc4db6424 100644 --- a/typedapi/types/slicedscroll.go +++ b/typedapi/types/slicedscroll.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SlicedScroll type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/SlicedScroll.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/SlicedScroll.ts#L23-L27 type SlicedScroll struct { Field *string `json:"field,omitempty"` Id string `json:"id"` diff --git a/typedapi/types/slices.go b/typedapi/types/slices.go index 0767a015f8..01419406c0 100644 --- a/typedapi/types/slices.go +++ b/typedapi/types/slices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // int // slicescalculation.SlicesCalculation // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L363-L368 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L365-L370 type Slices any diff --git a/typedapi/types/slm.go b/typedapi/types/slm.go index 69083e04fd..191966b98b 100644 --- a/typedapi/types/slm.go +++ b/typedapi/types/slm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Slm type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L455-L458 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L488-L491 type Slm struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/slmindicator.go b/typedapi/types/slmindicator.go index e461d62516..2aa0c91b18 100644 --- a/typedapi/types/slmindicator.go +++ b/typedapi/types/slmindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SlmIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L176-L180 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L176-L180 type SlmIndicator struct { Details *SlmIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` diff --git a/typedapi/types/slmindicatordetails.go b/typedapi/types/slmindicatordetails.go index 84a7c1f885..403a60de61 100644 --- a/typedapi/types/slmindicatordetails.go +++ b/typedapi/types/slmindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SlmIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L181-L185 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L181-L185 type SlmIndicatorDetails struct { Policies int64 `json:"policies"` SlmStatus lifecycleoperationmode.LifecycleOperationMode `json:"slm_status"` diff --git a/typedapi/types/slmindicatorunhealthypolicies.go b/typedapi/types/slmindicatorunhealthypolicies.go index cdee24b23c..3758b9a30b 100644 --- a/typedapi/types/slmindicatorunhealthypolicies.go +++ b/typedapi/types/slmindicatorunhealthypolicies.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SlmIndicatorUnhealthyPolicies type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L187-L190 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L187-L190 type SlmIndicatorUnhealthyPolicies struct { Count int64 `json:"count"` InvocationsSinceLastSuccess map[string]int64 `json:"invocations_since_last_success,omitempty"` diff --git a/typedapi/types/slmpolicy.go b/typedapi/types/slmpolicy.go index fd6d78d3e7..fa54da18d0 100644 --- a/typedapi/types/slmpolicy.go +++ b/typedapi/types/slmpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SLMPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/_types/SnapshotLifecycle.ts#L86-L92 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/_types/SnapshotLifecycle.ts#L86-L92 type SLMPolicy struct { Config *Configuration `json:"config,omitempty"` Name string `json:"name"` diff --git a/typedapi/types/slowlogsettings.go b/typedapi/types/slowlogsettings.go index 74be5db12e..22bebffb78 100644 --- a/typedapi/types/slowlogsettings.go +++ b/typedapi/types/slowlogsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SlowlogSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L528-L533 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L538-L543 type SlowlogSettings struct { Level *string `json:"level,omitempty"` Reformat *bool `json:"reformat,omitempty"` diff --git a/typedapi/types/slowlogtresholdlevels.go b/typedapi/types/slowlogtresholdlevels.go index 70179a4b96..90bbb5aa1d 100644 --- a/typedapi/types/slowlogtresholdlevels.go +++ b/typedapi/types/slowlogtresholdlevels.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SlowlogTresholdLevels type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L540-L545 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L550-L555 type SlowlogTresholdLevels struct { Debug Duration `json:"debug,omitempty"` Info Duration `json:"info,omitempty"` diff --git a/typedapi/types/slowlogtresholds.go b/typedapi/types/slowlogtresholds.go index 22d6a5ab2f..87b58f37ca 100644 --- a/typedapi/types/slowlogtresholds.go +++ b/typedapi/types/slowlogtresholds.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SlowlogTresholds type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L535-L538 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L545-L548 type SlowlogTresholds struct { Fetch *SlowlogTresholdLevels `json:"fetch,omitempty"` Query *SlowlogTresholdLevels `json:"query,omitempty"` diff --git a/typedapi/types/smoothingmodelcontainer.go b/typedapi/types/smoothingmodelcontainer.go index 51c62b8b04..6c0bb42cca 100644 --- a/typedapi/types/smoothingmodelcontainer.go +++ b/typedapi/types/smoothingmodelcontainer.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // SmoothingModelContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L446-L462 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L447-L463 type SmoothingModelContainer struct { - AdditionalSmoothingModelContainerProperty map[string]json.RawMessage `json:"-"` // Laplace A smoothing model that uses an additive smoothing where a constant (typically // `1.0` or smaller) is added to all counts to balance weights. Laplace *LaplaceSmoothingModel `json:"laplace,omitempty"` @@ -42,40 +36,9 @@ type SmoothingModelContainer struct { StupidBackoff *StupidBackoffSmoothingModel `json:"stupid_backoff,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s SmoothingModelContainer) MarshalJSON() ([]byte, error) { - type opt SmoothingModelContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalSmoothingModelContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalSmoothingModelContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewSmoothingModelContainer returns a SmoothingModelContainer. func NewSmoothingModelContainer() *SmoothingModelContainer { - r := &SmoothingModelContainer{ - AdditionalSmoothingModelContainerProperty: make(map[string]json.RawMessage), - } + r := &SmoothingModelContainer{} return r } diff --git a/typedapi/types/snapshotcurrentcounts.go b/typedapi/types/snapshotcurrentcounts.go index 01c43fb86e..3716cb3c36 100644 --- a/typedapi/types/snapshotcurrentcounts.go +++ b/typedapi/types/snapshotcurrentcounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SnapshotCurrentCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L642-L663 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L660-L681 type SnapshotCurrentCounts struct { // Cleanups Cleanups in progress, not counted in concurrent_operations as they are not // concurrent diff --git a/typedapi/types/snapshotindexstats.go b/typedapi/types/snapshotindexstats.go index 1ceb338338..180ebf8e23 100644 --- a/typedapi/types/snapshotindexstats.go +++ b/typedapi/types/snapshotindexstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SnapshotIndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotIndexStats.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotIndexStats.ts#L25-L29 type SnapshotIndexStats struct { Shards map[string]SnapshotShardsStatus `json:"shards"` ShardsStats SnapshotShardsStats `json:"shards_stats"` diff --git a/typedapi/types/snapshotinfo.go b/typedapi/types/snapshotinfo.go index a6e769bf68..702bd563ad 100644 --- a/typedapi/types/snapshotinfo.go +++ b/typedapi/types/snapshotinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SnapshotInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotInfo.ts#L41-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotInfo.ts#L41-L71 type SnapshotInfo struct { DataStreams []string `json:"data_streams"` Duration Duration `json:"duration,omitempty"` diff --git a/typedapi/types/snapshotlifecycle.go b/typedapi/types/snapshotlifecycle.go index 16d293b01a..1be5776547 100644 --- a/typedapi/types/snapshotlifecycle.go +++ b/typedapi/types/snapshotlifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SnapshotLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/_types/SnapshotLifecycle.ts#L38-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/_types/SnapshotLifecycle.ts#L38-L59 type SnapshotLifecycle struct { InProgress *InProgress `json:"in_progress,omitempty"` LastFailure *Invocation `json:"last_failure,omitempty"` diff --git a/typedapi/types/snapshotnodeinfo.go b/typedapi/types/snapshotnodeinfo.go index 095323d117..77549108c8 100644 --- a/typedapi/types/snapshotnodeinfo.go +++ b/typedapi/types/snapshotnodeinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SnapshotNodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L110-L113 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L110-L113 type SnapshotNodeInfo struct { Id string `json:"id"` Name string `json:"name"` diff --git a/typedapi/types/snapshotpolicystats.go b/typedapi/types/snapshotpolicystats.go index 695564f1eb..aa768a9f2c 100644 --- a/typedapi/types/snapshotpolicystats.go +++ b/typedapi/types/snapshotpolicystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SnapshotPolicyStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/_types/SnapshotLifecycle.ts#L153-L159 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/_types/SnapshotLifecycle.ts#L153-L159 type SnapshotPolicyStats struct { Policy string `json:"policy"` SnapshotDeletionFailures int64 `json:"snapshot_deletion_failures"` diff --git a/typedapi/types/snapshotresponseitem.go b/typedapi/types/snapshotresponseitem.go index 1f2c63d297..fb49e90ba0 100644 --- a/typedapi/types/snapshotresponseitem.go +++ b/typedapi/types/snapshotresponseitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SnapshotResponseItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/get/SnapshotGetResponse.ts#L49-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/get/SnapshotGetResponse.ts#L49-L53 type SnapshotResponseItem struct { Error *ErrorCause `json:"error,omitempty"` Repository string `json:"repository"` diff --git a/typedapi/types/snapshotrestore.go b/typedapi/types/snapshotrestore.go index 9d940c287e..09a08cbf41 100644 --- a/typedapi/types/snapshotrestore.go +++ b/typedapi/types/snapshotrestore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SnapshotRestore type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/restore/SnapshotRestoreResponse.ts#L30-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/restore/SnapshotRestoreResponse.ts#L30-L34 type SnapshotRestore struct { Indices []string `json:"indices"` Shards ShardStatistics `json:"shards"` diff --git a/typedapi/types/snapshotshardfailure.go b/typedapi/types/snapshotshardfailure.go index 5941743bee..050152e292 100644 --- a/typedapi/types/snapshotshardfailure.go +++ b/typedapi/types/snapshotshardfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SnapshotShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotShardFailure.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotShardFailure.ts#L23-L30 type SnapshotShardFailure struct { Index string `json:"index"` IndexUuid string `json:"index_uuid"` diff --git a/typedapi/types/snapshotshardsstats.go b/typedapi/types/snapshotshardsstats.go index cb53503044..09da0c17a2 100644 --- a/typedapi/types/snapshotshardsstats.go +++ b/typedapi/types/snapshotshardsstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SnapshotShardsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotShardsStats.ts#L22-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotShardsStats.ts#L22-L47 type SnapshotShardsStats struct { // Done The number of shards that initialized, started, and finalized successfully. Done int64 `json:"done"` diff --git a/typedapi/types/snapshotshardsstatus.go b/typedapi/types/snapshotshardsstatus.go index c4ffdafce5..992670903b 100644 --- a/typedapi/types/snapshotshardsstatus.go +++ b/typedapi/types/snapshotshardsstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // SnapshotShardsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotShardsStatus.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotShardsStatus.ts#L24-L27 type SnapshotShardsStatus struct { Stage shardsstatsstage.ShardsStatsStage `json:"stage"` Stats ShardsStatsSummary `json:"stats"` diff --git a/typedapi/types/snapshotsrecord.go b/typedapi/types/snapshotsrecord.go index 9b00839588..688f4607c1 100644 --- a/typedapi/types/snapshotsrecord.go +++ b/typedapi/types/snapshotsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SnapshotsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/snapshots/types.ts#L24-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/snapshots/types.ts#L24-L96 type SnapshotsRecord struct { // Duration The time it took the snapshot process to complete, in time units. Duration Duration `json:"duration,omitempty"` diff --git a/typedapi/types/snapshotstats.go b/typedapi/types/snapshotstats.go index dc60c1d424..0e9d63aabb 100644 --- a/typedapi/types/snapshotstats.go +++ b/typedapi/types/snapshotstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SnapshotStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotStats.ts#L23-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotStats.ts#L23-L42 type SnapshotStats struct { // Incremental The number and size of files that still need to be copied as part of the // incremental snapshot. diff --git a/typedapi/types/snowballanalyzer.go b/typedapi/types/snowballanalyzer.go index 8844c16f03..a6af1720a8 100644 --- a/typedapi/types/snowballanalyzer.go +++ b/typedapi/types/snowballanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // SnowballAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L374-L380 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L374-L380 type SnowballAnalyzer struct { Language snowballlanguage.SnowballLanguage `json:"language"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/snowballtokenfilter.go b/typedapi/types/snowballtokenfilter.go index c958224d67..d071b7f876 100644 --- a/typedapi/types/snowballtokenfilter.go +++ b/typedapi/types/snowballtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // SnowballTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L411-L415 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L446-L450 type SnowballTokenFilter struct { // Language Controls the language used by the stemmer. Language *snowballlanguage.SnowballLanguage `json:"language,omitempty"` diff --git a/typedapi/types/softdeletes.go b/typedapi/types/softdeletes.go index 08d68c47a7..57ee7a76fb 100644 --- a/typedapi/types/softdeletes.go +++ b/typedapi/types/softdeletes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SoftDeletes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L51-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L51-L64 type SoftDeletes struct { // Enabled Indicates whether soft deletes are enabled on the index. Enabled *bool `json:"enabled,omitempty"` diff --git a/typedapi/types/soranianalyzer.go b/typedapi/types/soranianalyzer.go index ce5521d006..d3c0c8973a 100644 --- a/typedapi/types/soranianalyzer.go +++ b/typedapi/types/soranianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SoraniAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L289-L294 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L289-L294 type SoraniAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/soraninormalizationtokenfilter.go b/typedapi/types/soraninormalizationtokenfilter.go index a6160fad94..7f20d8e612 100644 --- a/typedapi/types/soraninormalizationtokenfilter.go +++ b/typedapi/types/soraninormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SoraniNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L543-L545 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L580-L582 type SoraniNormalizationTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/sort.go b/typedapi/types/sort.go index d624045817..100c447127 100644 --- a/typedapi/types/sort.go +++ b/typedapi/types/sort.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Sort type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L104-L104 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L104-L104 type Sort []SortCombinations type SortVariant interface { diff --git a/typedapi/types/sortcombinations.go b/typedapi/types/sortcombinations.go index 9802c49257..121afd509f 100644 --- a/typedapi/types/sortcombinations.go +++ b/typedapi/types/sortcombinations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // SortOptions // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L98-L102 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L98-L102 type SortCombinations any type SortCombinationsVariant interface { diff --git a/typedapi/types/sortoptions.go b/typedapi/types/sortoptions.go index c3693191c6..a46ee98812 100644 --- a/typedapi/types/sortoptions.go +++ b/typedapi/types/sortoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -27,7 +27,7 @@ import ( // SortOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L86-L96 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/sort.ts#L86-L96 type SortOptions struct { Doc_ *ScoreSort `json:"_doc,omitempty"` GeoDistance_ *GeoDistanceSort `json:"_geo_distance,omitempty"` diff --git a/typedapi/types/sortprocessor.go b/typedapi/types/sortprocessor.go index 65764c083c..18867b047b 100644 --- a/typedapi/types/sortprocessor.go +++ b/typedapi/types/sortprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SortProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1497-L1513 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1501-L1517 type SortProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/sourceconfig.go b/typedapi/types/sourceconfig.go index 2738e4ddae..ddbf237cfa 100644 --- a/typedapi/types/sourceconfig.go +++ b/typedapi/types/sourceconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // bool // SourceFilter // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/SourceFilter.ts#L50-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/SourceFilter.ts#L50-L54 type SourceConfig any type SourceConfigVariant interface { diff --git a/typedapi/types/sourceconfigparam.go b/typedapi/types/sourceconfigparam.go index a04a6d10d6..cb68a47a9f 100644 --- a/typedapi/types/sourceconfigparam.go +++ b/typedapi/types/sourceconfigparam.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // bool // []string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/SourceFilter.ts#L56-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/SourceFilter.ts#L56-L62 type SourceConfigParam any diff --git a/typedapi/types/sourcefield.go b/typedapi/types/sourcefield.go index 6459c8b414..c11d484530 100644 --- a/typedapi/types/sourcefield.go +++ b/typedapi/types/sourcefield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SourceField type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L58-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/meta-fields.ts#L58-L65 type SourceField struct { Compress *bool `json:"compress,omitempty"` CompressThreshold *string `json:"compress_threshold,omitempty"` diff --git a/typedapi/types/sourcefilter.go b/typedapi/types/sourcefilter.go index 880c9c7247..ccee34fa8b 100644 --- a/typedapi/types/sourcefilter.go +++ b/typedapi/types/sourcefilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SourceFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/SourceFilter.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/SourceFilter.ts#L23-L48 type SourceFilter struct { // ExcludeVectors If `true`, vector fields are excluded from the returned source. // diff --git a/typedapi/types/sourceindex.go b/typedapi/types/sourceindex.go index e6d7f80bec..d18d7c5fa9 100644 --- a/typedapi/types/sourceindex.go +++ b/typedapi/types/sourceindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SourceIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L56-L58 type SourceIndex struct { Index string `json:"index"` } diff --git a/typedapi/types/sourceonlyrepository.go b/typedapi/types/sourceonlyrepository.go index e59b6eb20c..3fde0a656c 100644 --- a/typedapi/types/sourceonlyrepository.go +++ b/typedapi/types/sourceonlyrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SourceOnlyRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L104-L114 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L104-L114 type SourceOnlyRepository struct { // Settings The repository settings. Settings SourceOnlyRepositorySettings `json:"settings"` diff --git a/typedapi/types/sourceonlyrepositorysettings.go b/typedapi/types/sourceonlyrepositorysettings.go index 47ded3bb40..a007cc15a0 100644 --- a/typedapi/types/sourceonlyrepositorysettings.go +++ b/typedapi/types/sourceonlyrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SourceOnlyRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L414-L441 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotRepository.ts#L414-L441 type SourceOnlyRepositorySettings struct { // ChunkSize Big files can be broken down into multiple smaller blobs in the blob store // during snapshotting. diff --git a/typedapi/types/spancontainingquery.go b/typedapi/types/spancontainingquery.go index 956e4f937a..f7dba09ce0 100644 --- a/typedapi/types/spancontainingquery.go +++ b/typedapi/types/spancontainingquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanContainingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L25-L39 type SpanContainingQuery struct { // Big Can be any span query. // Matching spans from `big` that contain matches from `little` are returned. diff --git a/typedapi/types/spanfieldmaskingquery.go b/typedapi/types/spanfieldmaskingquery.go index f7f8ddf77b..ddee0fb0b2 100644 --- a/typedapi/types/spanfieldmaskingquery.go +++ b/typedapi/types/spanfieldmaskingquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanFieldMaskingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L41-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L41-L47 type SpanFieldMaskingQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/spanfirstquery.go b/typedapi/types/spanfirstquery.go index 889e685d60..12add4e9b0 100644 --- a/typedapi/types/spanfirstquery.go +++ b/typedapi/types/spanfirstquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanFirstQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L49-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L49-L61 type SpanFirstQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/spangapquery.go b/typedapi/types/spangapquery.go index 1afeb533a8..658fa96cc0 100644 --- a/typedapi/types/spangapquery.go +++ b/typedapi/types/spangapquery.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SpanGapQuery type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L63-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L63-L65 type SpanGapQuery map[string]int type SpanGapQueryVariant interface { diff --git a/typedapi/types/spanishanalyzer.go b/typedapi/types/spanishanalyzer.go index e0603f0725..1e752b9730 100644 --- a/typedapi/types/spanishanalyzer.go +++ b/typedapi/types/spanishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L296-L301 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L296-L301 type SpanishAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/spanmultitermquery.go b/typedapi/types/spanmultitermquery.go index 74e82f87af..2d9379873d 100644 --- a/typedapi/types/spanmultitermquery.go +++ b/typedapi/types/spanmultitermquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanMultiTermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L67-L75 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L67-L75 type SpanMultiTermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/spannearquery.go b/typedapi/types/spannearquery.go index a06178b902..580e6e3c5a 100644 --- a/typedapi/types/spannearquery.go +++ b/typedapi/types/spannearquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanNearQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L77-L93 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L77-L93 type SpanNearQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/spannotquery.go b/typedapi/types/spannotquery.go index e6d13444d9..b495ad44ea 100644 --- a/typedapi/types/spannotquery.go +++ b/typedapi/types/spannotquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanNotQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L95-L122 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L95-L122 type SpanNotQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/spanorquery.go b/typedapi/types/spanorquery.go index fe4ba62f8e..b23ea39806 100644 --- a/typedapi/types/spanorquery.go +++ b/typedapi/types/spanorquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanOrQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L124-L132 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L124-L132 type SpanOrQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/spanquery.go b/typedapi/types/spanquery.go index 4ab07d64cf..a35885e88e 100644 --- a/typedapi/types/spanquery.go +++ b/typedapi/types/spanquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SpanQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L159-L201 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L159-L201 type SpanQuery struct { AdditionalSpanQueryProperty map[string]json.RawMessage `json:"-"` // SpanContaining Accepts a list of span queries, but only returns those spans which also match diff --git a/typedapi/types/spantermquery.go b/typedapi/types/spantermquery.go index 30d26744e9..85a213277f 100644 --- a/typedapi/types/spantermquery.go +++ b/typedapi/types/spantermquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanTermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L134-L141 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L134-L141 type SpanTermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/spanwithinquery.go b/typedapi/types/spanwithinquery.go index 8dfc72987e..7ccecb4aae 100644 --- a/typedapi/types/spanwithinquery.go +++ b/typedapi/types/spanwithinquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SpanWithinQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L143-L157 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/span.ts#L143-L157 type SpanWithinQuery struct { // Big Can be any span query. // Matching spans from `little` that are enclosed within `big` are returned. diff --git a/typedapi/types/sparseembeddingresult.go b/typedapi/types/sparseembeddingresult.go index cf516db0d1..88e145bdd7 100644 --- a/typedapi/types/sparseembeddingresult.go +++ b/typedapi/types/sparseembeddingresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SparseEmbeddingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Results.ts#L36-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Results.ts#L36-L38 type SparseEmbeddingResult struct { Embedding SparseVector `json:"embedding"` } diff --git a/typedapi/types/sparsevector.go b/typedapi/types/sparsevector.go index 5f2d975dbb..e9bd89f1d8 100644 --- a/typedapi/types/sparsevector.go +++ b/typedapi/types/sparsevector.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SparseVector type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Results.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Results.ts#L24-L28 type SparseVector map[string]float32 diff --git a/typedapi/types/sparsevectorindexoptions.go b/typedapi/types/sparsevectorindexoptions.go index 5803ffef54..5e8bba6eb5 100644 --- a/typedapi/types/sparsevectorindexoptions.go +++ b/typedapi/types/sparsevectorindexoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SparseVectorIndexOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/SparseVectorIndexOptions.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/SparseVectorIndexOptions.ts#L22-L42 type SparseVectorIndexOptions struct { // Prune Whether to perform pruning, omitting the non-significant tokens from the // query to improve query performance. diff --git a/typedapi/types/sparsevectorproperty.go b/typedapi/types/sparsevectorproperty.go index 52715b590c..347bf580b1 100644 --- a/typedapi/types/sparsevectorproperty.go +++ b/typedapi/types/sparsevectorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // SparseVectorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L226-L236 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L227-L237 type SparseVectorProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` diff --git a/typedapi/types/sparsevectorquery.go b/typedapi/types/sparsevectorquery.go index 8570e086fc..27f121ceb3 100644 --- a/typedapi/types/sparsevectorquery.go +++ b/typedapi/types/sparsevectorquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,9 +31,8 @@ import ( // SparseVectorQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/SparseVectorQuery.ts#L26-L80 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/SparseVectorQuery.ts#L26-L80 type SparseVectorQuery struct { - AdditionalSparseVectorQueryProperty map[string]json.RawMessage `json:"-"` // Boost Floating point number used to decrease or increase the relevance scores of // the query. // Boost values are relative to the default value of 1.0. @@ -165,58 +164,15 @@ func (s *SparseVectorQuery) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "QueryVector", err) } - default: - - if key, ok := t.(string); ok { - if s.AdditionalSparseVectorQueryProperty == nil { - s.AdditionalSparseVectorQueryProperty = make(map[string]json.RawMessage, 0) - } - raw := new(json.RawMessage) - if err := dec.Decode(&raw); err != nil { - return fmt.Errorf("%s | %w", "AdditionalSparseVectorQueryProperty", err) - } - s.AdditionalSparseVectorQueryProperty[key] = *raw - } - } } return nil } -// MarhsalJSON overrides marshalling for types with additional properties -func (s SparseVectorQuery) MarshalJSON() ([]byte, error) { - type opt SparseVectorQuery - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalSparseVectorQueryProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalSparseVectorQueryProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewSparseVectorQuery returns a SparseVectorQuery. func NewSparseVectorQuery() *SparseVectorQuery { r := &SparseVectorQuery{ - AdditionalSparseVectorQueryProperty: make(map[string]json.RawMessage), - QueryVector: make(map[string]float32), + QueryVector: make(map[string]float32), } return r diff --git a/typedapi/types/sparsevectorstats.go b/typedapi/types/sparsevectorstats.go index e14b6aad0f..5293795403 100644 --- a/typedapi/types/sparsevectorstats.go +++ b/typedapi/types/sparsevectorstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SparseVectorStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L162-L164 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L176-L178 type SparseVectorStats struct { ValueCount int64 `json:"value_count"` } diff --git a/typedapi/types/specifieddocument.go b/typedapi/types/specifieddocument.go index 77afee68f2..77e6128200 100644 --- a/typedapi/types/specifieddocument.go +++ b/typedapi/types/specifieddocument.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SpecifiedDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L97-L100 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L98-L101 type SpecifiedDocument struct { Id string `json:"id"` Index *string `json:"index,omitempty"` diff --git a/typedapi/types/spike.go b/typedapi/types/spike.go new file mode 100644 index 0000000000..93ccec4a0a --- /dev/null +++ b/typedapi/types/spike.go @@ -0,0 +1,97 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// Spike type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L421-L421 +type Spike struct { + ChangePoint int `json:"change_point"` + PValue Float64 `json:"p_value"` +} + +func (s *Spike) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "change_point": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ChangePoint", err) + } + s.ChangePoint = value + case float64: + f := int(v) + s.ChangePoint = f + } + + case "p_value": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "PValue", err) + } + f := Float64(value) + s.PValue = f + case float64: + f := Float64(v) + s.PValue = f + } + + } + } + return nil +} + +// NewSpike returns a Spike. +func NewSpike() *Spike { + r := &Spike{} + + return r +} diff --git a/typedapi/types/splitprocessor.go b/typedapi/types/splitprocessor.go index 8a43086e86..2a33b6d540 100644 --- a/typedapi/types/splitprocessor.go +++ b/typedapi/types/splitprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SplitProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1515-L1540 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1519-L1544 type SplitProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/sql.go b/typedapi/types/sql.go index 60a901757f..ddda8ed55c 100644 --- a/typedapi/types/sql.go +++ b/typedapi/types/sql.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Sql type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L392-L395 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L425-L428 type Sql struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/ssl.go b/typedapi/types/ssl.go index 4712400ddb..c2a26189bf 100644 --- a/typedapi/types/ssl.go +++ b/typedapi/types/ssl.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Ssl type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L397-L400 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L430-L433 type Ssl struct { Http FeatureToggle `json:"http"` Transport FeatureToggle `json:"transport"` diff --git a/typedapi/types/stagnatingbackingindices.go b/typedapi/types/stagnatingbackingindices.go index c9b8a84cb0..5f0b23970d 100644 --- a/typedapi/types/stagnatingbackingindices.go +++ b/typedapi/types/stagnatingbackingindices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StagnatingBackingIndices type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L159-L163 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/health_report/types.ts#L159-L163 type StagnatingBackingIndices struct { FirstOccurrenceTimestamp int64 `json:"first_occurrence_timestamp"` IndexName string `json:"index_name"` diff --git a/typedapi/types/standardanalyzer.go b/typedapi/types/standardanalyzer.go index 9aa18c65b3..f8ca0b1f97 100644 --- a/typedapi/types/standardanalyzer.go +++ b/typedapi/types/standardanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StandardAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L382-L402 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L382-L402 type StandardAnalyzer struct { // MaxTokenLength The maximum token length. If a token is seen that exceeds this length then it // is split at `max_token_length` intervals. diff --git a/typedapi/types/standarddeviationbounds.go b/typedapi/types/standarddeviationbounds.go index 9fda175ca4..88f49dd735 100644 --- a/typedapi/types/standarddeviationbounds.go +++ b/typedapi/types/standarddeviationbounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // StandardDeviationBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L281-L288 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L286-L293 type StandardDeviationBounds struct { Lower *Float64 `json:"lower,omitempty"` LowerPopulation *Float64 `json:"lower_population,omitempty"` diff --git a/typedapi/types/standarddeviationboundsasstring.go b/typedapi/types/standarddeviationboundsasstring.go index c8cfd4995c..c1d035abc8 100644 --- a/typedapi/types/standarddeviationboundsasstring.go +++ b/typedapi/types/standarddeviationboundsasstring.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StandardDeviationBoundsAsString type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L290-L297 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L295-L302 type StandardDeviationBoundsAsString struct { Lower string `json:"lower"` LowerPopulation string `json:"lower_population"` diff --git a/typedapi/types/standardretriever.go b/typedapi/types/standardretriever.go index 8f0d471035..800b512e22 100644 --- a/typedapi/types/standardretriever.go +++ b/typedapi/types/standardretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StandardRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L102-L113 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L103-L114 type StandardRetriever struct { // Collapse Collapses the top documents by a specified key into a single top document per // key. diff --git a/typedapi/types/standardtokenizer.go b/typedapi/types/standardtokenizer.go index 648e6e0c0c..c4f6218f9b 100644 --- a/typedapi/types/standardtokenizer.go +++ b/typedapi/types/standardtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StandardTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L123-L126 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L123-L126 type StandardTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/stationary.go b/typedapi/types/stationary.go new file mode 100644 index 0000000000..8461166370 --- /dev/null +++ b/typedapi/types/stationary.go @@ -0,0 +1,34 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +// Stationary type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L435-L435 +type Stationary struct { +} + +// NewStationary returns a Stationary. +func NewStationary() *Stationary { + r := &Stationary{} + + return r +} diff --git a/typedapi/types/statistics.go b/typedapi/types/statistics.go index 484fa643c9..4478ce6b11 100644 --- a/typedapi/types/statistics.go +++ b/typedapi/types/statistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Statistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/_types/SnapshotLifecycle.ts#L61-L84 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/slm/_types/SnapshotLifecycle.ts#L61-L84 type Statistics struct { Policy *string `json:"policy,omitempty"` RetentionDeletionTime Duration `json:"retention_deletion_time,omitempty"` diff --git a/typedapi/types/stats.go b/typedapi/types/stats.go index 33e6ef3fb4..9d805afc48 100644 --- a/typedapi/types/stats.go +++ b/typedapi/types/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // Stats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L30-L114 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L30-L114 type Stats struct { // AdaptiveSelection Statistics about adaptive replica selection. AdaptiveSelection map[string]AdaptiveSelection `json:"adaptive_selection,omitempty"` diff --git a/typedapi/types/statsaggregate.go b/typedapi/types/statsaggregate.go index 2c2ce02441..b2af84f286 100644 --- a/typedapi/types/statsaggregate.go +++ b/typedapi/types/statsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L257-L273 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L262-L278 type StatsAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` diff --git a/typedapi/types/statsaggregation.go b/typedapi/types/statsaggregation.go index 787de16f92..fea410d97f 100644 --- a/typedapi/types/statsaggregation.go +++ b/typedapi/types/statsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L314-L314 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L318-L318 type StatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/statsbucketaggregate.go b/typedapi/types/statsbucketaggregate.go index b31b4ae575..d9108f2e28 100644 --- a/typedapi/types/statsbucketaggregate.go +++ b/typedapi/types/statsbucketaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StatsBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L275-L279 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L280-L284 type StatsBucketAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` diff --git a/typedapi/types/statsbucketaggregation.go b/typedapi/types/statsbucketaggregation.go index 8bbd23e027..99505677a1 100644 --- a/typedapi/types/statsbucketaggregation.go +++ b/typedapi/types/statsbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // StatsBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L410-L410 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L412-L412 type StatsBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/status.go b/typedapi/types/status.go index 3375396bb2..999b367f13 100644 --- a/typedapi/types/status.go +++ b/typedapi/types/status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Status type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotStatus.ts#L26-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/_types/SnapshotStatus.ts#L26-L60 type Status struct { // IncludeGlobalState Indicates whether the current cluster state is included in the snapshot. IncludeGlobalState bool `json:"include_global_state"` diff --git a/typedapi/types/statuserror.go b/typedapi/types/statuserror.go index 2c76c8b87b..8c622ce655 100644 --- a/typedapi/types/statuserror.go +++ b/typedapi/types/statuserror.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StatusError type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L44-L47 type StatusError struct { Index string `json:"index"` Message string `json:"message"` diff --git a/typedapi/types/statusinprogress.go b/typedapi/types/statusinprogress.go index d48196a41e..c3806ba8e8 100644 --- a/typedapi/types/statusinprogress.go +++ b/typedapi/types/statusinprogress.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StatusInProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L38-L42 type StatusInProgress struct { Index string `json:"index"` ReindexedDocCount int64 `json:"reindexed_doc_count"` diff --git a/typedapi/types/stemmeroverridetokenfilter.go b/typedapi/types/stemmeroverridetokenfilter.go index ce57356666..5a7528e20d 100644 --- a/typedapi/types/stemmeroverridetokenfilter.go +++ b/typedapi/types/stemmeroverridetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StemmerOverrideTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L417-L423 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L452-L458 type StemmerOverrideTokenFilter struct { // Rules A list of mapping rules to use. Rules []string `json:"rules,omitempty"` diff --git a/typedapi/types/stemmertokenfilter.go b/typedapi/types/stemmertokenfilter.go index c26254f8ab..748b1859d8 100644 --- a/typedapi/types/stemmertokenfilter.go +++ b/typedapi/types/stemmertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StemmerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L425-L429 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L460-L464 type StemmerTokenFilter struct { Language *string `json:"language,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/stepchange.go b/typedapi/types/stepchange.go new file mode 100644 index 0000000000..97b420faf8 --- /dev/null +++ b/typedapi/types/stepchange.go @@ -0,0 +1,97 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// StepChange type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L423-L423 +type StepChange struct { + ChangePoint int `json:"change_point"` + PValue Float64 `json:"p_value"` +} + +func (s *StepChange) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "change_point": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ChangePoint", err) + } + s.ChangePoint = value + case float64: + f := int(v) + s.ChangePoint = f + } + + case "p_value": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "PValue", err) + } + f := Float64(value) + s.PValue = f + case float64: + f := Float64(v) + s.PValue = f + } + + } + } + return nil +} + +// NewStepChange returns a StepChange. +func NewStepChange() *StepChange { + r := &StepChange{} + + return r +} diff --git a/typedapi/types/stepkey.go b/typedapi/types/stepkey.go index fd1b523bc5..1e47be6989 100644 --- a/typedapi/types/stepkey.go +++ b/typedapi/types/stepkey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StepKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/move_to_step/types.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/move_to_step/types.ts#L20-L31 type StepKey struct { // Action The optional action to which the index will be moved. Action *string `json:"action,omitempty"` diff --git a/typedapi/types/stopanalyzer.go b/typedapi/types/stopanalyzer.go index 72c7a97053..3ebe6e86fc 100644 --- a/typedapi/types/stopanalyzer.go +++ b/typedapi/types/stopanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StopAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L404-L419 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L404-L419 type StopAnalyzer struct { // Stopwords A pre-defined stop words list like `_english_` or an array containing a list // of stop words. diff --git a/typedapi/types/stoptokenfilter.go b/typedapi/types/stoptokenfilter.go index 327fe38e96..52d64b5b9b 100644 --- a/typedapi/types/stoptokenfilter.go +++ b/typedapi/types/stoptokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StopTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L125-L136 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L131-L144 type StopTokenFilter struct { // IgnoreCase If `true`, stop word matching is case insensitive. For example, if `true`, a // stop word of the matches and removes `The`, `THE`, or `the`. Defaults to diff --git a/typedapi/types/stopwords.go b/typedapi/types/stopwords.go index 97b66454e2..a33df0514e 100644 --- a/typedapi/types/stopwords.go +++ b/typedapi/types/stopwords.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // stopwordlanguage.StopWordLanguage // []string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/StopWords.ts#L60-L66 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/StopWords.ts#L60-L66 type StopWords any type StopWordsVariant interface { diff --git a/typedapi/types/storage.go b/typedapi/types/storage.go index fee0116273..dd97963f8e 100644 --- a/typedapi/types/storage.go +++ b/typedapi/types/storage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // Storage type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L547-L558 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L557-L568 type Storage struct { // AllowMmap You can restrict the use of the mmapfs and the related hybridfs store type // via the setting node.store.allow_mmap. diff --git a/typedapi/types/storedscript.go b/typedapi/types/storedscript.go index 28c12d8fff..5042e8956b 100644 --- a/typedapi/types/storedscript.go +++ b/typedapi/types/storedscript.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // StoredScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L51-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Scripting.ts#L51-L63 type StoredScript struct { // Lang The language the script is written in. // For search templates, use `mustache`. diff --git a/typedapi/types/storestats.go b/typedapi/types/storestats.go index c99e06f5b3..f7139f7cb9 100644 --- a/typedapi/types/storestats.go +++ b/typedapi/types/storestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StoreStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L398-L425 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L398-L425 type StoreStats struct { // Reserved A prediction of how much larger the shard stores will eventually grow due to // ongoing peer recoveries, restoring snapshots, and similar activities. diff --git a/typedapi/types/streamresult.go b/typedapi/types/streamresult.go index eb9311b028..2b20f63d3a 100644 --- a/typedapi/types/streamresult.go +++ b/typedapi/types/streamresult.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // StreamResult type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Binary.ts#L24-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Binary.ts#L24-L24 type StreamResult []byte diff --git a/typedapi/types/stringifiedboolean.go b/typedapi/types/stringifiedboolean.go index 2346cc1e51..84165ce3f3 100644 --- a/typedapi/types/stringifiedboolean.go +++ b/typedapi/types/stringifiedboolean.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // bool // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifiedboolean any type StringifiedbooleanVariant interface { diff --git a/typedapi/types/stringifieddouble.go b/typedapi/types/stringifieddouble.go index b8c835b6dd..e5a59674a1 100644 --- a/typedapi/types/stringifieddouble.go +++ b/typedapi/types/stringifieddouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,9 @@ package types // Float64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifieddouble any + +type StringifieddoubleVariant interface { + StringifieddoubleCaster() *Stringifieddouble +} diff --git a/typedapi/types/stringifiedepochtimeunitmillis.go b/typedapi/types/stringifiedepochtimeunitmillis.go index 25d9074b65..5d10c8883c 100644 --- a/typedapi/types/stringifiedepochtimeunitmillis.go +++ b/typedapi/types/stringifiedepochtimeunitmillis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedEpochTimeUnitMillis any type StringifiedEpochTimeUnitMillisVariant interface { diff --git a/typedapi/types/stringifiedepochtimeunitseconds.go b/typedapi/types/stringifiedepochtimeunitseconds.go index 1eabe71282..a1747e65a1 100644 --- a/typedapi/types/stringifiedepochtimeunitseconds.go +++ b/typedapi/types/stringifiedepochtimeunitseconds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedEpochTimeUnitSeconds any diff --git a/typedapi/types/stringifiedinteger.go b/typedapi/types/stringifiedinteger.go index d56fa08eb1..fc4b83d162 100644 --- a/typedapi/types/stringifiedinteger.go +++ b/typedapi/types/stringifiedinteger.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifiedinteger any type StringifiedintegerVariant interface { diff --git a/typedapi/types/stringifiedversionnumber.go b/typedapi/types/stringifiedversionnumber.go index 39d14b3e7a..57ec98103a 100644 --- a/typedapi/types/stringifiedversionnumber.go +++ b/typedapi/types/stringifiedversionnumber.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedVersionNumber any diff --git a/typedapi/types/stringraretermsaggregate.go b/typedapi/types/stringraretermsaggregate.go index 4027199ff3..91805bdde6 100644 --- a/typedapi/types/stringraretermsaggregate.go +++ b/typedapi/types/stringraretermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // StringRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L483-L487 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L555-L559 type StringRareTermsAggregate struct { Buckets BucketsStringRareTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/stringraretermsbucket.go b/typedapi/types/stringraretermsbucket.go index 1564493c1c..859a1e75cf 100644 --- a/typedapi/types/stringraretermsbucket.go +++ b/typedapi/types/stringraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // StringRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L489-L491 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L561-L563 type StringRareTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -204,6 +204,13 @@ func (s *StringRareTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -232,6 +239,20 @@ func (s *StringRareTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/stringstatsaggregate.go b/typedapi/types/stringstatsaggregate.go index 23856cc38a..16396ff0ea 100644 --- a/typedapi/types/stringstatsaggregate.go +++ b/typedapi/types/stringstatsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StringStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L795-L806 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L867-L878 type StringStatsAggregate struct { AvgLength *Float64 `json:"avg_length,omitempty"` AvgLengthAsString *string `json:"avg_length_as_string,omitempty"` diff --git a/typedapi/types/stringstatsaggregation.go b/typedapi/types/stringstatsaggregation.go index 5b74794dc8..658ffe0505 100644 --- a/typedapi/types/stringstatsaggregation.go +++ b/typedapi/types/stringstatsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StringStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L316-L322 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L320-L326 type StringStatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/stringtermsaggregate.go b/typedapi/types/stringtermsaggregate.go index a178e8ba01..c8ce326c8c 100644 --- a/typedapi/types/stringtermsaggregate.go +++ b/typedapi/types/stringtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StringTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L424-L429 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L496-L501 type StringTermsAggregate struct { Buckets BucketsStringTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/stringtermsbucket.go b/typedapi/types/stringtermsbucket.go index e24047930e..6057a144b6 100644 --- a/typedapi/types/stringtermsbucket.go +++ b/typedapi/types/stringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // StringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L435-L437 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L507-L509 type StringTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -213,6 +213,13 @@ func (s *StringTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -241,6 +248,20 @@ func (s *StringTermsBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/stupidbackoffsmoothingmodel.go b/typedapi/types/stupidbackoffsmoothingmodel.go index a620215571..a4a88d5420 100644 --- a/typedapi/types/stupidbackoffsmoothingmodel.go +++ b/typedapi/types/stupidbackoffsmoothingmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // StupidBackoffSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L464-L469 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L465-L470 type StupidBackoffSmoothingModel struct { // Discount A constant factor that the lower order n-gram model is discounted by. Discount Float64 `json:"discount"` diff --git a/typedapi/types/suggest.go b/typedapi/types/suggest.go index 482b4a1c56..a2c4d914c1 100644 --- a/typedapi/types/suggest.go +++ b/typedapi/types/suggest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,5 +26,5 @@ package types // PhraseSuggest // TermSuggest // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L35-L41 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L35-L41 type Suggest any diff --git a/typedapi/types/suggestcontext.go b/typedapi/types/suggestcontext.go index 2c2944f572..8e583a684d 100644 --- a/typedapi/types/suggestcontext.go +++ b/typedapi/types/suggestcontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SuggestContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L43-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L43-L49 type SuggestContext struct { Name string `json:"name"` Path *string `json:"path,omitempty"` diff --git a/typedapi/types/suggester.go b/typedapi/types/suggester.go index 36c7f40163..da51119b35 100644 --- a/typedapi/types/suggester.go +++ b/typedapi/types/suggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Suggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L102-L108 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L102-L108 type Suggester struct { Suggesters map[string]FieldSuggester `json:"-"` // Text Global suggest text, to avoid repetition when the same text is used in diff --git a/typedapi/types/suggestfuzziness.go b/typedapi/types/suggestfuzziness.go index 95ff3acc23..f0942f3591 100644 --- a/typedapi/types/suggestfuzziness.go +++ b/typedapi/types/suggestfuzziness.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SuggestFuzziness type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L197-L225 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L198-L226 type SuggestFuzziness struct { // Fuzziness The fuzziness factor. Fuzziness Fuzziness `json:"fuzziness,omitempty"` diff --git a/typedapi/types/sumaggregate.go b/typedapi/types/sumaggregate.go index fd7505e9a6..791e3013fb 100644 --- a/typedapi/types/sumaggregate.go +++ b/typedapi/types/sumaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SumAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L211-L216 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L216-L221 type SumAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to diff --git a/typedapi/types/sumaggregation.go b/typedapi/types/sumaggregation.go index dbf2e3dd47..b5857f098d 100644 --- a/typedapi/types/sumaggregation.go +++ b/typedapi/types/sumaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SumAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L324-L324 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L328-L328 type SumAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/sumbucketaggregation.go b/typedapi/types/sumbucketaggregation.go index 2ff05fe8a5..3c837b074c 100644 --- a/typedapi/types/sumbucketaggregation.go +++ b/typedapi/types/sumbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SumBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L412-L415 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/pipeline.ts#L414-L417 type SumBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` diff --git a/typedapi/types/summary.go b/typedapi/types/summary.go index df6c94c290..79f3ff4653 100644 --- a/typedapi/types/summary.go +++ b/typedapi/types/summary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // Summary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/_types/Policy.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/enrich/_types/Policy.ts#L24-L26 type Summary struct { Config map[policytype.PolicyType]EnrichPolicy `json:"config"` } diff --git a/typedapi/types/summaryinfo.go b/typedapi/types/summaryinfo.go index 47a103f1a2..8477f55ac6 100644 --- a/typedapi/types/summaryinfo.go +++ b/typedapi/types/summaryinfo.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SummaryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L193-L202 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L193-L202 type SummaryInfo struct { // Read A collection of statistics that summarise the results of the read operations // in the test. diff --git a/typedapi/types/swedishanalyzer.go b/typedapi/types/swedishanalyzer.go index 59b4de1acb..af52ad73c8 100644 --- a/typedapi/types/swedishanalyzer.go +++ b/typedapi/types/swedishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SwedishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L303-L308 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L303-L308 type SwedishAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/synccontainer.go b/typedapi/types/synccontainer.go index ddcffcb5dc..d1fe1050b1 100644 --- a/typedapi/types/synccontainer.go +++ b/typedapi/types/synccontainer.go @@ -16,59 +16,22 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // SyncContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L169-L175 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L179-L185 type SyncContainer struct { - AdditionalSyncContainerProperty map[string]json.RawMessage `json:"-"` // Time Specifies that the transform uses a time field to synchronize the source and // destination indices. Time *TimeSync `json:"time,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s SyncContainer) MarshalJSON() ([]byte, error) { - type opt SyncContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalSyncContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalSyncContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewSyncContainer returns a SyncContainer. func NewSyncContainer() *SyncContainer { - r := &SyncContainer{ - AdditionalSyncContainerProperty: make(map[string]json.RawMessage), - } + r := &SyncContainer{} return r } diff --git a/typedapi/types/syncjobconnectorreference.go b/typedapi/types/syncjobconnectorreference.go index e23199407e..5e901241fd 100644 --- a/typedapi/types/syncjobconnectorreference.go +++ b/typedapi/types/syncjobconnectorreference.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SyncJobConnectorReference type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/SyncJob.ts#L31-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/SyncJob.ts#L31-L40 type SyncJobConnectorReference struct { Configuration ConnectorConfiguration `json:"configuration"` Filtering FilteringRules `json:"filtering"` diff --git a/typedapi/types/syncrulesfeature.go b/typedapi/types/syncrulesfeature.go index daa309b68d..588dc9f2d9 100644 --- a/typedapi/types/syncrulesfeature.go +++ b/typedapi/types/syncrulesfeature.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // SyncRulesFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L219-L228 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L219-L228 type SyncRulesFeature struct { // Advanced Indicates whether advanced sync rules are enabled. Advanced *FeatureEnabled `json:"advanced,omitempty"` diff --git a/typedapi/types/synonymgraphtokenfilter.go b/typedapi/types/synonymgraphtokenfilter.go index 232452713b..ac37724e0c 100644 --- a/typedapi/types/synonymgraphtokenfilter.go +++ b/typedapi/types/synonymgraphtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SynonymGraphTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L163-L165 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L172-L174 type SynonymGraphTokenFilter struct { // Expand Expands definitions for equivalent synonym rules. Defaults to `true`. Expand *bool `json:"expand,omitempty"` diff --git a/typedapi/types/synonymrule.go b/typedapi/types/synonymrule.go index b489d61676..6cc840c737 100644 --- a/typedapi/types/synonymrule.go +++ b/typedapi/types/synonymrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SynonymRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/_types/SynonymRule.ts#L26-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/_types/SynonymRule.ts#L26-L37 type SynonymRule struct { // Id The identifier for the synonym rule. // If you do not specify a synonym rule ID when you create a rule, an identifier diff --git a/typedapi/types/synonymruleread.go b/typedapi/types/synonymruleread.go index 2411794780..d8aaf74504 100644 --- a/typedapi/types/synonymruleread.go +++ b/typedapi/types/synonymruleread.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // SynonymRuleRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/_types/SynonymRule.ts#L40-L50 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/_types/SynonymRule.ts#L40-L50 type SynonymRuleRead struct { // Id Synonym Rule identifier Id string `json:"id"` diff --git a/typedapi/types/synonymssetitem.go b/typedapi/types/synonymssetitem.go index 45ef0f08a3..6177339c6e 100644 --- a/typedapi/types/synonymssetitem.go +++ b/typedapi/types/synonymssetitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SynonymsSetItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L36-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L36-L45 type SynonymsSetItem struct { // Count Number of synonym rules that the synonym set contains Count int `json:"count"` diff --git a/typedapi/types/synonymsstats.go b/typedapi/types/synonymsstats.go index d8b1800a99..249a488a16 100644 --- a/typedapi/types/synonymsstats.go +++ b/typedapi/types/synonymsstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // SynonymsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/types.ts#L354-L357 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/stats/types.ts#L372-L375 type SynonymsStats struct { Count int `json:"count"` IndexCount int `json:"index_count"` diff --git a/typedapi/types/synonymtokenfilter.go b/typedapi/types/synonymtokenfilter.go index c9dcc3f8ef..da27be8fcf 100644 --- a/typedapi/types/synonymtokenfilter.go +++ b/typedapi/types/synonymtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // SynonymTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L167-L169 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L176-L178 type SynonymTokenFilter struct { // Expand Expands definitions for equivalent synonym rules. Defaults to `true`. Expand *bool `json:"expand,omitempty"` diff --git a/typedapi/types/tablevaluescontainer.go b/typedapi/types/tablevaluescontainer.go index c01d5432d3..03f5a0c42b 100644 --- a/typedapi/types/tablevaluescontainer.go +++ b/typedapi/types/tablevaluescontainer.go @@ -16,60 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // TableValuesContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/TableValuesContainer.ts#L22-L28 type TableValuesContainer struct { - AdditionalTableValuesContainerProperty map[string]json.RawMessage `json:"-"` - Float64 [][]Float64 `json:"double,omitempty"` - Int [][]int `json:"integer,omitempty"` - Int64 [][]int64 `json:"long,omitempty"` - Keyword [][]string `json:"keyword,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s TableValuesContainer) MarshalJSON() ([]byte, error) { - type opt TableValuesContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalTableValuesContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalTableValuesContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + Float64 [][]Float64 `json:"double,omitempty"` + Int [][]int `json:"integer,omitempty"` + Int64 [][]int64 `json:"long,omitempty"` + Keyword [][]string `json:"keyword,omitempty"` } // NewTableValuesContainer returns a TableValuesContainer. func NewTableValuesContainer() *TableValuesContainer { - r := &TableValuesContainer{ - AdditionalTableValuesContainerProperty: make(map[string]json.RawMessage), - } + r := &TableValuesContainer{} return r } diff --git a/typedapi/types/tablevaluesintegervalue.go b/typedapi/types/tablevaluesintegervalue.go index 4869d11443..a7296a6e26 100644 --- a/typedapi/types/tablevaluesintegervalue.go +++ b/typedapi/types/tablevaluesintegervalue.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TableValuesIntegerValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L30-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/TableValuesContainer.ts#L30-L30 type TableValuesIntegerValue []int type TableValuesIntegerValueVariant interface { diff --git a/typedapi/types/tablevalueskeywordvalue.go b/typedapi/types/tablevalueskeywordvalue.go index 5aa53dac11..b3a1c8c7cd 100644 --- a/typedapi/types/tablevalueskeywordvalue.go +++ b/typedapi/types/tablevalueskeywordvalue.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TableValuesKeywordValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L31-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/TableValuesContainer.ts#L31-L31 type TableValuesKeywordValue []string type TableValuesKeywordValueVariant interface { diff --git a/typedapi/types/tablevalueslongdouble.go b/typedapi/types/tablevalueslongdouble.go index e1727f9847..b90304cf12 100644 --- a/typedapi/types/tablevalueslongdouble.go +++ b/typedapi/types/tablevalueslongdouble.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TableValuesLongDouble type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L33-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/TableValuesContainer.ts#L33-L33 type TableValuesLongDouble []Float64 type TableValuesLongDoubleVariant interface { diff --git a/typedapi/types/tablevalueslongvalue.go b/typedapi/types/tablevalueslongvalue.go index f71392cc69..0a18558602 100644 --- a/typedapi/types/tablevalueslongvalue.go +++ b/typedapi/types/tablevalueslongvalue.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TableValuesLongValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L32-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/esql/_types/TableValuesContainer.ts#L32-L32 type TableValuesLongValue []int64 type TableValuesLongValueVariant interface { diff --git a/typedapi/types/tags.go b/typedapi/types/tags.go new file mode 100644 index 0000000000..ab61ee7803 --- /dev/null +++ b/typedapi/types/tags.go @@ -0,0 +1,160 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// Tags type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/project/tags/TagsResponse.ts#L23-L31 +type Tags struct { + Alias_ string `json:"_alias"` + Id_ string `json:"_id"` + Organisation_ string `json:"_organisation"` + Tags map[string]string `json:"-"` + Type_ string `json:"_type"` +} + +func (s *Tags) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "_alias": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Alias_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Alias_ = o + + case "_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Id_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Id_ = o + + case "_organisation": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Organisation_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Organisation_ = o + + case "_type": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Type_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Type_ = o + + default: + + if key, ok := t.(string); ok { + if s.Tags == nil { + s.Tags = make(map[string]string, 0) + } + raw := new(string) + if err := dec.Decode(&raw); err != nil { + return fmt.Errorf("%s | %w", "Tags", err) + } + s.Tags[key] = *raw + } + + } + } + return nil +} + +// MarhsalJSON overrides marshalling for types with additional properties +func (s Tags) MarshalJSON() ([]byte, error) { + type opt Tags + // We transform the struct to a map without the embedded additional properties map + tmp := make(map[string]any, 0) + + data, err := json.Marshal(opt(s)) + if err != nil { + return nil, err + } + err = json.Unmarshal(data, &tmp) + if err != nil { + return nil, err + } + + // We inline the additional fields from the underlying map + for key, value := range s.Tags { + tmp[fmt.Sprintf("%s", key)] = value + } + delete(tmp, "Tags") + + data, err = json.Marshal(tmp) + if err != nil { + return nil, err + } + + return data, nil +} + +// NewTags returns a Tags. +func NewTags() *Tags { + r := &Tags{ + Tags: make(map[string]string), + } + + return r +} diff --git a/typedapi/types/targetmeanencodingpreprocessor.go b/typedapi/types/targetmeanencodingpreprocessor.go index 6753a1b6ef..8a05667d6d 100644 --- a/typedapi/types/targetmeanencodingpreprocessor.go +++ b/typedapi/types/targetmeanencodingpreprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TargetMeanEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L49-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L49-L54 type TargetMeanEncodingPreprocessor struct { DefaultValue Float64 `json:"default_value"` FeatureName string `json:"feature_name"` diff --git a/typedapi/types/taskfailure.go b/typedapi/types/taskfailure.go index a7bd104bae..cc793b74da 100644 --- a/typedapi/types/taskfailure.go +++ b/typedapi/types/taskfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TaskFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Errors.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Errors.ts#L71-L76 type TaskFailure struct { NodeId string `json:"node_id"` Reason ErrorCause `json:"reason"` diff --git a/typedapi/types/taskinfo.go b/typedapi/types/taskinfo.go index b3c5ba9468..ada5dc5eed 100644 --- a/typedapi/types/taskinfo.go +++ b/typedapi/types/taskinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TaskInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/_types/TaskInfo.ts#L32-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/tasks/_types/TaskInfo.ts#L32-L58 type TaskInfo struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` diff --git a/typedapi/types/taskinfos.go b/typedapi/types/taskinfos.go index 436f60ac1d..8e4efd0853 100644 --- a/typedapi/types/taskinfos.go +++ b/typedapi/types/taskinfos.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // []TaskInfo // map[string]ParentTaskInfo // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/_types/TaskListResponseBase.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/tasks/_types/TaskListResponseBase.ts#L40-L43 type TaskInfos any diff --git a/typedapi/types/tasksrecord.go b/typedapi/types/tasksrecord.go index 263402a61d..3558ca847e 100644 --- a/typedapi/types/tasksrecord.go +++ b/typedapi/types/tasksrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TasksRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/tasks/types.ts#L22-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/tasks/types.ts#L22-L101 type TasksRecord struct { // Action The task action. Action *string `json:"action,omitempty"` diff --git a/typedapi/types/tdigest.go b/typedapi/types/tdigest.go index b6adc772e0..ccd907d3bd 100644 --- a/typedapi/types/tdigest.go +++ b/typedapi/types/tdigest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // TDigest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L244-L255 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L248-L259 type TDigest struct { // Compression Limits the maximum number of nodes used by the underlying TDigest algorithm // to `20 * compression`, enabling control of memory usage and approximation diff --git a/typedapi/types/tdigestpercentileranksaggregate.go b/typedapi/types/tdigestpercentileranksaggregate.go index e12a12a94e..b8306f1973 100644 --- a/typedapi/types/tdigestpercentileranksaggregate.go +++ b/typedapi/types/tdigestpercentileranksaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TDigestPercentileRanksAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L177-L178 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L182-L183 type TDigestPercentileRanksAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/tdigestpercentilesaggregate.go b/typedapi/types/tdigestpercentilesaggregate.go index 86417e8e82..d896f4a277 100644 --- a/typedapi/types/tdigestpercentilesaggregate.go +++ b/typedapi/types/tdigestpercentilesaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TDigestPercentilesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L174-L175 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L179-L180 type TDigestPercentilesAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` diff --git a/typedapi/types/template.go b/typedapi/types/template.go index 227890b09f..4791cf6c30 100644 --- a/typedapi/types/template.go +++ b/typedapi/types/template.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Template type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L33-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L33-L37 type Template struct { Aliases map[string]Alias `json:"aliases"` Mappings TypeMapping `json:"mappings"` diff --git a/typedapi/types/templateconfig.go b/typedapi/types/templateconfig.go index 5820272605..f4259f2f8c 100644 --- a/typedapi/types/templateconfig.go +++ b/typedapi/types/templateconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TemplateConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch_template/types.ts#L29-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/msearch_template/types.ts#L29-L55 type TemplateConfig struct { // Explain If `true`, returns detailed information about score calculation as part of // each hit. diff --git a/typedapi/types/templatemapping.go b/typedapi/types/templatemapping.go index 2b5216762a..c4f92874dd 100644 --- a/typedapi/types/templatemapping.go +++ b/typedapi/types/templatemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TemplateMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/TemplateMapping.ts#L27-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/TemplateMapping.ts#L27-L34 type TemplateMapping struct { Aliases map[string]Alias `json:"aliases"` IndexPatterns []string `json:"index_patterns"` diff --git a/typedapi/types/templatesrecord.go b/typedapi/types/templatesrecord.go index 7f782e8630..39fa03bae7 100644 --- a/typedapi/types/templatesrecord.go +++ b/typedapi/types/templatesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TemplatesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/templates/types.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/templates/types.ts#L22-L48 type TemplatesRecord struct { // ComposedOf The component templates that comprise the index template. ComposedOf *string `json:"composed_of,omitempty"` diff --git a/typedapi/types/term.go b/typedapi/types/term.go index b3b71ef2a7..8d7b841538 100644 --- a/typedapi/types/term.go +++ b/typedapi/types/term.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Term type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/termvectors/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/termvectors/types.ts#L34-L40 type Term struct { DocFreq *int `json:"doc_freq,omitempty"` Score *Float64 `json:"score,omitempty"` diff --git a/typedapi/types/terminateprocessor.go b/typedapi/types/terminateprocessor.go index 32aa8c23ca..71fa72414e 100644 --- a/typedapi/types/terminateprocessor.go +++ b/typedapi/types/terminateprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TerminateProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1542-L1542 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1546-L1546 type TerminateProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/termquery.go b/typedapi/types/termquery.go index 1f578d4a90..88ff069d70 100644 --- a/typedapi/types/termquery.go +++ b/typedapi/types/termquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L234-L251 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L235-L252 type TermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/termrangequery.go b/typedapi/types/termrangequery.go index 1f4599d9e6..c3e80d5832 100644 --- a/typedapi/types/termrangequery.go +++ b/typedapi/types/termrangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // TermRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L170-L170 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L171-L171 type TermRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/termsaggregation.go b/typedapi/types/termsaggregation.go index fcb0ddffb5..9a4f63e409 100644 --- a/typedapi/types/termsaggregation.go +++ b/typedapi/types/termsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // TermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L963-L1031 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L992-L1060 type TermsAggregation struct { // CollectMode Determines how child aggregations should be calculated: breadth-first or // depth-first. diff --git a/typedapi/types/termsexclude.go b/typedapi/types/termsexclude.go index 5f67be8c6c..27a8659e20 100644 --- a/typedapi/types/termsexclude.go +++ b/typedapi/types/termsexclude.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TermsExclude type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1077-L1078 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1106-L1107 type TermsExclude []string type TermsExcludeVariant interface { diff --git a/typedapi/types/termsgrouping.go b/typedapi/types/termsgrouping.go index 52b0b2c348..2744b959e0 100644 --- a/typedapi/types/termsgrouping.go +++ b/typedapi/types/termsgrouping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TermsGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/_types/Groupings.ts#L75-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/rollup/_types/Groupings.ts#L75-L82 type TermsGrouping struct { // Fields The set of fields that you wish to collect terms for. // This array can contain fields that are both keyword and numerics. diff --git a/typedapi/types/termsinclude.go b/typedapi/types/termsinclude.go index 674920f160..b98b4e3744 100644 --- a/typedapi/types/termsinclude.go +++ b/typedapi/types/termsinclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ package types // []string // TermsPartition // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1074-L1075 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1103-L1104 type TermsInclude any type TermsIncludeVariant interface { diff --git a/typedapi/types/termslookup.go b/typedapi/types/termslookup.go index 5031bffd8a..e3ddaddb6b 100644 --- a/typedapi/types/termslookup.go +++ b/typedapi/types/termslookup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,12 +30,12 @@ import ( // TermsLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L266-L271 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L267-L272 type TermsLookup struct { - Id string `json:"id"` - Index string `json:"index"` - Path string `json:"path"` - Routing *string `json:"routing,omitempty"` + Id string `json:"id"` + Index string `json:"index"` + Path string `json:"path"` + Routing []string `json:"routing,omitempty"` } func (s *TermsLookup) UnmarshalJSON(data []byte) error { @@ -69,8 +69,19 @@ func (s *TermsLookup) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } } diff --git a/typedapi/types/termspartition.go b/typedapi/types/termspartition.go index f0ffad538f..5f73daa672 100644 --- a/typedapi/types/termspartition.go +++ b/typedapi/types/termspartition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TermsPartition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1080-L1089 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1109-L1118 type TermsPartition struct { // NumPartitions The number of partitions. NumPartitions int64 `json:"num_partitions"` diff --git a/typedapi/types/termsquery.go b/typedapi/types/termsquery.go index 88080eb7df..41201ab6e1 100644 --- a/typedapi/types/termsquery.go +++ b/typedapi/types/termsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TermsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L253-L259 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L254-L260 type TermsQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/termsqueryfield.go b/typedapi/types/termsqueryfield.go index 64e3f655dd..8ba7693a99 100644 --- a/typedapi/types/termsqueryfield.go +++ b/typedapi/types/termsqueryfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // []FieldValue // TermsLookup // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L261-L264 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L262-L265 type TermsQueryField any type TermsQueryFieldVariant interface { diff --git a/typedapi/types/termssetquery.go b/typedapi/types/termssetquery.go index cbc91eea63..4307871b6c 100644 --- a/typedapi/types/termssetquery.go +++ b/typedapi/types/termssetquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TermsSetQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L273-L295 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L274-L296 type TermsSetQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/termsuggest.go b/typedapi/types/termsuggest.go index 2ed33e78d3..bd5958fcbd 100644 --- a/typedapi/types/termsuggest.go +++ b/typedapi/types/termsuggest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TermSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L65-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L65-L70 type TermSuggest struct { Length int `json:"length"` Offset int `json:"offset"` diff --git a/typedapi/types/termsuggester.go b/typedapi/types/termsuggester.go index 564aeafe2e..51cb7328ab 100644 --- a/typedapi/types/termsuggester.go +++ b/typedapi/types/termsuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -35,7 +35,7 @@ import ( // TermSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L507-L569 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L508-L570 type TermSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. diff --git a/typedapi/types/termsuggestoption.go b/typedapi/types/termsuggestoption.go index 5ee9e24c66..c6117247e2 100644 --- a/typedapi/types/termsuggestoption.go +++ b/typedapi/types/termsuggestoption.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TermSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L94-L100 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/suggester.ts#L94-L100 type TermSuggestOption struct { CollateMatch *bool `json:"collate_match,omitempty"` Freq int64 `json:"freq"` diff --git a/typedapi/types/termvector.go b/typedapi/types/termvector.go index 75263f55ef..f001926153 100644 --- a/typedapi/types/termvector.go +++ b/typedapi/types/termvector.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TermVector type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/termvectors/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/termvectors/types.ts#L23-L26 type TermVector struct { FieldStatistics *FieldStatistics `json:"field_statistics,omitempty"` Terms map[string]Term `json:"terms"` diff --git a/typedapi/types/termvectorsfilter.go b/typedapi/types/termvectorsfilter.go index 0cd15158cd..9d5c6a946a 100644 --- a/typedapi/types/termvectorsfilter.go +++ b/typedapi/types/termvectorsfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TermVectorsFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/termvectors/types.ts#L49-L86 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/termvectors/types.ts#L49-L86 type TermVectorsFilter struct { // MaxDocFreq Ignore words which occur in more than this many docs. // Defaults to unbounded. diff --git a/typedapi/types/termvectorsresult.go b/typedapi/types/termvectorsresult.go index 23d0e6e7b0..d6a7b3e208 100644 --- a/typedapi/types/termvectorsresult.go +++ b/typedapi/types/termvectorsresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TermVectorsResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mtermvectors/types.ts#L96-L104 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/mtermvectors/types.ts#L96-L104 type TermVectorsResult struct { Error *ErrorCause `json:"error,omitempty"` Found *bool `json:"found,omitempty"` diff --git a/typedapi/types/termvectorstoken.go b/typedapi/types/termvectorstoken.go index ae917b3332..1bb018f076 100644 --- a/typedapi/types/termvectorstoken.go +++ b/typedapi/types/termvectorstoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TermVectorsToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/termvectors/types.ts#L42-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/termvectors/types.ts#L42-L47 type TermVectorsToken struct { EndOffset *int `json:"end_offset,omitempty"` Payload *string `json:"payload,omitempty"` diff --git a/typedapi/types/testpopulation.go b/typedapi/types/testpopulation.go index 82514cde2b..4f075c26f8 100644 --- a/typedapi/types/testpopulation.go +++ b/typedapi/types/testpopulation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TestPopulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L342-L352 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L346-L356 type TestPopulation struct { // Field The field to aggregate. Field string `json:"field"` diff --git a/typedapi/types/textclassificationinferenceoptions.go b/typedapi/types/textclassificationinferenceoptions.go index fe5594ee1e..4f474d8da8 100644 --- a/typedapi/types/textclassificationinferenceoptions.go +++ b/typedapi/types/textclassificationinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TextClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L202-L214 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L202-L214 type TextClassificationInferenceOptions struct { // ClassificationLabels Classification labels to apply other than the stored labels. Must have the // same deminsions as the default configured labels diff --git a/typedapi/types/textclassificationinferenceupdateoptions.go b/typedapi/types/textclassificationinferenceupdateoptions.go index 9eb29583bd..ffeed1f444 100644 --- a/typedapi/types/textclassificationinferenceupdateoptions.go +++ b/typedapi/types/textclassificationinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TextClassificationInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L382-L391 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L386-L395 type TextClassificationInferenceUpdateOptions struct { // ClassificationLabels Classification labels to apply other than the stored labels. Must have the // same deminsions as the default configured labels diff --git a/typedapi/types/textembedding.go b/typedapi/types/textembedding.go index ff4993818d..397c85c89c 100644 --- a/typedapi/types/textembedding.go +++ b/typedapi/types/textembedding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,10 +31,12 @@ import ( // TextEmbedding type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Knn.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Knn.ts#L108-L117 type TextEmbedding struct { - ModelId string `json:"model_id"` - ModelText string `json:"model_text"` + // ModelId Model ID is required for all dense_vector fields but + // may be inferred for semantic_text fields + ModelId *string `json:"model_id,omitempty"` + ModelText string `json:"model_text"` } func (s *TextEmbedding) UnmarshalJSON(data []byte) error { @@ -62,7 +64,7 @@ func (s *TextEmbedding) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.ModelId = o + s.ModelId = &o case "model_text": var tmp json.RawMessage diff --git a/typedapi/types/textembeddingbyteresult.go b/typedapi/types/textembeddingbyteresult.go index 620c23b941..d05c953dbe 100644 --- a/typedapi/types/textembeddingbyteresult.go +++ b/typedapi/types/textembeddingbyteresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TextEmbeddingByteResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Results.ts#L53-L58 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Results.ts#L53-L58 type TextEmbeddingByteResult struct { Embedding []byte `json:"embedding"` } diff --git a/typedapi/types/textembeddinginferenceoptions.go b/typedapi/types/textembeddinginferenceoptions.go index f155c9b2de..a0cfbb92b3 100644 --- a/typedapi/types/textembeddinginferenceoptions.go +++ b/typedapi/types/textembeddinginferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TextEmbeddingInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L252-L262 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L254-L264 type TextEmbeddingInferenceOptions struct { // EmbeddingSize The number of dimensions in the embedding output EmbeddingSize *int `json:"embedding_size,omitempty"` @@ -40,7 +40,7 @@ type TextEmbeddingInferenceOptions struct { ResultsField *string `json:"results_field,omitempty"` // Tokenization The tokenization options Tokenization *TokenizationConfigContainer `json:"tokenization,omitempty"` - Vocabulary Vocabulary `json:"vocabulary"` + Vocabulary *Vocabulary `json:"vocabulary,omitempty"` } func (s *TextEmbeddingInferenceOptions) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/textembeddinginferenceupdateoptions.go b/typedapi/types/textembeddinginferenceupdateoptions.go index 819b5041e6..8138af1a0a 100644 --- a/typedapi/types/textembeddinginferenceupdateoptions.go +++ b/typedapi/types/textembeddinginferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TextEmbeddingInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L411-L415 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L415-L419 type TextEmbeddingInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/textembeddingresult.go b/typedapi/types/textembeddingresult.go index 79f3f430e6..aa510f6d8a 100644 --- a/typedapi/types/textembeddingresult.go +++ b/typedapi/types/textembeddingresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TextEmbeddingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Results.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/Results.ts#L60-L65 type TextEmbeddingResult struct { Embedding []float32 `json:"embedding"` } diff --git a/typedapi/types/textexpansioninferenceoptions.go b/typedapi/types/textexpansioninferenceoptions.go index 61636ef875..c7c2497e54 100644 --- a/typedapi/types/textexpansioninferenceoptions.go +++ b/typedapi/types/textexpansioninferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,14 +31,14 @@ import ( // TextExpansionInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L264-L271 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L266-L273 type TextExpansionInferenceOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. ResultsField *string `json:"results_field,omitempty"` // Tokenization The tokenization options Tokenization *TokenizationConfigContainer `json:"tokenization,omitempty"` - Vocabulary Vocabulary `json:"vocabulary"` + Vocabulary *Vocabulary `json:"vocabulary,omitempty"` } func (s *TextExpansionInferenceOptions) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/textexpansioninferenceupdateoptions.go b/typedapi/types/textexpansioninferenceupdateoptions.go index d5aaeb36e8..5b133de3a5 100644 --- a/typedapi/types/textexpansioninferenceupdateoptions.go +++ b/typedapi/types/textexpansioninferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TextExpansionInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L417-L421 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L421-L425 type TextExpansionInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. diff --git a/typedapi/types/textexpansionquery.go b/typedapi/types/textexpansionquery.go index 69e3e18e81..2462422e1a 100644 --- a/typedapi/types/textexpansionquery.go +++ b/typedapi/types/textexpansionquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TextExpansionQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/TextExpansionQuery.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/TextExpansionQuery.ts#L23-L37 type TextExpansionQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/textindexprefixes.go b/typedapi/types/textindexprefixes.go index 655c595217..21fa85091b 100644 --- a/typedapi/types/textindexprefixes.go +++ b/typedapi/types/textindexprefixes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TextIndexPrefixes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L316-L319 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L329-L332 type TextIndexPrefixes struct { MaxChars int `json:"max_chars"` MinChars int `json:"min_chars"` diff --git a/typedapi/types/textproperty.go b/typedapi/types/textproperty.go index 170164ac45..2fa909ab20 100644 --- a/typedapi/types/textproperty.go +++ b/typedapi/types/textproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // TextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L321-L338 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L334-L351 type TextProperty struct { Analyzer *string `json:"analyzer,omitempty"` Boost *Float64 `json:"boost,omitempty"` diff --git a/typedapi/types/textsimilarityreranker.go b/typedapi/types/textsimilarityreranker.go index b1fb0f28f0..f0b44969e4 100644 --- a/typedapi/types/textsimilarityreranker.go +++ b/typedapi/types/textsimilarityreranker.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,16 +31,18 @@ import ( // TextSimilarityReranker type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Retriever.ts#L146-L157 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Retriever.ts#L173-L190 type TextSimilarityReranker struct { + // ChunkRescorer Whether to rescore on only the best matching chunks. + ChunkRescorer *ChunkRescorer `json:"chunk_rescorer,omitempty"` // Field The document field to be used for text similarity comparisons. This field - // should contain the text that will be evaluated against the inference_text + // should contain the text that will be evaluated against the inference_text. Field string `json:"field"` // Filter Query to filter the documents that can match. Filter []Query `json:"filter,omitempty"` // InferenceId Unique identifier of the inference endpoint created using the inference API. InferenceId *string `json:"inference_id,omitempty"` - // InferenceText The text snippet used as the basis for similarity comparison + // InferenceText The text snippet used as the basis for similarity comparison. InferenceText string `json:"inference_text"` // MinScore Minimum _score for matching documents. Documents with a lower _score are not // included in the top documents. @@ -70,6 +72,11 @@ func (s *TextSimilarityReranker) UnmarshalJSON(data []byte) error { switch t { + case "chunk_rescorer": + if err := dec.Decode(&s.ChunkRescorer); err != nil { + return fmt.Errorf("%s | %w", "ChunkRescorer", err) + } + case "field": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/types/texttoanalyze.go b/typedapi/types/texttoanalyze.go index e188a85c65..471bb667b8 100644 --- a/typedapi/types/texttoanalyze.go +++ b/typedapi/types/texttoanalyze.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TextToAnalyze type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/types.ts#L69-L69 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/analyze/types.ts#L69-L69 type TextToAnalyze []string type TextToAnalyzeVariant interface { diff --git a/typedapi/types/thaianalyzer.go b/typedapi/types/thaianalyzer.go index f1975da3ec..1b14e19180 100644 --- a/typedapi/types/thaianalyzer.go +++ b/typedapi/types/thaianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ThaiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L317-L321 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L317-L321 type ThaiAnalyzer struct { Stopwords StopWords `json:"stopwords,omitempty"` StopwordsPath *string `json:"stopwords_path,omitempty"` diff --git a/typedapi/types/thaitokenizer.go b/typedapi/types/thaitokenizer.go index 797a494bfa..b7581d06c4 100644 --- a/typedapi/types/thaitokenizer.go +++ b/typedapi/types/thaitokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // ThaiTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L128-L130 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L128-L130 type ThaiTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/thinkingconfig.go b/typedapi/types/thinkingconfig.go new file mode 100644 index 0000000000..831f36f74a --- /dev/null +++ b/typedapi/types/thinkingconfig.go @@ -0,0 +1,89 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// ThinkingConfig type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1540-L1545 +type ThinkingConfig struct { + // ThinkingBudget Indicates the desired thinking budget in tokens. + ThinkingBudget *int `json:"thinking_budget,omitempty"` +} + +func (s *ThinkingConfig) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "thinking_budget": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ThinkingBudget", err) + } + s.ThinkingBudget = &value + case float64: + f := int(v) + s.ThinkingBudget = &f + } + + } + } + return nil +} + +// NewThinkingConfig returns a ThinkingConfig. +func NewThinkingConfig() *ThinkingConfig { + r := &ThinkingConfig{} + + return r +} + +type ThinkingConfigVariant interface { + ThinkingConfigCaster() *ThinkingConfig +} + +func (s *ThinkingConfig) ThinkingConfigCaster() *ThinkingConfig { + return s +} diff --git a/typedapi/types/threadcount.go b/typedapi/types/threadcount.go index b99578bb48..bf3a75df4c 100644 --- a/typedapi/types/threadcount.go +++ b/typedapi/types/threadcount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ThreadCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1082-L1107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1082-L1107 type ThreadCount struct { // Active Number of active threads in the thread pool. Active *int64 `json:"active,omitempty"` diff --git a/typedapi/types/threadpoolrecord.go b/typedapi/types/threadpoolrecord.go index 0843529f38..1d161d9f80 100644 --- a/typedapi/types/threadpoolrecord.go +++ b/typedapi/types/threadpoolrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ThreadPoolRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/thread_pool/types.ts#L22-L124 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/thread_pool/types.ts#L22-L124 type ThreadPoolRecord struct { // Active The number of active threads in the current thread pool. Active *string `json:"active,omitempty"` diff --git a/typedapi/types/throttlestate.go b/typedapi/types/throttlestate.go index ab878a2c23..9287324364 100644 --- a/typedapi/types/throttlestate.go +++ b/typedapi/types/throttlestate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ThrottleState type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L120-L123 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L120-L123 type ThrottleState struct { Reason string `json:"reason"` Timestamp DateTime `json:"timestamp"` diff --git a/typedapi/types/timehttphistogram.go b/typedapi/types/timehttphistogram.go index a6ba9a5cd9..84075594c9 100644 --- a/typedapi/types/timehttphistogram.go +++ b/typedapi/types/timehttphistogram.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TimeHttpHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L710-L714 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L710-L714 type TimeHttpHistogram struct { Count int64 `json:"count"` GeMillis *int64 `json:"ge_millis,omitempty"` diff --git a/typedapi/types/timeofmonth.go b/typedapi/types/timeofmonth.go index c57fd1c7b4..0e5d7060f8 100644 --- a/typedapi/types/timeofmonth.go +++ b/typedapi/types/timeofmonth.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TimeOfMonth type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L111-L114 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L111-L114 type TimeOfMonth struct { At []string `json:"at"` On []int `json:"on"` diff --git a/typedapi/types/timeofweek.go b/typedapi/types/timeofweek.go index 55a2f5288e..ec698836b6 100644 --- a/typedapi/types/timeofweek.go +++ b/typedapi/types/timeofweek.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // TimeOfWeek type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L116-L119 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L116-L119 type TimeOfWeek struct { At []string `json:"at"` On []day.Day `json:"on"` diff --git a/typedapi/types/timeofyear.go b/typedapi/types/timeofyear.go index d9a7b08a4e..97105fd343 100644 --- a/typedapi/types/timeofyear.go +++ b/typedapi/types/timeofyear.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // TimeOfYear type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L121-L125 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Schedule.ts#L121-L125 type TimeOfYear struct { At []string `json:"at"` Int []month.Month `json:"int"` diff --git a/typedapi/types/timeseriesaggregate.go b/typedapi/types/timeseriesaggregate.go index 54e1554da8..8eb81d636b 100644 --- a/typedapi/types/timeseriesaggregate.go +++ b/typedapi/types/timeseriesaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TimeSeriesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L732-L733 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L804-L805 type TimeSeriesAggregate struct { Buckets BucketsTimeSeriesBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/timeseriesaggregation.go b/typedapi/types/timeseriesaggregation.go index 7baa19429a..f4d436f66c 100644 --- a/typedapi/types/timeseriesaggregation.go +++ b/typedapi/types/timeseriesaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TimeSeriesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1033-L1046 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1062-L1075 type TimeSeriesAggregation struct { // Keyed Set to `true` to associate a unique string key with each bucket and returns // the ranges as a hash rather than an array. diff --git a/typedapi/types/timeseriesbucket.go b/typedapi/types/timeseriesbucket.go index 27e2ce3f29..d425d1f0fe 100644 --- a/typedapi/types/timeseriesbucket.go +++ b/typedapi/types/timeseriesbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // TimeSeriesBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L735-L737 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L807-L809 type TimeSeriesBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -200,6 +200,13 @@ func (s *TimeSeriesBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -228,6 +235,20 @@ func (s *TimeSeriesBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/timesync.go b/typedapi/types/timesync.go index 28f27b779e..2d1aff7922 100644 --- a/typedapi/types/timesync.go +++ b/typedapi/types/timesync.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TimeSync type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L177-L189 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L187-L199 type TimeSync struct { // Delay The time delay between the current time and the latest input data time. Delay Duration `json:"delay,omitempty"` diff --git a/typedapi/types/timingstats.go b/typedapi/types/timingstats.go index 559d3821c8..9bc58a3bfc 100644 --- a/typedapi/types/timingstats.go +++ b/typedapi/types/timingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L564-L569 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L564-L569 type TimingStats struct { // ElapsedTime Runtime of the analysis in milliseconds. ElapsedTime int64 `json:"elapsed_time"` diff --git a/typedapi/types/tokencountproperty.go b/typedapi/types/tokencountproperty.go index aae1a4f44e..e0bacbb0d1 100644 --- a/typedapi/types/tokencountproperty.go +++ b/typedapi/types/tokencountproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // TokenCountProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/specialized.ts#L94-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/specialized.ts#L95-L102 type TokenCountProperty struct { Analyzer *string `json:"analyzer,omitempty"` Boost *Float64 `json:"boost,omitempty"` diff --git a/typedapi/types/tokendetail.go b/typedapi/types/tokendetail.go index 5e44c76569..2c96d483fa 100644 --- a/typedapi/types/tokendetail.go +++ b/typedapi/types/tokendetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TokenDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/types.ts#L71-L74 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/analyze/types.ts#L71-L74 type TokenDetail struct { Name string `json:"name"` Tokens []ExplainAnalyzeToken `json:"tokens"` diff --git a/typedapi/types/tokenfilter.go b/typedapi/types/tokenfilter.go index 9e8915dfe6..46ef4f899d 100644 --- a/typedapi/types/tokenfilter.go +++ b/typedapi/types/tokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // TokenFilterDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L575-L580 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L612-L617 type TokenFilter any type TokenFilterVariant interface { diff --git a/typedapi/types/tokenfilterdefinition.go b/typedapi/types/tokenfilterdefinition.go index 814aff1e68..34f69a6b30 100644 --- a/typedapi/types/tokenfilterdefinition.go +++ b/typedapi/types/tokenfilterdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -97,7 +97,7 @@ package types // PhoneticTokenFilter // DictionaryDecompounderTokenFilter // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L582-L660 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L619-L697 type TokenFilterDefinition any type TokenFilterDefinitionVariant interface { diff --git a/typedapi/types/tokenizationconfigcontainer.go b/typedapi/types/tokenizationconfigcontainer.go index 297ff86220..76c479c49f 100644 --- a/typedapi/types/tokenizationconfigcontainer.go +++ b/typedapi/types/tokenizationconfigcontainer.go @@ -16,20 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // TokenizationConfigContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L135-L158 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L135-L158 type TokenizationConfigContainer struct { - AdditionalTokenizationConfigContainerProperty map[string]json.RawMessage `json:"-"` // Bert Indicates BERT tokenization and its options Bert *NlpBertTokenizationConfig `json:"bert,omitempty"` // BertJa Indicates BERT Japanese tokenization and its options @@ -41,40 +35,9 @@ type TokenizationConfigContainer struct { XlmRoberta *XlmRobertaTokenizationConfig `json:"xlm_roberta,omitempty"` } -// MarhsalJSON overrides marshalling for types with additional properties -func (s TokenizationConfigContainer) MarshalJSON() ([]byte, error) { - type opt TokenizationConfigContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalTokenizationConfigContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalTokenizationConfigContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil -} - // NewTokenizationConfigContainer returns a TokenizationConfigContainer. func NewTokenizationConfigContainer() *TokenizationConfigContainer { - r := &TokenizationConfigContainer{ - AdditionalTokenizationConfigContainerProperty: make(map[string]json.RawMessage), - } + r := &TokenizationConfigContainer{} return r } diff --git a/typedapi/types/tokenizer.go b/typedapi/types/tokenizer.go index 9cb06aa191..fe4a02e4ff 100644 --- a/typedapi/types/tokenizer.go +++ b/typedapi/types/tokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // string // TokenizerDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L142-L147 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L142-L147 type Tokenizer any type TokenizerVariant interface { diff --git a/typedapi/types/tokenizerdefinition.go b/typedapi/types/tokenizerdefinition.go index 9d7f64d608..83394ff429 100644 --- a/typedapi/types/tokenizerdefinition.go +++ b/typedapi/types/tokenizerdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -41,7 +41,7 @@ package types // KuromojiTokenizer // NoriTokenizer // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L149-L172 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L149-L172 type TokenizerDefinition any type TokenizerDefinitionVariant interface { diff --git a/typedapi/types/tokenpruningconfig.go b/typedapi/types/tokenpruningconfig.go index 370b6d1349..63c6a2c631 100644 --- a/typedapi/types/tokenpruningconfig.go +++ b/typedapi/types/tokenpruningconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TokenPruningConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/TokenPruningConfig.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/TokenPruningConfig.ts#L22-L38 type TokenPruningConfig struct { // OnlyScorePrunedTokens Whether to only score pruned tokens, vs only scoring kept tokens. OnlyScorePrunedTokens *bool `json:"only_score_pruned_tokens,omitempty"` diff --git a/typedapi/types/toolcall.go b/typedapi/types/toolcall.go index a5a11bffec..88b8150e6f 100644 --- a/typedapi/types/toolcall.go +++ b/typedapi/types/toolcall.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ToolCall type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L151-L167 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L151-L167 type ToolCall struct { // Function The function that the model called. Function ToolCallFunction `json:"function"` diff --git a/typedapi/types/toolcallfunction.go b/typedapi/types/toolcallfunction.go index 43c30aa684..16fbfbb6fb 100644 --- a/typedapi/types/toolcallfunction.go +++ b/typedapi/types/toolcallfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ToolCallFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L137-L149 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L137-L149 type ToolCallFunction struct { // Arguments The arguments to call the function with in JSON format. Arguments string `json:"arguments"` diff --git a/typedapi/types/topclassentry.go b/typedapi/types/topclassentry.go index 32ee507ae6..0e8ed28446 100644 --- a/typedapi/types/topclassentry.go +++ b/typedapi/types/topclassentry.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TopClassEntry type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L459-L463 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L463-L467 type TopClassEntry struct { ClassName string `json:"class_name"` ClassProbability Float64 `json:"class_probability"` diff --git a/typedapi/types/tophit.go b/typedapi/types/tophit.go index cf7962bc43..9718a34207 100644 --- a/typedapi/types/tophit.go +++ b/typedapi/types/tophit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TopHit type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/_types/Structure.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/text_structure/_types/Structure.ts#L35-L38 type TopHit struct { Count int64 `json:"count"` Value json.RawMessage `json:"value,omitempty"` diff --git a/typedapi/types/tophitsaggregate.go b/typedapi/types/tophitsaggregate.go index 8840bffd67..19336a54d8 100644 --- a/typedapi/types/tophitsaggregate.go +++ b/typedapi/types/tophitsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TopHitsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L749-L755 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L821-L827 type TopHitsAggregate struct { Hits HitsMetadata `json:"hits"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/tophitsaggregation.go b/typedapi/types/tophitsaggregation.go index 145371089d..5f8d51637f 100644 --- a/typedapi/types/tophitsaggregation.go +++ b/typedapi/types/tophitsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TopHitsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L369-L429 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L373-L433 type TopHitsAggregation struct { // DocvalueFields Fields for which to return doc values. DocvalueFields []FieldAndFormat `json:"docvalue_fields,omitempty"` diff --git a/typedapi/types/topleftbottomrightgeobounds.go b/typedapi/types/topleftbottomrightgeobounds.go index b077b9bdae..d738257333 100644 --- a/typedapi/types/topleftbottomrightgeobounds.go +++ b/typedapi/types/topleftbottomrightgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TopLeftBottomRightGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L161-L164 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L160-L163 type TopLeftBottomRightGeoBounds struct { BottomRight GeoLocation `json:"bottom_right"` TopLeft GeoLocation `json:"top_left"` diff --git a/typedapi/types/topmetrics.go b/typedapi/types/topmetrics.go index e319e0c36f..a2784a4f85 100644 --- a/typedapi/types/topmetrics.go +++ b/typedapi/types/topmetrics.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TopMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L834-L838 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L906-L910 type TopMetrics struct { Metrics map[string]FieldValue `json:"metrics"` Sort []FieldValue `json:"sort"` diff --git a/typedapi/types/topmetricsaggregate.go b/typedapi/types/topmetricsaggregate.go index 8f0e3348b5..349d045ebb 100644 --- a/typedapi/types/topmetricsaggregate.go +++ b/typedapi/types/topmetricsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TopMetricsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L829-L832 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L901-L904 type TopMetricsAggregate struct { Meta Metadata `json:"meta,omitempty"` Top []TopMetrics `json:"top"` diff --git a/typedapi/types/topmetricsaggregation.go b/typedapi/types/topmetricsaggregation.go index 2d82e122f5..fdb49d9107 100644 --- a/typedapi/types/topmetricsaggregation.go +++ b/typedapi/types/topmetricsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TopMetricsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L431-L448 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L435-L452 type TopMetricsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/topmetricsvalue.go b/typedapi/types/topmetricsvalue.go index 9ea22ed11a..d4ac6f76c3 100644 --- a/typedapi/types/topmetricsvalue.go +++ b/typedapi/types/topmetricsvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TopMetricsValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L450-L455 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L454-L459 type TopMetricsValue struct { // Field A field to return as a metric. Field string `json:"field"` diff --git a/typedapi/types/toprightbottomleftgeobounds.go b/typedapi/types/toprightbottomleftgeobounds.go index 3e2b08e230..7d2cd2142c 100644 --- a/typedapi/types/toprightbottomleftgeobounds.go +++ b/typedapi/types/toprightbottomleftgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TopRightBottomLeftGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L166-L169 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L165-L168 type TopRightBottomLeftGeoBounds struct { BottomLeft GeoLocation `json:"bottom_left"` TopRight GeoLocation `json:"top_right"` diff --git a/typedapi/types/totalfeatureimportance.go b/typedapi/types/totalfeatureimportance.go index a9faccab88..76cc41ae9c 100644 --- a/typedapi/types/totalfeatureimportance.go +++ b/typedapi/types/totalfeatureimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TotalFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L290-L297 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L291-L298 type TotalFeatureImportance struct { // Classes If the trained model is a classification model, feature importance statistics // are gathered per target class value. diff --git a/typedapi/types/totalfeatureimportanceclass.go b/typedapi/types/totalfeatureimportanceclass.go index f9230cf14d..678f734f51 100644 --- a/typedapi/types/totalfeatureimportanceclass.go +++ b/typedapi/types/totalfeatureimportanceclass.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TotalFeatureImportanceClass type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L299-L304 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L300-L305 type TotalFeatureImportanceClass struct { // ClassName The target class value. Could be a string, boolean, or number. ClassName string `json:"class_name"` diff --git a/typedapi/types/totalfeatureimportancestatistics.go b/typedapi/types/totalfeatureimportancestatistics.go index dc684af0bd..32fd95ccb8 100644 --- a/typedapi/types/totalfeatureimportancestatistics.go +++ b/typedapi/types/totalfeatureimportancestatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TotalFeatureImportanceStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L306-L313 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L307-L314 type TotalFeatureImportanceStatistics struct { // Max The maximum importance value across all the training data for this feature. Max int `json:"max"` diff --git a/typedapi/types/totaluserprofiles.go b/typedapi/types/totaluserprofiles.go index 1bfee52934..f0c48937a1 100644 --- a/typedapi/types/totaluserprofiles.go +++ b/typedapi/types/totaluserprofiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TotalUserProfiles type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/suggest_user_profiles/Response.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/suggest_user_profiles/Response.ts#L24-L27 type TotalUserProfiles struct { Relation string `json:"relation"` Value int64 `json:"value"` diff --git a/typedapi/types/trackhits.go b/typedapi/types/trackhits.go index f999c28dbc..fb33bd77a9 100644 --- a/typedapi/types/trackhits.go +++ b/typedapi/types/trackhits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,7 +25,7 @@ package types // bool // int // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L143-L151 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/search/_types/hits.ts#L151-L159 type TrackHits any type TrackHitsVariant interface { diff --git a/typedapi/types/trainedmodel.go b/typedapi/types/trainedmodel.go index aa3f89d17f..6a38849cab 100644 --- a/typedapi/types/trainedmodel.go +++ b/typedapi/types/trainedmodel.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TrainedModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L60-L72 type TrainedModel struct { // Ensemble The definition for an ensemble model Ensemble *Ensemble `json:"ensemble,omitempty"` diff --git a/typedapi/types/trainedmodelassignment.go b/typedapi/types/trainedmodelassignment.go index 6e0a485361..0869c39172 100644 --- a/typedapi/types/trainedmodelassignment.go +++ b/typedapi/types/trainedmodelassignment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignment type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L472-L489 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L473-L490 type TrainedModelAssignment struct { AdaptiveAllocations *AdaptiveAllocationsSettings `json:"adaptive_allocations,omitempty"` // AssignmentState The overall assignment state. diff --git a/typedapi/types/trainedmodelassignmentroutingstateandreason.go b/typedapi/types/trainedmodelassignmentroutingstateandreason.go index 765cb3d37f..57a7b8091e 100644 --- a/typedapi/types/trainedmodelassignmentroutingstateandreason.go +++ b/typedapi/types/trainedmodelassignmentroutingstateandreason.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignmentRoutingStateAndReason type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L431-L441 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L432-L442 type TrainedModelAssignmentRoutingStateAndReason struct { // Reason The reason for the current state. It is usually populated only when the // `routing_state` is `failed`. diff --git a/typedapi/types/trainedmodelassignmentroutingtable.go b/typedapi/types/trainedmodelassignmentroutingtable.go index fb5c9e7b15..fcccb1b959 100644 --- a/typedapi/types/trainedmodelassignmentroutingtable.go +++ b/typedapi/types/trainedmodelassignmentroutingtable.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignmentRoutingTable type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L443-L461 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L444-L462 type TrainedModelAssignmentRoutingTable struct { // CurrentAllocations Current number of allocations. CurrentAllocations int `json:"current_allocations"` diff --git a/typedapi/types/trainedmodelassignmenttaskparameters.go b/typedapi/types/trainedmodelassignmenttaskparameters.go index 534bb20cc6..744ec2e7cb 100644 --- a/typedapi/types/trainedmodelassignmenttaskparameters.go +++ b/typedapi/types/trainedmodelassignmenttaskparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignmentTaskParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L370-L406 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L371-L407 type TrainedModelAssignmentTaskParameters struct { // CacheSize The size of the trained model cache. CacheSize ByteSize `json:"cache_size,omitempty"` diff --git a/typedapi/types/trainedmodelconfig.go b/typedapi/types/trainedmodelconfig.go index 5d4c8bb2e6..da6b0b1f01 100644 --- a/typedapi/types/trainedmodelconfig.go +++ b/typedapi/types/trainedmodelconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // TrainedModelConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L203-L240 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L204-L241 type TrainedModelConfig struct { CompressedDefinition *string `json:"compressed_definition,omitempty"` // CreateTime The time when the trained model was created. diff --git a/typedapi/types/trainedmodelconfiginput.go b/typedapi/types/trainedmodelconfiginput.go index f87e75aba2..e02b5a0d7c 100644 --- a/typedapi/types/trainedmodelconfiginput.go +++ b/typedapi/types/trainedmodelconfiginput.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TrainedModelConfigInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L242-L245 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L243-L246 type TrainedModelConfigInput struct { // FieldNames An array of input field names for the model. FieldNames []string `json:"field_names"` diff --git a/typedapi/types/trainedmodelconfigmetadata.go b/typedapi/types/trainedmodelconfigmetadata.go index 534e412a5b..b678193976 100644 --- a/typedapi/types/trainedmodelconfigmetadata.go +++ b/typedapi/types/trainedmodelconfigmetadata.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TrainedModelConfigMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L247-L255 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L248-L256 type TrainedModelConfigMetadata struct { // FeatureImportanceBaseline An object that contains the baseline for feature importance values. For // regression analysis, it is a single value. For classification analysis, there diff --git a/typedapi/types/trainedmodeldeploymentallocationstatus.go b/typedapi/types/trainedmodeldeploymentallocationstatus.go index 838e1ce946..183053d8af 100644 --- a/typedapi/types/trainedmodeldeploymentallocationstatus.go +++ b/typedapi/types/trainedmodeldeploymentallocationstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // TrainedModelDeploymentAllocationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L463-L470 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L464-L471 type TrainedModelDeploymentAllocationStatus struct { // AllocationCount The current number of nodes where the model is allocated. AllocationCount int `json:"allocation_count"` diff --git a/typedapi/types/trainedmodeldeploymentnodesstats.go b/typedapi/types/trainedmodeldeploymentnodesstats.go index 432205160e..65c1e76270 100644 --- a/typedapi/types/trainedmodeldeploymentnodesstats.go +++ b/typedapi/types/trainedmodeldeploymentnodesstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelDeploymentNodesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L156-L201 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L157-L202 type TrainedModelDeploymentNodesStats struct { // AverageInferenceTimeMs The average time for each inference call to complete on this node. AverageInferenceTimeMs Float64 `json:"average_inference_time_ms,omitempty"` diff --git a/typedapi/types/trainedmodeldeploymentstats.go b/typedapi/types/trainedmodeldeploymentstats.go index 4d9495c03a..da4478e70f 100644 --- a/typedapi/types/trainedmodeldeploymentstats.go +++ b/typedapi/types/trainedmodeldeploymentstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // TrainedModelDeploymentStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L62-L107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L62-L108 type TrainedModelDeploymentStats struct { AdaptiveAllocations *AdaptiveAllocationsSettings `json:"adaptive_allocations,omitempty"` // AllocationStatus The detailed allocation status for the deployment. diff --git a/typedapi/types/trainedmodelentities.go b/typedapi/types/trainedmodelentities.go index 82a3e508c8..ea87c70ad0 100644 --- a/typedapi/types/trainedmodelentities.go +++ b/typedapi/types/trainedmodelentities.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelEntities type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L452-L458 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L456-L462 type TrainedModelEntities struct { ClassName string `json:"class_name"` ClassProbability Float64 `json:"class_probability"` diff --git a/typedapi/types/trainedmodelinferenceclassimportance.go b/typedapi/types/trainedmodelinferenceclassimportance.go index 1637f0afeb..93142c0e8c 100644 --- a/typedapi/types/trainedmodelinferenceclassimportance.go +++ b/typedapi/types/trainedmodelinferenceclassimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceClassImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L465-L468 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L469-L472 type TrainedModelInferenceClassImportance struct { ClassName string `json:"class_name"` Importance Float64 `json:"importance"` diff --git a/typedapi/types/trainedmodelinferencefeatureimportance.go b/typedapi/types/trainedmodelinferencefeatureimportance.go index a2fd6d071f..c8d0c6b758 100644 --- a/typedapi/types/trainedmodelinferencefeatureimportance.go +++ b/typedapi/types/trainedmodelinferencefeatureimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L470-L474 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L474-L478 type TrainedModelInferenceFeatureImportance struct { Classes []TrainedModelInferenceClassImportance `json:"classes,omitempty"` FeatureName string `json:"feature_name"` diff --git a/typedapi/types/trainedmodelinferencestats.go b/typedapi/types/trainedmodelinferencestats.go index 0208e9a23d..f3f6fcd8c2 100644 --- a/typedapi/types/trainedmodelinferencestats.go +++ b/typedapi/types/trainedmodelinferencestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L127-L147 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L128-L148 type TrainedModelInferenceStats struct { // CacheMissCount The number of times the model was loaded for inference and was not retrieved // from the cache. diff --git a/typedapi/types/trainedmodellocation.go b/typedapi/types/trainedmodellocation.go index 6594740f41..e65840a371 100644 --- a/typedapi/types/trainedmodellocation.go +++ b/typedapi/types/trainedmodellocation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TrainedModelLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L491-L493 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L492-L494 type TrainedModelLocation struct { Index TrainedModelLocationIndex `json:"index"` } diff --git a/typedapi/types/trainedmodellocationindex.go b/typedapi/types/trainedmodellocationindex.go index 3a24f363df..9cac053b22 100644 --- a/typedapi/types/trainedmodellocationindex.go +++ b/typedapi/types/trainedmodellocationindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TrainedModelLocationIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L495-L497 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L496-L498 type TrainedModelLocationIndex struct { Name string `json:"name"` } diff --git a/typedapi/types/trainedmodelprefixstrings.go b/typedapi/types/trainedmodelprefixstrings.go index 4626020851..befc0231a3 100644 --- a/typedapi/types/trainedmodelprefixstrings.go +++ b/typedapi/types/trainedmodelprefixstrings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelPrefixStrings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L499-L508 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L500-L509 type TrainedModelPrefixStrings struct { // Ingest String prepended to input at ingest Ingest *string `json:"ingest,omitempty"` diff --git a/typedapi/types/trainedmodelsizestats.go b/typedapi/types/trainedmodelsizestats.go index 94ba3bf55c..ab3597a349 100644 --- a/typedapi/types/trainedmodelsizestats.go +++ b/typedapi/types/trainedmodelsizestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TrainedModelSizeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L149-L154 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L150-L155 type TrainedModelSizeStats struct { // ModelSizeBytes The size of the model in bytes. ModelSizeBytes ByteSize `json:"model_size_bytes"` diff --git a/typedapi/types/trainedmodelsrecord.go b/typedapi/types/trainedmodelsrecord.go index 8aae50703e..19d9b8f18f 100644 --- a/typedapi/types/trainedmodelsrecord.go +++ b/typedapi/types/trainedmodelsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_trained_models/types.ts#L23-L115 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/ml_trained_models/types.ts#L23-L115 type TrainedModelsRecord struct { // CreateTime The time the model was created. CreateTime DateTime `json:"create_time,omitempty"` diff --git a/typedapi/types/trainedmodelstats.go b/typedapi/types/trainedmodelstats.go index 557a4a98aa..d267c61df4 100644 --- a/typedapi/types/trainedmodelstats.go +++ b/typedapi/types/trainedmodelstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L42-L60 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/TrainedModel.ts#L42-L60 type TrainedModelStats struct { // DeploymentStats A collection of deployment stats, which is present when the models are // deployed. diff --git a/typedapi/types/trainedmodeltree.go b/typedapi/types/trainedmodeltree.go index f2a2113edc..2b392810c1 100644 --- a/typedapi/types/trainedmodeltree.go +++ b/typedapi/types/trainedmodeltree.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelTree type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L74-L79 type TrainedModelTree struct { ClassificationLabels []string `json:"classification_labels,omitempty"` FeatureNames []string `json:"feature_names"` diff --git a/typedapi/types/trainedmodeltreenode.go b/typedapi/types/trainedmodeltreenode.go index d9bd301b42..a8ff5bebb6 100644 --- a/typedapi/types/trainedmodeltreenode.go +++ b/typedapi/types/trainedmodeltreenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrainedModelTreeNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L81-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L81-L91 type TrainedModelTreeNode struct { DecisionType *string `json:"decision_type,omitempty"` DefaultLeft *bool `json:"default_left,omitempty"` diff --git a/typedapi/types/transformauthorization.go b/typedapi/types/transformauthorization.go index ba6baf11bb..21412b9e8e 100644 --- a/typedapi/types/transformauthorization.go +++ b/typedapi/types/transformauthorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TransformAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Authorization.ts#L59-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/Authorization.ts#L61-L74 type TransformAuthorization struct { // ApiKey If an API key was used for the most recent update to the transform, its name // and identifier are listed in the response. diff --git a/typedapi/types/transformcontainer.go b/typedapi/types/transformcontainer.go index c3e422e4b3..b331d911ae 100644 --- a/typedapi/types/transformcontainer.go +++ b/typedapi/types/transformcontainer.go @@ -16,59 +16,22 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // TransformContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Transform.ts#L28-L35 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Transform.ts#L28-L35 type TransformContainer struct { - AdditionalTransformContainerProperty map[string]json.RawMessage `json:"-"` - Chain []TransformContainer `json:"chain,omitempty"` - Script *ScriptTransform `json:"script,omitempty"` - Search *SearchTransform `json:"search,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s TransformContainer) MarshalJSON() ([]byte, error) { - type opt TransformContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalTransformContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalTransformContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + Chain []TransformContainer `json:"chain,omitempty"` + Script *ScriptTransform `json:"script,omitempty"` + Search *SearchTransform `json:"search,omitempty"` } // NewTransformContainer returns a TransformContainer. func NewTransformContainer() *TransformContainer { - r := &TransformContainer{ - AdditionalTransformContainerProperty: make(map[string]json.RawMessage), - } + r := &TransformContainer{} return r } diff --git a/typedapi/types/transformdestination.go b/typedapi/types/transformdestination.go index 584ead9a7d..5f1727d492 100644 --- a/typedapi/types/transformdestination.go +++ b/typedapi/types/transformdestination.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TransformDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L34-L45 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L34-L45 type TransformDestination struct { // Index The destination index for the transform. The mappings of the destination // index are deduced based on the source diff --git a/typedapi/types/transformhealthissue.go b/typedapi/types/transformhealthissue.go index 9529afd97f..f3a000ac34 100644 --- a/typedapi/types/transformhealthissue.go +++ b/typedapi/types/transformhealthissue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TransformHealthIssue type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform_stats/types.ts#L51-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform_stats/types.ts#L51-L63 type TransformHealthIssue struct { // Count Number of times this issue has occurred since it started Count int `json:"count"` diff --git a/typedapi/types/transformindexerstats.go b/typedapi/types/transformindexerstats.go index 1b711ebdd7..874d5b7736 100644 --- a/typedapi/types/transformindexerstats.go +++ b/typedapi/types/transformindexerstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TransformIndexerStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform_stats/types.ts#L73-L91 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform_stats/types.ts#L73-L91 type TransformIndexerStats struct { DeleteTimeInMs *int64 `json:"delete_time_in_ms,omitempty"` DocumentsDeleted *int64 `json:"documents_deleted,omitempty"` diff --git a/typedapi/types/transformprogress.go b/typedapi/types/transformprogress.go index 2b150a4e90..22d7226b39 100644 --- a/typedapi/types/transformprogress.go +++ b/typedapi/types/transformprogress.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TransformProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform_stats/types.ts#L65-L71 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform_stats/types.ts#L65-L71 type TransformProgress struct { DocsIndexed int64 `json:"docs_indexed"` DocsProcessed int64 `json:"docs_processed"` diff --git a/typedapi/types/transformsource.go b/typedapi/types/transformsource.go index de13cdbf41..640aa77861 100644 --- a/typedapi/types/transformsource.go +++ b/typedapi/types/transformsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TransformSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L146-L165 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/_types/Transform.ts#L156-L175 type TransformSource struct { // Index The source indices for the transform. It can be a single index, an index // pattern (for example, `"my-index-*""`), an diff --git a/typedapi/types/transformsrecord.go b/typedapi/types/transformsrecord.go index 9e52e8dd88..3d3078ad88 100644 --- a/typedapi/types/transformsrecord.go +++ b/typedapi/types/transformsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TransformsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/transforms/types.ts#L22-L197 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cat/transforms/types.ts#L22-L197 type TransformsRecord struct { // ChangesLastDetectionTime The timestamp when changes were last detected in the source indices. ChangesLastDetectionTime *string `json:"changes_last_detection_time,omitempty"` diff --git a/typedapi/types/transformstats.go b/typedapi/types/transformstats.go index 2ad58c4ef6..7b4e9ac7a3 100644 --- a/typedapi/types/transformstats.go +++ b/typedapi/types/transformstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TransformStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform_stats/types.ts#L31-L42 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform_stats/types.ts#L31-L42 type TransformStats struct { Checkpointing Checkpointing `json:"checkpointing"` Health *TransformStatsHealth `json:"health,omitempty"` diff --git a/typedapi/types/transformstatshealth.go b/typedapi/types/transformstatshealth.go index b8b93e71e0..361e3dd521 100644 --- a/typedapi/types/transformstatshealth.go +++ b/typedapi/types/transformstatshealth.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // TransformStatsHealth type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform_stats/types.ts#L44-L49 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform_stats/types.ts#L44-L49 type TransformStatsHealth struct { // Issues If a non-healthy status is returned, contains a list of issues of the // transform. diff --git a/typedapi/types/transformsummary.go b/typedapi/types/transformsummary.go index 091ed2a678..f13577278b 100644 --- a/typedapi/types/transformsummary.go +++ b/typedapi/types/transformsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TransformSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/get_transform/types.ts#L33-L62 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/transform/get_transform/types.ts#L33-L62 type TransformSummary struct { // Authorization The security privileges that the transform uses to run its queries. If // Elastic Stack security features were disabled at the time of the most recent diff --git a/typedapi/types/translog.go b/typedapi/types/translog.go index a630c6f9d6..e10aeaf283 100644 --- a/typedapi/types/translog.go +++ b/typedapi/types/translog.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // Translog type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L368-L390 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L375-L397 type Translog struct { // Durability Whether or not to `fsync` and commit the translog after every index, delete, // update, or bulk request. diff --git a/typedapi/types/translogretention.go b/typedapi/types/translogretention.go index 0f662c9b4a..665815ccfa 100644 --- a/typedapi/types/translogretention.go +++ b/typedapi/types/translogretention.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TranslogRetention type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L409-L428 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/_types/IndexSettings.ts#L416-L435 type TranslogRetention struct { // Age This controls the maximum duration for which translog files are kept by each // shard. Keeping more diff --git a/typedapi/types/translogstats.go b/typedapi/types/translogstats.go index bcf3894cf4..f829a1f857 100644 --- a/typedapi/types/translogstats.go +++ b/typedapi/types/translogstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TranslogStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L427-L435 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L427-L435 type TranslogStats struct { EarliestLastModifiedAge int64 `json:"earliest_last_modified_age"` Operations int64 `json:"operations"` diff --git a/typedapi/types/translogstatus.go b/typedapi/types/translogstatus.go index c8d57a4f7b..e99c257764 100644 --- a/typedapi/types/translogstatus.go +++ b/typedapi/types/translogstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TranslogStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L102-L109 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L102-L109 type TranslogStatus struct { Percent Percentage `json:"percent"` Recovered int64 `json:"recovered"` diff --git a/typedapi/types/transport.go b/typedapi/types/transport.go index d7f969082e..d58c9d67d5 100644 --- a/typedapi/types/transport.go +++ b/typedapi/types/transport.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Transport type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1125-L1168 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1125-L1168 type Transport struct { // InboundHandlingTimeHistogram The distribution of the time spent handling each inbound message on a // transport thread, represented as a histogram. diff --git a/typedapi/types/transporthistogram.go b/typedapi/types/transporthistogram.go index 5aa5e540e6..acb3ebda80 100644 --- a/typedapi/types/transporthistogram.go +++ b/typedapi/types/transporthistogram.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TransportHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/_types/Stats.ts#L1170-L1184 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/nodes/_types/Stats.ts#L1170-L1184 type TransportHistogram struct { // Count The number of times a transport thread took a period of time within the // bounds of this bucket to handle an inbound message. diff --git a/typedapi/types/trendchange.go b/typedapi/types/trendchange.go new file mode 100644 index 0000000000..6118ed389b --- /dev/null +++ b/typedapi/types/trendchange.go @@ -0,0 +1,114 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// TrendChange type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L437-L441 +type TrendChange struct { + ChangePoint int `json:"change_point"` + PValue Float64 `json:"p_value"` + RValue Float64 `json:"r_value"` +} + +func (s *TrendChange) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "change_point": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ChangePoint", err) + } + s.ChangePoint = value + case float64: + f := int(v) + s.ChangePoint = f + } + + case "p_value": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "PValue", err) + } + f := Float64(value) + s.PValue = f + case float64: + f := Float64(v) + s.PValue = f + } + + case "r_value": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "RValue", err) + } + f := Float64(value) + s.RValue = f + case float64: + f := Float64(v) + s.RValue = f + } + + } + } + return nil +} + +// NewTrendChange returns a TrendChange. +func NewTrendChange() *TrendChange { + r := &TrendChange{} + + return r +} diff --git a/typedapi/types/triggercontainer.go b/typedapi/types/triggercontainer.go index dcb7241f7a..14f0c6875e 100644 --- a/typedapi/types/triggercontainer.go +++ b/typedapi/types/triggercontainer.go @@ -16,57 +16,20 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // TriggerContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Trigger.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Trigger.ts#L23-L28 type TriggerContainer struct { - AdditionalTriggerContainerProperty map[string]json.RawMessage `json:"-"` - Schedule *ScheduleContainer `json:"schedule,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s TriggerContainer) MarshalJSON() ([]byte, error) { - type opt TriggerContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalTriggerContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalTriggerContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + Schedule *ScheduleContainer `json:"schedule,omitempty"` } // NewTriggerContainer returns a TriggerContainer. func NewTriggerContainer() *TriggerContainer { - r := &TriggerContainer{ - AdditionalTriggerContainerProperty: make(map[string]json.RawMessage), - } + r := &TriggerContainer{} return r } diff --git a/typedapi/types/triggereventcontainer.go b/typedapi/types/triggereventcontainer.go index ac8a2f5098..0a16578af1 100644 --- a/typedapi/types/triggereventcontainer.go +++ b/typedapi/types/triggereventcontainer.go @@ -16,57 +16,20 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types -import ( - "encoding/json" - "fmt" -) - // TriggerEventContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Trigger.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Trigger.ts#L32-L37 type TriggerEventContainer struct { - AdditionalTriggerEventContainerProperty map[string]json.RawMessage `json:"-"` - Schedule *ScheduleTriggerEvent `json:"schedule,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s TriggerEventContainer) MarshalJSON() ([]byte, error) { - type opt TriggerEventContainer - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalTriggerEventContainerProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalTriggerEventContainerProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + Schedule *ScheduleTriggerEvent `json:"schedule,omitempty"` } // NewTriggerEventContainer returns a TriggerEventContainer. func NewTriggerEventContainer() *TriggerEventContainer { - r := &TriggerEventContainer{ - AdditionalTriggerEventContainerProperty: make(map[string]json.RawMessage), - } + r := &TriggerEventContainer{} return r } diff --git a/typedapi/types/triggereventresult.go b/typedapi/types/triggereventresult.go index f9ee7dc69c..21913858cd 100644 --- a/typedapi/types/triggereventresult.go +++ b/typedapi/types/triggereventresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TriggerEventResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Trigger.ts#L39-L43 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Trigger.ts#L39-L43 type TriggerEventResult struct { Manual TriggerEventContainer `json:"manual"` TriggeredTime DateTime `json:"triggered_time"` diff --git a/typedapi/types/trimprocessor.go b/typedapi/types/trimprocessor.go index 8fcd14dcb8..06e50e67fd 100644 --- a/typedapi/types/trimprocessor.go +++ b/typedapi/types/trimprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TrimProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1544-L1560 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1548-L1564 type TrimProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/trimtokenfilter.go b/typedapi/types/trimtokenfilter.go index fabae2b594..25d9d2d006 100644 --- a/typedapi/types/trimtokenfilter.go +++ b/typedapi/types/trimtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // TrimTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L431-L433 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L466-L468 type TrimTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/truncatetokenfilter.go b/typedapi/types/truncatetokenfilter.go index a529f10462..b183bae49b 100644 --- a/typedapi/types/truncatetokenfilter.go +++ b/typedapi/types/truncatetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TruncateTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L435-L439 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L470-L474 type TruncateTokenFilter struct { // Length Character limit for each token. Tokens exceeding this limit are truncated. // Defaults to `10`. diff --git a/typedapi/types/ttestaggregate.go b/typedapi/types/ttestaggregate.go index 63b49e86e7..7ae409ad51 100644 --- a/typedapi/types/ttestaggregate.go +++ b/typedapi/types/ttestaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TTestAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L840-L847 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L912-L919 type TTestAggregate struct { Meta Metadata `json:"meta,omitempty"` Value *Float64 `json:"value,omitempty"` diff --git a/typedapi/types/ttestaggregation.go b/typedapi/types/ttestaggregation.go index 055336644d..b331ea60e4 100644 --- a/typedapi/types/ttestaggregation.go +++ b/typedapi/types/ttestaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -26,7 +26,7 @@ import ( // TTestAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L326-L340 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L330-L344 type TTestAggregation struct { // A Test population A. A *TestPopulation `json:"a,omitempty"` diff --git a/typedapi/types/turkishanalyzer.go b/typedapi/types/turkishanalyzer.go index e7dedf0e2a..c0c29e92c4 100644 --- a/typedapi/types/turkishanalyzer.go +++ b/typedapi/types/turkishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TurkishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L310-L315 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L310-L315 type TurkishAnalyzer struct { StemExclusion []string `json:"stem_exclusion,omitempty"` Stopwords StopWords `json:"stopwords,omitempty"` diff --git a/typedapi/types/typefieldmappings.go b/typedapi/types/typefieldmappings.go index 688c03c510..31c32ca36c 100644 --- a/typedapi/types/typefieldmappings.go +++ b/typedapi/types/typefieldmappings.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // TypeFieldMappings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_field_mapping/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/get_field_mapping/types.ts#L24-L26 type TypeFieldMappings struct { Mappings map[string]FieldMapping `json:"mappings"` } diff --git a/typedapi/types/typemapping.go b/typedapi/types/typemapping.go index 125cd22351..20217de08e 100644 --- a/typedapi/types/typemapping.go +++ b/typedapi/types/typemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // TypeMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/TypeMapping.ts#L34-L57 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/TypeMapping.ts#L34-L57 type TypeMapping struct { AllField *AllField `json:"all_field,omitempty"` DataStreamTimestamp_ *DataStreamTimestamp `json:"_data_stream_timestamp,omitempty"` diff --git a/typedapi/types/typequery.go b/typedapi/types/typequery.go index c1dd9a85bb..7e50f895e6 100644 --- a/typedapi/types/typequery.go +++ b/typedapi/types/typequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // TypeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L297-L299 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L298-L300 type TypeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/uaxemailurltokenizer.go b/typedapi/types/uaxemailurltokenizer.go index d6fa6ca6d2..b9e6fa255a 100644 --- a/typedapi/types/uaxemailurltokenizer.go +++ b/typedapi/types/uaxemailurltokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UaxEmailUrlTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L132-L135 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L132-L135 type UaxEmailUrlTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/unassignedinformation.go b/typedapi/types/unassignedinformation.go index e87c91dcc2..f81e8e60be 100644 --- a/typedapi/types/unassignedinformation.go +++ b/typedapi/types/unassignedinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // UnassignedInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/types.ts#L128-L136 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/allocation_explain/types.ts#L128-L136 type UnassignedInformation struct { AllocationStatus *string `json:"allocation_status,omitempty"` At DateTime `json:"at"` diff --git a/typedapi/types/uniquetokenfilter.go b/typedapi/types/uniquetokenfilter.go index 0d162b7cf9..5df56b6fb9 100644 --- a/typedapi/types/uniquetokenfilter.go +++ b/typedapi/types/uniquetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UniqueTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L441-L445 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L476-L480 type UniqueTokenFilter struct { // OnlyOnSamePosition If `true`, only remove duplicate tokens in the same position. Defaults to // `false`. diff --git a/typedapi/types/unmappedraretermsaggregate.go b/typedapi/types/unmappedraretermsaggregate.go index 6ceb324cb8..af40084dea 100644 --- a/typedapi/types/unmappedraretermsaggregate.go +++ b/typedapi/types/unmappedraretermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // UnmappedRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L493-L499 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L565-L571 type UnmappedRareTermsAggregate struct { Buckets BucketsVoid `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/unmappedsampleraggregate.go b/typedapi/types/unmappedsampleraggregate.go index 60dee067ff..982d19ea32 100644 --- a/typedapi/types/unmappedsampleraggregate.go +++ b/typedapi/types/unmappedsampleraggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // UnmappedSamplerAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L561-L562 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L633-L634 type UnmappedSamplerAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -197,6 +197,13 @@ func (s *UnmappedSamplerAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -225,6 +232,20 @@ func (s *UnmappedSamplerAggregate) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/unmappedsignificanttermsaggregate.go b/typedapi/types/unmappedsignificanttermsaggregate.go index ca9c92805c..4945a9c05a 100644 --- a/typedapi/types/unmappedsignificanttermsaggregate.go +++ b/typedapi/types/unmappedsignificanttermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UnmappedSignificantTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L692-L698 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L764-L770 type UnmappedSignificantTermsAggregate struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsVoid `json:"buckets"` diff --git a/typedapi/types/unmappedtermsaggregate.go b/typedapi/types/unmappedtermsaggregate.go index 7e1178ee5a..f1f600948b 100644 --- a/typedapi/types/unmappedtermsaggregate.go +++ b/typedapi/types/unmappedtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UnmappedTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L463-L469 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L535-L541 type UnmappedTermsAggregate struct { Buckets BucketsVoid `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` diff --git a/typedapi/types/unrateddocument.go b/typedapi/types/unrateddocument.go index 9e8903c623..df5cb1cd72 100644 --- a/typedapi/types/unrateddocument.go +++ b/typedapi/types/unrateddocument.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // UnratedDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L150-L153 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/rank_eval/types.ts#L150-L153 type UnratedDocument struct { Id_ string `json:"_id"` Index_ string `json:"_index"` diff --git a/typedapi/types/unsignedlongnumberproperty.go b/typedapi/types/unsignedlongnumberproperty.go index 2ad058ebe0..de41973991 100644 --- a/typedapi/types/unsignedlongnumberproperty.go +++ b/typedapi/types/unsignedlongnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -36,7 +36,7 @@ import ( // UnsignedLongNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L192-L195 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L193-L196 type UnsignedLongNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` diff --git a/typedapi/types/untypeddecayfunction.go b/typedapi/types/untypeddecayfunction.go index e73dc384ab..40b7657826 100644 --- a/typedapi/types/untypeddecayfunction.go +++ b/typedapi/types/untypeddecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -29,7 +29,7 @@ import ( // UntypedDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L204-L207 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/compound.ts#L206-L209 type UntypedDecayFunction struct { DecayFunctionBase map[string]DecayPlacement `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the diff --git a/typedapi/types/untypeddistancefeaturequery.go b/typedapi/types/untypeddistancefeaturequery.go index 0ab1a293bf..9d6f572b3a 100644 --- a/typedapi/types/untypeddistancefeaturequery.go +++ b/typedapi/types/untypeddistancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UntypedDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L61-L64 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/specialized.ts#L61-L64 type UntypedDistanceFeatureQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/untypedrangequery.go b/typedapi/types/untypedrangequery.go index 76ed13ed56..7eff1c14e2 100644 --- a/typedapi/types/untypedrangequery.go +++ b/typedapi/types/untypedrangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // UntypedRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L146-L155 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L147-L156 type UntypedRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/updateaction.go b/typedapi/types/updateaction.go index 6eab7a6de1..9b809ecb12 100644 --- a/typedapi/types/updateaction.go +++ b/typedapi/types/updateaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UpdateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L182-L217 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/types.ts#L182-L217 type UpdateAction struct { // DetectNoop If true, the `result` in the response is set to 'noop' when no changes to the // document occur. diff --git a/typedapi/types/updatebyqueryrethrottlenode.go b/typedapi/types/updatebyqueryrethrottlenode.go index 682fd7dafe..aa07654549 100644 --- a/typedapi/types/updatebyqueryrethrottlenode.go +++ b/typedapi/types/updatebyqueryrethrottlenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // UpdateByQueryRethrottleNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27 type UpdateByQueryRethrottleNode struct { Attributes map[string]string `json:"attributes"` Host string `json:"host"` diff --git a/typedapi/types/updateddatastreammappings.go b/typedapi/types/updateddatastreammappings.go new file mode 100644 index 0000000000..f4ea41dd76 --- /dev/null +++ b/typedapi/types/updateddatastreammappings.go @@ -0,0 +1,120 @@ +// 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. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// UpdatedDataStreamMappings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_mappings/IndicesPutDataStreamMappingsResponse.ts#L30-L51 +type UpdatedDataStreamMappings struct { + // AppliedToDataStream If the mappings were successfully applied to the data stream (or would have + // been, if running in `dry_run` + // mode), it is `true`. If an error occurred, it is `false`. + AppliedToDataStream bool `json:"applied_to_data_stream"` + // EffectiveMappings The mappings that are effective on this data stream, taking into account the + // mappings from the matching index + // template and the mappings specific to this data stream. + EffectiveMappings *TypeMapping `json:"effective_mappings,omitempty"` + // Error A message explaining why the mappings could not be applied to the data + // stream. + Error *string `json:"error,omitempty"` + // Mappings The mappings that are specfic to this data stream that will override any + // mappings from the matching index template. + Mappings *TypeMapping `json:"mappings,omitempty"` + // Name The data stream name. + Name string `json:"name"` +} + +func (s *UpdatedDataStreamMappings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "applied_to_data_stream": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "AppliedToDataStream", err) + } + s.AppliedToDataStream = value + case bool: + s.AppliedToDataStream = v + } + + case "effective_mappings": + if err := dec.Decode(&s.EffectiveMappings); err != nil { + return fmt.Errorf("%s | %w", "EffectiveMappings", err) + } + + case "error": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Error", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Error = &o + + case "mappings": + if err := dec.Decode(&s.Mappings); err != nil { + return fmt.Errorf("%s | %w", "Mappings", err) + } + + case "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + } + } + return nil +} + +// NewUpdatedDataStreamMappings returns a UpdatedDataStreamMappings. +func NewUpdatedDataStreamMappings() *UpdatedDataStreamMappings { + r := &UpdatedDataStreamMappings{} + + return r +} diff --git a/typedapi/types/updateddatastreamsettings.go b/typedapi/types/updateddatastreamsettings.go index ad6e3f5ef5..3eb0b3ec34 100644 --- a/typedapi/types/updateddatastreamsettings.go +++ b/typedapi/types/updateddatastreamsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UpdatedDataStreamSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L30-L55 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L30-L55 type UpdatedDataStreamSettings struct { // AppliedToDataStream If the settings were successfully applied to the data stream (or would have // been, if running in `dry_run` diff --git a/typedapi/types/updateoperation.go b/typedapi/types/updateoperation.go index de6661a1e7..3bddb21c28 100644 --- a/typedapi/types/updateoperation.go +++ b/typedapi/types/updateoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // UpdateOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L146-L156 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_global/bulk/types.ts#L146-L156 type UpdateOperation struct { // Id_ The document ID. Id_ *string `json:"_id,omitempty"` @@ -47,7 +47,7 @@ type UpdateOperation struct { // conflict. RetryOnConflict *int `json:"retry_on_conflict,omitempty"` // Routing A custom value used to route operations to a specific shard. - Routing *string `json:"routing,omitempty"` + Routing []string `json:"routing,omitempty"` Version *int64 `json:"version,omitempty"` VersionType *versiontype.VersionType `json:"version_type,omitempty"` } @@ -128,8 +128,19 @@ func (s *UpdateOperation) UnmarshalJSON(data []byte) error { } case "routing": - if err := dec.Decode(&s.Routing); err != nil { - return fmt.Errorf("%s | %w", "Routing", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } + + s.Routing = append(s.Routing, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Routing); err != nil { + return fmt.Errorf("%s | %w", "Routing", err) + } } case "version": diff --git a/typedapi/types/uppercaseprocessor.go b/typedapi/types/uppercaseprocessor.go index f613b69fb3..f14444be67 100644 --- a/typedapi/types/uppercaseprocessor.go +++ b/typedapi/types/uppercaseprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UppercaseProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1562-L1578 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1566-L1582 type UppercaseProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/uppercasetokenfilter.go b/typedapi/types/uppercasetokenfilter.go index 155c763bf4..a8cdaac345 100644 --- a/typedapi/types/uppercasetokenfilter.go +++ b/typedapi/types/uppercasetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // UppercaseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L447-L449 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L482-L484 type UppercaseTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/uripartsprocessor.go b/typedapi/types/uripartsprocessor.go index 87e7c5456d..ce09cf7c3b 100644 --- a/typedapi/types/uripartsprocessor.go +++ b/typedapi/types/uripartsprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UriPartsProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1598-L1624 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1602-L1628 type UriPartsProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/urldecodeprocessor.go b/typedapi/types/urldecodeprocessor.go index 04fb4294cb..fc90c36b6a 100644 --- a/typedapi/types/urldecodeprocessor.go +++ b/typedapi/types/urldecodeprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UrlDecodeProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1580-L1596 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L1584-L1600 type UrlDecodeProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/usagephase.go b/typedapi/types/usagephase.go index 325ba87323..36632c54ec 100644 --- a/typedapi/types/usagephase.go +++ b/typedapi/types/usagephase.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // UsagePhase type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L154-L157 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L154-L157 type UsagePhase struct { Actions []string `json:"actions"` MinAge int64 `json:"min_age"` diff --git a/typedapi/types/usagephases.go b/typedapi/types/usagephases.go index 2e8a9cc21b..ad2a355832 100644 --- a/typedapi/types/usagephases.go +++ b/typedapi/types/usagephases.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // UsagePhases type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L159-L165 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L159-L165 type UsagePhases struct { Cold *UsagePhase `json:"cold,omitempty"` Delete *UsagePhase `json:"delete,omitempty"` diff --git a/typedapi/types/usagestatsindex.go b/typedapi/types/usagestatsindex.go index 820ab35cd1..f1040ffb58 100644 --- a/typedapi/types/usagestatsindex.go +++ b/typedapi/types/usagestatsindex.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // UsageStatsIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L42-L44 type UsageStatsIndex struct { Shards []UsageStatsShards `json:"shards"` } diff --git a/typedapi/types/usagestatsshards.go b/typedapi/types/usagestatsshards.go index 442817644b..807ba567b4 100644 --- a/typedapi/types/usagestatsshards.go +++ b/typedapi/types/usagestatsshards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UsageStatsShards type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L46-L51 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L46-L51 type UsageStatsShards struct { Routing ShardRouting `json:"routing"` Stats IndicesShardsStats `json:"stats"` diff --git a/typedapi/types/user.go b/typedapi/types/user.go index ef6a8dec2c..4183621996 100644 --- a/typedapi/types/user.go +++ b/typedapi/types/user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // User type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/User.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/User.ts#L23-L31 type User struct { Email *string `json:"email,omitempty"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/useragentprocessor.go b/typedapi/types/useragentprocessor.go index d3f6a9844e..fa317e8481 100644 --- a/typedapi/types/useragentprocessor.go +++ b/typedapi/types/useragentprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // UserAgentProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L515-L546 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Processors.ts#L519-L550 type UserAgentProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. diff --git a/typedapi/types/userindicesprivileges.go b/typedapi/types/userindicesprivileges.go index 9ac51970b6..271efc4b50 100644 --- a/typedapi/types/userindicesprivileges.go +++ b/typedapi/types/userindicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // UserIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L294-L316 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/Privileges.ts#L294-L316 type UserIndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited diff --git a/typedapi/types/userprofile.go b/typedapi/types/userprofile.go index f30b915035..6c90efa17f 100644 --- a/typedapi/types/userprofile.go +++ b/typedapi/types/userprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UserProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/UserProfile.ts#L41-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/UserProfile.ts#L41-L47 type UserProfile struct { Data map[string]json.RawMessage `json:"data"` Enabled *bool `json:"enabled,omitempty"` diff --git a/typedapi/types/userprofilehitmetadata.go b/typedapi/types/userprofilehitmetadata.go index 7e875a578b..a5e18e44ef 100644 --- a/typedapi/types/userprofilehitmetadata.go +++ b/typedapi/types/userprofilehitmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UserProfileHitMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/UserProfile.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/UserProfile.ts#L27-L30 type UserProfileHitMetadata struct { PrimaryTerm_ int64 `json:"_primary_term"` SeqNo_ int64 `json:"_seq_no"` diff --git a/typedapi/types/userprofileuser.go b/typedapi/types/userprofileuser.go index c367e98786..262becbc71 100644 --- a/typedapi/types/userprofileuser.go +++ b/typedapi/types/userprofileuser.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UserProfileUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/UserProfile.ts#L32-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/UserProfile.ts#L32-L39 type UserProfileUser struct { Email *string `json:"email,omitempty"` FullName *string `json:"full_name,omitempty"` diff --git a/typedapi/types/userprofilewithmetadata.go b/typedapi/types/userprofilewithmetadata.go index 12d49b08e9..59b5eb831a 100644 --- a/typedapi/types/userprofilewithmetadata.go +++ b/typedapi/types/userprofilewithmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UserProfileWithMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/UserProfile.ts#L49-L52 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/_types/UserProfile.ts#L49-L52 type UserProfileWithMetadata struct { Data map[string]json.RawMessage `json:"data"` Doc_ UserProfileHitMetadata `json:"_doc"` diff --git a/typedapi/types/userquerycontainer.go b/typedapi/types/userquerycontainer.go index 072b763916..925f860681 100644 --- a/typedapi/types/userquerycontainer.go +++ b/typedapi/types/userquerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // UserQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_user/types.ts#L37-L101 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/query_user/types.ts#L37-L101 type UserQueryContainer struct { AdditionalUserQueryContainerProperty map[string]json.RawMessage `json:"-"` // Bool matches users matching boolean combinations of other queries. diff --git a/typedapi/types/userrealm.go b/typedapi/types/userrealm.go index 745626b2c7..a10bb1e777 100644 --- a/typedapi/types/userrealm.go +++ b/typedapi/types/userrealm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // UserRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/get_token/types.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/security/get_token/types.ts#L50-L53 type UserRealm struct { Name string `json:"name"` Type string `json:"type"` diff --git a/typedapi/types/validation.go b/typedapi/types/validation.go index 44c7c54806..2c3751fa33 100644 --- a/typedapi/types/validation.go +++ b/typedapi/types/validation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -28,7 +28,7 @@ package types // IncludedInValidation // RegexValidation // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L50-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/connector/_types/Connector.ts#L50-L56 type Validation any type ValidationVariant interface { diff --git a/typedapi/types/validationloss.go b/typedapi/types/validationloss.go index d9038eb7d2..cf2f33c4ab 100644 --- a/typedapi/types/validationloss.go +++ b/typedapi/types/validationloss.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ValidationLoss type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L571-L576 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/DataframeAnalytics.ts#L571-L576 type ValidationLoss struct { // FoldValues Validation loss values for every added decision tree during the forest // growing procedure. diff --git a/typedapi/types/valuecountaggregate.go b/typedapi/types/valuecountaggregate.go index f1e3c5e92d..6ca8f675a2 100644 --- a/typedapi/types/valuecountaggregate.go +++ b/typedapi/types/valuecountaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ValueCountAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L231-L236 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L236-L241 type ValueCountAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to diff --git a/typedapi/types/valuecountaggregation.go b/typedapi/types/valuecountaggregation.go index 2fa40ce73c..eaecce9942 100644 --- a/typedapi/types/valuecountaggregation.go +++ b/typedapi/types/valuecountaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ValueCountAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L457-L457 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L461-L461 type ValueCountAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/variablewidthhistogramaggregate.go b/typedapi/types/variablewidthhistogramaggregate.go index f91d679e5d..6f25155b9e 100644 --- a/typedapi/types/variablewidthhistogramaggregate.go +++ b/typedapi/types/variablewidthhistogramaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // VariableWidthHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L402-L404 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L474-L476 type VariableWidthHistogramAggregate struct { Buckets BucketsVariableWidthHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` diff --git a/typedapi/types/variablewidthhistogramaggregation.go b/typedapi/types/variablewidthhistogramaggregation.go index 178bf05a11..8071f39c2c 100644 --- a/typedapi/types/variablewidthhistogramaggregation.go +++ b/typedapi/types/variablewidthhistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // VariableWidthHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1091-L1115 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/bucket.ts#L1120-L1144 type VariableWidthHistogramAggregation struct { // Buckets The target number of buckets. Buckets *int `json:"buckets,omitempty"` diff --git a/typedapi/types/variablewidthhistogrambucket.go b/typedapi/types/variablewidthhistogrambucket.go index 22ba62f690..0cc7b2ccf1 100644 --- a/typedapi/types/variablewidthhistogrambucket.go +++ b/typedapi/types/variablewidthhistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // VariableWidthHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L406-L413 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L478-L485 type VariableWidthHistogramBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -281,6 +281,13 @@ func (s *VariableWidthHistogramBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "change_point": + o := NewChangePointAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "stats": o := NewStatsAggregate() if err := dec.Decode(&o); err != nil { @@ -309,6 +316,20 @@ func (s *VariableWidthHistogramBucket) UnmarshalJSON(data []byte) error { } s.Aggregations[elems[1]] = o + case "cartesian_bounds": + o := NewCartesianBoundsAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + + case "cartesian_centroid": + o := NewCartesianCentroidAggregate() + if err := dec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Aggregations", err) + } + s.Aggregations[elems[1]] = o + case "geo_bounds": o := NewGeoBoundsAggregate() if err := dec.Decode(&o); err != nil { diff --git a/typedapi/types/vector.go b/typedapi/types/vector.go index d489021008..9cdab84081 100644 --- a/typedapi/types/vector.go +++ b/typedapi/types/vector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Vector type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L460-L464 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L493-L497 type Vector struct { Available bool `json:"available"` DenseVectorDimsAvgCount int `json:"dense_vector_dims_avg_count"` diff --git a/typedapi/types/verifyindex.go b/typedapi/types/verifyindex.go index e099b5e29d..1424b484e2 100644 --- a/typedapi/types/verifyindex.go +++ b/typedapi/types/verifyindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // VerifyIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/recovery/types.ts#L111-L116 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/indices/recovery/types.ts#L111-L116 type VerifyIndex struct { CheckIndexTime Duration `json:"check_index_time,omitempty"` CheckIndexTimeInMillis int64 `json:"check_index_time_in_millis"` diff --git a/typedapi/types/versionproperty.go b/typedapi/types/versionproperty.go index aa5011b890..c45087f676 100644 --- a/typedapi/types/versionproperty.go +++ b/typedapi/types/versionproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // VersionProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L340-L342 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L353-L355 type VersionProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` diff --git a/typedapi/types/vertex.go b/typedapi/types/vertex.go index 9896ce6908..9a2ecfc1aa 100644 --- a/typedapi/types/vertex.go +++ b/typedapi/types/vertex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Vertex type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/_types/Vertex.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/graph/_types/Vertex.ts#L23-L28 type Vertex struct { Depth int64 `json:"depth"` Field string `json:"field"` diff --git a/typedapi/types/vertexdefinition.go b/typedapi/types/vertexdefinition.go index 1263333948..cba4cb2f29 100644 --- a/typedapi/types/vertexdefinition.go +++ b/typedapi/types/vertexdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // VertexDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/_types/Vertex.ts#L30-L59 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/graph/_types/Vertex.ts#L30-L59 type VertexDefinition struct { // Exclude Prevents the specified terms from being included in the results. Exclude []string `json:"exclude,omitempty"` diff --git a/typedapi/types/vertexinclude.go b/typedapi/types/vertexinclude.go index 4a0e85404e..98e2eefa08 100644 --- a/typedapi/types/vertexinclude.go +++ b/typedapi/types/vertexinclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // VertexInclude type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/_types/Vertex.ts#L61-L65 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/graph/_types/Vertex.ts#L61-L65 type VertexInclude struct { Boost *Float64 `json:"boost,omitempty"` Term string `json:"term"` diff --git a/typedapi/types/vocabulary.go b/typedapi/types/vocabulary.go index 73a5416ccc..2e148f84b5 100644 --- a/typedapi/types/vocabulary.go +++ b/typedapi/types/vocabulary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Vocabulary type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L248-L250 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L250-L252 type Vocabulary struct { Index string `json:"index"` } diff --git a/typedapi/types/voyageaiservicesettings.go b/typedapi/types/voyageaiservicesettings.go index 03ae27ed4e..0b67278de7 100644 --- a/typedapi/types/voyageaiservicesettings.go +++ b/typedapi/types/voyageaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // VoyageAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1616-L1647 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1913-L1944 type VoyageAIServiceSettings struct { // Dimensions The number of dimensions for resulting output embeddings. // This setting maps to `output_dimension` in the VoyageAI documentation. diff --git a/typedapi/types/voyageaitasksettings.go b/typedapi/types/voyageaitasksettings.go index 0dad0b6ae5..5845963ba6 100644 --- a/typedapi/types/voyageaitasksettings.go +++ b/typedapi/types/voyageaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // VoyageAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1649-L1673 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1946-L1970 type VoyageAITaskSettings struct { // InputType Type of the input text. // Permitted values: `ingest` (maps to `document` in the VoyageAI diff --git a/typedapi/types/waitforactiveshards.go b/typedapi/types/waitforactiveshards.go index 108b43f53e..5cc73ff44e 100644 --- a/typedapi/types/waitforactiveshards.go +++ b/typedapi/types/waitforactiveshards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // int // waitforactiveshardoptions.WaitForActiveShardOptions // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L139-L140 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/common.ts#L134-L135 type WaitForActiveShards any diff --git a/typedapi/types/waitfornodes.go b/typedapi/types/waitfornodes.go index 7313af97f9..be651aacd9 100644 --- a/typedapi/types/waitfornodes.go +++ b/typedapi/types/waitfornodes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -25,5 +25,5 @@ package types // string // int // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/health/types.ts#L47-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/cluster/health/types.ts#L47-L47 type WaitForNodes any diff --git a/typedapi/types/waitforsnapshotaction.go b/typedapi/types/waitforsnapshotaction.go index 2551643c7f..978b90314a 100644 --- a/typedapi/types/waitforsnapshotaction.go +++ b/typedapi/types/waitforsnapshotaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WaitForSnapshotAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L145-L147 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ilm/_types/Phase.ts#L148-L150 type WaitForSnapshotAction struct { Policy string `json:"policy"` } diff --git a/typedapi/types/warmerstats.go b/typedapi/types/warmerstats.go index ad934bc44b..58bdb5b63a 100644 --- a/typedapi/types/warmerstats.go +++ b/typedapi/types/warmerstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WarmerStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L437-L442 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Stats.ts#L437-L442 type WarmerStats struct { Current int64 `json:"current"` Total int64 `json:"total"` diff --git a/typedapi/types/watch.go b/typedapi/types/watch.go index 462bf9d223..db5b1657f4 100644 --- a/typedapi/types/watch.go +++ b/typedapi/types/watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // Watch type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Watch.ts#L37-L47 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Watch.ts#L37-L47 type Watch struct { Actions map[string]WatcherAction `json:"actions"` Condition WatcherCondition `json:"condition"` diff --git a/typedapi/types/watcher.go b/typedapi/types/watcher.go index 6473a37464..5a3ef5733a 100644 --- a/typedapi/types/watcher.go +++ b/typedapi/types/watcher.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Watcher type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L466-L470 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L499-L503 type Watcher struct { Available bool `json:"available"` Count Counter `json:"count"` diff --git a/typedapi/types/watcheraction.go b/typedapi/types/watcheraction.go index d9dd0416a3..841798b681 100644 --- a/typedapi/types/watcheraction.go +++ b/typedapi/types/watcheraction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // WatcherAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L35-L54 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L35-L54 type WatcherAction struct { ActionType *actiontype.ActionType `json:"action_type,omitempty"` Condition *WatcherCondition `json:"condition,omitempty"` diff --git a/typedapi/types/watcheractions.go b/typedapi/types/watcheractions.go index 2476f9c868..b909c693d0 100644 --- a/typedapi/types/watcheractions.go +++ b/typedapi/types/watcheractions.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // WatcherActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L402-L404 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L435-L437 type WatcherActions struct { Actions map[string]WatcherActionTotals `json:"actions"` } diff --git a/typedapi/types/watcheractiontotals.go b/typedapi/types/watcheractiontotals.go index 1bcc052701..f7f516031d 100644 --- a/typedapi/types/watcheractiontotals.go +++ b/typedapi/types/watcheractiontotals.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // WatcherActionTotals type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L418-L421 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L451-L454 type WatcherActionTotals struct { Total Duration `json:"total"` TotalTimeInMs int64 `json:"total_time_in_ms"` diff --git a/typedapi/types/watchercondition.go b/typedapi/types/watchercondition.go index a75c1301ca..4955ed2a9a 100644 --- a/typedapi/types/watchercondition.go +++ b/typedapi/types/watchercondition.go @@ -16,64 +16,30 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types import ( - "encoding/json" - "fmt" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/conditionop" ) // WatcherCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L51-L63 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Conditions.ts#L51-L63 type WatcherCondition struct { - AdditionalWatcherConditionProperty map[string]json.RawMessage `json:"-"` - Always *AlwaysCondition `json:"always,omitempty"` - ArrayCompare map[string]ArrayCompareCondition `json:"array_compare,omitempty"` - Compare map[string]map[conditionop.ConditionOp]FieldValue `json:"compare,omitempty"` - Never *NeverCondition `json:"never,omitempty"` - Script *ScriptCondition `json:"script,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s WatcherCondition) MarshalJSON() ([]byte, error) { - type opt WatcherCondition - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalWatcherConditionProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalWatcherConditionProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + Always *AlwaysCondition `json:"always,omitempty"` + ArrayCompare map[string]ArrayCompareCondition `json:"array_compare,omitempty"` + Compare map[string]map[conditionop.ConditionOp]FieldValue `json:"compare,omitempty"` + Never *NeverCondition `json:"never,omitempty"` + Script *ScriptCondition `json:"script,omitempty"` } // NewWatcherCondition returns a WatcherCondition. func NewWatcherCondition() *WatcherCondition { r := &WatcherCondition{ - AdditionalWatcherConditionProperty: make(map[string]json.RawMessage), - ArrayCompare: make(map[string]ArrayCompareCondition), - Compare: make(map[string]map[conditionop.ConditionOp]FieldValue), + ArrayCompare: make(map[string]ArrayCompareCondition), + Compare: make(map[string]map[conditionop.ConditionOp]FieldValue), } return r diff --git a/typedapi/types/watcherinput.go b/typedapi/types/watcherinput.go index e07ef45b98..ef868ffda4 100644 --- a/typedapi/types/watcherinput.go +++ b/typedapi/types/watcherinput.go @@ -16,60 +16,28 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types import ( "encoding/json" - "fmt" ) // WatcherInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L87-L95 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Input.ts#L87-L95 type WatcherInput struct { - AdditionalWatcherInputProperty map[string]json.RawMessage `json:"-"` - Chain *ChainInput `json:"chain,omitempty"` - Http *HttpInput `json:"http,omitempty"` - Search *SearchInput `json:"search,omitempty"` - Simple map[string]json.RawMessage `json:"simple,omitempty"` -} - -// MarhsalJSON overrides marshalling for types with additional properties -func (s WatcherInput) MarshalJSON() ([]byte, error) { - type opt WatcherInput - // We transform the struct to a map without the embedded additional properties map - tmp := make(map[string]any, 0) - - data, err := json.Marshal(opt(s)) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &tmp) - if err != nil { - return nil, err - } - - // We inline the additional fields from the underlying map - for key, value := range s.AdditionalWatcherInputProperty { - tmp[fmt.Sprintf("%s", key)] = value - } - delete(tmp, "AdditionalWatcherInputProperty") - - data, err = json.Marshal(tmp) - if err != nil { - return nil, err - } - - return data, nil + Chain *ChainInput `json:"chain,omitempty"` + Http *HttpInput `json:"http,omitempty"` + Search *SearchInput `json:"search,omitempty"` + Simple map[string]json.RawMessage `json:"simple,omitempty"` } // NewWatcherInput returns a WatcherInput. func NewWatcherInput() *WatcherInput { r := &WatcherInput{ - AdditionalWatcherInputProperty: make(map[string]json.RawMessage), - Simple: make(map[string]json.RawMessage), + Simple: make(map[string]json.RawMessage), } return r diff --git a/typedapi/types/watchernodestats.go b/typedapi/types/watchernodestats.go index 2d455421ec..762dd1139c 100644 --- a/typedapi/types/watchernodestats.go +++ b/typedapi/types/watchernodestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // WatcherNodeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/stats/types.ts#L33-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/stats/types.ts#L33-L61 type WatcherNodeStats struct { // CurrentWatches The current executing watches metric gives insight into the watches that are // currently being executed by Watcher. diff --git a/typedapi/types/watcherstatusactions.go b/typedapi/types/watcherstatusactions.go index 0329a73a67..3e8c7dbbcb 100644 --- a/typedapi/types/watcherstatusactions.go +++ b/typedapi/types/watcherstatusactions.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // WatcherStatusActions type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L56-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Action.ts#L56-L56 type WatcherStatusActions map[string]ActionStatus type WatcherStatusActionsVariant interface { diff --git a/typedapi/types/watcherwatch.go b/typedapi/types/watcherwatch.go index e363a228e7..db95fce4ea 100644 --- a/typedapi/types/watcherwatch.go +++ b/typedapi/types/watcherwatch.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // WatcherWatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L406-L411 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L439-L444 type WatcherWatch struct { Action map[string]Counter `json:"action,omitempty"` Condition map[string]Counter `json:"condition,omitempty"` diff --git a/typedapi/types/watcherwatchtrigger.go b/typedapi/types/watcherwatchtrigger.go index ade8509688..89b3c88eb2 100644 --- a/typedapi/types/watcherwatchtrigger.go +++ b/typedapi/types/watcherwatchtrigger.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // WatcherWatchTrigger type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L413-L416 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L446-L449 type WatcherWatchTrigger struct { All_ Counter `json:"_all"` Schedule *WatcherWatchTriggerSchedule `json:"schedule,omitempty"` diff --git a/typedapi/types/watcherwatchtriggerschedule.go b/typedapi/types/watcherwatchtriggerschedule.go index de60cd0553..03f720792d 100644 --- a/typedapi/types/watcherwatchtriggerschedule.go +++ b/typedapi/types/watcherwatchtriggerschedule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WatcherWatchTriggerSchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L472-L475 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L505-L508 type WatcherWatchTriggerSchedule struct { Active int64 `json:"active"` All_ Counter `json:"_all"` diff --git a/typedapi/types/watchrecord.go b/typedapi/types/watchrecord.go index c0009eac9a..3ae7c65556 100644 --- a/typedapi/types/watchrecord.go +++ b/typedapi/types/watchrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // WatchRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/execute_watch/types.ts#L27-L39 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/execute_watch/types.ts#L27-L39 type WatchRecord struct { Condition WatcherCondition `json:"condition"` Input WatcherInput `json:"input"` diff --git a/typedapi/types/watchrecordqueuedstats.go b/typedapi/types/watchrecordqueuedstats.go index c84beabcbc..f157451a30 100644 --- a/typedapi/types/watchrecordqueuedstats.go +++ b/typedapi/types/watchrecordqueuedstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // WatchRecordQueuedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/stats/types.ts#L71-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/stats/types.ts#L71-L77 type WatchRecordQueuedStats struct { // ExecutionTime The time the watch was run. // This is just before the input is being run. diff --git a/typedapi/types/watchrecordstats.go b/typedapi/types/watchrecordstats.go index d7559bf816..d97f196b1a 100644 --- a/typedapi/types/watchrecordstats.go +++ b/typedapi/types/watchrecordstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -32,7 +32,7 @@ import ( // WatchRecordStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/stats/types.ts#L79-L94 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/stats/types.ts#L79-L94 type WatchRecordStats struct { ExecutedActions []string `json:"executed_actions,omitempty"` // ExecutionPhase The current watch execution phase. diff --git a/typedapi/types/watchstatus.go b/typedapi/types/watchstatus.go index 49a5b56499..693fc012cc 100644 --- a/typedapi/types/watchstatus.go +++ b/typedapi/types/watchstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WatchStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Watch.ts#L49-L56 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Watch.ts#L49-L56 type WatchStatus struct { Actions WatcherStatusActions `json:"actions"` ExecutionState *string `json:"execution_state,omitempty"` diff --git a/typedapi/types/watsonxservicesettings.go b/typedapi/types/watsonxservicesettings.go index 6773292314..49e0ba266b 100644 --- a/typedapi/types/watsonxservicesettings.go +++ b/typedapi/types/watsonxservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WatsonxServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1684-L1722 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/inference/_types/CommonTypes.ts#L1981-L2019 type WatsonxServiceSettings struct { // ApiKey A valid API key of your Watsonx account. // You can find your Watsonx API keys or you can create a new one on the API diff --git a/typedapi/types/web.go b/typedapi/types/web.go index f42d8a9edf..a2232be620 100644 --- a/typedapi/types/web.go +++ b/typedapi/types/web.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // Web type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Database.ts#L61-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ingest/_types/Database.ts#L61-L61 type Web struct { } diff --git a/typedapi/types/webhookaction.go b/typedapi/types/webhookaction.go index ddab437e0e..4f75f22fdd 100644 --- a/typedapi/types/webhookaction.go +++ b/typedapi/types/webhookaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // WebhookAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L293-L293 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L293-L293 type WebhookAction struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` diff --git a/typedapi/types/webhookresult.go b/typedapi/types/webhookresult.go index 5c8e030e5e..6ea467b90d 100644 --- a/typedapi/types/webhookresult.go +++ b/typedapi/types/webhookresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // WebhookResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L295-L298 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/_types/Actions.ts#L295-L298 type WebhookResult struct { Request HttpInputRequestResult `json:"request"` Response *HttpInputResponseResult `json:"response,omitempty"` diff --git a/typedapi/types/weightedaverageaggregation.go b/typedapi/types/weightedaverageaggregation.go index f1c22e0c8b..07bbf44b77 100644 --- a/typedapi/types/weightedaverageaggregation.go +++ b/typedapi/types/weightedaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // WeightedAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L472-L486 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L476-L490 type WeightedAverageAggregation struct { // Format A numeric response formatter. Format *string `json:"format,omitempty"` diff --git a/typedapi/types/weightedaveragevalue.go b/typedapi/types/weightedaveragevalue.go index 0cf1994100..340e79ee6d 100644 --- a/typedapi/types/weightedaveragevalue.go +++ b/typedapi/types/weightedaveragevalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WeightedAverageValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L488-L498 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/metric.ts#L492-L502 type WeightedAverageValue struct { // Field The field from which to extract the values or weights. Field *string `json:"field,omitempty"` diff --git a/typedapi/types/weightedavgaggregate.go b/typedapi/types/weightedavgaggregate.go index aa43b2b09b..5d75bc10c2 100644 --- a/typedapi/types/weightedavgaggregate.go +++ b/typedapi/types/weightedavgaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WeightedAvgAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L224-L229 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/aggregations/Aggregate.ts#L229-L234 type WeightedAvgAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to diff --git a/typedapi/types/weightedtokensquery.go b/typedapi/types/weightedtokensquery.go index d5b42d5918..08bc74996a 100644 --- a/typedapi/types/weightedtokensquery.go +++ b/typedapi/types/weightedtokensquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WeightedTokensQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/WeightedTokensQuery.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/WeightedTokensQuery.ts#L25-L33 type WeightedTokensQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/weights.go b/typedapi/types/weights.go index 9a7c3d330e..deb8c3018a 100644 --- a/typedapi/types/weights.go +++ b/typedapi/types/weights.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // Weights type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L108-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/put_trained_model/types.ts#L108-L110 type Weights struct { Weights Float64 `json:"weights"` } diff --git a/typedapi/types/whitespaceanalyzer.go b/typedapi/types/whitespaceanalyzer.go index 5ceb7c8c50..37bd0b68f4 100644 --- a/typedapi/types/whitespaceanalyzer.go +++ b/typedapi/types/whitespaceanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -30,7 +30,7 @@ import ( // WhitespaceAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L421-L425 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/analyzers.ts#L421-L425 type WhitespaceAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` diff --git a/typedapi/types/whitespacetokenizer.go b/typedapi/types/whitespacetokenizer.go index 9ee4e021ab..0e40c51678 100644 --- a/typedapi/types/whitespacetokenizer.go +++ b/typedapi/types/whitespacetokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WhitespaceTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L137-L140 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/tokenizers.ts#L137-L140 type WhitespaceTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` diff --git a/typedapi/types/wildcardproperty.go b/typedapi/types/wildcardproperty.go index aceb1e5bda..c8a8ca4718 100644 --- a/typedapi/types/wildcardproperty.go +++ b/typedapi/types/wildcardproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -34,7 +34,7 @@ import ( // WildcardProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L344-L351 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/mapping/core.ts#L357-L364 type WildcardProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` diff --git a/typedapi/types/wildcardquery.go b/typedapi/types/wildcardquery.go index cbedbac5fa..31a792c8eb 100644 --- a/typedapi/types/wildcardquery.go +++ b/typedapi/types/wildcardquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WildcardQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L301-L321 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/term.ts#L302-L322 type WildcardQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/wktgeobounds.go b/typedapi/types/wktgeobounds.go index c93067ecf1..318d91f6ac 100644 --- a/typedapi/types/wktgeobounds.go +++ b/typedapi/types/wktgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WktGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L150-L152 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Geo.ts#L149-L151 type WktGeoBounds struct { Wkt string `json:"wkt"` } diff --git a/typedapi/types/worddelimitergraphtokenfilter.go b/typedapi/types/worddelimitergraphtokenfilter.go index 1ea473dd71..a983305e49 100644 --- a/typedapi/types/worddelimitergraphtokenfilter.go +++ b/typedapi/types/worddelimitergraphtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WordDelimiterGraphTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L205-L211 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L216-L222 type WordDelimiterGraphTokenFilter struct { // AdjustOffsets If `true`, the filter adjusts the offsets of split or catenated tokens to // better reflect their actual position in the token stream. Defaults to `true`. diff --git a/typedapi/types/worddelimitertokenfilter.go b/typedapi/types/worddelimitertokenfilter.go index 0e91a0d953..5fa6829de9 100644 --- a/typedapi/types/worddelimitertokenfilter.go +++ b/typedapi/types/worddelimitertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WordDelimiterTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L201-L203 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/analysis/token_filters.ts#L212-L214 type WordDelimiterTokenFilter struct { // CatenateAll If `true`, the filter produces catenated tokens for chains of alphanumeric // characters separated by non-alphabetic delimiters. Defaults to `false`. diff --git a/typedapi/types/wrapperquery.go b/typedapi/types/wrapperquery.go index 09f340640a..056f6478fc 100644 --- a/typedapi/types/wrapperquery.go +++ b/typedapi/types/wrapperquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WrapperQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/abstractions.ts#L508-L517 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/query_dsl/abstractions.ts#L508-L517 type WrapperQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. diff --git a/typedapi/types/writeresponsebase.go b/typedapi/types/writeresponsebase.go index 8fe06acb6f..1505682451 100644 --- a/typedapi/types/writeresponsebase.go +++ b/typedapi/types/writeresponsebase.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -28,14 +28,17 @@ import ( "io" "strconv" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/failurestorestatus" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/result" ) // WriteResponseBase type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Base.ts#L36-L67 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/_types/Base.ts#L37-L72 type WriteResponseBase struct { - ForcedRefresh *bool `json:"forced_refresh,omitempty"` + // FailureStore The role of the failure store in this document response + FailureStore *failurestorestatus.FailureStoreStatus `json:"failure_store,omitempty"` + ForcedRefresh *bool `json:"forced_refresh,omitempty"` // Id_ The unique identifier for the added document. Id_ string `json:"_id"` // Index_ The name of the index the document was added to. @@ -69,6 +72,11 @@ func (s *WriteResponseBase) UnmarshalJSON(data []byte) error { switch t { + case "failure_store": + if err := dec.Decode(&s.FailureStore); err != nil { + return fmt.Errorf("%s | %w", "FailureStore", err) + } + case "forced_refresh": var tmp any dec.Decode(&tmp) diff --git a/typedapi/types/writesummaryinfo.go b/typedapi/types/writesummaryinfo.go index e674f70c4b..ba800c09a3 100644 --- a/typedapi/types/writesummaryinfo.go +++ b/typedapi/types/writesummaryinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // WriteSummaryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L162-L191 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L162-L191 type WriteSummaryInfo struct { // Count The number of write operations performed in the test. Count int `json:"count"` diff --git a/typedapi/types/xlmrobertatokenizationconfig.go b/typedapi/types/xlmrobertatokenizationconfig.go index 2c4092a2b9..3a47b4579c 100644 --- a/typedapi/types/xlmrobertatokenizationconfig.go +++ b/typedapi/types/xlmrobertatokenizationconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -33,7 +33,7 @@ import ( // XlmRobertaTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L200-L200 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L200-L200 type XlmRobertaTokenizationConfig struct { // DoLowerCase Should the tokenizer lower case the text DoLowerCase *bool `json:"do_lower_case,omitempty"` diff --git a/typedapi/types/xpackdatafeed.go b/typedapi/types/xpackdatafeed.go index 7343c9b1a0..91338d3f68 100644 --- a/typedapi/types/xpackdatafeed.go +++ b/typedapi/types/xpackdatafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // XpackDatafeed type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L74-L76 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L74-L76 type XpackDatafeed struct { Count int64 `json:"count"` } diff --git a/typedapi/types/xpackfeature.go b/typedapi/types/xpackfeature.go index bf959f9659..e76b851745 100644 --- a/typedapi/types/xpackfeature.go +++ b/typedapi/types/xpackfeature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // XpackFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/info/types.ts#L84-L89 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/info/types.ts#L84-L89 type XpackFeature struct { Available bool `json:"available"` Description *string `json:"description,omitempty"` diff --git a/typedapi/types/xpackfeatures.go b/typedapi/types/xpackfeatures.go index 63addcee2a..940a74671e 100644 --- a/typedapi/types/xpackfeatures.go +++ b/typedapi/types/xpackfeatures.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types // XpackFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/info/types.ts#L42-L82 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/info/types.ts#L42-L82 type XpackFeatures struct { AggregateMetric XpackFeature `json:"aggregate_metric"` Analytics XpackFeature `json:"analytics"` diff --git a/typedapi/types/xpackquery.go b/typedapi/types/xpackquery.go index 6ec01335db..3022242494 100644 --- a/typedapi/types/xpackquery.go +++ b/typedapi/types/xpackquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // XpackQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L269-L274 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L269-L274 type XpackQuery struct { Count *int `json:"count,omitempty"` Failed *int `json:"failed,omitempty"` diff --git a/typedapi/types/xpackrealm.go b/typedapi/types/xpackrealm.go index fa878e7f53..d0968975c0 100644 --- a/typedapi/types/xpackrealm.go +++ b/typedapi/types/xpackrealm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // XpackRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L423-L432 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L456-L465 type XpackRealm struct { Available bool `json:"available"` Cache []RealmCache `json:"cache,omitempty"` diff --git a/typedapi/types/xpackrolemapping.go b/typedapi/types/xpackrolemapping.go index f377172e21..098d8154b4 100644 --- a/typedapi/types/xpackrolemapping.go +++ b/typedapi/types/xpackrolemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // XpackRoleMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L280-L283 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L280-L283 type XpackRoleMapping struct { Enabled int `json:"enabled"` Size int `json:"size"` diff --git a/typedapi/types/xpackruntimefieldtypes.go b/typedapi/types/xpackruntimefieldtypes.go index abeeed80c6..5d7d245ac6 100644 --- a/typedapi/types/xpackruntimefieldtypes.go +++ b/typedapi/types/xpackruntimefieldtypes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // XpackRuntimeFieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L285-L287 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/types.ts#L285-L287 type XpackRuntimeFieldTypes struct { Available bool `json:"available"` Enabled bool `json:"enabled"` diff --git a/typedapi/types/zeroshotclassificationinferenceoptions.go b/typedapi/types/zeroshotclassificationinferenceoptions.go index 6ca3e3d819..6ac7cc198a 100644 --- a/typedapi/types/zeroshotclassificationinferenceoptions.go +++ b/typedapi/types/zeroshotclassificationinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ZeroShotClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L216-L237 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L216-L239 type ZeroShotClassificationInferenceOptions struct { // ClassificationLabels The zero shot classification labels indicating entailment, neutral, and // contradiction diff --git a/typedapi/types/zeroshotclassificationinferenceupdateoptions.go b/typedapi/types/zeroshotclassificationinferenceupdateoptions.go index d9d934dc9b..cfc80b7b10 100644 --- a/typedapi/types/zeroshotclassificationinferenceupdateoptions.go +++ b/typedapi/types/zeroshotclassificationinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package types @@ -31,7 +31,7 @@ import ( // ZeroShotClassificationInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L393-L402 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/ml/_types/inference.ts#L397-L406 type ZeroShotClassificationInferenceUpdateOptions struct { // Labels The labels to predict. Labels []string `json:"labels"` diff --git a/typedapi/watcher/ackwatch/ack_watch.go b/typedapi/watcher/ackwatch/ack_watch.go index ba88dab782..a508024596 100644 --- a/typedapi/watcher/ackwatch/ack_watch.go +++ b/typedapi/watcher/ackwatch/ack_watch.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Acknowledge a watch. +// // Acknowledging a watch enables you to manually throttle the execution of the // watch's actions. // @@ -97,6 +98,7 @@ func NewAckWatchFunc(tp elastictransport.Interface) NewAckWatch { } // Acknowledge a watch. +// // Acknowledging a watch enables you to manually throttle the execution of the // watch's actions. // diff --git a/typedapi/watcher/ackwatch/response.go b/typedapi/watcher/ackwatch/response.go index a15e981d22..05b6690149 100644 --- a/typedapi/watcher/ackwatch/response.go +++ b/typedapi/watcher/ackwatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package ackwatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package ackwatch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/ack_watch/WatcherAckWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/ack_watch/WatcherAckWatchResponse.ts#L22-L24 type Response struct { Status types.WatchStatus `json:"status"` } diff --git a/typedapi/watcher/activatewatch/activate_watch.go b/typedapi/watcher/activatewatch/activate_watch.go index 29e0a4bfd4..ec3a5a72c9 100644 --- a/typedapi/watcher/activatewatch/activate_watch.go +++ b/typedapi/watcher/activatewatch/activate_watch.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Activate a watch. +// // A watch can be either active or inactive. package activatewatch @@ -78,6 +79,7 @@ func NewActivateWatchFunc(tp elastictransport.Interface) NewActivateWatch { } // Activate a watch. +// // A watch can be either active or inactive. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch diff --git a/typedapi/watcher/activatewatch/response.go b/typedapi/watcher/activatewatch/response.go index 0807f10412..9c75ed0b8c 100644 --- a/typedapi/watcher/activatewatch/response.go +++ b/typedapi/watcher/activatewatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package activatewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package activatewatch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/activate_watch/WatcherActivateWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/activate_watch/WatcherActivateWatchResponse.ts#L22-L24 type Response struct { Status types.ActivationStatus `json:"status"` } diff --git a/typedapi/watcher/deactivatewatch/deactivate_watch.go b/typedapi/watcher/deactivatewatch/deactivate_watch.go index dcb9030da6..b695701db4 100644 --- a/typedapi/watcher/deactivatewatch/deactivate_watch.go +++ b/typedapi/watcher/deactivatewatch/deactivate_watch.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Deactivate a watch. +// // A watch can be either active or inactive. package deactivatewatch @@ -78,6 +79,7 @@ func NewDeactivateWatchFunc(tp elastictransport.Interface) NewDeactivateWatch { } // Deactivate a watch. +// // A watch can be either active or inactive. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch diff --git a/typedapi/watcher/deactivatewatch/response.go b/typedapi/watcher/deactivatewatch/response.go index 16b2efd3c2..1fbb1b49f8 100644 --- a/typedapi/watcher/deactivatewatch/response.go +++ b/typedapi/watcher/deactivatewatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deactivatewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deactivatewatch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/deactivate_watch/DeactivateWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/deactivate_watch/DeactivateWatchResponse.ts#L22-L24 type Response struct { Status types.ActivationStatus `json:"status"` } diff --git a/typedapi/watcher/deletewatch/delete_watch.go b/typedapi/watcher/deletewatch/delete_watch.go index e7577d353f..7e76a47160 100644 --- a/typedapi/watcher/deletewatch/delete_watch.go +++ b/typedapi/watcher/deletewatch/delete_watch.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Delete a watch. +// // When the watch is removed, the document representing the watch in the // `.watches` index is gone and it will never be run again. // @@ -88,6 +89,7 @@ func NewDeleteWatchFunc(tp elastictransport.Interface) NewDeleteWatch { } // Delete a watch. +// // When the watch is removed, the document representing the watch in the // `.watches` index is gone and it will never be run again. // diff --git a/typedapi/watcher/deletewatch/response.go b/typedapi/watcher/deletewatch/response.go index dd46c8e3a5..acebb065a5 100644 --- a/typedapi/watcher/deletewatch/response.go +++ b/typedapi/watcher/deletewatch/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package deletewatch // Response holds the response body struct for the package deletewatch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/delete_watch/DeleteWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/delete_watch/DeleteWatchResponse.ts#L22-L24 type Response struct { Found bool `json:"found"` Id_ string `json:"_id"` diff --git a/typedapi/watcher/executewatch/execute_watch.go b/typedapi/watcher/executewatch/execute_watch.go index cca08d28e0..a56cd5532b 100644 --- a/typedapi/watcher/executewatch/execute_watch.go +++ b/typedapi/watcher/executewatch/execute_watch.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Run a watch. +// // This API can be used to force execution of the watch outside of its // triggering logic or to simulate the watch execution for debugging purposes. // @@ -106,6 +107,7 @@ func NewExecuteWatchFunc(tp elastictransport.Interface) NewExecuteWatch { } // Run a watch. +// // This API can be used to force execution of the watch outside of its // triggering logic or to simulate the watch execution for debugging purposes. // diff --git a/typedapi/watcher/executewatch/request.go b/typedapi/watcher/executewatch/request.go index 0461baf0c2..4f7528211d 100644 --- a/typedapi/watcher/executewatch/request.go +++ b/typedapi/watcher/executewatch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package executewatch @@ -30,9 +30,8 @@ import ( // Request holds the request body struct for the package executewatch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/execute_watch/WatcherExecuteWatchRequest.ts#L28-L107 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/execute_watch/WatcherExecuteWatchRequest.ts#L28-L108 type Request struct { - // ActionModes Determines how to handle the watch actions as part of the watch execution. ActionModes map[string]actionexecutionmode.ActionExecutionMode `json:"action_modes,omitempty"` // AlternativeInput When present, the watch uses this object as a payload instead of executing diff --git a/typedapi/watcher/executewatch/response.go b/typedapi/watcher/executewatch/response.go index c27f0a5d49..02c719894e 100644 --- a/typedapi/watcher/executewatch/response.go +++ b/typedapi/watcher/executewatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package executewatch @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package executewatch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/execute_watch/WatcherExecuteWatchResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/execute_watch/WatcherExecuteWatchResponse.ts#L23-L34 type Response struct { - // Id_ The watch record identifier as it would be stored in the `.watcher-history` // index. Id_ string `json:"_id"` diff --git a/typedapi/watcher/getsettings/get_settings.go b/typedapi/watcher/getsettings/get_settings.go index 459849f353..8557ff22fb 100644 --- a/typedapi/watcher/getsettings/get_settings.go +++ b/typedapi/watcher/getsettings/get_settings.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get Watcher index settings. +// // Get settings for the Watcher internal index (`.watches`). // Only a subset of settings are shown, for example `index.auto_expand_replicas` // and `index.number_of_replicas`. @@ -72,6 +73,7 @@ func NewGetSettingsFunc(tp elastictransport.Interface) NewGetSettings { } // Get Watcher index settings. +// // Get settings for the Watcher internal index (`.watches`). // Only a subset of settings are shown, for example `index.auto_expand_replicas` // and `index.number_of_replicas`. diff --git a/typedapi/watcher/getsettings/response.go b/typedapi/watcher/getsettings/response.go index 2e787cf6cd..601d2b6864 100644 --- a/typedapi/watcher/getsettings/response.go +++ b/typedapi/watcher/getsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/get_settings/WatcherGetSettingsResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/get_settings/WatcherGetSettingsResponse.ts#L22-L26 type Response struct { Index types.IndexSettings `json:"index"` } diff --git a/typedapi/watcher/getwatch/get_watch.go b/typedapi/watcher/getwatch/get_watch.go index 22da956dad..02e831dc42 100644 --- a/typedapi/watcher/getwatch/get_watch.go +++ b/typedapi/watcher/getwatch/get_watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get a watch. package getwatch diff --git a/typedapi/watcher/getwatch/response.go b/typedapi/watcher/getwatch/response.go index 813ec4c2df..222ff4b9df 100644 --- a/typedapi/watcher/getwatch/response.go +++ b/typedapi/watcher/getwatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package getwatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getwatch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/get_watch/GetWatchResponse.ts#L24-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/get_watch/GetWatchResponse.ts#L24-L34 type Response struct { Found bool `json:"found"` Id_ string `json:"_id"` diff --git a/typedapi/watcher/putwatch/put_watch.go b/typedapi/watcher/putwatch/put_watch.go index 309f97cf4e..444b1bc873 100644 --- a/typedapi/watcher/putwatch/put_watch.go +++ b/typedapi/watcher/putwatch/put_watch.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Create or update a watch. +// // When a watch is registered, a new document that represents the watch is added // to the `.watches` index and its trigger is immediately registered with the // relevant trigger engine. @@ -101,6 +102,7 @@ func NewPutWatchFunc(tp elastictransport.Interface) NewPutWatch { } // Create or update a watch. +// // When a watch is registered, a new document that represents the watch is added // to the `.watches` index and its trigger is immediately registered with the // relevant trigger engine. diff --git a/typedapi/watcher/putwatch/request.go b/typedapi/watcher/putwatch/request.go index f20526e544..f781d0e3a5 100644 --- a/typedapi/watcher/putwatch/request.go +++ b/typedapi/watcher/putwatch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putwatch @@ -32,9 +32,8 @@ import ( // Request holds the request body struct for the package putwatch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/put_watch/WatcherPutWatchRequest.ts#L31-L110 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/put_watch/WatcherPutWatchRequest.ts#L31-L111 type Request struct { - // Actions The list of actions that will be run if the condition matches. Actions map[string]types.WatcherAction `json:"actions,omitempty"` // Condition The condition that defines if the actions should be run. diff --git a/typedapi/watcher/putwatch/response.go b/typedapi/watcher/putwatch/response.go index 2943ac5bd2..7764cfba22 100644 --- a/typedapi/watcher/putwatch/response.go +++ b/typedapi/watcher/putwatch/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package putwatch // Response holds the response body struct for the package putwatch // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/put_watch/WatcherPutWatchResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/put_watch/WatcherPutWatchResponse.ts#L23-L31 type Response struct { Created bool `json:"created"` Id_ string `json:"_id"` diff --git a/typedapi/watcher/querywatches/query_watches.go b/typedapi/watcher/querywatches/query_watches.go index 4db81cc905..89961316ca 100644 --- a/typedapi/watcher/querywatches/query_watches.go +++ b/typedapi/watcher/querywatches/query_watches.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Query watches. +// // Get all registered watches in a paginated manner and optionally filter // watches by a query. // @@ -78,6 +79,7 @@ func NewQueryWatchesFunc(tp elastictransport.Interface) NewQueryWatches { } // Query watches. +// // Get all registered watches in a paginated manner and optionally filter // watches by a query. // diff --git a/typedapi/watcher/querywatches/request.go b/typedapi/watcher/querywatches/request.go index dd063ce337..2e0f3bb262 100644 --- a/typedapi/watcher/querywatches/request.go +++ b/typedapi/watcher/querywatches/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package querywatches @@ -33,9 +33,8 @@ import ( // Request holds the request body struct for the package querywatches // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts#L25-L70 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts#L25-L71 type Request struct { - // From The offset from the first result to fetch. // It must be non-negative. From *int `json:"from,omitempty"` diff --git a/typedapi/watcher/querywatches/response.go b/typedapi/watcher/querywatches/response.go index 699cd30d4a..539e44ec56 100644 --- a/typedapi/watcher/querywatches/response.go +++ b/typedapi/watcher/querywatches/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package querywatches @@ -26,9 +26,8 @@ import ( // Response holds the response body struct for the package querywatches // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/query_watches/WatcherQueryWatchesResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/query_watches/WatcherQueryWatchesResponse.ts#L23-L34 type Response struct { - // Count The total number of watches found. Count int `json:"count"` // Watches A list of watches based on the `from`, `size`, or `search_after` request body diff --git a/typedapi/watcher/start/response.go b/typedapi/watcher/start/response.go index 10c67de582..854e33fe3b 100644 --- a/typedapi/watcher/start/response.go +++ b/typedapi/watcher/start/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/start/WatcherStartResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/start/WatcherStartResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/watcher/start/start.go b/typedapi/watcher/start/start.go index 9cd6693800..337302dee4 100644 --- a/typedapi/watcher/start/start.go +++ b/typedapi/watcher/start/start.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Start the watch service. +// // Start the Watcher service if it is not already running. package start @@ -70,6 +71,7 @@ func NewStartFunc(tp elastictransport.Interface) NewStart { } // Start the watch service. +// // Start the Watcher service if it is not already running. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start diff --git a/typedapi/watcher/stats/response.go b/typedapi/watcher/stats/response.go index bf0b594dda..086f08255a 100644 --- a/typedapi/watcher/stats/response.go +++ b/typedapi/watcher/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/stats/WatcherStatsResponse.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/stats/WatcherStatsResponse.ts#L24-L32 type Response struct { ClusterName string `json:"cluster_name"` ManuallyStopped bool `json:"manually_stopped"` diff --git a/typedapi/watcher/stats/stats.go b/typedapi/watcher/stats/stats.go index f3f705a07f..54491f2d40 100644 --- a/typedapi/watcher/stats/stats.go +++ b/typedapi/watcher/stats/stats.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get Watcher statistics. +// // This API always returns basic metrics. // You retrieve more metrics by using the metric parameter. package stats @@ -77,6 +78,7 @@ func NewStatsFunc(tp elastictransport.Interface) NewStats { } // Get Watcher statistics. +// // This API always returns basic metrics. // You retrieve more metrics by using the metric parameter. // diff --git a/typedapi/watcher/stop/response.go b/typedapi/watcher/stop/response.go index 0851367c1c..d54ced5fd0 100644 --- a/typedapi/watcher/stop/response.go +++ b/typedapi/watcher/stop/response.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/stop/WatcherStopResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/stop/WatcherStopResponse.ts#L22-L25 type Response struct { - // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/watcher/stop/stop.go b/typedapi/watcher/stop/stop.go index f8886617d0..a888151baa 100644 --- a/typedapi/watcher/stop/stop.go +++ b/typedapi/watcher/stop/stop.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Stop the watch service. +// // Stop the Watcher service if it is running. package stop @@ -70,6 +71,7 @@ func NewStopFunc(tp elastictransport.Interface) NewStop { } // Stop the watch service. +// // Stop the Watcher service if it is running. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop diff --git a/typedapi/watcher/updatesettings/request.go b/typedapi/watcher/updatesettings/request.go index 3aae9f298d..c5c1029efb 100644 --- a/typedapi/watcher/updatesettings/request.go +++ b/typedapi/watcher/updatesettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatesettings @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/update_settings/WatcherUpdateSettingsRequest.ts#L24-L61 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/update_settings/WatcherUpdateSettingsRequest.ts#L24-L63 type Request struct { IndexAutoExpandReplicas *string `json:"index.auto_expand_replicas,omitempty"` IndexNumberOfReplicas *int `json:"index.number_of_replicas,omitempty"` diff --git a/typedapi/watcher/updatesettings/response.go b/typedapi/watcher/updatesettings/response.go index 6944453ca2..5716ea8e1c 100644 --- a/typedapi/watcher/updatesettings/response.go +++ b/typedapi/watcher/updatesettings/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package updatesettings // Response holds the response body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/update_settings/WatcherUpdateSettingsResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/watcher/update_settings/WatcherUpdateSettingsResponse.ts#L20-L24 type Response struct { Acknowledged bool `json:"acknowledged"` } diff --git a/typedapi/watcher/updatesettings/update_settings.go b/typedapi/watcher/updatesettings/update_settings.go index 7aeac2c4cb..80dda4550f 100644 --- a/typedapi/watcher/updatesettings/update_settings.go +++ b/typedapi/watcher/updatesettings/update_settings.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Update Watcher index settings. +// // Update settings for the Watcher internal index (`.watches`). // Only a subset of settings can be modified. // This includes `index.auto_expand_replicas`, `index.number_of_replicas`, @@ -83,6 +84,7 @@ func NewUpdateSettingsFunc(tp elastictransport.Interface) NewUpdateSettings { } // Update Watcher index settings. +// // Update settings for the Watcher internal index (`.watches`). // Only a subset of settings can be modified. // This includes `index.auto_expand_replicas`, `index.number_of_replicas`, diff --git a/typedapi/xpack/info/info.go b/typedapi/xpack/info/info.go index 3950b96ee9..cbe7d05b50 100644 --- a/typedapi/xpack/info/info.go +++ b/typedapi/xpack/info/info.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get information. +// // The information provided by the API includes: // // * Build information including the build number and timestamp. @@ -76,6 +77,7 @@ func NewInfoFunc(tp elastictransport.Interface) NewInfo { } // Get information. +// // The information provided by the API includes: // // * Build information including the build number and timestamp. diff --git a/typedapi/xpack/info/response.go b/typedapi/xpack/info/response.go index ea19475c7d..e496a21d22 100644 --- a/typedapi/xpack/info/response.go +++ b/typedapi/xpack/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/info/XPackInfoResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/info/XPackInfoResponse.ts#L22-L29 type Response struct { Build types.BuildInformation `json:"build"` Features types.XpackFeatures `json:"features"` diff --git a/typedapi/xpack/usage/response.go b/typedapi/xpack/usage/response.go index b8f570981e..f769cbfd4e 100644 --- a/typedapi/xpack/usage/response.go +++ b/typedapi/xpack/usage/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c package usage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package usage // -// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/XPackUsageResponse.ts#L42-L77 +// https://github.com/elastic/elasticsearch-specification/blob/aa1459fbdcaf57c653729142b3b6e9982373bb1c/specification/xpack/usage/XPackUsageResponse.ts#L42-L77 type Response struct { AggregateMetric types.Base `json:"aggregate_metric"` Analytics types.Analytics `json:"analytics"` diff --git a/typedapi/xpack/usage/usage.go b/typedapi/xpack/usage/usage.go index 2f69e5231f..2135f90b98 100644 --- a/typedapi/xpack/usage/usage.go +++ b/typedapi/xpack/usage/usage.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e +// https://github.com/elastic/elasticsearch-specification/tree/aa1459fbdcaf57c653729142b3b6e9982373bb1c // Get usage information. +// // Get information about the features that are currently enabled and available // under the current license. // The API also provides some usage statistics. @@ -72,6 +73,7 @@ func NewUsageFunc(tp elastictransport.Interface) NewUsage { } // Get usage information. +// // Get information about the features that are currently enabled and available // under the current license. // The API also provides some usage statistics. From 5537183906213e0bf55a71e8e8f29f1b7185afdb Mon Sep 17 00:00:00 2001 From: Matt Devy Date: Wed, 26 Nov 2025 20:43:26 +0000 Subject: [PATCH 2/9] chore: update skip list --- .../cmd/generate/commands/gentests/skips.go | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/internal/build/cmd/generate/commands/gentests/skips.go b/internal/build/cmd/generate/commands/gentests/skips.go index 4689383be9..b9d862559c 100644 --- a/internal/build/cmd/generate/commands/gentests/skips.go +++ b/internal/build/cmd/generate/commands/gentests/skips.go @@ -19,8 +19,9 @@ package gentests import ( "fmt" - "gopkg.in/yaml.v2" "strings" + + "gopkg.in/yaml.v2" ) var skipTests map[string][]string @@ -80,8 +81,12 @@ var skipFiles = []string{ "update/100_synthetic_source.yml", "tsdb/160_nested_fields.yml", "tsdb/90_unsupported_operations.yml", + "cluster.component_template/.*.yml", + "indices.put_index_template/.*.yml", + "ml/forecast.yml", ".*inference/.*.yml", // incompatible inference tests ".*mustache/.*.yml", // incompatible mustache tests + "data_stream/240_data_stream_settings.yml", } // TODO: Comments into descriptions for `Skip()` @@ -466,12 +471,6 @@ data_streams/10_data_stream_resolvability.yml: data_stream/230_data_stream_options.yml: - Test partially resetting failure store options in template composition -data_stream/240_data_stream_settings.yml: - - Test single data stream - - Test dry run - - Test null out settings - - Test null out settings component templates only - # Error: constant 9223372036854775808 overflows int (https://play.golang.org/p/7pUdz-_Pdom) unsigned_long/10_basic.yml: unsigned_long/20_null_value.yml: @@ -662,4 +661,30 @@ search.vectors/41_knn_search_half_byte_quantized.yml: tsdb/25_id_generation.yml: - delete over _bulk + +# Data stream mappings tests failing in Go test suite +data_stream/250_data_stream_mappings.yml: + - "Test single data stream" + - "Test mappings component templates only" + +# Data streams stats failing for multiple data streams scenario +data_stream/120_data_streams_stats.yml: + - "Multiple data stream" + +# Search vectors synthetic dense vectors failures (include and update cases) +search.vectors/240_source_synthetic_dense_vectors.yml: + - "include synthetic vectors" + - "Bulk partial update with synthetic vectors" + - "Partial update with synthetic vectors" + +# Search vectors synthetic sparse vectors failures (include and update cases) +search.vectors/250_source_synthetic_sparse_vectors.yml: + - "include synthetic vectors" + - "Bulk partial update with synthetic vectors" + - "Partial update with synthetic vectors" + +rank_vectors/rank_vectors_synthetic_vectors.yml: + - "include synthetic vectors" + - "Bulk partial update with synthetic vectors" + - "Partial update with synthetic vectors" ` From 59b817d9ed4400ef6c33872dd9de5b6a5a0e47f4 Mon Sep 17 00:00:00 2001 From: Matt Devy Date: Wed, 26 Nov 2025 21:08:35 +0000 Subject: [PATCH 3/9] chore: update version.go --- internal/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/version/version.go b/internal/version/version.go index 2859188c82..c58218b073 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -21,4 +21,4 @@ package version const Client = Version // Version is the version of the client. -const Version = "9.1.0-SNAPSHOT" +const Version = "9.3.0-SNAPSHOT" From e146d18259915a25b5441ce1b9173ccb41955c4b Mon Sep 17 00:00:00 2001 From: Matt Devy Date: Wed, 26 Nov 2025 21:42:29 +0000 Subject: [PATCH 4/9] chore: update esapi 9.3.0-SNAPSHOT --- esapi/api._.go | 310 +++++++++------- esapi/api.bulk.go | 16 +- esapi/api.capabilities.go | 2 +- esapi/api.cat.aliases.go | 38 +- esapi/api.cat.allocation.go | 18 +- esapi/api.cat.circuit_breaker.go | 345 ++++++++++++++++++ esapi/api.cat.component_templates.go | 30 +- esapi/api.cat.count.go | 52 ++- esapi/api.cat.fielddata.go | 18 +- esapi/api.cat.health.go | 18 +- esapi/api.cat.help.go | 6 +- esapi/api.cat.indices.go | 14 +- esapi/api.cat.master.go | 30 +- esapi/api.cat.nodeattrs.go | 30 +- esapi/api.cat.nodes.go | 6 +- esapi/api.cat.pending_tasks.go | 18 +- esapi/api.cat.plugins.go | 30 +- esapi/api.cat.recovery.go | 6 +- esapi/api.cat.repositories.go | 30 +- esapi/api.cat.segments.go | 94 ++++- esapi/api.cat.shards.go | 6 +- esapi/api.cat.snapshots.go | 18 +- esapi/api.cat.tasks.go | 18 +- esapi/api.cat.templates.go | 30 +- esapi/api.cat.thread_pool.go | 19 +- esapi/api.clear_scroll.go | 6 +- esapi/api.cluster.allocation_explain.go | 54 ++- .../api.cluster.delete_component_template.go | 23 +- ...cluster.delete_voting_config_exclusions.go | 6 +- .../api.cluster.exists_component_template.go | 23 +- esapi/api.cluster.get_component_template.go | 20 +- esapi/api.cluster.get_settings.go | 6 +- esapi/api.cluster.health.go | 14 +- esapi/api.cluster.info.go | 6 +- esapi/api.cluster.pending_tasks.go | 7 +- ...i.cluster.post_voting_config_exclusions.go | 6 +- esapi/api.cluster.put_component_template.go | 6 +- esapi/api.cluster.put_settings.go | 6 +- esapi/api.cluster.remote_info.go | 6 +- esapi/api.cluster.reroute.go | 6 +- esapi/api.cluster.state.go | 16 +- esapi/api.cluster.stats.go | 6 +- esapi/api.connector.check_in.go | 6 +- esapi/api.connector.delete.go | 8 +- esapi/api.connector.get.go | 8 +- esapi/api.connector.last_sync.go | 6 +- esapi/api.connector.list.go | 8 +- esapi/api.connector.post.go | 8 +- esapi/api.connector.put.go | 8 +- esapi/api.connector.secret_delete.go | 4 +- esapi/api.connector.secret_get.go | 4 +- esapi/api.connector.secret_post.go | 4 +- esapi/api.connector.secret_put.go | 4 +- esapi/api.connector.sync_job_cancel.go | 8 +- esapi/api.connector.sync_job_check_in.go | 6 +- esapi/api.connector.sync_job_claim.go | 6 +- esapi/api.connector.sync_job_delete.go | 8 +- esapi/api.connector.sync_job_error.go | 6 +- esapi/api.connector.sync_job_get.go | 8 +- esapi/api.connector.sync_job_list.go | 10 +- esapi/api.connector.sync_job_post.go | 8 +- esapi/api.connector.sync_job_update_stats.go | 6 +- .../api.connector.update_active_filtering.go | 6 +- esapi/api.connector.update_api_key_id.go | 8 +- esapi/api.connector.update_configuration.go | 8 +- esapi/api.connector.update_error.go | 6 +- esapi/api.connector.update_features.go | 6 +- esapi/api.connector.update_filtering.go | 8 +- ...i.connector.update_filtering_validation.go | 6 +- esapi/api.connector.update_index_name.go | 8 +- esapi/api.connector.update_name.go | 8 +- esapi/api.connector.update_native.go | 8 +- esapi/api.connector.update_pipeline.go | 8 +- esapi/api.connector.update_scheduling.go | 8 +- esapi/api.connector.update_service_type.go | 8 +- esapi/api.connector.update_status.go | 6 +- esapi/api.count.go | 35 +- esapi/api.create.go | 16 +- ....dangling_indices.delete_dangling_index.go | 6 +- ....dangling_indices.import_dangling_index.go | 6 +- ....dangling_indices.list_dangling_indices.go | 6 +- esapi/api.delete.go | 14 +- esapi/api.delete_by_query.go | 14 +- esapi/api.delete_by_query_rethrottle.go | 6 +- esapi/api.delete_script.go | 6 +- esapi/api.exists.go | 14 +- esapi/api.exists_source.go | 14 +- esapi/api.explain.go | 14 +- esapi/api.features.get_features.go | 6 +- esapi/api.features.reset_features.go | 6 +- esapi/api.field_caps.go | 26 +- esapi/api.fleet.delete_secret.go | 4 +- esapi/api.fleet.get_secret.go | 4 +- esapi/api.fleet.global_checkpoints.go | 6 +- esapi/api.fleet.msearch.go | 4 +- esapi/api.fleet.post_secret.go | 4 +- esapi/api.fleet.search.go | 17 +- esapi/api.get.go | 26 +- esapi/api.get_script.go | 6 +- esapi/api.get_script_context.go | 6 +- esapi/api.get_script_languages.go | 6 +- esapi/api.get_source.go | 14 +- esapi/api.health_report.go | 20 +- esapi/api.index.go | 14 +- esapi/api.indices.add_block.go | 14 +- esapi/api.indices.analyze.go | 19 +- esapi/api.indices.cancel_migrate_reindex.go | 25 +- esapi/api.indices.clear_cache.go | 14 +- esapi/api.indices.clone.go | 6 +- esapi/api.indices.close.go | 14 +- esapi/api.indices.create.go | 6 +- esapi/api.indices.create_from.go | 8 +- esapi/api.indices.delete.go | 14 +- esapi/api.indices.delete_alias.go | 6 +- esapi/api.indices.delete_data_lifecycle.go | 14 +- esapi/api.indices.delete_index_template.go | 23 +- ...api.indices.delete_sample_configuration.go | 253 +++++++++++++ esapi/api.indices.delete_template.go | 6 +- esapi/api.indices.disk_usage.go | 31 +- esapi/api.indices.downsample.go | 4 +- esapi/api.indices.exists.go | 14 +- esapi/api.indices.exists_alias.go | 14 +- esapi/api.indices.exists_index_template.go | 6 +- esapi/api.indices.exists_template.go | 6 +- esapi/api.indices.explain_data_lifecycle.go | 23 +- esapi/api.indices.field_usage_stats.go | 31 +- esapi/api.indices.flush.go | 14 +- esapi/api.indices.forcemerge.go | 14 +- esapi/api.indices.get.go | 22 +- esapi/api.indices.get_alias.go | 14 +- ...pi.indices.get_all_sample_configuration.go | 231 ++++++++++++ esapi/api.indices.get_data_lifecycle.go | 14 +- esapi/api.indices.get_data_lifecycle_stats.go | 6 +- esapi/api.indices.get_field_mapping.go | 14 +- esapi/api.indices.get_index_template.go | 6 +- esapi/api.indices.get_mapping.go | 14 +- .../api.indices.get_migrate_reindex_status.go | 25 +- esapi/api.indices.get_sample.go | 225 ++++++++++++ esapi/api.indices.get_sample_configuration.go | 241 ++++++++++++ esapi/api.indices.get_sample_stats.go | 227 ++++++++++++ esapi/api.indices.get_settings.go | 14 +- esapi/api.indices.get_template.go | 6 +- esapi/api.indices.migrate_reindex.go | 8 +- esapi/api.indices.modify_data_stream.go | 6 +- esapi/api.indices.open.go | 14 +- esapi/api.indices.put_alias.go | 6 +- esapi/api.indices.put_data_lifecycle.go | 27 +- esapi/api.indices.put_data_stream_mappings.go | 279 ++++++++++++++ esapi/api.indices.put_data_stream_options.go | 27 +- esapi/api.indices.put_data_stream_settings.go | 23 +- esapi/api.indices.put_index_template.go | 6 +- esapi/api.indices.put_mapping.go | 14 +- esapi/api.indices.put_sample_configuration.go | 263 +++++++++++++ esapi/api.indices.put_settings.go | 14 +- esapi/api.indices.put_template.go | 6 +- esapi/api.indices.recovery.go | 14 +- esapi/api.indices.refresh.go | 14 +- esapi/api.indices.remove_block.go | 14 +- esapi/api.indices.resolve_cluster.go | 14 +- esapi/api.indices.resolve_index.go | 38 +- esapi/api.indices.rollover.go | 7 +- esapi/api.indices.segments.go | 14 +- esapi/api.indices.shard_stores.go | 14 +- esapi/api.indices.shrink.go | 19 +- esapi/api.indices.simulate_index_template.go | 6 +- esapi/api.indices.simulate_template.go | 6 +- esapi/api.indices.split.go | 19 +- esapi/api.indices.stats.go | 14 +- esapi/api.indices.update_aliases.go | 6 +- esapi/api.indices.validate_query.go | 14 +- .../api.inference.chat_completion_unified.go | 23 +- esapi/api.inference.completion.go | 25 +- esapi/api.inference.delete.go | 4 +- esapi/api.inference.get.go | 4 +- esapi/api.inference.inference.go | 31 +- esapi/api.inference.put.go | 31 +- esapi/api.inference.put_ai21.go | 253 +++++++++++++ esapi/api.inference.put_alibabacloud.go | 25 +- esapi/api.inference.put_amazonbedrock.go | 25 +- esapi/api.inference.put_amazonsagemaker.go | 25 +- esapi/api.inference.put_anthropic.go | 25 +- esapi/api.inference.put_azureaistudio.go | 25 +- esapi/api.inference.put_azureopenai.go | 25 +- esapi/api.inference.put_cohere.go | 25 +- esapi/api.inference.put_contextualai.go | 253 +++++++++++++ esapi/api.inference.put_custom.go | 17 +- esapi/api.inference.put_deepseek.go | 25 +- esapi/api.inference.put_elasticsearch.go | 25 +- esapi/api.inference.put_elser.go | 25 +- esapi/api.inference.put_googleaistudio.go | 25 +- esapi/api.inference.put_googlevertexai.go | 25 +- esapi/api.inference.put_hugging_face.go | 25 +- esapi/api.inference.put_jinaai.go | 25 +- esapi/api.inference.put_llama.go | 253 +++++++++++++ esapi/api.inference.put_mistral.go | 25 +- esapi/api.inference.put_openai.go | 25 +- esapi/api.inference.put_openshift_ai.go | 253 +++++++++++++ esapi/api.inference.put_voyageai.go | 25 +- esapi/api.inference.put_watsonx.go | 25 +- esapi/api.inference.rerank.go | 25 +- esapi/api.inference.sparse_embedding.go | 25 +- esapi/api.inference.stream_completion.go | 25 +- esapi/api.inference.text_embedding.go | 25 +- esapi/api.inference.update.go | 19 +- esapi/api.info.go | 6 +- esapi/api.ingest.delete_geoip_database.go | 6 +- .../api.ingest.delete_ip_location_database.go | 6 +- esapi/api.ingest.delete_pipeline.go | 6 +- esapi/api.ingest.geo_ip_stats.go | 6 +- esapi/api.ingest.get_geoip_database.go | 6 +- esapi/api.ingest.get_ip_location_database.go | 6 +- esapi/api.ingest.get_pipeline.go | 6 +- esapi/api.ingest.processor_grok.go | 6 +- esapi/api.ingest.put_geoip_database.go | 6 +- esapi/api.ingest.put_ip_location_database.go | 6 +- esapi/api.ingest.put_pipeline.go | 6 +- esapi/api.ingest.simulate.go | 6 +- esapi/api.mget.go | 14 +- esapi/api.msearch.go | 28 +- esapi/api.msearch_template.go | 18 +- esapi/api.mtermvectors.go | 14 +- ...des.clear_repositories_metering_archive.go | 6 +- ...pi.nodes.get_repositories_metering_info.go | 6 +- esapi/api.nodes.hot_threads.go | 6 +- esapi/api.nodes.info.go | 6 +- esapi/api.nodes.reload_secure_settings.go | 6 +- esapi/api.nodes.stats.go | 6 +- esapi/api.nodes.usage.go | 6 +- esapi/api.ping.go | 6 +- esapi/api.profiling.stacktraces.go | 4 +- esapi/api.profiling.status.go | 4 +- esapi/api.profiling.topn_functions.go | 4 +- esapi/api.project.tags.go | 215 +++++++++++ esapi/api.put_script.go | 6 +- esapi/api.query_rules.delete_rule.go | 6 +- esapi/api.query_rules.delete_ruleset.go | 6 +- esapi/api.query_rules.get_rule.go | 6 +- esapi/api.query_rules.get_ruleset.go | 6 +- esapi/api.query_rules.list_rulesets.go | 6 +- esapi/api.query_rules.put_rule.go | 6 +- esapi/api.query_rules.put_ruleset.go | 6 +- esapi/api.query_rules.test.go | 8 +- esapi/api.rank_eval.go | 14 +- esapi/api.reindex.go | 8 +- esapi/api.reindex_rethrottle.go | 6 +- esapi/api.render_search_template.go | 19 +- esapi/api.scripts_painless_execute.go | 19 +- esapi/api.scroll.go | 6 +- esapi/api.search.go | 40 +- esapi/api.search_application.delete.go | 8 +- ...application.delete_behavioral_analytics.go | 6 +- esapi/api.search_application.get.go | 8 +- ...ch_application.get_behavioral_analytics.go | 6 +- esapi/api.search_application.list.go | 8 +- ...ication.post_behavioral_analytics_event.go | 6 +- esapi/api.search_application.put.go | 8 +- ...ch_application.put_behavioral_analytics.go | 6 +- esapi/api.search_application.render_query.go | 6 +- esapi/api.search_application.search.go | 8 +- esapi/api.search_mvt.go | 20 +- esapi/api.search_shards.go | 22 +- esapi/api.search_template.go | 26 +- esapi/api.shutdown.delete_node.go | 6 +- esapi/api.shutdown.get_node.go | 20 +- esapi/api.shutdown.put_node.go | 6 +- esapi/api.simulate.ingest.go | 20 +- esapi/api.snapshot.cleanup_repository.go | 6 +- esapi/api.snapshot.clone.go | 6 +- esapi/api.snapshot.create.go | 6 +- esapi/api.snapshot.create_repository.go | 6 +- esapi/api.snapshot.delete.go | 6 +- esapi/api.snapshot.delete_repository.go | 6 +- esapi/api.snapshot.get.go | 6 +- esapi/api.snapshot.get_repository.go | 6 +- esapi/api.snapshot.repository_analyze.go | 15 +- ...pi.snapshot.repository_verify_integrity.go | 23 +- esapi/api.snapshot.restore.go | 6 +- esapi/api.snapshot.status.go | 6 +- esapi/api.snapshot.verify_repository.go | 6 +- esapi/api.streams.logs_disable.go | 6 +- esapi/api.streams.logs_enable.go | 6 +- esapi/api.streams.status.go | 18 +- esapi/api.synonyms.delete_synonym.go | 6 +- esapi/api.synonyms.delete_synonym_rule.go | 6 +- esapi/api.synonyms.get_synonym.go | 6 +- esapi/api.synonyms.get_synonym_rule.go | 6 +- esapi/api.synonyms.get_synonyms_sets.go | 6 +- esapi/api.synonyms.put_synonym.go | 6 +- esapi/api.synonyms.put_synonym_rule.go | 6 +- esapi/api.tasks.cancel.go | 6 +- esapi/api.tasks.get.go | 6 +- esapi/api.tasks.list.go | 6 +- esapi/api.terms_enum.go | 19 +- esapi/api.termvectors.go | 14 +- esapi/api.update.go | 14 +- esapi/api.update_by_query.go | 15 +- esapi/api.update_by_query_rethrottle.go | 6 +- esapi/api.xpack.async_search.delete.go | 6 +- esapi/api.xpack.async_search.get.go | 6 +- esapi/api.xpack.async_search.status.go | 6 +- esapi/api.xpack.async_search.submit.go | 26 +- ...k.autoscaling.delete_autoscaling_policy.go | 6 +- ...ck.autoscaling.get_autoscaling_capacity.go | 6 +- ...pack.autoscaling.get_autoscaling_policy.go | 6 +- ...pack.autoscaling.put_autoscaling_policy.go | 6 +- .../api.xpack.cat.ml_data_frame_analytics.go | 6 +- esapi/api.xpack.cat.ml_datafeeds.go | 18 +- esapi/api.xpack.cat.ml_jobs.go | 6 +- esapi/api.xpack.cat.ml_trained_models.go | 6 +- esapi/api.xpack.cat.transforms.go | 18 +- ...pi.xpack.ccr.delete_auto_follow_pattern.go | 6 +- esapi/api.xpack.ccr.follow.go | 6 +- esapi/api.xpack.ccr.follow_info.go | 6 +- esapi/api.xpack.ccr.follow_stats.go | 6 +- esapi/api.xpack.ccr.forget_follower.go | 6 +- .../api.xpack.ccr.get_auto_follow_pattern.go | 6 +- ...api.xpack.ccr.pause_auto_follow_pattern.go | 6 +- esapi/api.xpack.ccr.pause_follow.go | 6 +- .../api.xpack.ccr.put_auto_follow_pattern.go | 6 +- ...pi.xpack.ccr.resume_auto_follow_pattern.go | 6 +- esapi/api.xpack.ccr.resume_follow.go | 6 +- esapi/api.xpack.ccr.stats.go | 6 +- esapi/api.xpack.ccr.unfollow.go | 6 +- esapi/api.xpack.close_point_in_time.go | 17 +- esapi/api.xpack.enrich.delete_policy.go | 6 +- esapi/api.xpack.enrich.execute_policy.go | 6 +- esapi/api.xpack.enrich.get_policy.go | 6 +- esapi/api.xpack.enrich.put_policy.go | 6 +- esapi/api.xpack.enrich.stats.go | 6 +- esapi/api.xpack.eql.delete.go | 6 +- esapi/api.xpack.eql.get.go | 6 +- esapi/api.xpack.eql.get_status.go | 6 +- esapi/api.xpack.eql.search.go | 43 ++- esapi/api.xpack.esql.async_query.go | 8 +- esapi/api.xpack.esql.async_query_delete.go | 6 +- esapi/api.xpack.esql.async_query_get.go | 8 +- esapi/api.xpack.esql.async_query_stop.go | 20 +- esapi/api.xpack.esql.get_query.go | 6 +- esapi/api.xpack.esql.list_queries.go | 6 +- esapi/api.xpack.esql.query.go | 8 +- esapi/api.xpack.graph.explore.go | 27 +- esapi/api.xpack.ilm.delete_lifecycle.go | 6 +- esapi/api.xpack.ilm.explain_lifecycle.go | 6 +- esapi/api.xpack.ilm.get_lifecycle.go | 6 +- esapi/api.xpack.ilm.get_status.go | 6 +- esapi/api.xpack.ilm.migrate_to_data_tiers.go | 6 +- esapi/api.xpack.ilm.move_to_step.go | 19 +- esapi/api.xpack.ilm.put_lifecycle.go | 19 +- esapi/api.xpack.ilm.remove_policy.go | 6 +- esapi/api.xpack.ilm.retry.go | 6 +- esapi/api.xpack.ilm.start.go | 6 +- esapi/api.xpack.ilm.stop.go | 6 +- esapi/api.xpack.indices.create_data_stream.go | 6 +- esapi/api.xpack.indices.data_streams_stats.go | 19 +- esapi/api.xpack.indices.delete_data_stream.go | 14 +- ...pack.indices.delete_data_stream_options.go | 14 +- esapi/api.xpack.indices.get_data_stream.go | 14 +- ....xpack.indices.get_data_stream_mappings.go | 244 +++++++++++++ ...i.xpack.indices.get_data_stream_options.go | 14 +- ....xpack.indices.get_data_stream_settings.go | 23 +- ...pi.xpack.indices.migrate_to_data_stream.go | 6 +- .../api.xpack.indices.promote_data_stream.go | 6 +- ...i.xpack.indices.reload_search_analyzers.go | 14 +- esapi/api.xpack.license.delete.go | 6 +- esapi/api.xpack.license.get.go | 6 +- esapi/api.xpack.license.get_basic_status.go | 6 +- esapi/api.xpack.license.get_trial_status.go | 6 +- esapi/api.xpack.license.post.go | 6 +- esapi/api.xpack.license.post_start_basic.go | 6 +- esapi/api.xpack.license.post_start_trial.go | 6 +- esapi/api.xpack.logstash.delete_pipeline.go | 6 +- esapi/api.xpack.logstash.get_pipeline.go | 20 +- esapi/api.xpack.logstash.put_pipeline.go | 6 +- esapi/api.xpack.migration.deprecations.go | 6 +- ...ck.migration.get_feature_upgrade_status.go | 6 +- ...pi.xpack.migration.post_feature_upgrade.go | 6 +- ...ml.clear_trained_model_deployment_cache.go | 6 +- esapi/api.xpack.ml.close_job.go | 6 +- esapi/api.xpack.ml.delete_calendar.go | 6 +- esapi/api.xpack.ml.delete_calendar_event.go | 6 +- esapi/api.xpack.ml.delete_calendar_job.go | 23 +- ...pi.xpack.ml.delete_data_frame_analytics.go | 6 +- esapi/api.xpack.ml.delete_datafeed.go | 6 +- esapi/api.xpack.ml.delete_expired_data.go | 6 +- esapi/api.xpack.ml.delete_filter.go | 6 +- esapi/api.xpack.ml.delete_forecast.go | 6 +- esapi/api.xpack.ml.delete_job.go | 6 +- esapi/api.xpack.ml.delete_model_snapshot.go | 6 +- esapi/api.xpack.ml.delete_trained_model.go | 6 +- ...api.xpack.ml.delete_trained_model_alias.go | 6 +- esapi/api.xpack.ml.estimate_model_memory.go | 6 +- esapi/api.xpack.ml.evaluate_data_frame.go | 6 +- ...i.xpack.ml.explain_data_frame_analytics.go | 6 +- esapi/api.xpack.ml.flush_job.go | 39 +- esapi/api.xpack.ml.forecast.go | 6 +- esapi/api.xpack.ml.get_buckets.go | 22 +- esapi/api.xpack.ml.get_calendar_events.go | 14 +- esapi/api.xpack.ml.get_calendars.go | 6 +- esapi/api.xpack.ml.get_categories.go | 6 +- .../api.xpack.ml.get_data_frame_analytics.go | 6 +- ...xpack.ml.get_data_frame_analytics_stats.go | 6 +- esapi/api.xpack.ml.get_datafeed_stats.go | 20 +- esapi/api.xpack.ml.get_datafeeds.go | 20 +- esapi/api.xpack.ml.get_filters.go | 20 +- esapi/api.xpack.ml.get_influencers.go | 22 +- esapi/api.xpack.ml.get_job_stats.go | 6 +- esapi/api.xpack.ml.get_jobs.go | 20 +- esapi/api.xpack.ml.get_memory_stats.go | 6 +- ...ack.ml.get_model_snapshot_upgrade_stats.go | 6 +- esapi/api.xpack.ml.get_model_snapshots.go | 6 +- esapi/api.xpack.ml.get_overall_buckets.go | 22 +- esapi/api.xpack.ml.get_records.go | 22 +- esapi/api.xpack.ml.get_trained_models.go | 22 +- .../api.xpack.ml.get_trained_models_stats.go | 20 +- esapi/api.xpack.ml.infer_trained_model.go | 6 +- esapi/api.xpack.ml.info.go | 6 +- esapi/api.xpack.ml.open_job.go | 6 +- esapi/api.xpack.ml.post_calendar_events.go | 6 +- esapi/api.xpack.ml.post_data.go | 23 +- ...i.xpack.ml.preview_data_frame_analytics.go | 6 +- esapi/api.xpack.ml.preview_datafeed.go | 23 +- esapi/api.xpack.ml.put_calendar.go | 6 +- esapi/api.xpack.ml.put_calendar_job.go | 23 +- .../api.xpack.ml.put_data_frame_analytics.go | 6 +- esapi/api.xpack.ml.put_datafeed.go | 14 +- esapi/api.xpack.ml.put_filter.go | 6 +- esapi/api.xpack.ml.put_job.go | 14 +- esapi/api.xpack.ml.put_trained_model.go | 6 +- esapi/api.xpack.ml.put_trained_model_alias.go | 6 +- ...ck.ml.put_trained_model_definition_part.go | 6 +- ...i.xpack.ml.put_trained_model_vocabulary.go | 6 +- esapi/api.xpack.ml.reset_job.go | 6 +- esapi/api.xpack.ml.revert_model_snapshot.go | 6 +- esapi/api.xpack.ml.set_upgrade_mode.go | 6 +- ...api.xpack.ml.start_data_frame_analytics.go | 6 +- esapi/api.xpack.ml.start_datafeed.go | 23 +- ...xpack.ml.start_trained_model_deployment.go | 8 +- .../api.xpack.ml.stop_data_frame_analytics.go | 6 +- esapi/api.xpack.ml.stop_datafeed.go | 6 +- ....xpack.ml.stop_trained_model_deployment.go | 6 +- ...pi.xpack.ml.update_data_frame_analytics.go | 6 +- esapi/api.xpack.ml.update_datafeed.go | 14 +- esapi/api.xpack.ml.update_filter.go | 6 +- esapi/api.xpack.ml.update_job.go | 6 +- esapi/api.xpack.ml.update_model_snapshot.go | 6 +- ...pack.ml.update_trained_model_deployment.go | 6 +- esapi/api.xpack.ml.upgrade_job_snapshot.go | 6 +- esapi/api.xpack.ml.validate.go | 4 +- esapi/api.xpack.ml.validate_detector.go | 6 +- esapi/api.xpack.monitoring.bulk.go | 29 +- esapi/api.xpack.open_point_in_time.go | 34 +- esapi/api.xpack.profiling.flamegraph.go | 4 +- esapi/api.xpack.rollup.delete_job.go | 6 +- esapi/api.xpack.rollup.get_jobs.go | 6 +- esapi/api.xpack.rollup.get_rollup_caps.go | 6 +- .../api.xpack.rollup.get_rollup_index_caps.go | 23 +- esapi/api.xpack.rollup.put_job.go | 6 +- esapi/api.xpack.rollup.rollup_search.go | 6 +- esapi/api.xpack.rollup.start_job.go | 6 +- esapi/api.xpack.rollup.stop_job.go | 6 +- ....xpack.searchable_snapshots.cache_stats.go | 6 +- ....xpack.searchable_snapshots.clear_cache.go | 14 +- esapi/api.xpack.searchable_snapshots.mount.go | 6 +- esapi/api.xpack.searchable_snapshots.stats.go | 6 +- ...pi.xpack.security.activate_user_profile.go | 6 +- esapi/api.xpack.security.authenticate.go | 6 +- esapi/api.xpack.security.bulk_delete_role.go | 6 +- esapi/api.xpack.security.bulk_put_role.go | 6 +- ...api.xpack.security.bulk_update_api_keys.go | 6 +- esapi/api.xpack.security.change_password.go | 6 +- .../api.xpack.security.clear_api_key_cache.go | 6 +- ....xpack.security.clear_cached_privileges.go | 6 +- .../api.xpack.security.clear_cached_realms.go | 6 +- .../api.xpack.security.clear_cached_roles.go | 6 +- ...ck.security.clear_cached_service_tokens.go | 6 +- esapi/api.xpack.security.create_api_key.go | 6 +- ...k.security.create_cross_cluster_api_key.go | 6 +- ...api.xpack.security.create_service_token.go | 6 +- esapi/api.xpack.security.delegate_pki.go | 6 +- esapi/api.xpack.security.delete_privileges.go | 23 +- esapi/api.xpack.security.delete_role.go | 6 +- .../api.xpack.security.delete_role_mapping.go | 6 +- ...api.xpack.security.delete_service_token.go | 6 +- esapi/api.xpack.security.delete_user.go | 6 +- esapi/api.xpack.security.disable_user.go | 6 +- ...api.xpack.security.disable_user_profile.go | 6 +- esapi/api.xpack.security.enable_user.go | 6 +- .../api.xpack.security.enable_user_profile.go | 6 +- esapi/api.xpack.security.enroll_kibana.go | 6 +- esapi/api.xpack.security.enroll_node.go | 6 +- esapi/api.xpack.security.get_api_key.go | 6 +- ...i.xpack.security.get_builtin_privileges.go | 6 +- esapi/api.xpack.security.get_privileges.go | 20 +- esapi/api.xpack.security.get_role.go | 6 +- esapi/api.xpack.security.get_role_mapping.go | 6 +- ...api.xpack.security.get_service_accounts.go | 6 +- ....xpack.security.get_service_credentials.go | 6 +- esapi/api.xpack.security.get_settings.go | 6 +- esapi/api.xpack.security.get_stats.go | 215 +++++++++++ esapi/api.xpack.security.get_token.go | 6 +- esapi/api.xpack.security.get_user.go | 6 +- .../api.xpack.security.get_user_privileges.go | 6 +- esapi/api.xpack.security.get_user_profile.go | 6 +- esapi/api.xpack.security.grant_api_key.go | 6 +- esapi/api.xpack.security.has_privileges.go | 6 +- ...ck.security.has_privileges_user_profile.go | 6 +- .../api.xpack.security.invalidate_api_key.go | 6 +- esapi/api.xpack.security.invalidate_token.go | 6 +- esapi/api.xpack.security.oidc_authenticate.go | 6 +- esapi/api.xpack.security.oidc_logout.go | 6 +- ...ck.security.oidc_prepare_authentication.go | 6 +- esapi/api.xpack.security.put_privileges.go | 6 +- esapi/api.xpack.security.put_role.go | 6 +- esapi/api.xpack.security.put_role_mapping.go | 6 +- esapi/api.xpack.security.put_user.go | 6 +- esapi/api.xpack.security.query_api_keys.go | 6 +- esapi/api.xpack.security.query_role.go | 6 +- esapi/api.xpack.security.query_user.go | 6 +- esapi/api.xpack.security.saml_authenticate.go | 6 +- ...api.xpack.security.saml_complete_logout.go | 6 +- esapi/api.xpack.security.saml_invalidate.go | 6 +- esapi/api.xpack.security.saml_logout.go | 6 +- ...ck.security.saml_prepare_authentication.go | 6 +- ...security.saml_service_provider_metadata.go | 6 +- ...pi.xpack.security.suggest_user_profiles.go | 6 +- esapi/api.xpack.security.update_api_key.go | 6 +- ...k.security.update_cross_cluster_api_key.go | 6 +- esapi/api.xpack.security.update_settings.go | 6 +- ...xpack.security.update_user_profile_data.go | 6 +- esapi/api.xpack.slm.delete_lifecycle.go | 6 +- esapi/api.xpack.slm.execute_lifecycle.go | 6 +- esapi/api.xpack.slm.execute_retention.go | 6 +- esapi/api.xpack.slm.get_lifecycle.go | 6 +- esapi/api.xpack.slm.get_stats.go | 6 +- esapi/api.xpack.slm.get_status.go | 6 +- esapi/api.xpack.slm.put_lifecycle.go | 19 +- esapi/api.xpack.slm.start.go | 6 +- esapi/api.xpack.slm.stop.go | 6 +- esapi/api.xpack.sql.clear_cursor.go | 6 +- esapi/api.xpack.sql.delete_async.go | 6 +- esapi/api.xpack.sql.get_async.go | 6 +- esapi/api.xpack.sql.get_async_status.go | 6 +- esapi/api.xpack.sql.query.go | 22 +- esapi/api.xpack.sql.translate.go | 6 +- esapi/api.xpack.ssl.certificates.go | 6 +- ...ack.text_structure.find_field_structure.go | 10 +- ...k.text_structure.find_message_structure.go | 8 +- ...api.xpack.text_structure.find_structure.go | 6 +- ....xpack.text_structure.test_grok_pattern.go | 6 +- esapi/api.xpack.transform.delete_transform.go | 6 +- esapi/api.xpack.transform.get_node_stats.go | 4 +- esapi/api.xpack.transform.get_transform.go | 20 +- ...api.xpack.transform.get_transform_stats.go | 23 +- .../api.xpack.transform.preview_transform.go | 6 +- esapi/api.xpack.transform.put_transform.go | 6 +- esapi/api.xpack.transform.reset_transform.go | 6 +- ....xpack.transform.schedule_now_transform.go | 6 +- esapi/api.xpack.transform.set_upgrade_mode.go | 242 ++++++++++++ esapi/api.xpack.transform.start_transform.go | 6 +- esapi/api.xpack.transform.stop_transform.go | 6 +- esapi/api.xpack.transform.update_transform.go | 6 +- .../api.xpack.transform.upgrade_transforms.go | 6 +- esapi/api.xpack.watcher.ack_watch.go | 6 +- esapi/api.xpack.watcher.activate_watch.go | 6 +- esapi/api.xpack.watcher.deactivate_watch.go | 6 +- esapi/api.xpack.watcher.delete_watch.go | 6 +- esapi/api.xpack.watcher.execute_watch.go | 6 +- esapi/api.xpack.watcher.get_settings.go | 6 +- esapi/api.xpack.watcher.get_watch.go | 6 +- esapi/api.xpack.watcher.put_watch.go | 19 +- esapi/api.xpack.watcher.query_watches.go | 6 +- esapi/api.xpack.watcher.start.go | 6 +- esapi/api.xpack.watcher.stats.go | 6 +- esapi/api.xpack.watcher.stop.go | 6 +- esapi/api.xpack.watcher.update_settings.go | 6 +- esapi/api.xpack.xpack.info.go | 6 +- esapi/api.xpack.xpack.usage.go | 6 +- esutil/bulk_indexer.go | 2 +- .../cmd/generate/commands/gensource/debug.go | 2 +- .../generate/commands/gensource/generator.go | 8 +- .../cmd/generate/commands/gensource/model.go | 9 +- .../cmd/generate/commands/gentests/skips.go | 1 + internal/build/go.mod | 11 +- internal/build/go.sum | 10 + 584 files changed, 7613 insertions(+), 2800 deletions(-) create mode 100644 esapi/api.cat.circuit_breaker.go create mode 100644 esapi/api.indices.delete_sample_configuration.go create mode 100644 esapi/api.indices.get_all_sample_configuration.go create mode 100644 esapi/api.indices.get_sample.go create mode 100644 esapi/api.indices.get_sample_configuration.go create mode 100644 esapi/api.indices.get_sample_stats.go create mode 100644 esapi/api.indices.put_data_stream_mappings.go create mode 100644 esapi/api.indices.put_sample_configuration.go create mode 100644 esapi/api.inference.put_ai21.go create mode 100644 esapi/api.inference.put_contextualai.go create mode 100644 esapi/api.inference.put_llama.go create mode 100644 esapi/api.inference.put_openshift_ai.go create mode 100644 esapi/api.project.tags.go create mode 100644 esapi/api.xpack.indices.get_data_stream_mappings.go create mode 100644 esapi/api.xpack.security.get_stats.go create mode 100644 esapi/api.xpack.transform.set_upgrade_mode.go diff --git a/esapi/api._.go b/esapi/api._.go index e500c4a4b3..194b209b48 100755 --- a/esapi/api._.go +++ b/esapi/api._.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0 (9732617): DO NOT EDIT +// Code generated from specification version 9.3.0 (a83acf1): DO NOT EDIT package esapi @@ -135,6 +135,7 @@ type API struct { InferenceDelete InferenceDelete InferenceGet InferenceGet InferenceInference InferenceInference + InferencePutAi21 InferencePutAi21 InferencePutAlibabacloud InferencePutAlibabacloud InferencePutAmazonbedrock InferencePutAmazonbedrock InferencePutAmazonsagemaker InferencePutAmazonsagemaker @@ -142,6 +143,7 @@ type API struct { InferencePutAzureaistudio InferencePutAzureaistudio InferencePutAzureopenai InferencePutAzureopenai InferencePutCohere InferencePutCohere + InferencePutContextualai InferencePutContextualai InferencePutCustom InferencePutCustom InferencePutDeepseek InferencePutDeepseek InferencePutElasticsearch InferencePutElasticsearch @@ -150,8 +152,10 @@ type API struct { InferencePutGooglevertexai InferencePutGooglevertexai InferencePutHuggingFace InferencePutHuggingFace InferencePutJinaai InferencePutJinaai + InferencePutLlama InferencePutLlama InferencePutMistral InferencePutMistral InferencePutOpenai InferencePutOpenai + InferencePutOpenshiftAi InferencePutOpenshiftAi InferencePut InferencePut InferencePutVoyageai InferencePutVoyageai InferencePutWatsonx InferencePutWatsonx @@ -174,6 +178,7 @@ type API struct { ProfilingStacktraces ProfilingStacktraces ProfilingStatus ProfilingStatus ProfilingTopnFunctions ProfilingTopnFunctions + ProjectTags ProjectTags PutScript PutScript QueryRulesDeleteRule QueryRulesDeleteRule QueryRulesDeleteRuleset QueryRulesDeleteRuleset @@ -244,6 +249,7 @@ type API struct { TransformPutTransform TransformPutTransform TransformResetTransform TransformResetTransform TransformScheduleNowTransform TransformScheduleNowTransform + TransformSetUpgradeMode TransformSetUpgradeMode TransformStartTransform TransformStartTransform TransformStopTransform TransformStopTransform TransformUpdateTransform TransformUpdateTransform @@ -257,6 +263,7 @@ type API struct { type Cat struct { Aliases CatAliases Allocation CatAllocation + CircuitBreaker CatCircuitBreaker ComponentTemplates CatComponentTemplates Count CatCount Fielddata CatFielddata @@ -305,75 +312,83 @@ type Cluster struct { // Indices contains the Indices APIs type Indices struct { - AddBlock IndicesAddBlock - Analyze IndicesAnalyze - CancelMigrateReindex IndicesCancelMigrateReindex - ClearCache IndicesClearCache - Clone IndicesClone - Close IndicesClose - CreateDataStream IndicesCreateDataStream - CreateFrom IndicesCreateFrom - Create IndicesCreate - DataStreamsStats IndicesDataStreamsStats - DeleteAlias IndicesDeleteAlias - DeleteDataLifecycle IndicesDeleteDataLifecycle - DeleteDataStreamOptions IndicesDeleteDataStreamOptions - DeleteDataStream IndicesDeleteDataStream - DeleteIndexTemplate IndicesDeleteIndexTemplate - Delete IndicesDelete - DeleteTemplate IndicesDeleteTemplate - DiskUsage IndicesDiskUsage - Downsample IndicesDownsample - ExistsAlias IndicesExistsAlias - ExistsIndexTemplate IndicesExistsIndexTemplate - Exists IndicesExists - ExistsTemplate IndicesExistsTemplate - ExplainDataLifecycle IndicesExplainDataLifecycle - FieldUsageStats IndicesFieldUsageStats - Flush IndicesFlush - Forcemerge IndicesForcemerge - GetAlias IndicesGetAlias - GetDataLifecycle IndicesGetDataLifecycle - GetDataLifecycleStats IndicesGetDataLifecycleStats - GetDataStreamOptions IndicesGetDataStreamOptions - GetDataStream IndicesGetDataStream - GetDataStreamSettings IndicesGetDataStreamSettings - GetFieldMapping IndicesGetFieldMapping - GetIndexTemplate IndicesGetIndexTemplate - GetMapping IndicesGetMapping - GetMigrateReindexStatus IndicesGetMigrateReindexStatus - Get IndicesGet - GetSettings IndicesGetSettings - GetTemplate IndicesGetTemplate - MigrateReindex IndicesMigrateReindex - MigrateToDataStream IndicesMigrateToDataStream - ModifyDataStream IndicesModifyDataStream - Open IndicesOpen - PromoteDataStream IndicesPromoteDataStream - PutAlias IndicesPutAlias - PutDataLifecycle IndicesPutDataLifecycle - PutDataStreamOptions IndicesPutDataStreamOptions - PutDataStreamSettings IndicesPutDataStreamSettings - PutIndexTemplate IndicesPutIndexTemplate - PutMapping IndicesPutMapping - PutSettings IndicesPutSettings - PutTemplate IndicesPutTemplate - Recovery IndicesRecovery - Refresh IndicesRefresh - ReloadSearchAnalyzers IndicesReloadSearchAnalyzers - RemoveBlock IndicesRemoveBlock - ResolveCluster IndicesResolveCluster - ResolveIndex IndicesResolveIndex - Rollover IndicesRollover - Segments IndicesSegments - ShardStores IndicesShardStores - Shrink IndicesShrink - SimulateIndexTemplate IndicesSimulateIndexTemplate - SimulateTemplate IndicesSimulateTemplate - Split IndicesSplit - Stats IndicesStats - UpdateAliases IndicesUpdateAliases - ValidateQuery IndicesValidateQuery + AddBlock IndicesAddBlock + Analyze IndicesAnalyze + CancelMigrateReindex IndicesCancelMigrateReindex + ClearCache IndicesClearCache + Clone IndicesClone + Close IndicesClose + CreateDataStream IndicesCreateDataStream + CreateFrom IndicesCreateFrom + Create IndicesCreate + DataStreamsStats IndicesDataStreamsStats + DeleteAlias IndicesDeleteAlias + DeleteDataLifecycle IndicesDeleteDataLifecycle + DeleteDataStreamOptions IndicesDeleteDataStreamOptions + DeleteDataStream IndicesDeleteDataStream + DeleteIndexTemplate IndicesDeleteIndexTemplate + Delete IndicesDelete + DeleteSampleConfiguration IndicesDeleteSampleConfiguration + DeleteTemplate IndicesDeleteTemplate + DiskUsage IndicesDiskUsage + Downsample IndicesDownsample + ExistsAlias IndicesExistsAlias + ExistsIndexTemplate IndicesExistsIndexTemplate + Exists IndicesExists + ExistsTemplate IndicesExistsTemplate + ExplainDataLifecycle IndicesExplainDataLifecycle + FieldUsageStats IndicesFieldUsageStats + Flush IndicesFlush + Forcemerge IndicesForcemerge + GetAlias IndicesGetAlias + GetAllSampleConfiguration IndicesGetAllSampleConfiguration + GetDataLifecycle IndicesGetDataLifecycle + GetDataLifecycleStats IndicesGetDataLifecycleStats + GetDataStreamMappings IndicesGetDataStreamMappings + GetDataStreamOptions IndicesGetDataStreamOptions + GetDataStream IndicesGetDataStream + GetDataStreamSettings IndicesGetDataStreamSettings + GetFieldMapping IndicesGetFieldMapping + GetIndexTemplate IndicesGetIndexTemplate + GetMapping IndicesGetMapping + GetMigrateReindexStatus IndicesGetMigrateReindexStatus + Get IndicesGet + GetSampleConfiguration IndicesGetSampleConfiguration + GetSample IndicesGetSample + GetSampleStats IndicesGetSampleStats + GetSettings IndicesGetSettings + GetTemplate IndicesGetTemplate + MigrateReindex IndicesMigrateReindex + MigrateToDataStream IndicesMigrateToDataStream + ModifyDataStream IndicesModifyDataStream + Open IndicesOpen + PromoteDataStream IndicesPromoteDataStream + PutAlias IndicesPutAlias + PutDataLifecycle IndicesPutDataLifecycle + PutDataStreamMappings IndicesPutDataStreamMappings + PutDataStreamOptions IndicesPutDataStreamOptions + PutDataStreamSettings IndicesPutDataStreamSettings + PutIndexTemplate IndicesPutIndexTemplate + PutMapping IndicesPutMapping + PutSampleConfiguration IndicesPutSampleConfiguration + PutSettings IndicesPutSettings + PutTemplate IndicesPutTemplate + Recovery IndicesRecovery + Refresh IndicesRefresh + ReloadSearchAnalyzers IndicesReloadSearchAnalyzers + RemoveBlock IndicesRemoveBlock + ResolveCluster IndicesResolveCluster + ResolveIndex IndicesResolveIndex + Rollover IndicesRollover + Segments IndicesSegments + ShardStores IndicesShardStores + Shrink IndicesShrink + SimulateIndexTemplate IndicesSimulateIndexTemplate + SimulateTemplate IndicesSimulateTemplate + Split IndicesSplit + Stats IndicesStats + UpdateAliases IndicesUpdateAliases + ValidateQuery IndicesValidateQuery } // Ingest contains the Ingest APIs @@ -619,6 +634,7 @@ type Security struct { GetServiceAccounts SecurityGetServiceAccounts GetServiceCredentials SecurityGetServiceCredentials GetSettings SecurityGetSettings + GetStats SecurityGetStats GetToken SecurityGetToken GetUserPrivileges SecurityGetUserPrivileges GetUserProfile SecurityGetUserProfile @@ -784,6 +800,7 @@ func New(t Transport) *API { InferenceDelete: newInferenceDeleteFunc(t), InferenceGet: newInferenceGetFunc(t), InferenceInference: newInferenceInferenceFunc(t), + InferencePutAi21: newInferencePutAi21Func(t), InferencePutAlibabacloud: newInferencePutAlibabacloudFunc(t), InferencePutAmazonbedrock: newInferencePutAmazonbedrockFunc(t), InferencePutAmazonsagemaker: newInferencePutAmazonsagemakerFunc(t), @@ -791,6 +808,7 @@ func New(t Transport) *API { InferencePutAzureaistudio: newInferencePutAzureaistudioFunc(t), InferencePutAzureopenai: newInferencePutAzureopenaiFunc(t), InferencePutCohere: newInferencePutCohereFunc(t), + InferencePutContextualai: newInferencePutContextualaiFunc(t), InferencePutCustom: newInferencePutCustomFunc(t), InferencePutDeepseek: newInferencePutDeepseekFunc(t), InferencePutElasticsearch: newInferencePutElasticsearchFunc(t), @@ -799,8 +817,10 @@ func New(t Transport) *API { InferencePutGooglevertexai: newInferencePutGooglevertexaiFunc(t), InferencePutHuggingFace: newInferencePutHuggingFaceFunc(t), InferencePutJinaai: newInferencePutJinaaiFunc(t), + InferencePutLlama: newInferencePutLlamaFunc(t), InferencePutMistral: newInferencePutMistralFunc(t), InferencePutOpenai: newInferencePutOpenaiFunc(t), + InferencePutOpenshiftAi: newInferencePutOpenshiftAiFunc(t), InferencePut: newInferencePutFunc(t), InferencePutVoyageai: newInferencePutVoyageaiFunc(t), InferencePutWatsonx: newInferencePutWatsonxFunc(t), @@ -823,6 +843,7 @@ func New(t Transport) *API { ProfilingStacktraces: newProfilingStacktracesFunc(t), ProfilingStatus: newProfilingStatusFunc(t), ProfilingTopnFunctions: newProfilingTopnFunctionsFunc(t), + ProjectTags: newProjectTagsFunc(t), PutScript: newPutScriptFunc(t), QueryRulesDeleteRule: newQueryRulesDeleteRuleFunc(t), QueryRulesDeleteRuleset: newQueryRulesDeleteRulesetFunc(t), @@ -893,6 +914,7 @@ func New(t Transport) *API { TransformPutTransform: newTransformPutTransformFunc(t), TransformResetTransform: newTransformResetTransformFunc(t), TransformScheduleNowTransform: newTransformScheduleNowTransformFunc(t), + TransformSetUpgradeMode: newTransformSetUpgradeModeFunc(t), TransformStartTransform: newTransformStartTransformFunc(t), TransformStopTransform: newTransformStopTransformFunc(t), TransformUpdateTransform: newTransformUpdateTransformFunc(t), @@ -903,6 +925,7 @@ func New(t Transport) *API { Cat: &Cat{ Aliases: newCatAliasesFunc(t), Allocation: newCatAllocationFunc(t), + CircuitBreaker: newCatCircuitBreakerFunc(t), ComponentTemplates: newCatComponentTemplatesFunc(t), Count: newCatCountFunc(t), Fielddata: newCatFielddataFunc(t), @@ -947,75 +970,83 @@ func New(t Transport) *API { Stats: newClusterStatsFunc(t), }, Indices: &Indices{ - AddBlock: newIndicesAddBlockFunc(t), - Analyze: newIndicesAnalyzeFunc(t), - CancelMigrateReindex: newIndicesCancelMigrateReindexFunc(t), - ClearCache: newIndicesClearCacheFunc(t), - Clone: newIndicesCloneFunc(t), - Close: newIndicesCloseFunc(t), - CreateDataStream: newIndicesCreateDataStreamFunc(t), - CreateFrom: newIndicesCreateFromFunc(t), - Create: newIndicesCreateFunc(t), - DataStreamsStats: newIndicesDataStreamsStatsFunc(t), - DeleteAlias: newIndicesDeleteAliasFunc(t), - DeleteDataLifecycle: newIndicesDeleteDataLifecycleFunc(t), - DeleteDataStreamOptions: newIndicesDeleteDataStreamOptionsFunc(t), - DeleteDataStream: newIndicesDeleteDataStreamFunc(t), - DeleteIndexTemplate: newIndicesDeleteIndexTemplateFunc(t), - Delete: newIndicesDeleteFunc(t), - DeleteTemplate: newIndicesDeleteTemplateFunc(t), - DiskUsage: newIndicesDiskUsageFunc(t), - Downsample: newIndicesDownsampleFunc(t), - ExistsAlias: newIndicesExistsAliasFunc(t), - ExistsIndexTemplate: newIndicesExistsIndexTemplateFunc(t), - Exists: newIndicesExistsFunc(t), - ExistsTemplate: newIndicesExistsTemplateFunc(t), - ExplainDataLifecycle: newIndicesExplainDataLifecycleFunc(t), - FieldUsageStats: newIndicesFieldUsageStatsFunc(t), - Flush: newIndicesFlushFunc(t), - Forcemerge: newIndicesForcemergeFunc(t), - GetAlias: newIndicesGetAliasFunc(t), - GetDataLifecycle: newIndicesGetDataLifecycleFunc(t), - GetDataLifecycleStats: newIndicesGetDataLifecycleStatsFunc(t), - GetDataStreamOptions: newIndicesGetDataStreamOptionsFunc(t), - GetDataStream: newIndicesGetDataStreamFunc(t), - GetDataStreamSettings: newIndicesGetDataStreamSettingsFunc(t), - GetFieldMapping: newIndicesGetFieldMappingFunc(t), - GetIndexTemplate: newIndicesGetIndexTemplateFunc(t), - GetMapping: newIndicesGetMappingFunc(t), - GetMigrateReindexStatus: newIndicesGetMigrateReindexStatusFunc(t), - Get: newIndicesGetFunc(t), - GetSettings: newIndicesGetSettingsFunc(t), - GetTemplate: newIndicesGetTemplateFunc(t), - MigrateReindex: newIndicesMigrateReindexFunc(t), - MigrateToDataStream: newIndicesMigrateToDataStreamFunc(t), - ModifyDataStream: newIndicesModifyDataStreamFunc(t), - Open: newIndicesOpenFunc(t), - PromoteDataStream: newIndicesPromoteDataStreamFunc(t), - PutAlias: newIndicesPutAliasFunc(t), - PutDataLifecycle: newIndicesPutDataLifecycleFunc(t), - PutDataStreamOptions: newIndicesPutDataStreamOptionsFunc(t), - PutDataStreamSettings: newIndicesPutDataStreamSettingsFunc(t), - PutIndexTemplate: newIndicesPutIndexTemplateFunc(t), - PutMapping: newIndicesPutMappingFunc(t), - PutSettings: newIndicesPutSettingsFunc(t), - PutTemplate: newIndicesPutTemplateFunc(t), - Recovery: newIndicesRecoveryFunc(t), - Refresh: newIndicesRefreshFunc(t), - ReloadSearchAnalyzers: newIndicesReloadSearchAnalyzersFunc(t), - RemoveBlock: newIndicesRemoveBlockFunc(t), - ResolveCluster: newIndicesResolveClusterFunc(t), - ResolveIndex: newIndicesResolveIndexFunc(t), - Rollover: newIndicesRolloverFunc(t), - Segments: newIndicesSegmentsFunc(t), - ShardStores: newIndicesShardStoresFunc(t), - Shrink: newIndicesShrinkFunc(t), - SimulateIndexTemplate: newIndicesSimulateIndexTemplateFunc(t), - SimulateTemplate: newIndicesSimulateTemplateFunc(t), - Split: newIndicesSplitFunc(t), - Stats: newIndicesStatsFunc(t), - UpdateAliases: newIndicesUpdateAliasesFunc(t), - ValidateQuery: newIndicesValidateQueryFunc(t), + AddBlock: newIndicesAddBlockFunc(t), + Analyze: newIndicesAnalyzeFunc(t), + CancelMigrateReindex: newIndicesCancelMigrateReindexFunc(t), + ClearCache: newIndicesClearCacheFunc(t), + Clone: newIndicesCloneFunc(t), + Close: newIndicesCloseFunc(t), + CreateDataStream: newIndicesCreateDataStreamFunc(t), + CreateFrom: newIndicesCreateFromFunc(t), + Create: newIndicesCreateFunc(t), + DataStreamsStats: newIndicesDataStreamsStatsFunc(t), + DeleteAlias: newIndicesDeleteAliasFunc(t), + DeleteDataLifecycle: newIndicesDeleteDataLifecycleFunc(t), + DeleteDataStreamOptions: newIndicesDeleteDataStreamOptionsFunc(t), + DeleteDataStream: newIndicesDeleteDataStreamFunc(t), + DeleteIndexTemplate: newIndicesDeleteIndexTemplateFunc(t), + Delete: newIndicesDeleteFunc(t), + DeleteSampleConfiguration: newIndicesDeleteSampleConfigurationFunc(t), + DeleteTemplate: newIndicesDeleteTemplateFunc(t), + DiskUsage: newIndicesDiskUsageFunc(t), + Downsample: newIndicesDownsampleFunc(t), + ExistsAlias: newIndicesExistsAliasFunc(t), + ExistsIndexTemplate: newIndicesExistsIndexTemplateFunc(t), + Exists: newIndicesExistsFunc(t), + ExistsTemplate: newIndicesExistsTemplateFunc(t), + ExplainDataLifecycle: newIndicesExplainDataLifecycleFunc(t), + FieldUsageStats: newIndicesFieldUsageStatsFunc(t), + Flush: newIndicesFlushFunc(t), + Forcemerge: newIndicesForcemergeFunc(t), + GetAlias: newIndicesGetAliasFunc(t), + GetAllSampleConfiguration: newIndicesGetAllSampleConfigurationFunc(t), + GetDataLifecycle: newIndicesGetDataLifecycleFunc(t), + GetDataLifecycleStats: newIndicesGetDataLifecycleStatsFunc(t), + GetDataStreamMappings: newIndicesGetDataStreamMappingsFunc(t), + GetDataStreamOptions: newIndicesGetDataStreamOptionsFunc(t), + GetDataStream: newIndicesGetDataStreamFunc(t), + GetDataStreamSettings: newIndicesGetDataStreamSettingsFunc(t), + GetFieldMapping: newIndicesGetFieldMappingFunc(t), + GetIndexTemplate: newIndicesGetIndexTemplateFunc(t), + GetMapping: newIndicesGetMappingFunc(t), + GetMigrateReindexStatus: newIndicesGetMigrateReindexStatusFunc(t), + Get: newIndicesGetFunc(t), + GetSampleConfiguration: newIndicesGetSampleConfigurationFunc(t), + GetSample: newIndicesGetSampleFunc(t), + GetSampleStats: newIndicesGetSampleStatsFunc(t), + GetSettings: newIndicesGetSettingsFunc(t), + GetTemplate: newIndicesGetTemplateFunc(t), + MigrateReindex: newIndicesMigrateReindexFunc(t), + MigrateToDataStream: newIndicesMigrateToDataStreamFunc(t), + ModifyDataStream: newIndicesModifyDataStreamFunc(t), + Open: newIndicesOpenFunc(t), + PromoteDataStream: newIndicesPromoteDataStreamFunc(t), + PutAlias: newIndicesPutAliasFunc(t), + PutDataLifecycle: newIndicesPutDataLifecycleFunc(t), + PutDataStreamMappings: newIndicesPutDataStreamMappingsFunc(t), + PutDataStreamOptions: newIndicesPutDataStreamOptionsFunc(t), + PutDataStreamSettings: newIndicesPutDataStreamSettingsFunc(t), + PutIndexTemplate: newIndicesPutIndexTemplateFunc(t), + PutMapping: newIndicesPutMappingFunc(t), + PutSampleConfiguration: newIndicesPutSampleConfigurationFunc(t), + PutSettings: newIndicesPutSettingsFunc(t), + PutTemplate: newIndicesPutTemplateFunc(t), + Recovery: newIndicesRecoveryFunc(t), + Refresh: newIndicesRefreshFunc(t), + ReloadSearchAnalyzers: newIndicesReloadSearchAnalyzersFunc(t), + RemoveBlock: newIndicesRemoveBlockFunc(t), + ResolveCluster: newIndicesResolveClusterFunc(t), + ResolveIndex: newIndicesResolveIndexFunc(t), + Rollover: newIndicesRolloverFunc(t), + Segments: newIndicesSegmentsFunc(t), + ShardStores: newIndicesShardStoresFunc(t), + Shrink: newIndicesShrinkFunc(t), + SimulateIndexTemplate: newIndicesSimulateIndexTemplateFunc(t), + SimulateTemplate: newIndicesSimulateTemplateFunc(t), + Split: newIndicesSplitFunc(t), + Stats: newIndicesStatsFunc(t), + UpdateAliases: newIndicesUpdateAliasesFunc(t), + ValidateQuery: newIndicesValidateQueryFunc(t), }, Ingest: &Ingest{ DeleteGeoipDatabase: newIngestDeleteGeoipDatabaseFunc(t), @@ -1232,6 +1263,7 @@ func New(t Transport) *API { GetServiceAccounts: newSecurityGetServiceAccountsFunc(t), GetServiceCredentials: newSecurityGetServiceCredentialsFunc(t), GetSettings: newSecurityGetSettingsFunc(t), + GetStats: newSecurityGetStatsFunc(t), GetToken: newSecurityGetTokenFunc(t), GetUserPrivileges: newSecurityGetUserPrivilegesFunc(t), GetUserProfile: newSecurityGetUserProfileFunc(t), diff --git a/esapi/api.bulk.go b/esapi/api.bulk.go index 12246ca0a4..1402f02793 100644 --- a/esapi/api.bulk.go +++ b/esapi/api.bulk.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newBulkFunc(t Transport) Bulk { // ----- API Definition ------------------------------------------------------- -// Bulk allows to perform multiple index/update/delete operations in a single request. +// Bulk bulk index or delete documents // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk. type Bulk func(body io.Reader, o ...func(*BulkRequest)) (*Response, error) // BulkRequest configures the Bulk API request. @@ -62,7 +62,7 @@ type BulkRequest struct { Refresh string RequireAlias *bool RequireDataStream *bool - Routing string + Routing []string Source []string SourceExcludes []string SourceIncludes []string @@ -138,8 +138,8 @@ func (r BulkRequest) Do(providedCtx context.Context, transport Transport) (*Resp params["require_data_stream"] = strconv.FormatBool(*r.RequireDataStream) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if len(r.Source) > 0 { @@ -282,7 +282,7 @@ func (f Bulk) WithRefresh(v string) func(*BulkRequest) { } } -// WithRequireAlias - if true, the request’s actions must target an index alias. defaults to false.. +// WithRequireAlias - if true, the request's actions must target an index alias. defaults to false.. func (f Bulk) WithRequireAlias(v bool) func(*BulkRequest) { return func(r *BulkRequest) { r.RequireAlias = &v @@ -297,7 +297,7 @@ func (f Bulk) WithRequireDataStream(v bool) func(*BulkRequest) { } // WithRouting - specific routing value. -func (f Bulk) WithRouting(v string) func(*BulkRequest) { +func (f Bulk) WithRouting(v ...string) func(*BulkRequest) { return func(r *BulkRequest) { r.Routing = v } diff --git a/esapi/api.capabilities.go b/esapi/api.capabilities.go index 5a6a5cd824..dde9b86ccc 100644 --- a/esapi/api.capabilities.go +++ b/esapi/api.capabilities.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi diff --git a/esapi/api.cat.aliases.go b/esapi/api.cat.aliases.go index 0f4531d37d..145f69ba52 100644 --- a/esapi/api.cat.aliases.go +++ b/esapi/api.cat.aliases.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,21 +44,23 @@ func newCatAliasesFunc(t Transport) CatAliases { // ----- API Definition ------------------------------------------------------- -// CatAliases shows information about currently configured aliases to indices including filter and routing infos. +// CatAliases get aliases // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-aliases. type CatAliases func(o ...func(*CatAliasesRequest)) (*Response, error) // CatAliasesRequest configures the Cat Aliases API request. type CatAliasesRequest struct { Name []string - ExpandWildcards string + Bytes string + ExpandWildcards []string Format string H []string Help *bool MasterTimeout time.Duration S []string + Time string V *bool Pretty bool @@ -108,8 +110,12 @@ func (r CatAliasesRequest) Do(providedCtx context.Context, transport Transport) params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Format != "" { @@ -132,6 +138,10 @@ func (r CatAliasesRequest) Do(providedCtx context.Context, transport Transport) params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -221,8 +231,15 @@ func (f CatAliases) WithName(v ...string) func(*CatAliasesRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatAliases) WithBytes(v string) func(*CatAliasesRequest) { + return func(r *CatAliasesRequest) { + r.Bytes = v + } +} + // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f CatAliases) WithExpandWildcards(v string) func(*CatAliasesRequest) { +func (f CatAliases) WithExpandWildcards(v ...string) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.ExpandWildcards = v } @@ -263,6 +280,13 @@ func (f CatAliases) WithS(v ...string) func(*CatAliasesRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatAliases) WithTime(v string) func(*CatAliasesRequest) { + return func(r *CatAliasesRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatAliases) WithV(v bool) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { diff --git a/esapi/api.cat.allocation.go b/esapi/api.cat.allocation.go index 3c2b5c1e73..5e87396322 100644 --- a/esapi/api.cat.allocation.go +++ b/esapi/api.cat.allocation.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCatAllocationFunc(t Transport) CatAllocation { // ----- API Definition ------------------------------------------------------- -// CatAllocation provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. +// CatAllocation get shard allocation information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-allocation. type CatAllocation func(o ...func(*CatAllocationRequest)) (*Response, error) // CatAllocationRequest configures the Cat Allocation API request. @@ -60,6 +60,7 @@ type CatAllocationRequest struct { Local *bool MasterTimeout time.Duration S []string + Time string V *bool Pretty bool @@ -137,6 +138,10 @@ func (r CatAllocationRequest) Do(providedCtx context.Context, transport Transpor params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -275,6 +280,13 @@ func (f CatAllocation) WithS(v ...string) func(*CatAllocationRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatAllocation) WithTime(v string) func(*CatAllocationRequest) { + return func(r *CatAllocationRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatAllocation) WithV(v bool) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { diff --git a/esapi/api.cat.circuit_breaker.go b/esapi/api.cat.circuit_breaker.go new file mode 100644 index 0000000000..1597f91abc --- /dev/null +++ b/esapi/api.cat.circuit_breaker.go @@ -0,0 +1,345 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" + "time" +) + +func newCatCircuitBreakerFunc(t Transport) CatCircuitBreaker { + return func(o ...func(*CatCircuitBreakerRequest)) (*Response, error) { + var r = CatCircuitBreakerRequest{} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// CatCircuitBreaker get circuit breakers statistics +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. +type CatCircuitBreaker func(o ...func(*CatCircuitBreakerRequest)) (*Response, error) + +// CatCircuitBreakerRequest configures the Cat Circuit Breaker API request. +type CatCircuitBreakerRequest struct { + CircuitBreakerPatterns []string + + Bytes string + Format string + H []string + Help *bool + Local *bool + MasterTimeout time.Duration + S []string + Time string + V *bool + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r CatCircuitBreakerRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "cat.circuit_breaker") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + 1 + len("_cat") + 1 + len("circuit_breaker") + 1 + len(strings.Join(r.CircuitBreakerPatterns, ","))) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_cat") + path.WriteString("/") + path.WriteString("circuit_breaker") + if len(r.CircuitBreakerPatterns) > 0 { + path.WriteString("/") + path.WriteString(strings.Join(r.CircuitBreakerPatterns, ",")) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "circuit_breaker_patterns", strings.Join(r.CircuitBreakerPatterns, ",")) + } + } + + params = make(map[string]string) + + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + + if r.Format != "" { + params["format"] = r.Format + } + + if len(r.H) > 0 { + params["h"] = strings.Join(r.H, ",") + } + + if r.Help != nil { + params["help"] = strconv.FormatBool(*r.Help) + } + + if r.Local != nil { + params["local"] = strconv.FormatBool(*r.Local) + } + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if len(r.S) > 0 { + params["s"] = strings.Join(r.S, ",") + } + + if r.Time != "" { + params["time"] = r.Time + } + + if r.V != nil { + params["v"] = strconv.FormatBool(*r.V) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "cat.circuit_breaker") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "cat.circuit_breaker") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f CatCircuitBreaker) WithContext(v context.Context) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.ctx = v + } +} + +// WithCircuitBreakerPatterns - a list of regular-expressions to filter the circuit breakers in the output. +func (f CatCircuitBreaker) WithCircuitBreakerPatterns(v ...string) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.CircuitBreakerPatterns = v + } +} + +// WithBytes - the unit in which to display byte values. +func (f CatCircuitBreaker) WithBytes(v string) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.Bytes = v + } +} + +// WithFormat - a short version of the accept header, e.g. json, yaml. +func (f CatCircuitBreaker) WithFormat(v string) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.Format = v + } +} + +// WithH - comma-separated list of column names to display. +func (f CatCircuitBreaker) WithH(v ...string) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.H = v + } +} + +// WithHelp - return help information. +func (f CatCircuitBreaker) WithHelp(v bool) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.Help = &v + } +} + +// WithLocal - return local information, do not retrieve the state from master node (default: false). +func (f CatCircuitBreaker) WithLocal(v bool) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.Local = &v + } +} + +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f CatCircuitBreaker) WithMasterTimeout(v time.Duration) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.MasterTimeout = v + } +} + +// WithS - comma-separated list of column names or column aliases to sort by. +func (f CatCircuitBreaker) WithS(v ...string) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.S = v + } +} + +// WithTime - the unit in which to display time values. +func (f CatCircuitBreaker) WithTime(v string) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.Time = v + } +} + +// WithV - verbose mode. display column headers. +func (f CatCircuitBreaker) WithV(v bool) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.V = &v + } +} + +// WithPretty makes the response body pretty-printed. +func (f CatCircuitBreaker) WithPretty() func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f CatCircuitBreaker) WithHuman() func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f CatCircuitBreaker) WithErrorTrace() func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f CatCircuitBreaker) WithFilterPath(v ...string) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f CatCircuitBreaker) WithHeader(h map[string]string) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f CatCircuitBreaker) WithOpaqueID(s string) func(*CatCircuitBreakerRequest) { + return func(r *CatCircuitBreakerRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.cat.component_templates.go b/esapi/api.cat.component_templates.go index 1ff1108a5a..1c2509839c 100644 --- a/esapi/api.cat.component_templates.go +++ b/esapi/api.cat.component_templates.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,21 +44,23 @@ func newCatComponentTemplatesFunc(t Transport) CatComponentTemplates { // ----- API Definition ------------------------------------------------------- -// CatComponentTemplates returns information about existing component_templates templates. +// CatComponentTemplates get component templates // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-component-templates. type CatComponentTemplates func(o ...func(*CatComponentTemplatesRequest)) (*Response, error) // CatComponentTemplatesRequest configures the Cat Component Templates API request. type CatComponentTemplatesRequest struct { Name string + Bytes string Format string H []string Help *bool Local *bool MasterTimeout time.Duration S []string + Time string V *bool Pretty bool @@ -108,6 +110,10 @@ func (r CatComponentTemplatesRequest) Do(providedCtx context.Context, transport params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -132,6 +138,10 @@ func (r CatComponentTemplatesRequest) Do(providedCtx context.Context, transport params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -221,6 +231,13 @@ func (f CatComponentTemplates) WithName(v string) func(*CatComponentTemplatesReq } } +// WithBytes - the unit in which to display byte values. +func (f CatComponentTemplates) WithBytes(v string) func(*CatComponentTemplatesRequest) { + return func(r *CatComponentTemplatesRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatComponentTemplates) WithFormat(v string) func(*CatComponentTemplatesRequest) { return func(r *CatComponentTemplatesRequest) { @@ -263,6 +280,13 @@ func (f CatComponentTemplates) WithS(v ...string) func(*CatComponentTemplatesReq } } +// WithTime - the unit in which to display time values. +func (f CatComponentTemplates) WithTime(v string) func(*CatComponentTemplatesRequest) { + return func(r *CatComponentTemplatesRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatComponentTemplates) WithV(v bool) func(*CatComponentTemplatesRequest) { return func(r *CatComponentTemplatesRequest) { diff --git a/esapi/api.cat.count.go b/esapi/api.cat.count.go index 1fe9cde57c..52d21bf11f 100644 --- a/esapi/api.cat.count.go +++ b/esapi/api.cat.count.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,20 +43,23 @@ func newCatCountFunc(t Transport) CatCount { // ----- API Definition ------------------------------------------------------- -// CatCount provides quick access to the document count of the entire cluster, or individual indices. +// CatCount get a document count // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-count. type CatCount func(o ...func(*CatCountRequest)) (*Response, error) // CatCountRequest configures the Cat Count API request. type CatCountRequest struct { Index []string - Format string - H []string - Help *bool - S []string - V *bool + Bytes string + Format string + H []string + Help *bool + ProjectRouting string + S []string + Time string + V *bool Pretty bool Human bool @@ -105,6 +108,10 @@ func (r CatCountRequest) Do(providedCtx context.Context, transport Transport) (* params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -117,10 +124,18 @@ func (r CatCountRequest) Do(providedCtx context.Context, transport Transport) (* params["help"] = strconv.FormatBool(*r.Help) } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if len(r.S) > 0 { params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -210,6 +225,13 @@ func (f CatCount) WithIndex(v ...string) func(*CatCountRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatCount) WithBytes(v string) func(*CatCountRequest) { + return func(r *CatCountRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatCount) WithFormat(v string) func(*CatCountRequest) { return func(r *CatCountRequest) { @@ -231,6 +253,13 @@ func (f CatCount) WithHelp(v bool) func(*CatCountRequest) { } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f CatCount) WithProjectRouting(v string) func(*CatCountRequest) { + return func(r *CatCountRequest) { + r.ProjectRouting = v + } +} + // WithS - comma-separated list of column names or column aliases to sort by. func (f CatCount) WithS(v ...string) func(*CatCountRequest) { return func(r *CatCountRequest) { @@ -238,6 +267,13 @@ func (f CatCount) WithS(v ...string) func(*CatCountRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatCount) WithTime(v string) func(*CatCountRequest) { + return func(r *CatCountRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatCount) WithV(v bool) func(*CatCountRequest) { return func(r *CatCountRequest) { diff --git a/esapi/api.cat.fielddata.go b/esapi/api.cat.fielddata.go index 6189777d64..ea0b91fb97 100644 --- a/esapi/api.cat.fielddata.go +++ b/esapi/api.cat.fielddata.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCatFielddataFunc(t Transport) CatFielddata { // ----- API Definition ------------------------------------------------------- -// CatFielddata shows how much heap memory is currently being used by fielddata on every data node in the cluster. +// CatFielddata get field data cache information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-fielddata. type CatFielddata func(o ...func(*CatFielddataRequest)) (*Response, error) // CatFielddataRequest configures the Cat Fielddata API request. @@ -57,6 +57,7 @@ type CatFielddataRequest struct { H []string Help *bool S []string + Time string V *bool Pretty bool @@ -130,6 +131,10 @@ func (r CatFielddataRequest) Do(providedCtx context.Context, transport Transport params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -254,6 +259,13 @@ func (f CatFielddata) WithS(v ...string) func(*CatFielddataRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatFielddata) WithTime(v string) func(*CatFielddataRequest) { + return func(r *CatFielddataRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatFielddata) WithV(v bool) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { diff --git a/esapi/api.cat.health.go b/esapi/api.cat.health.go index 9b8404b01b..de006362f6 100644 --- a/esapi/api.cat.health.go +++ b/esapi/api.cat.health.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,13 +43,14 @@ func newCatHealthFunc(t Transport) CatHealth { // ----- API Definition ------------------------------------------------------- -// CatHealth returns a concise representation of the cluster health. +// CatHealth get the cluster health status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-health. type CatHealth func(o ...func(*CatHealthRequest)) (*Response, error) // CatHealthRequest configures the Cat Health API request. type CatHealthRequest struct { + Bytes string Format string H []string Help *bool @@ -95,6 +96,10 @@ func (r CatHealthRequest) Do(providedCtx context.Context, transport Transport) ( params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -201,6 +206,13 @@ func (f CatHealth) WithContext(v context.Context) func(*CatHealthRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatHealth) WithBytes(v string) func(*CatHealthRequest) { + return func(r *CatHealthRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatHealth) WithFormat(v string) func(*CatHealthRequest) { return func(r *CatHealthRequest) { diff --git a/esapi/api.cat.help.go b/esapi/api.cat.help.go index 29e795c5e4..872ca94c01 100644 --- a/esapi/api.cat.help.go +++ b/esapi/api.cat.help.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newCatHelpFunc(t Transport) CatHelp { // ----- API Definition ------------------------------------------------------- -// CatHelp returns help for the Cat APIs. +// CatHelp get CAT help // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cat. type CatHelp func(o ...func(*CatHelpRequest)) (*Response, error) // CatHelpRequest configures the Cat Help API request. diff --git a/esapi/api.cat.indices.go b/esapi/api.cat.indices.go index a4743da5e1..61c32a769e 100644 --- a/esapi/api.cat.indices.go +++ b/esapi/api.cat.indices.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCatIndicesFunc(t Transport) CatIndices { // ----- API Definition ------------------------------------------------------- -// CatIndices returns information about indices: number of primaries and replicas, document counts, disk size, ... +// CatIndices get index information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-indices. type CatIndices func(o ...func(*CatIndicesRequest)) (*Response, error) // CatIndicesRequest configures the Cat Indices API request. @@ -54,7 +54,7 @@ type CatIndicesRequest struct { Index []string Bytes string - ExpandWildcards string + ExpandWildcards []string Format string H []string Health string @@ -117,8 +117,8 @@ func (r CatIndicesRequest) Do(providedCtx context.Context, transport Transport) params["bytes"] = r.Bytes } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Format != "" { @@ -254,7 +254,7 @@ func (f CatIndices) WithBytes(v string) func(*CatIndicesRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f CatIndices) WithExpandWildcards(v string) func(*CatIndicesRequest) { +func (f CatIndices) WithExpandWildcards(v ...string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.cat.master.go b/esapi/api.cat.master.go index 689f3af12d..10497d8a07 100644 --- a/esapi/api.cat.master.go +++ b/esapi/api.cat.master.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,19 +44,21 @@ func newCatMasterFunc(t Transport) CatMaster { // ----- API Definition ------------------------------------------------------- -// CatMaster returns information about the master node. +// CatMaster get master node information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-master. type CatMaster func(o ...func(*CatMasterRequest)) (*Response, error) // CatMasterRequest configures the Cat Master API request. type CatMasterRequest struct { + Bytes string Format string H []string Help *bool Local *bool MasterTimeout time.Duration S []string + Time string V *bool Pretty bool @@ -96,6 +98,10 @@ func (r CatMasterRequest) Do(providedCtx context.Context, transport Transport) ( params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -120,6 +126,10 @@ func (r CatMasterRequest) Do(providedCtx context.Context, transport Transport) ( params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -202,6 +212,13 @@ func (f CatMaster) WithContext(v context.Context) func(*CatMasterRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatMaster) WithBytes(v string) func(*CatMasterRequest) { + return func(r *CatMasterRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatMaster) WithFormat(v string) func(*CatMasterRequest) { return func(r *CatMasterRequest) { @@ -244,6 +261,13 @@ func (f CatMaster) WithS(v ...string) func(*CatMasterRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatMaster) WithTime(v string) func(*CatMasterRequest) { + return func(r *CatMasterRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatMaster) WithV(v bool) func(*CatMasterRequest) { return func(r *CatMasterRequest) { diff --git a/esapi/api.cat.nodeattrs.go b/esapi/api.cat.nodeattrs.go index 4df967aea5..c0893a60ee 100644 --- a/esapi/api.cat.nodeattrs.go +++ b/esapi/api.cat.nodeattrs.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,19 +44,21 @@ func newCatNodeattrsFunc(t Transport) CatNodeattrs { // ----- API Definition ------------------------------------------------------- -// CatNodeattrs returns information about custom node attributes. +// CatNodeattrs get node attribute information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-nodeattrs. type CatNodeattrs func(o ...func(*CatNodeattrsRequest)) (*Response, error) // CatNodeattrsRequest configures the Cat Nodeattrs API request. type CatNodeattrsRequest struct { + Bytes string Format string H []string Help *bool Local *bool MasterTimeout time.Duration S []string + Time string V *bool Pretty bool @@ -96,6 +98,10 @@ func (r CatNodeattrsRequest) Do(providedCtx context.Context, transport Transport params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -120,6 +126,10 @@ func (r CatNodeattrsRequest) Do(providedCtx context.Context, transport Transport params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -202,6 +212,13 @@ func (f CatNodeattrs) WithContext(v context.Context) func(*CatNodeattrsRequest) } } +// WithBytes - the unit in which to display byte values. +func (f CatNodeattrs) WithBytes(v string) func(*CatNodeattrsRequest) { + return func(r *CatNodeattrsRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatNodeattrs) WithFormat(v string) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { @@ -244,6 +261,13 @@ func (f CatNodeattrs) WithS(v ...string) func(*CatNodeattrsRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatNodeattrs) WithTime(v string) func(*CatNodeattrsRequest) { + return func(r *CatNodeattrsRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatNodeattrs) WithV(v bool) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { diff --git a/esapi/api.cat.nodes.go b/esapi/api.cat.nodes.go index 54aedcefa3..5b427643ac 100644 --- a/esapi/api.cat.nodes.go +++ b/esapi/api.cat.nodes.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCatNodesFunc(t Transport) CatNodes { // ----- API Definition ------------------------------------------------------- -// CatNodes returns basic statistics about performance of cluster nodes. +// CatNodes get node information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-nodes. type CatNodes func(o ...func(*CatNodesRequest)) (*Response, error) // CatNodesRequest configures the Cat Nodes API request. diff --git a/esapi/api.cat.pending_tasks.go b/esapi/api.cat.pending_tasks.go index be63a93be1..d0c2b78df7 100644 --- a/esapi/api.cat.pending_tasks.go +++ b/esapi/api.cat.pending_tasks.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,13 +44,14 @@ func newCatPendingTasksFunc(t Transport) CatPendingTasks { // ----- API Definition ------------------------------------------------------- -// CatPendingTasks returns a concise representation of the cluster pending tasks. +// CatPendingTasks get pending task information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-pending-tasks. type CatPendingTasks func(o ...func(*CatPendingTasksRequest)) (*Response, error) // CatPendingTasksRequest configures the Cat Pending Tasks API request. type CatPendingTasksRequest struct { + Bytes string Format string H []string Help *bool @@ -97,6 +98,10 @@ func (r CatPendingTasksRequest) Do(providedCtx context.Context, transport Transp params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -207,6 +212,13 @@ func (f CatPendingTasks) WithContext(v context.Context) func(*CatPendingTasksReq } } +// WithBytes - the unit in which to display byte values. +func (f CatPendingTasks) WithBytes(v string) func(*CatPendingTasksRequest) { + return func(r *CatPendingTasksRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatPendingTasks) WithFormat(v string) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { diff --git a/esapi/api.cat.plugins.go b/esapi/api.cat.plugins.go index 19d3a84bc6..c2298791d8 100644 --- a/esapi/api.cat.plugins.go +++ b/esapi/api.cat.plugins.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,13 +44,14 @@ func newCatPluginsFunc(t Transport) CatPlugins { // ----- API Definition ------------------------------------------------------- -// CatPlugins returns information about installed plugins across nodes node. +// CatPlugins get plugin information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-plugins. type CatPlugins func(o ...func(*CatPluginsRequest)) (*Response, error) // CatPluginsRequest configures the Cat Plugins API request. type CatPluginsRequest struct { + Bytes string Format string H []string Help *bool @@ -58,6 +59,7 @@ type CatPluginsRequest struct { Local *bool MasterTimeout time.Duration S []string + Time string V *bool Pretty bool @@ -97,6 +99,10 @@ func (r CatPluginsRequest) Do(providedCtx context.Context, transport Transport) params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -125,6 +131,10 @@ func (r CatPluginsRequest) Do(providedCtx context.Context, transport Transport) params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -207,6 +217,13 @@ func (f CatPlugins) WithContext(v context.Context) func(*CatPluginsRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatPlugins) WithBytes(v string) func(*CatPluginsRequest) { + return func(r *CatPluginsRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatPlugins) WithFormat(v string) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { @@ -256,6 +273,13 @@ func (f CatPlugins) WithS(v ...string) func(*CatPluginsRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatPlugins) WithTime(v string) func(*CatPluginsRequest) { + return func(r *CatPluginsRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatPlugins) WithV(v bool) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { diff --git a/esapi/api.cat.recovery.go b/esapi/api.cat.recovery.go index 405edb5259..0ac870903c 100644 --- a/esapi/api.cat.recovery.go +++ b/esapi/api.cat.recovery.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCatRecoveryFunc(t Transport) CatRecovery { // ----- API Definition ------------------------------------------------------- -// CatRecovery returns information about index shard recoveries, both on-going completed. +// CatRecovery get shard recovery information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-recovery. type CatRecovery func(o ...func(*CatRecoveryRequest)) (*Response, error) // CatRecoveryRequest configures the Cat Recovery API request. diff --git a/esapi/api.cat.repositories.go b/esapi/api.cat.repositories.go index 4377f097c7..a3591e3b75 100644 --- a/esapi/api.cat.repositories.go +++ b/esapi/api.cat.repositories.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,19 +44,21 @@ func newCatRepositoriesFunc(t Transport) CatRepositories { // ----- API Definition ------------------------------------------------------- -// CatRepositories returns information about snapshot repositories registered in the cluster. +// CatRepositories get snapshot repository information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-repositories. type CatRepositories func(o ...func(*CatRepositoriesRequest)) (*Response, error) // CatRepositoriesRequest configures the Cat Repositories API request. type CatRepositoriesRequest struct { + Bytes string Format string H []string Help *bool Local *bool MasterTimeout time.Duration S []string + Time string V *bool Pretty bool @@ -96,6 +98,10 @@ func (r CatRepositoriesRequest) Do(providedCtx context.Context, transport Transp params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -120,6 +126,10 @@ func (r CatRepositoriesRequest) Do(providedCtx context.Context, transport Transp params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -202,6 +212,13 @@ func (f CatRepositories) WithContext(v context.Context) func(*CatRepositoriesReq } } +// WithBytes - the unit in which to display byte values. +func (f CatRepositories) WithBytes(v string) func(*CatRepositoriesRequest) { + return func(r *CatRepositoriesRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatRepositories) WithFormat(v string) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { @@ -244,6 +261,13 @@ func (f CatRepositories) WithS(v ...string) func(*CatRepositoriesRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatRepositories) WithTime(v string) func(*CatRepositoriesRequest) { + return func(r *CatRepositoriesRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatRepositories) WithV(v bool) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { diff --git a/esapi/api.cat.segments.go b/esapi/api.cat.segments.go index bf7c801c7d..220bed7c1f 100644 --- a/esapi/api.cat.segments.go +++ b/esapi/api.cat.segments.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,23 +44,29 @@ func newCatSegmentsFunc(t Transport) CatSegments { // ----- API Definition ------------------------------------------------------- -// CatSegments provides low-level information about the segments in the shards of an index. +// CatSegments get segment information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-segments. type CatSegments func(o ...func(*CatSegmentsRequest)) (*Response, error) // CatSegmentsRequest configures the Cat Segments API request. type CatSegmentsRequest struct { Index []string - Bytes string - Format string - H []string - Help *bool - Local *bool - MasterTimeout time.Duration - S []string - V *bool + AllowClosed *bool + AllowNoIndices *bool + Bytes string + ExpandWildcards []string + Format string + H []string + Help *bool + IgnoreThrottled *bool + IgnoreUnavailable *bool + Local *bool + MasterTimeout time.Duration + S []string + Time string + V *bool Pretty bool Human bool @@ -109,10 +115,22 @@ func (r CatSegmentsRequest) Do(providedCtx context.Context, transport Transport) params = make(map[string]string) + if r.AllowClosed != nil { + params["allow_closed"] = strconv.FormatBool(*r.AllowClosed) + } + + if r.AllowNoIndices != nil { + params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) + } + if r.Bytes != "" { params["bytes"] = r.Bytes } + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") + } + if r.Format != "" { params["format"] = r.Format } @@ -125,6 +143,14 @@ func (r CatSegmentsRequest) Do(providedCtx context.Context, transport Transport) params["help"] = strconv.FormatBool(*r.Help) } + if r.IgnoreThrottled != nil { + params["ignore_throttled"] = strconv.FormatBool(*r.IgnoreThrottled) + } + + if r.IgnoreUnavailable != nil { + params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) + } + if r.Local != nil { params["local"] = strconv.FormatBool(*r.Local) } @@ -137,6 +163,10 @@ func (r CatSegmentsRequest) Do(providedCtx context.Context, transport Transport) params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -226,6 +256,20 @@ func (f CatSegments) WithIndex(v ...string) func(*CatSegmentsRequest) { } } +// WithAllowClosed - if true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour of throwing an exception if index pattern matches closed indices. +func (f CatSegments) WithAllowClosed(v bool) func(*CatSegmentsRequest) { + return func(r *CatSegmentsRequest) { + r.AllowClosed = &v + } +} + +// WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). only allowed when providing an index expression.. +func (f CatSegments) WithAllowNoIndices(v bool) func(*CatSegmentsRequest) { + return func(r *CatSegmentsRequest) { + r.AllowNoIndices = &v + } +} + // WithBytes - the unit in which to display byte values. func (f CatSegments) WithBytes(v string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { @@ -233,6 +277,13 @@ func (f CatSegments) WithBytes(v string) func(*CatSegmentsRequest) { } } +// WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. +func (f CatSegments) WithExpandWildcards(v ...string) func(*CatSegmentsRequest) { + return func(r *CatSegmentsRequest) { + r.ExpandWildcards = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatSegments) WithFormat(v string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { @@ -254,6 +305,20 @@ func (f CatSegments) WithHelp(v bool) func(*CatSegmentsRequest) { } } +// WithIgnoreThrottled - whether specified concrete, expanded or aliased indices should be ignored when throttled. only allowed when providing an index expression.. +func (f CatSegments) WithIgnoreThrottled(v bool) func(*CatSegmentsRequest) { + return func(r *CatSegmentsRequest) { + r.IgnoreThrottled = &v + } +} + +// WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). only allowed when providing an index expression.. +func (f CatSegments) WithIgnoreUnavailable(v bool) func(*CatSegmentsRequest) { + return func(r *CatSegmentsRequest) { + r.IgnoreUnavailable = &v + } +} + // WithLocal - return local information, do not retrieve the state from master node (default: false). func (f CatSegments) WithLocal(v bool) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { @@ -275,6 +340,13 @@ func (f CatSegments) WithS(v ...string) func(*CatSegmentsRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatSegments) WithTime(v string) func(*CatSegmentsRequest) { + return func(r *CatSegmentsRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatSegments) WithV(v bool) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { diff --git a/esapi/api.cat.shards.go b/esapi/api.cat.shards.go index c993738a89..fb2dbdcd13 100644 --- a/esapi/api.cat.shards.go +++ b/esapi/api.cat.shards.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCatShardsFunc(t Transport) CatShards { // ----- API Definition ------------------------------------------------------- -// CatShards provides a detailed view of shard allocation on nodes. +// CatShards get shard information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-shards. type CatShards func(o ...func(*CatShardsRequest)) (*Response, error) // CatShardsRequest configures the Cat Shards API request. diff --git a/esapi/api.cat.snapshots.go b/esapi/api.cat.snapshots.go index 33784c5476..33ad5e56ec 100644 --- a/esapi/api.cat.snapshots.go +++ b/esapi/api.cat.snapshots.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,15 +44,16 @@ func newCatSnapshotsFunc(t Transport) CatSnapshots { // ----- API Definition ------------------------------------------------------- -// CatSnapshots returns all snapshots in a specific repository. +// CatSnapshots get snapshot information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-snapshots. type CatSnapshots func(o ...func(*CatSnapshotsRequest)) (*Response, error) // CatSnapshotsRequest configures the Cat Snapshots API request. type CatSnapshotsRequest struct { Repository []string + Bytes string Format string H []string Help *bool @@ -109,6 +110,10 @@ func (r CatSnapshotsRequest) Do(providedCtx context.Context, transport Transport params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -226,6 +231,13 @@ func (f CatSnapshots) WithRepository(v ...string) func(*CatSnapshotsRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatSnapshots) WithBytes(v string) func(*CatSnapshotsRequest) { + return func(r *CatSnapshotsRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatSnapshots) WithFormat(v string) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { diff --git a/esapi/api.cat.tasks.go b/esapi/api.cat.tasks.go index 58fb197a54..e95383dadd 100644 --- a/esapi/api.cat.tasks.go +++ b/esapi/api.cat.tasks.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,16 +44,17 @@ func newCatTasksFunc(t Transport) CatTasks { // ----- API Definition ------------------------------------------------------- -// CatTasks returns information about the tasks currently executing on one or more nodes in the cluster. +// CatTasks get task information // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-tasks. type CatTasks func(o ...func(*CatTasksRequest)) (*Response, error) // CatTasksRequest configures the Cat Tasks API request. type CatTasksRequest struct { Actions []string + Bytes string Detailed *bool Format string H []string @@ -107,6 +108,10 @@ func (r CatTasksRequest) Do(providedCtx context.Context, transport Transport) (* params["actions"] = strings.Join(r.Actions, ",") } + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Detailed != nil { params["detailed"] = strconv.FormatBool(*r.Detailed) } @@ -236,6 +241,13 @@ func (f CatTasks) WithActions(v ...string) func(*CatTasksRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatTasks) WithBytes(v string) func(*CatTasksRequest) { + return func(r *CatTasksRequest) { + r.Bytes = v + } +} + // WithDetailed - return detailed task information (default: false). func (f CatTasks) WithDetailed(v bool) func(*CatTasksRequest) { return func(r *CatTasksRequest) { diff --git a/esapi/api.cat.templates.go b/esapi/api.cat.templates.go index 04c03c64cd..ef2a78a914 100644 --- a/esapi/api.cat.templates.go +++ b/esapi/api.cat.templates.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,21 +44,23 @@ func newCatTemplatesFunc(t Transport) CatTemplates { // ----- API Definition ------------------------------------------------------- -// CatTemplates returns information about existing templates. +// CatTemplates get index template information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-templates. type CatTemplates func(o ...func(*CatTemplatesRequest)) (*Response, error) // CatTemplatesRequest configures the Cat Templates API request. type CatTemplatesRequest struct { Name string + Bytes string Format string H []string Help *bool Local *bool MasterTimeout time.Duration S []string + Time string V *bool Pretty bool @@ -108,6 +110,10 @@ func (r CatTemplatesRequest) Do(providedCtx context.Context, transport Transport params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -132,6 +138,10 @@ func (r CatTemplatesRequest) Do(providedCtx context.Context, transport Transport params["s"] = strings.Join(r.S, ",") } + if r.Time != "" { + params["time"] = r.Time + } + if r.V != nil { params["v"] = strconv.FormatBool(*r.V) } @@ -221,6 +231,13 @@ func (f CatTemplates) WithName(v string) func(*CatTemplatesRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatTemplates) WithBytes(v string) func(*CatTemplatesRequest) { + return func(r *CatTemplatesRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatTemplates) WithFormat(v string) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { @@ -263,6 +280,13 @@ func (f CatTemplates) WithS(v ...string) func(*CatTemplatesRequest) { } } +// WithTime - the unit in which to display time values. +func (f CatTemplates) WithTime(v string) func(*CatTemplatesRequest) { + return func(r *CatTemplatesRequest) { + r.Time = v + } +} + // WithV - verbose mode. display column headers. func (f CatTemplates) WithV(v bool) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { diff --git a/esapi/api.cat.thread_pool.go b/esapi/api.cat.thread_pool.go index 70d18e59d1..44d779baf5 100644 --- a/esapi/api.cat.thread_pool.go +++ b/esapi/api.cat.thread_pool.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,16 +44,16 @@ func newCatThreadPoolFunc(t Transport) CatThreadPool { // ----- API Definition ------------------------------------------------------- -// CatThreadPool returns cluster-wide thread pool statistics per node. -// By default the active, queue and rejected statistics are returned for all thread pools. +// CatThreadPool get thread pool statistics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-thread-pool. type CatThreadPool func(o ...func(*CatThreadPoolRequest)) (*Response, error) // CatThreadPoolRequest configures the Cat Thread Pool API request. type CatThreadPoolRequest struct { ThreadPoolPatterns []string + Bytes string Format string H []string Help *bool @@ -110,6 +110,10 @@ func (r CatThreadPoolRequest) Do(providedCtx context.Context, transport Transpor params = make(map[string]string) + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -227,6 +231,13 @@ func (f CatThreadPool) WithThreadPoolPatterns(v ...string) func(*CatThreadPoolRe } } +// WithBytes - the unit in which to display byte values. +func (f CatThreadPool) WithBytes(v string) func(*CatThreadPoolRequest) { + return func(r *CatThreadPoolRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatThreadPool) WithFormat(v string) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { diff --git a/esapi/api.clear_scroll.go b/esapi/api.clear_scroll.go index b3a86f7d84..019aa2af03 100644 --- a/esapi/api.clear_scroll.go +++ b/esapi/api.clear_scroll.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newClearScrollFunc(t Transport) ClearScroll { // ----- API Definition ------------------------------------------------------- -// ClearScroll explicitly clears the search context for a scroll. +// ClearScroll clear a scrolling search // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll. type ClearScroll func(o ...func(*ClearScrollRequest)) (*Response, error) // ClearScrollRequest configures the Clear Scroll API request. diff --git a/esapi/api.cluster.allocation_explain.go b/esapi/api.cluster.allocation_explain.go index 8d2f68193c..a62b13078a 100644 --- a/esapi/api.cluster.allocation_explain.go +++ b/esapi/api.cluster.allocation_explain.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,18 +45,22 @@ func newClusterAllocationExplainFunc(t Transport) ClusterAllocationExplain { // ----- API Definition ------------------------------------------------------- -// ClusterAllocationExplain provides explanations for shard allocations in the cluster. +// ClusterAllocationExplain explain the shard allocations // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain. type ClusterAllocationExplain func(o ...func(*ClusterAllocationExplainRequest)) (*Response, error) // ClusterAllocationExplainRequest configures the Cluster Allocation Explain API request. type ClusterAllocationExplainRequest struct { Body io.Reader + CurrentNode string IncludeDiskInfo *bool IncludeYesDecisions *bool + Index string MasterTimeout time.Duration + Primary *bool + Shard *int Pretty bool Human bool @@ -95,6 +99,10 @@ func (r ClusterAllocationExplainRequest) Do(providedCtx context.Context, transpo params = make(map[string]string) + if r.CurrentNode != "" { + params["current_node"] = r.CurrentNode + } + if r.IncludeDiskInfo != nil { params["include_disk_info"] = strconv.FormatBool(*r.IncludeDiskInfo) } @@ -103,10 +111,22 @@ func (r ClusterAllocationExplainRequest) Do(providedCtx context.Context, transpo params["include_yes_decisions"] = strconv.FormatBool(*r.IncludeYesDecisions) } + if r.Index != "" { + params["index"] = r.Index + } + if r.MasterTimeout != 0 { params["master_timeout"] = formatDuration(r.MasterTimeout) } + if r.Primary != nil { + params["primary"] = strconv.FormatBool(*r.Primary) + } + + if r.Shard != nil { + params["shard"] = strconv.FormatInt(int64(*r.Shard), 10) + } + if r.Pretty { params["pretty"] = "true" } @@ -199,6 +219,13 @@ func (f ClusterAllocationExplain) WithBody(v io.Reader) func(*ClusterAllocationE } } +// WithCurrentNode - specifies the node ID or the name of the node to only explain a shard that is currently located on the specified node. +func (f ClusterAllocationExplain) WithCurrentNode(v string) func(*ClusterAllocationExplainRequest) { + return func(r *ClusterAllocationExplainRequest) { + r.CurrentNode = v + } +} + // WithIncludeDiskInfo - return information about disk usage and shard sizes (default: false). func (f ClusterAllocationExplain) WithIncludeDiskInfo(v bool) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { @@ -213,6 +240,13 @@ func (f ClusterAllocationExplain) WithIncludeYesDecisions(v bool) func(*ClusterA } } +// WithIndex - specifies the name of the index that you would like an explanation for. +func (f ClusterAllocationExplain) WithIndex(v string) func(*ClusterAllocationExplainRequest) { + return func(r *ClusterAllocationExplainRequest) { + r.Index = v + } +} + // WithMasterTimeout - timeout for connection to master node. func (f ClusterAllocationExplain) WithMasterTimeout(v time.Duration) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { @@ -220,6 +254,20 @@ func (f ClusterAllocationExplain) WithMasterTimeout(v time.Duration) func(*Clust } } +// WithPrimary - if true, returns explanation for the primary shard for the given shard ID. +func (f ClusterAllocationExplain) WithPrimary(v bool) func(*ClusterAllocationExplainRequest) { + return func(r *ClusterAllocationExplainRequest) { + r.Primary = &v + } +} + +// WithShard - specifies the ID of the shard that you would like an explanation for. +func (f ClusterAllocationExplain) WithShard(v int) func(*ClusterAllocationExplainRequest) { + return func(r *ClusterAllocationExplainRequest) { + r.Shard = &v + } +} + // WithPretty makes the response body pretty-printed. func (f ClusterAllocationExplain) WithPretty() func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { diff --git a/esapi/api.cluster.delete_component_template.go b/esapi/api.cluster.delete_component_template.go index 3c2baed585..788cbfffa8 100644 --- a/esapi/api.cluster.delete_component_template.go +++ b/esapi/api.cluster.delete_component_template.go @@ -15,19 +15,20 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strings" "time" ) func newClusterDeleteComponentTemplateFunc(t Transport) ClusterDeleteComponentTemplate { - return func(name string, o ...func(*ClusterDeleteComponentTemplateRequest)) (*Response, error) { + return func(name []string, o ...func(*ClusterDeleteComponentTemplateRequest)) (*Response, error) { var r = ClusterDeleteComponentTemplateRequest{Name: name} for _, f := range o { f(&r) @@ -43,14 +44,14 @@ func newClusterDeleteComponentTemplateFunc(t Transport) ClusterDeleteComponentTe // ----- API Definition ------------------------------------------------------- -// ClusterDeleteComponentTemplate deletes a component template +// ClusterDeleteComponentTemplate delete component templates // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html. -type ClusterDeleteComponentTemplate func(name string, o ...func(*ClusterDeleteComponentTemplateRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template. +type ClusterDeleteComponentTemplate func(name []string, o ...func(*ClusterDeleteComponentTemplateRequest)) (*Response, error) // ClusterDeleteComponentTemplateRequest configures the Cluster Delete Component Template API request. type ClusterDeleteComponentTemplateRequest struct { - Name string + Name []string MasterTimeout time.Duration Timeout time.Duration @@ -86,14 +87,18 @@ func (r ClusterDeleteComponentTemplateRequest) Do(providedCtx context.Context, t method = "DELETE" - path.Grow(7 + 1 + len("_component_template") + 1 + len(r.Name)) + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_component_template") + 1 + len(strings.Join(r.Name, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_component_template") path.WriteString("/") - path.WriteString(r.Name) + path.WriteString(strings.Join(r.Name, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "name", r.Name) + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) } params = make(map[string]string) diff --git a/esapi/api.cluster.delete_voting_config_exclusions.go b/esapi/api.cluster.delete_voting_config_exclusions.go index 43f7c6103a..5086359f34 100644 --- a/esapi/api.cluster.delete_voting_config_exclusions.go +++ b/esapi/api.cluster.delete_voting_config_exclusions.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newClusterDeleteVotingConfigExclusionsFunc(t Transport) ClusterDeleteVoting // ----- API Definition ------------------------------------------------------- -// ClusterDeleteVotingConfigExclusions clears cluster voting config exclusions. +// ClusterDeleteVotingConfigExclusions clear cluster voting config exclusions // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions. type ClusterDeleteVotingConfigExclusions func(o ...func(*ClusterDeleteVotingConfigExclusionsRequest)) (*Response, error) // ClusterDeleteVotingConfigExclusionsRequest configures the Cluster Delete Voting Config Exclusions API request. diff --git a/esapi/api.cluster.exists_component_template.go b/esapi/api.cluster.exists_component_template.go index 50facc059d..7838a67008 100644 --- a/esapi/api.cluster.exists_component_template.go +++ b/esapi/api.cluster.exists_component_template.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strconv" "strings" @@ -28,7 +29,7 @@ import ( ) func newClusterExistsComponentTemplateFunc(t Transport) ClusterExistsComponentTemplate { - return func(name string, o ...func(*ClusterExistsComponentTemplateRequest)) (*Response, error) { + return func(name []string, o ...func(*ClusterExistsComponentTemplateRequest)) (*Response, error) { var r = ClusterExistsComponentTemplateRequest{Name: name} for _, f := range o { f(&r) @@ -44,14 +45,14 @@ func newClusterExistsComponentTemplateFunc(t Transport) ClusterExistsComponentTe // ----- API Definition ------------------------------------------------------- -// ClusterExistsComponentTemplate returns information about whether a particular component template exist +// ClusterExistsComponentTemplate check component templates // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html. -type ClusterExistsComponentTemplate func(name string, o ...func(*ClusterExistsComponentTemplateRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template. +type ClusterExistsComponentTemplate func(name []string, o ...func(*ClusterExistsComponentTemplateRequest)) (*Response, error) // ClusterExistsComponentTemplateRequest configures the Cluster Exists Component Template API request. type ClusterExistsComponentTemplateRequest struct { - Name string + Name []string Local *bool MasterTimeout time.Duration @@ -87,14 +88,18 @@ func (r ClusterExistsComponentTemplateRequest) Do(providedCtx context.Context, t method = "HEAD" - path.Grow(7 + 1 + len("_component_template") + 1 + len(r.Name)) + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_component_template") + 1 + len(strings.Join(r.Name, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_component_template") path.WriteString("/") - path.WriteString(r.Name) + path.WriteString(strings.Join(r.Name, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "name", r.Name) + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) } params = make(map[string]string) diff --git a/esapi/api.cluster.get_component_template.go b/esapi/api.cluster.get_component_template.go index 72e7ea4860..8bd95e02e0 100644 --- a/esapi/api.cluster.get_component_template.go +++ b/esapi/api.cluster.get_component_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,14 +44,14 @@ func newClusterGetComponentTemplateFunc(t Transport) ClusterGetComponentTemplate // ----- API Definition ------------------------------------------------------- -// ClusterGetComponentTemplate returns one or more component templates +// ClusterGetComponentTemplate get component templates // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template. type ClusterGetComponentTemplate func(o ...func(*ClusterGetComponentTemplateRequest)) (*Response, error) // ClusterGetComponentTemplateRequest configures the Cluster Get Component Template API request. type ClusterGetComponentTemplateRequest struct { - Name []string + Name string FlatSettings *bool IncludeDefaults *bool @@ -90,15 +90,15 @@ func (r ClusterGetComponentTemplateRequest) Do(providedCtx context.Context, tran method = "GET" - path.Grow(7 + 1 + len("_component_template") + 1 + len(strings.Join(r.Name, ","))) + path.Grow(7 + 1 + len("_component_template") + 1 + len(r.Name)) path.WriteString("http://") path.WriteString("/") path.WriteString("_component_template") - if len(r.Name) > 0 { + if r.Name != "" { path.WriteString("/") - path.WriteString(strings.Join(r.Name, ",")) + path.WriteString(r.Name) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) + instrument.RecordPathPart(ctx, "name", r.Name) } } @@ -202,8 +202,8 @@ func (f ClusterGetComponentTemplate) WithContext(v context.Context) func(*Cluste } } -// WithName - the comma separated names of the component templates. -func (f ClusterGetComponentTemplate) WithName(v ...string) func(*ClusterGetComponentTemplateRequest) { +// WithName - the name of the component template. wildcard (`*`) expressions are supported.. +func (f ClusterGetComponentTemplate) WithName(v string) func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { r.Name = v } diff --git a/esapi/api.cluster.get_settings.go b/esapi/api.cluster.get_settings.go index f50d3ab7d3..bdf99fc496 100644 --- a/esapi/api.cluster.get_settings.go +++ b/esapi/api.cluster.get_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newClusterGetSettingsFunc(t Transport) ClusterGetSettings { // ----- API Definition ------------------------------------------------------- -// ClusterGetSettings returns cluster settings. +// ClusterGetSettings get cluster-wide settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings. type ClusterGetSettings func(o ...func(*ClusterGetSettingsRequest)) (*Response, error) // ClusterGetSettingsRequest configures the Cluster Get Settings API request. diff --git a/esapi/api.cluster.health.go b/esapi/api.cluster.health.go index c69ee47469..fc5f73cece 100644 --- a/esapi/api.cluster.health.go +++ b/esapi/api.cluster.health.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,16 +44,16 @@ func newClusterHealthFunc(t Transport) ClusterHealth { // ----- API Definition ------------------------------------------------------- -// ClusterHealth returns basic information about the health of the cluster. +// ClusterHealth get the cluster health status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-health. type ClusterHealth func(o ...func(*ClusterHealthRequest)) (*Response, error) // ClusterHealthRequest configures the Cluster Health API request. type ClusterHealthRequest struct { Index []string - ExpandWildcards string + ExpandWildcards []string Level string Local *bool MasterTimeout time.Duration @@ -112,8 +112,8 @@ func (r ClusterHealthRequest) Do(providedCtx context.Context, transport Transpor params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Level != "" { @@ -242,7 +242,7 @@ func (f ClusterHealth) WithIndex(v ...string) func(*ClusterHealthRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f ClusterHealth) WithExpandWildcards(v string) func(*ClusterHealthRequest) { +func (f ClusterHealth) WithExpandWildcards(v ...string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.cluster.info.go b/esapi/api.cluster.info.go index a0821da150..04bb307a9e 100644 --- a/esapi/api.cluster.info.go +++ b/esapi/api.cluster.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newClusterInfoFunc(t Transport) ClusterInfo { // ----- API Definition ------------------------------------------------------- -// ClusterInfo returns different information about the cluster. +// ClusterInfo get cluster info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-info.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-info. type ClusterInfo func(target []string, o ...func(*ClusterInfoRequest)) (*Response, error) // ClusterInfoRequest configures the Cluster Info API request. diff --git a/esapi/api.cluster.pending_tasks.go b/esapi/api.cluster.pending_tasks.go index 5d62db8d92..85ebb58bd9 100644 --- a/esapi/api.cluster.pending_tasks.go +++ b/esapi/api.cluster.pending_tasks.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,10 +44,9 @@ func newClusterPendingTasksFunc(t Transport) ClusterPendingTasks { // ----- API Definition ------------------------------------------------------- -// ClusterPendingTasks returns a list of any cluster-level changes (e.g. create index, update mapping, -// allocate or fail shard) which have not yet been executed. +// ClusterPendingTasks get the pending cluster tasks // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-pending-tasks. type ClusterPendingTasks func(o ...func(*ClusterPendingTasksRequest)) (*Response, error) // ClusterPendingTasksRequest configures the Cluster Pending Tasks API request. diff --git a/esapi/api.cluster.post_voting_config_exclusions.go b/esapi/api.cluster.post_voting_config_exclusions.go index 91b7ec7f4d..cb6d3b8802 100644 --- a/esapi/api.cluster.post_voting_config_exclusions.go +++ b/esapi/api.cluster.post_voting_config_exclusions.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newClusterPostVotingConfigExclusionsFunc(t Transport) ClusterPostVotingConf // ----- API Definition ------------------------------------------------------- -// ClusterPostVotingConfigExclusions updates the cluster voting config exclusions by node ids or node names. +// ClusterPostVotingConfigExclusions update voting configuration exclusions // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions. type ClusterPostVotingConfigExclusions func(o ...func(*ClusterPostVotingConfigExclusionsRequest)) (*Response, error) // ClusterPostVotingConfigExclusionsRequest configures the Cluster Post Voting Config Exclusions API request. diff --git a/esapi/api.cluster.put_component_template.go b/esapi/api.cluster.put_component_template.go index 44885a3e26..c3541f3107 100644 --- a/esapi/api.cluster.put_component_template.go +++ b/esapi/api.cluster.put_component_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newClusterPutComponentTemplateFunc(t Transport) ClusterPutComponentTemplate // ----- API Definition ------------------------------------------------------- -// ClusterPutComponentTemplate creates or updates a component template +// ClusterPutComponentTemplate create or update a component template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template. type ClusterPutComponentTemplate func(name string, body io.Reader, o ...func(*ClusterPutComponentTemplateRequest)) (*Response, error) // ClusterPutComponentTemplateRequest configures the Cluster Put Component Template API request. diff --git a/esapi/api.cluster.put_settings.go b/esapi/api.cluster.put_settings.go index f1ba212710..0965a9f3e1 100644 --- a/esapi/api.cluster.put_settings.go +++ b/esapi/api.cluster.put_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newClusterPutSettingsFunc(t Transport) ClusterPutSettings { // ----- API Definition ------------------------------------------------------- -// ClusterPutSettings updates the cluster settings. +// ClusterPutSettings update the cluster settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings. type ClusterPutSettings func(body io.Reader, o ...func(*ClusterPutSettingsRequest)) (*Response, error) // ClusterPutSettingsRequest configures the Cluster Put Settings API request. diff --git a/esapi/api.cluster.remote_info.go b/esapi/api.cluster.remote_info.go index 00184c9fe1..cac42f5f59 100644 --- a/esapi/api.cluster.remote_info.go +++ b/esapi/api.cluster.remote_info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newClusterRemoteInfoFunc(t Transport) ClusterRemoteInfo { // ----- API Definition ------------------------------------------------------- -// ClusterRemoteInfo returns the information about configured remote clusters. +// ClusterRemoteInfo get remote cluster information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-remote-info. type ClusterRemoteInfo func(o ...func(*ClusterRemoteInfoRequest)) (*Response, error) // ClusterRemoteInfoRequest configures the Cluster Remote Info API request. diff --git a/esapi/api.cluster.reroute.go b/esapi/api.cluster.reroute.go index b0e8624324..59b25484ad 100644 --- a/esapi/api.cluster.reroute.go +++ b/esapi/api.cluster.reroute.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newClusterRerouteFunc(t Transport) ClusterReroute { // ----- API Definition ------------------------------------------------------- -// ClusterReroute allows to manually change the allocation of individual shards in the cluster. +// ClusterReroute reroute the cluster // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-reroute. type ClusterReroute func(o ...func(*ClusterRerouteRequest)) (*Response, error) // ClusterRerouteRequest configures the Cluster Reroute API request. diff --git a/esapi/api.cluster.state.go b/esapi/api.cluster.state.go index bbea2c788e..04f6f21c12 100644 --- a/esapi/api.cluster.state.go +++ b/esapi/api.cluster.state.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newClusterStateFunc(t Transport) ClusterState { // ----- API Definition ------------------------------------------------------- -// ClusterState returns a comprehensive information about the state of the cluster. +// ClusterState get the cluster state // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-state. type ClusterState func(o ...func(*ClusterStateRequest)) (*Response, error) // ClusterStateRequest configures the Cluster State API request. @@ -56,7 +56,7 @@ type ClusterStateRequest struct { Metric []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string FlatSettings *bool IgnoreUnavailable *bool Local *bool @@ -122,8 +122,8 @@ func (r ClusterStateRequest) Do(providedCtx context.Context, transport Transport params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.FlatSettings != nil { @@ -250,7 +250,7 @@ func (f ClusterState) WithAllowNoIndices(v bool) func(*ClusterStateRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f ClusterState) WithExpandWildcards(v string) func(*ClusterStateRequest) { +func (f ClusterState) WithExpandWildcards(v ...string) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.ExpandWildcards = v } @@ -277,7 +277,7 @@ func (f ClusterState) WithLocal(v bool) func(*ClusterStateRequest) { } } -// WithMasterTimeout - specify timeout for connection to master. +// WithMasterTimeout - timeout for waiting for new cluster state in case it is blocked. func (f ClusterState) WithMasterTimeout(v time.Duration) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.MasterTimeout = v diff --git a/esapi/api.cluster.stats.go b/esapi/api.cluster.stats.go index c4628f8831..719bf0467f 100644 --- a/esapi/api.cluster.stats.go +++ b/esapi/api.cluster.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newClusterStatsFunc(t Transport) ClusterStats { // ----- API Definition ------------------------------------------------------- -// ClusterStats returns high-level overview of cluster statistics. +// ClusterStats get cluster statistics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-stats. type ClusterStats func(o ...func(*ClusterStatsRequest)) (*Response, error) // ClusterStatsRequest configures the Cluster Stats API request. diff --git a/esapi/api.connector.check_in.go b/esapi/api.connector.check_in.go index 75ab402de9..4e939a8073 100644 --- a/esapi/api.connector.check_in.go +++ b/esapi/api.connector.check_in.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newConnectorCheckInFunc(t Transport) ConnectorCheckIn { // ----- API Definition ------------------------------------------------------- -// ConnectorCheckIn updates the last_seen timestamp in the connector document. +// ConnectorCheckIn check in a connector // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-check-in. type ConnectorCheckIn func(connector_id string, o ...func(*ConnectorCheckInRequest)) (*Response, error) // ConnectorCheckInRequest configures the Connector Check In API request. diff --git a/esapi/api.connector.delete.go b/esapi/api.connector.delete.go index b2110c3714..4043c8ad34 100644 --- a/esapi/api.connector.delete.go +++ b/esapi/api.connector.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorDeleteFunc(t Transport) ConnectorDelete { // ----- API Definition ------------------------------------------------------- -// ConnectorDelete deletes a connector. +// ConnectorDelete delete a connector // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-delete. type ConnectorDelete func(connector_id string, o ...func(*ConnectorDeleteRequest)) (*Response, error) // ConnectorDeleteRequest configures the Connector Delete API request. diff --git a/esapi/api.connector.get.go b/esapi/api.connector.get.go index 7046f1d712..64e8a3ddeb 100644 --- a/esapi/api.connector.get.go +++ b/esapi/api.connector.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorGetFunc(t Transport) ConnectorGet { // ----- API Definition ------------------------------------------------------- -// ConnectorGet returns the details about a connector. +// ConnectorGet get a connector // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-get. type ConnectorGet func(connector_id string, o ...func(*ConnectorGetRequest)) (*Response, error) // ConnectorGetRequest configures the Connector Get API request. diff --git a/esapi/api.connector.last_sync.go b/esapi/api.connector.last_sync.go index 7e41ed37aa..d4618bd13f 100644 --- a/esapi/api.connector.last_sync.go +++ b/esapi/api.connector.last_sync.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorLastSyncFunc(t Transport) ConnectorLastSync { // ----- API Definition ------------------------------------------------------- -// ConnectorLastSync updates the stats of last sync in the connector document. +// ConnectorLastSync update the connector last sync stats // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-last-sync-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-last-sync. type ConnectorLastSync func(body io.Reader, connector_id string, o ...func(*ConnectorLastSyncRequest)) (*Response, error) // ConnectorLastSyncRequest configures the Connector Last Sync API request. diff --git a/esapi/api.connector.list.go b/esapi/api.connector.list.go index d065c08b55..4a63088762 100644 --- a/esapi/api.connector.list.go +++ b/esapi/api.connector.list.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorListFunc(t Transport) ConnectorList { // ----- API Definition ------------------------------------------------------- -// ConnectorList lists all connectors. +// ConnectorList get all connectors // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-list. type ConnectorList func(o ...func(*ConnectorListRequest)) (*Response, error) // ConnectorListRequest configures the Connector List API request. diff --git a/esapi/api.connector.post.go b/esapi/api.connector.post.go index e1c401b2e0..432f387431 100644 --- a/esapi/api.connector.post.go +++ b/esapi/api.connector.post.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorPostFunc(t Transport) ConnectorPost { // ----- API Definition ------------------------------------------------------- -// ConnectorPost creates a connector. +// ConnectorPost create a connector // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put. type ConnectorPost func(o ...func(*ConnectorPostRequest)) (*Response, error) // ConnectorPostRequest configures the Connector Post API request. diff --git a/esapi/api.connector.put.go b/esapi/api.connector.put.go index a8c97406b2..ce574fcb28 100644 --- a/esapi/api.connector.put.go +++ b/esapi/api.connector.put.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorPutFunc(t Transport) ConnectorPut { // ----- API Definition ------------------------------------------------------- -// ConnectorPut creates or updates a connector. +// ConnectorPut create or update a connector // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put. type ConnectorPut func(o ...func(*ConnectorPutRequest)) (*Response, error) // ConnectorPutRequest configures the Connector Put API request. diff --git a/esapi/api.connector.secret_delete.go b/esapi/api.connector.secret_delete.go index d35dcc9583..5ce7eac29f 100644 --- a/esapi/api.connector.secret_delete.go +++ b/esapi/api.connector.secret_delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,7 +42,7 @@ func newConnectorSecretDeleteFunc(t Transport) ConnectorSecretDelete { // ----- API Definition ------------------------------------------------------- -// ConnectorSecretDelete deletes a connector secret. +// ConnectorSecretDelete deletes a connector secret // // This API is experimental. type ConnectorSecretDelete func(id string, o ...func(*ConnectorSecretDeleteRequest)) (*Response, error) diff --git a/esapi/api.connector.secret_get.go b/esapi/api.connector.secret_get.go index c8564455c0..f2e44bb9e9 100644 --- a/esapi/api.connector.secret_get.go +++ b/esapi/api.connector.secret_get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,7 +42,7 @@ func newConnectorSecretGetFunc(t Transport) ConnectorSecretGet { // ----- API Definition ------------------------------------------------------- -// ConnectorSecretGet retrieves a secret stored by Connectors. +// ConnectorSecretGet retrieves a secret stored by Connectors // // This API is experimental. type ConnectorSecretGet func(id string, o ...func(*ConnectorSecretGetRequest)) (*Response, error) diff --git a/esapi/api.connector.secret_post.go b/esapi/api.connector.secret_post.go index 13ff872de3..737addec50 100644 --- a/esapi/api.connector.secret_post.go +++ b/esapi/api.connector.secret_post.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,7 +43,7 @@ func newConnectorSecretPostFunc(t Transport) ConnectorSecretPost { // ----- API Definition ------------------------------------------------------- -// ConnectorSecretPost creates a secret for a Connector. +// ConnectorSecretPost creates a secret for a Connector // // This API is experimental. type ConnectorSecretPost func(body io.Reader, o ...func(*ConnectorSecretPostRequest)) (*Response, error) diff --git a/esapi/api.connector.secret_put.go b/esapi/api.connector.secret_put.go index d3dde8726c..4f3ca8aae6 100644 --- a/esapi/api.connector.secret_put.go +++ b/esapi/api.connector.secret_put.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,7 +43,7 @@ func newConnectorSecretPutFunc(t Transport) ConnectorSecretPut { // ----- API Definition ------------------------------------------------------- -// ConnectorSecretPut creates or updates a secret for a Connector. +// ConnectorSecretPut creates or updates a secret for a Connector // // This API is experimental. type ConnectorSecretPut func(id string, body io.Reader, o ...func(*ConnectorSecretPutRequest)) (*Response, error) diff --git a/esapi/api.connector.sync_job_cancel.go b/esapi/api.connector.sync_job_cancel.go index 64f5dc6db2..3b5823bf96 100644 --- a/esapi/api.connector.sync_job_cancel.go +++ b/esapi/api.connector.sync_job_cancel.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newConnectorSyncJobCancelFunc(t Transport) ConnectorSyncJobCancel { // ----- API Definition ------------------------------------------------------- -// ConnectorSyncJobCancel cancels a connector sync job. +// ConnectorSyncJobCancel cancel a connector sync job // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-cancel. type ConnectorSyncJobCancel func(connector_sync_job_id string, o ...func(*ConnectorSyncJobCancelRequest)) (*Response, error) // ConnectorSyncJobCancelRequest configures the Connector Sync Job Cancel API request. diff --git a/esapi/api.connector.sync_job_check_in.go b/esapi/api.connector.sync_job_check_in.go index 2626deb29d..281633fafd 100644 --- a/esapi/api.connector.sync_job_check_in.go +++ b/esapi/api.connector.sync_job_check_in.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newConnectorSyncJobCheckInFunc(t Transport) ConnectorSyncJobCheckIn { // ----- API Definition ------------------------------------------------------- -// ConnectorSyncJobCheckIn checks in a connector sync job (refreshes 'last_seen'). +// ConnectorSyncJobCheckIn check in a connector sync job // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-sync-job-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-check-in. type ConnectorSyncJobCheckIn func(connector_sync_job_id string, o ...func(*ConnectorSyncJobCheckInRequest)) (*Response, error) // ConnectorSyncJobCheckInRequest configures the Connector Sync Job Check In API request. diff --git a/esapi/api.connector.sync_job_claim.go b/esapi/api.connector.sync_job_claim.go index da610e03c8..004098a5ff 100644 --- a/esapi/api.connector.sync_job_claim.go +++ b/esapi/api.connector.sync_job_claim.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorSyncJobClaimFunc(t Transport) ConnectorSyncJobClaim { // ----- API Definition ------------------------------------------------------- -// ConnectorSyncJobClaim claims a connector sync job. +// ConnectorSyncJobClaim claim a connector sync job // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/claim-connector-sync-job-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-claim. type ConnectorSyncJobClaim func(body io.Reader, connector_sync_job_id string, o ...func(*ConnectorSyncJobClaimRequest)) (*Response, error) // ConnectorSyncJobClaimRequest configures the Connector Sync Job Claim API request. diff --git a/esapi/api.connector.sync_job_delete.go b/esapi/api.connector.sync_job_delete.go index 3172b229d4..be3e40a77a 100644 --- a/esapi/api.connector.sync_job_delete.go +++ b/esapi/api.connector.sync_job_delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newConnectorSyncJobDeleteFunc(t Transport) ConnectorSyncJobDelete { // ----- API Definition ------------------------------------------------------- -// ConnectorSyncJobDelete deletes a connector sync job. +// ConnectorSyncJobDelete delete a connector sync job // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-delete. type ConnectorSyncJobDelete func(connector_sync_job_id string, o ...func(*ConnectorSyncJobDeleteRequest)) (*Response, error) // ConnectorSyncJobDeleteRequest configures the Connector Sync Job Delete API request. diff --git a/esapi/api.connector.sync_job_error.go b/esapi/api.connector.sync_job_error.go index ecc7224c15..6e77a91eff 100644 --- a/esapi/api.connector.sync_job_error.go +++ b/esapi/api.connector.sync_job_error.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorSyncJobErrorFunc(t Transport) ConnectorSyncJobError { // ----- API Definition ------------------------------------------------------- -// ConnectorSyncJobError sets an error for a connector sync job. +// ConnectorSyncJobError set a connector sync job error // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-error-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-error. type ConnectorSyncJobError func(body io.Reader, connector_sync_job_id string, o ...func(*ConnectorSyncJobErrorRequest)) (*Response, error) // ConnectorSyncJobErrorRequest configures the Connector Sync Job Error API request. diff --git a/esapi/api.connector.sync_job_get.go b/esapi/api.connector.sync_job_get.go index 5e5599e463..4c1a0222e6 100644 --- a/esapi/api.connector.sync_job_get.go +++ b/esapi/api.connector.sync_job_get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newConnectorSyncJobGetFunc(t Transport) ConnectorSyncJobGet { // ----- API Definition ------------------------------------------------------- -// ConnectorSyncJobGet returns the details about a connector sync job. +// ConnectorSyncJobGet get a connector sync job // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-get. type ConnectorSyncJobGet func(connector_sync_job_id string, o ...func(*ConnectorSyncJobGetRequest)) (*Response, error) // ConnectorSyncJobGetRequest configures the Connector Sync Job Get API request. diff --git a/esapi/api.connector.sync_job_list.go b/esapi/api.connector.sync_job_list.go index 6d00f01d6a..ee9cd939d5 100644 --- a/esapi/api.connector.sync_job_list.go +++ b/esapi/api.connector.sync_job_list.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorSyncJobListFunc(t Transport) ConnectorSyncJobList { // ----- API Definition ------------------------------------------------------- -// ConnectorSyncJobList lists all connector sync jobs. +// ConnectorSyncJobList get all connector sync jobs // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-list. type ConnectorSyncJobList func(o ...func(*ConnectorSyncJobListRequest)) (*Response, error) // ConnectorSyncJobListRequest configures the Connector Sync Job List API request. @@ -221,7 +221,7 @@ func (f ConnectorSyncJobList) WithSize(v int) func(*ConnectorSyncJobListRequest) } } -// WithStatus - sync job status, which sync jobs are fetched for. +// WithStatus - a sync job status to fetch connector sync jobs for. func (f ConnectorSyncJobList) WithStatus(v string) func(*ConnectorSyncJobListRequest) { return func(r *ConnectorSyncJobListRequest) { r.Status = v diff --git a/esapi/api.connector.sync_job_post.go b/esapi/api.connector.sync_job_post.go index b1b5ac0e1c..b3a2ae7b05 100644 --- a/esapi/api.connector.sync_job_post.go +++ b/esapi/api.connector.sync_job_post.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorSyncJobPostFunc(t Transport) ConnectorSyncJobPost { // ----- API Definition ------------------------------------------------------- -// ConnectorSyncJobPost creates a connector sync job. +// ConnectorSyncJobPost create a connector sync job // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-post. type ConnectorSyncJobPost func(body io.Reader, o ...func(*ConnectorSyncJobPostRequest)) (*Response, error) // ConnectorSyncJobPostRequest configures the Connector Sync Job Post API request. diff --git a/esapi/api.connector.sync_job_update_stats.go b/esapi/api.connector.sync_job_update_stats.go index bee74b0a31..737af982b8 100644 --- a/esapi/api.connector.sync_job_update_stats.go +++ b/esapi/api.connector.sync_job_update_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorSyncJobUpdateStatsFunc(t Transport) ConnectorSyncJobUpdateStats // ----- API Definition ------------------------------------------------------- -// ConnectorSyncJobUpdateStats updates the stats fields in the connector sync job document. +// ConnectorSyncJobUpdateStats set the connector sync job stats // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-stats-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-update-stats. type ConnectorSyncJobUpdateStats func(body io.Reader, connector_sync_job_id string, o ...func(*ConnectorSyncJobUpdateStatsRequest)) (*Response, error) // ConnectorSyncJobUpdateStatsRequest configures the Connector Sync Job Update Stats API request. diff --git a/esapi/api.connector.update_active_filtering.go b/esapi/api.connector.update_active_filtering.go index 774a7e22e6..248ee51fea 100644 --- a/esapi/api.connector.update_active_filtering.go +++ b/esapi/api.connector.update_active_filtering.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newConnectorUpdateActiveFilteringFunc(t Transport) ConnectorUpdateActiveFil // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateActiveFiltering activates the draft filtering rules if they are in a validated state. +// ConnectorUpdateActiveFiltering activate the connector draft filter // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering. type ConnectorUpdateActiveFiltering func(connector_id string, o ...func(*ConnectorUpdateActiveFilteringRequest)) (*Response, error) // ConnectorUpdateActiveFilteringRequest configures the Connector Update Active Filtering API request. diff --git a/esapi/api.connector.update_api_key_id.go b/esapi/api.connector.update_api_key_id.go index 276fcac8bf..8153f9c757 100644 --- a/esapi/api.connector.update_api_key_id.go +++ b/esapi/api.connector.update_api_key_id.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateAPIKeyDocumentIDFunc(t Transport) ConnectorUpdateAPIKeyDo // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateAPIKeyDocumentID updates the API key id and/or API key secret id fields in the connector document. +// ConnectorUpdateAPIKeyDocumentID update the connector API key ID // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-api-key-id-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-api-key-id. type ConnectorUpdateAPIKeyDocumentID func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateAPIKeyDocumentIDRequest)) (*Response, error) // ConnectorUpdateAPIKeyDocumentIDRequest configures the Connector UpdateAPI Key DocumentI D API request. diff --git a/esapi/api.connector.update_configuration.go b/esapi/api.connector.update_configuration.go index c35fc56441..fa0a2c56f1 100644 --- a/esapi/api.connector.update_configuration.go +++ b/esapi/api.connector.update_configuration.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateConfigurationFunc(t Transport) ConnectorUpdateConfigurati // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateConfiguration updates the connector configuration. +// ConnectorUpdateConfiguration update the connector configuration // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-configuration-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-configuration. type ConnectorUpdateConfiguration func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateConfigurationRequest)) (*Response, error) // ConnectorUpdateConfigurationRequest configures the Connector Update Configuration API request. diff --git a/esapi/api.connector.update_error.go b/esapi/api.connector.update_error.go index 903bd8f169..41d639686d 100644 --- a/esapi/api.connector.update_error.go +++ b/esapi/api.connector.update_error.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateErrorFunc(t Transport) ConnectorUpdateError { // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateError updates the error field in the connector document. +// ConnectorUpdateError update the connector error field // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-error-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-error. type ConnectorUpdateError func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateErrorRequest)) (*Response, error) // ConnectorUpdateErrorRequest configures the Connector Update Error API request. diff --git a/esapi/api.connector.update_features.go b/esapi/api.connector.update_features.go index 7038dc8b08..a5eec281a7 100644 --- a/esapi/api.connector.update_features.go +++ b/esapi/api.connector.update_features.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateFeaturesFunc(t Transport) ConnectorUpdateFeatures { // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateFeatures updates the connector features in the connector document. +// ConnectorUpdateFeatures update the connector features // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-features-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-features. type ConnectorUpdateFeatures func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateFeaturesRequest)) (*Response, error) // ConnectorUpdateFeaturesRequest configures the Connector Update Features API request. diff --git a/esapi/api.connector.update_filtering.go b/esapi/api.connector.update_filtering.go index 2225de8a62..350baabfbc 100644 --- a/esapi/api.connector.update_filtering.go +++ b/esapi/api.connector.update_filtering.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateFilteringFunc(t Transport) ConnectorUpdateFiltering { // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateFiltering updates the filtering field in the connector document. +// ConnectorUpdateFiltering update the connector filtering // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering. type ConnectorUpdateFiltering func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateFilteringRequest)) (*Response, error) // ConnectorUpdateFilteringRequest configures the Connector Update Filtering API request. diff --git a/esapi/api.connector.update_filtering_validation.go b/esapi/api.connector.update_filtering_validation.go index 1c6ab2b0ac..ef17b39399 100644 --- a/esapi/api.connector.update_filtering_validation.go +++ b/esapi/api.connector.update_filtering_validation.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateFilteringValidationFunc(t Transport) ConnectorUpdateFilte // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateFilteringValidation updates the validation info of the draft filtering rules. +// ConnectorUpdateFilteringValidation update the connector draft filtering validation // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering-validation. type ConnectorUpdateFilteringValidation func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateFilteringValidationRequest)) (*Response, error) // ConnectorUpdateFilteringValidationRequest configures the Connector Update Filtering Validation API request. diff --git a/esapi/api.connector.update_index_name.go b/esapi/api.connector.update_index_name.go index f67204f14b..fca5c8c8b9 100644 --- a/esapi/api.connector.update_index_name.go +++ b/esapi/api.connector.update_index_name.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateIndexNameFunc(t Transport) ConnectorUpdateIndexName { // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateIndexName updates the index name of the connector. +// ConnectorUpdateIndexName update the connector index name // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-index-name-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-index-name. type ConnectorUpdateIndexName func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateIndexNameRequest)) (*Response, error) // ConnectorUpdateIndexNameRequest configures the Connector Update Index Name API request. diff --git a/esapi/api.connector.update_name.go b/esapi/api.connector.update_name.go index 3e6fc52bff..f213936c6f 100644 --- a/esapi/api.connector.update_name.go +++ b/esapi/api.connector.update_name.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateNameFunc(t Transport) ConnectorUpdateName { // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateName updates the name and/or description fields in the connector document. +// ConnectorUpdateName update the connector name and description // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-name-description-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-name. type ConnectorUpdateName func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateNameRequest)) (*Response, error) // ConnectorUpdateNameRequest configures the Connector Update Name API request. diff --git a/esapi/api.connector.update_native.go b/esapi/api.connector.update_native.go index 05b2b0c51f..059e6d4a05 100644 --- a/esapi/api.connector.update_native.go +++ b/esapi/api.connector.update_native.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateNativeFunc(t Transport) ConnectorUpdateNative { // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateNative updates the is_native flag of the connector. +// ConnectorUpdateNative update the connector is_native flag // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-native. type ConnectorUpdateNative func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateNativeRequest)) (*Response, error) // ConnectorUpdateNativeRequest configures the Connector Update Native API request. diff --git a/esapi/api.connector.update_pipeline.go b/esapi/api.connector.update_pipeline.go index 3a438cd0b2..304c72cb6f 100644 --- a/esapi/api.connector.update_pipeline.go +++ b/esapi/api.connector.update_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdatePipelineFunc(t Transport) ConnectorUpdatePipeline { // ----- API Definition ------------------------------------------------------- -// ConnectorUpdatePipeline updates the pipeline field in the connector document. +// ConnectorUpdatePipeline update the connector pipeline // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-pipeline-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-pipeline. type ConnectorUpdatePipeline func(body io.Reader, connector_id string, o ...func(*ConnectorUpdatePipelineRequest)) (*Response, error) // ConnectorUpdatePipelineRequest configures the Connector Update Pipeline API request. diff --git a/esapi/api.connector.update_scheduling.go b/esapi/api.connector.update_scheduling.go index 9cd5219a82..a1ff6b8617 100644 --- a/esapi/api.connector.update_scheduling.go +++ b/esapi/api.connector.update_scheduling.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateSchedulingFunc(t Transport) ConnectorUpdateScheduling { // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateScheduling updates the scheduling field in the connector document. +// ConnectorUpdateScheduling update the connector scheduling // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-scheduling-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-scheduling. type ConnectorUpdateScheduling func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateSchedulingRequest)) (*Response, error) // ConnectorUpdateSchedulingRequest configures the Connector Update Scheduling API request. diff --git a/esapi/api.connector.update_service_type.go b/esapi/api.connector.update_service_type.go index 98b912fcf2..66a15518d2 100644 --- a/esapi/api.connector.update_service_type.go +++ b/esapi/api.connector.update_service_type.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateServiceDocumentTypeFunc(t Transport) ConnectorUpdateServi // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateServiceDocumentType updates the service type of the connector. +// ConnectorUpdateServiceDocumentType update the connector service type // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-service-type-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-service-type. type ConnectorUpdateServiceDocumentType func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateServiceDocumentTypeRequest)) (*Response, error) // ConnectorUpdateServiceDocumentTypeRequest configures the Connector Update Service Document Type API request. diff --git a/esapi/api.connector.update_status.go b/esapi/api.connector.update_status.go index fe3bd946e1..df5708f053 100644 --- a/esapi/api.connector.update_status.go +++ b/esapi/api.connector.update_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newConnectorUpdateStatusFunc(t Transport) ConnectorUpdateStatus { // ----- API Definition ------------------------------------------------------- -// ConnectorUpdateStatus updates the status of the connector. +// ConnectorUpdateStatus update the connector status // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-status-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-status. type ConnectorUpdateStatus func(body io.Reader, connector_id string, o ...func(*ConnectorUpdateStatusRequest)) (*Response, error) // ConnectorUpdateStatusRequest configures the Connector Update Status API request. diff --git a/esapi/api.count.go b/esapi/api.count.go index cfeea1704d..f216c416f9 100644 --- a/esapi/api.count.go +++ b/esapi/api.count.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "fmt" "io" "net/http" "strconv" @@ -44,9 +45,9 @@ func newCountFunc(t Transport) Count { // ----- API Definition ------------------------------------------------------- -// Count returns number of documents matching a query. +// Count count search results // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-count. type Count func(o ...func(*CountRequest)) (*Response, error) // CountRequest configures the Count API request. @@ -60,12 +61,13 @@ type CountRequest struct { AnalyzeWildcard *bool DefaultOperator string Df string - ExpandWildcards string + ExpandWildcards []string IgnoreThrottled *bool IgnoreUnavailable *bool Lenient *bool - MinScore *int + MinScore interface{} Preference string + ProjectRouting string Query string Routing []string TerminateAfter *int @@ -135,8 +137,8 @@ func (r CountRequest) Do(providedCtx context.Context, transport Transport) (*Res params["df"] = r.Df } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreThrottled != nil { @@ -152,13 +154,17 @@ func (r CountRequest) Do(providedCtx context.Context, transport Transport) (*Res } if r.MinScore != nil { - params["min_score"] = strconv.FormatInt(int64(*r.MinScore), 10) + params["min_score"] = fmt.Sprintf("%v", r.MinScore) } if r.Preference != "" { params["preference"] = r.Preference } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.Query != "" { params["q"] = r.Query } @@ -306,7 +312,7 @@ func (f Count) WithDf(v string) func(*CountRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f Count) WithExpandWildcards(v string) func(*CountRequest) { +func (f Count) WithExpandWildcards(v ...string) func(*CountRequest) { return func(r *CountRequest) { r.ExpandWildcards = v } @@ -334,9 +340,9 @@ func (f Count) WithLenient(v bool) func(*CountRequest) { } // WithMinScore - include only documents with a specific `_score` value in the result. -func (f Count) WithMinScore(v int) func(*CountRequest) { +func (f Count) WithMinScore(v interface{}) func(*CountRequest) { return func(r *CountRequest) { - r.MinScore = &v + r.MinScore = v } } @@ -347,6 +353,13 @@ func (f Count) WithPreference(v string) func(*CountRequest) { } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f Count) WithProjectRouting(v string) func(*CountRequest) { + return func(r *CountRequest) { + r.ProjectRouting = v + } +} + // WithQuery - query in the lucene query string syntax. func (f Count) WithQuery(v string) func(*CountRequest) { return func(r *CountRequest) { diff --git a/esapi/api.create.go b/esapi/api.create.go index 63575133b6..cd69bfca5b 100644 --- a/esapi/api.create.go +++ b/esapi/api.create.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,11 +45,9 @@ func newCreateFunc(t Transport) Create { // ----- API Definition ------------------------------------------------------- -// Create creates a new document in the index. +// Create create a new document in the index // -// Returns a 409 response when a document with a same ID already exists in the index. -// -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create. type Create func(index string, id string, body io.Reader, o ...func(*CreateRequest)) (*Response, error) // CreateRequest configures the Create API request. @@ -64,7 +62,7 @@ type CreateRequest struct { Refresh string RequireAlias *bool RequireDataStream *bool - Routing string + Routing []string Timeout time.Duration Version *int VersionType string @@ -138,8 +136,8 @@ func (r CreateRequest) Do(providedCtx context.Context, transport Transport) (*Re params["require_data_stream"] = strconv.FormatBool(*r.RequireDataStream) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if r.Timeout != 0 { @@ -279,7 +277,7 @@ func (f Create) WithRequireDataStream(v bool) func(*CreateRequest) { } // WithRouting - specific routing value. -func (f Create) WithRouting(v string) func(*CreateRequest) { +func (f Create) WithRouting(v ...string) func(*CreateRequest) { return func(r *CreateRequest) { r.Routing = v } diff --git a/esapi/api.dangling_indices.delete_dangling_index.go b/esapi/api.dangling_indices.delete_dangling_index.go index 4103f63499..c0252d4cd4 100644 --- a/esapi/api.dangling_indices.delete_dangling_index.go +++ b/esapi/api.dangling_indices.delete_dangling_index.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newDanglingIndicesDeleteDanglingIndexFunc(t Transport) DanglingIndicesDelet // ----- API Definition ------------------------------------------------------- -// DanglingIndicesDeleteDanglingIndex deletes the specified dangling index +// DanglingIndicesDeleteDanglingIndex delete a dangling index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-delete-dangling-index. type DanglingIndicesDeleteDanglingIndex func(index_uuid string, o ...func(*DanglingIndicesDeleteDanglingIndexRequest)) (*Response, error) // DanglingIndicesDeleteDanglingIndexRequest configures the Dangling Indices Delete Dangling Index API request. diff --git a/esapi/api.dangling_indices.import_dangling_index.go b/esapi/api.dangling_indices.import_dangling_index.go index ececdef3aa..4767662195 100644 --- a/esapi/api.dangling_indices.import_dangling_index.go +++ b/esapi/api.dangling_indices.import_dangling_index.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newDanglingIndicesImportDanglingIndexFunc(t Transport) DanglingIndicesImpor // ----- API Definition ------------------------------------------------------- -// DanglingIndicesImportDanglingIndex imports the specified dangling index +// DanglingIndicesImportDanglingIndex import a dangling index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-import-dangling-index. type DanglingIndicesImportDanglingIndex func(index_uuid string, o ...func(*DanglingIndicesImportDanglingIndexRequest)) (*Response, error) // DanglingIndicesImportDanglingIndexRequest configures the Dangling Indices Import Dangling Index API request. diff --git a/esapi/api.dangling_indices.list_dangling_indices.go b/esapi/api.dangling_indices.list_dangling_indices.go index fd6e88c777..c34ac95895 100644 --- a/esapi/api.dangling_indices.list_dangling_indices.go +++ b/esapi/api.dangling_indices.list_dangling_indices.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newDanglingIndicesListDanglingIndicesFunc(t Transport) DanglingIndicesListD // ----- API Definition ------------------------------------------------------- -// DanglingIndicesListDanglingIndices returns all dangling indices. +// DanglingIndicesListDanglingIndices get the dangling indices // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices. type DanglingIndicesListDanglingIndices func(o ...func(*DanglingIndicesListDanglingIndicesRequest)) (*Response, error) // DanglingIndicesListDanglingIndicesRequest configures the Dangling Indices List Dangling Indices API request. diff --git a/esapi/api.delete.go b/esapi/api.delete.go index fb7cf0590b..9a1b6a3dfe 100644 --- a/esapi/api.delete.go +++ b/esapi/api.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newDeleteFunc(t Transport) Delete { // ----- API Definition ------------------------------------------------------- -// Delete removes a document from the index. +// Delete delete a document // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete. type Delete func(index string, id string, o ...func(*DeleteRequest)) (*Response, error) // DeleteRequest configures the Delete API request. @@ -57,7 +57,7 @@ type DeleteRequest struct { IfPrimaryTerm *int IfSeqNo *int Refresh string - Routing string + Routing []string Timeout time.Duration Version *int VersionType string @@ -123,8 +123,8 @@ func (r DeleteRequest) Do(providedCtx context.Context, transport Transport) (*Re params["refresh"] = r.Refresh } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if r.Timeout != 0 { @@ -243,7 +243,7 @@ func (f Delete) WithRefresh(v string) func(*DeleteRequest) { } // WithRouting - specific routing value. -func (f Delete) WithRouting(v string) func(*DeleteRequest) { +func (f Delete) WithRouting(v ...string) func(*DeleteRequest) { return func(r *DeleteRequest) { r.Routing = v } diff --git a/esapi/api.delete_by_query.go b/esapi/api.delete_by_query.go index c72436a449..956e8b1cd9 100644 --- a/esapi/api.delete_by_query.go +++ b/esapi/api.delete_by_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -47,9 +47,9 @@ func newDeleteByQueryFunc(t Transport) DeleteByQuery { // ----- API Definition ------------------------------------------------------- -// DeleteByQuery deletes documents matching the provided query. +// DeleteByQuery delete documents // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-by-query. type DeleteByQuery func(index []string, body io.Reader, o ...func(*DeleteByQueryRequest)) (*Response, error) // DeleteByQueryRequest configures the Delete By Query API request. @@ -64,7 +64,7 @@ type DeleteByQueryRequest struct { Conflicts string DefaultOperator string Df string - ExpandWildcards string + ExpandWildcards []string From *int IgnoreUnavailable *bool Lenient *bool @@ -159,8 +159,8 @@ func (r DeleteByQueryRequest) Do(providedCtx context.Context, transport Transpor params["df"] = r.Df } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.From != nil { @@ -379,7 +379,7 @@ func (f DeleteByQuery) WithDf(v string) func(*DeleteByQueryRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f DeleteByQuery) WithExpandWildcards(v string) func(*DeleteByQueryRequest) { +func (f DeleteByQuery) WithExpandWildcards(v ...string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.delete_by_query_rethrottle.go b/esapi/api.delete_by_query_rethrottle.go index 972e018ec7..5e24d6aa05 100644 --- a/esapi/api.delete_by_query_rethrottle.go +++ b/esapi/api.delete_by_query_rethrottle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newDeleteByQueryRethrottleFunc(t Transport) DeleteByQueryRethrottle { // ----- API Definition ------------------------------------------------------- -// DeleteByQueryRethrottle changes the number of requests per second for a particular Delete By Query operation. +// DeleteByQueryRethrottle throttle a delete by query operation // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-by-query-rethrottle. type DeleteByQueryRethrottle func(task_id string, requests_per_second *int, o ...func(*DeleteByQueryRethrottleRequest)) (*Response, error) // DeleteByQueryRethrottleRequest configures the Delete By Query Rethrottle API request. diff --git a/esapi/api.delete_script.go b/esapi/api.delete_script.go index 18a7e0d6f2..66fa14bfbd 100644 --- a/esapi/api.delete_script.go +++ b/esapi/api.delete_script.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newDeleteScriptFunc(t Transport) DeleteScript { // ----- API Definition ------------------------------------------------------- -// DeleteScript deletes a script. +// DeleteScript delete a script or search template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script. type DeleteScript func(id string, o ...func(*DeleteScriptRequest)) (*Response, error) // DeleteScriptRequest configures the Delete Script API request. diff --git a/esapi/api.exists.go b/esapi/api.exists.go index 6d490bd9a4..5be7979573 100644 --- a/esapi/api.exists.go +++ b/esapi/api.exists.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newExistsFunc(t Transport) Exists { // ----- API Definition ------------------------------------------------------- -// Exists returns information about whether a document exists in an index. +// Exists check a document // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get. type Exists func(index string, id string, o ...func(*ExistsRequest)) (*Response, error) // ExistsRequest configures the Exists API request. @@ -56,7 +56,7 @@ type ExistsRequest struct { Preference string Realtime *bool Refresh *bool - Routing string + Routing []string Source []string SourceExcludes []string SourceIncludes []string @@ -124,8 +124,8 @@ func (r ExistsRequest) Do(providedCtx context.Context, transport Transport) (*Re params["refresh"] = strconv.FormatBool(*r.Refresh) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if len(r.Source) > 0 { @@ -252,7 +252,7 @@ func (f Exists) WithRefresh(v bool) func(*ExistsRequest) { } // WithRouting - specific routing value. -func (f Exists) WithRouting(v string) func(*ExistsRequest) { +func (f Exists) WithRouting(v ...string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.Routing = v } diff --git a/esapi/api.exists_source.go b/esapi/api.exists_source.go index 4da7afc11e..cdb0280ae0 100644 --- a/esapi/api.exists_source.go +++ b/esapi/api.exists_source.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newExistsSourceFunc(t Transport) ExistsSource { // ----- API Definition ------------------------------------------------------- -// ExistsSource returns information about whether a document source exists in an index. +// ExistsSource check for a document source // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get. type ExistsSource func(index string, id string, o ...func(*ExistsSourceRequest)) (*Response, error) // ExistsSourceRequest configures the Exists Source API request. @@ -56,7 +56,7 @@ type ExistsSourceRequest struct { Preference string Realtime *bool Refresh *bool - Routing string + Routing []string Source []string SourceExcludes []string SourceIncludes []string @@ -123,8 +123,8 @@ func (r ExistsSourceRequest) Do(providedCtx context.Context, transport Transport params["refresh"] = strconv.FormatBool(*r.Refresh) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if len(r.Source) > 0 { @@ -247,7 +247,7 @@ func (f ExistsSource) WithRefresh(v bool) func(*ExistsSourceRequest) { } // WithRouting - specific routing value. -func (f ExistsSource) WithRouting(v string) func(*ExistsSourceRequest) { +func (f ExistsSource) WithRouting(v ...string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.Routing = v } diff --git a/esapi/api.explain.go b/esapi/api.explain.go index dd35d2c667..fa42580f03 100644 --- a/esapi/api.explain.go +++ b/esapi/api.explain.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newExplainFunc(t Transport) Explain { // ----- API Definition ------------------------------------------------------- -// Explain returns information about why a specific matches (or doesn't match) a query. +// Explain explain a document match result // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-explain. type Explain func(index string, id string, o ...func(*ExplainRequest)) (*Response, error) // ExplainRequest configures the Explain API request. @@ -63,7 +63,7 @@ type ExplainRequest struct { Lenient *bool Preference string Query string - Routing string + Routing []string Source []string SourceExcludes []string SourceIncludes []string @@ -145,8 +145,8 @@ func (r ExplainRequest) Do(providedCtx context.Context, transport Transport) (*R params["q"] = r.Query } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if len(r.Source) > 0 { @@ -307,7 +307,7 @@ func (f Explain) WithQuery(v string) func(*ExplainRequest) { } // WithRouting - specific routing value. -func (f Explain) WithRouting(v string) func(*ExplainRequest) { +func (f Explain) WithRouting(v ...string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.Routing = v } diff --git a/esapi/api.features.get_features.go b/esapi/api.features.get_features.go index 694ab3d50b..0245e2f2ba 100644 --- a/esapi/api.features.get_features.go +++ b/esapi/api.features.get_features.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newFeaturesGetFeaturesFunc(t Transport) FeaturesGetFeatures { // ----- API Definition ------------------------------------------------------- -// FeaturesGetFeatures gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot +// FeaturesGetFeatures get the features // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-get-features. type FeaturesGetFeatures func(o ...func(*FeaturesGetFeaturesRequest)) (*Response, error) // FeaturesGetFeaturesRequest configures the Features Get Features API request. diff --git a/esapi/api.features.reset_features.go b/esapi/api.features.reset_features.go index bb62b5bbaa..5d009cc14a 100644 --- a/esapi/api.features.reset_features.go +++ b/esapi/api.features.reset_features.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newFeaturesResetFeaturesFunc(t Transport) FeaturesResetFeatures { // ----- API Definition ------------------------------------------------------- -// FeaturesResetFeatures resets the internal state of features, usually by deleting system indices +// FeaturesResetFeatures reset the features // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-reset-features. type FeaturesResetFeatures func(o ...func(*FeaturesResetFeaturesRequest)) (*Response, error) // FeaturesResetFeaturesRequest configures the Features Reset Features API request. diff --git a/esapi/api.field_caps.go b/esapi/api.field_caps.go index 7e19e6a11b..88e20317da 100644 --- a/esapi/api.field_caps.go +++ b/esapi/api.field_caps.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newFieldCapsFunc(t Transport) FieldCaps { // ----- API Definition ------------------------------------------------------- -// FieldCaps returns the information about the capabilities of fields among multiple indices. +// FieldCaps get the field capabilities // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-field-caps. type FieldCaps func(o ...func(*FieldCapsRequest)) (*Response, error) // FieldCapsRequest configures the Field Caps API request. @@ -56,12 +56,13 @@ type FieldCapsRequest struct { Body io.Reader AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string Fields []string Filters []string IgnoreUnavailable *bool IncludeEmptyFields *bool IncludeUnmapped *bool + ProjectRouting string Types []string Pretty bool @@ -113,8 +114,8 @@ func (r FieldCapsRequest) Do(providedCtx context.Context, transport Transport) ( params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if len(r.Fields) > 0 { @@ -137,6 +138,10 @@ func (r FieldCapsRequest) Do(providedCtx context.Context, transport Transport) ( params["include_unmapped"] = strconv.FormatBool(*r.IncludeUnmapped) } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if len(r.Types) > 0 { params["types"] = strings.Join(r.Types, ",") } @@ -248,7 +253,7 @@ func (f FieldCaps) WithAllowNoIndices(v bool) func(*FieldCapsRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f FieldCaps) WithExpandWildcards(v string) func(*FieldCapsRequest) { +func (f FieldCaps) WithExpandWildcards(v ...string) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.ExpandWildcards = v } @@ -289,6 +294,13 @@ func (f FieldCaps) WithIncludeUnmapped(v bool) func(*FieldCapsRequest) { } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f FieldCaps) WithProjectRouting(v string) func(*FieldCapsRequest) { + return func(r *FieldCapsRequest) { + r.ProjectRouting = v + } +} + // WithTypes - only return results for fields that have one of the types in the list. func (f FieldCaps) WithTypes(v ...string) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { diff --git a/esapi/api.fleet.delete_secret.go b/esapi/api.fleet.delete_secret.go index 2d95257052..5568045151 100644 --- a/esapi/api.fleet.delete_secret.go +++ b/esapi/api.fleet.delete_secret.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,7 +42,7 @@ func newFleetDeleteSecretFunc(t Transport) FleetDeleteSecret { // ----- API Definition ------------------------------------------------------- -// FleetDeleteSecret deletes a secret stored by Fleet. +// FleetDeleteSecret deletes a secret stored by Fleet // // This API is experimental. type FleetDeleteSecret func(id string, o ...func(*FleetDeleteSecretRequest)) (*Response, error) diff --git a/esapi/api.fleet.get_secret.go b/esapi/api.fleet.get_secret.go index e6a2e9d15f..23bcb773a7 100644 --- a/esapi/api.fleet.get_secret.go +++ b/esapi/api.fleet.get_secret.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,7 +42,7 @@ func newFleetGetSecretFunc(t Transport) FleetGetSecret { // ----- API Definition ------------------------------------------------------- -// FleetGetSecret retrieves a secret stored by Fleet. +// FleetGetSecret retrieves a secret stored by Fleet // // This API is experimental. type FleetGetSecret func(id string, o ...func(*FleetGetSecretRequest)) (*Response, error) diff --git a/esapi/api.fleet.global_checkpoints.go b/esapi/api.fleet.global_checkpoints.go index dd39d96d45..4806c5b8a7 100644 --- a/esapi/api.fleet.global_checkpoints.go +++ b/esapi/api.fleet.global_checkpoints.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newFleetGlobalCheckpointsFunc(t Transport) FleetGlobalCheckpoints { // ----- API Definition ------------------------------------------------------- -// FleetGlobalCheckpoints returns the current global checkpoints for an index. This API is design for internal use by the fleet server project. +// FleetGlobalCheckpoints get global checkpoints // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-fleet. type FleetGlobalCheckpoints func(index string, o ...func(*FleetGlobalCheckpointsRequest)) (*Response, error) // FleetGlobalCheckpointsRequest configures the Fleet Global Checkpoints API request. diff --git a/esapi/api.fleet.msearch.go b/esapi/api.fleet.msearch.go index f162520f66..8c38b63bd8 100644 --- a/esapi/api.fleet.msearch.go +++ b/esapi/api.fleet.msearch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,7 +43,7 @@ func newFleetMsearchFunc(t Transport) FleetMsearch { // ----- API Definition ------------------------------------------------------- -// FleetMsearch multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. +// FleetMsearch run multiple Fleet searches // // This API is experimental. type FleetMsearch func(body io.Reader, o ...func(*FleetMsearchRequest)) (*Response, error) diff --git a/esapi/api.fleet.post_secret.go b/esapi/api.fleet.post_secret.go index 6478f9187b..9b2a101a7f 100644 --- a/esapi/api.fleet.post_secret.go +++ b/esapi/api.fleet.post_secret.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,7 +43,7 @@ func newFleetPostSecretFunc(t Transport) FleetPostSecret { // ----- API Definition ------------------------------------------------------- -// FleetPostSecret creates a secret stored by Fleet. +// FleetPostSecret creates a secret stored by Fleet // // This API is experimental. type FleetPostSecret func(body io.Reader, o ...func(*FleetPostSecretRequest)) (*Response, error) diff --git a/esapi/api.fleet.search.go b/esapi/api.fleet.search.go index a763b3d2b6..4d1e7db077 100644 --- a/esapi/api.fleet.search.go +++ b/esapi/api.fleet.search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -29,8 +29,8 @@ import ( ) func newFleetSearchFunc(t Transport) FleetSearch { - return func(index string, o ...func(*FleetSearchRequest)) (*Response, error) { - var r = FleetSearchRequest{Index: index} + return func(index string, body io.Reader, o ...func(*FleetSearchRequest)) (*Response, error) { + var r = FleetSearchRequest{Index: index, Body: body} for _, f := range o { f(&r) } @@ -45,10 +45,10 @@ func newFleetSearchFunc(t Transport) FleetSearch { // ----- API Definition ------------------------------------------------------- -// FleetSearch search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. +// FleetSearch run a Fleet search // // This API is experimental. -type FleetSearch func(index string, o ...func(*FleetSearchRequest)) (*Response, error) +type FleetSearch func(index string, body io.Reader, o ...func(*FleetSearchRequest)) (*Response, error) // FleetSearchRequest configures the Fleet Search API request. type FleetSearchRequest struct { @@ -202,13 +202,6 @@ func (f FleetSearch) WithContext(v context.Context) func(*FleetSearchRequest) { } } -// WithBody - The search definition using the Query DSL. -func (f FleetSearch) WithBody(v io.Reader) func(*FleetSearchRequest) { - return func(r *FleetSearchRequest) { - r.Body = v - } -} - // WithAllowPartialSearchResults - indicate if an error should be returned if there is a partial search failure or timeout. func (f FleetSearch) WithAllowPartialSearchResults(v bool) func(*FleetSearchRequest) { return func(r *FleetSearchRequest) { diff --git a/esapi/api.get.go b/esapi/api.get.go index b8a900c397..6820d70a98 100644 --- a/esapi/api.get.go +++ b/esapi/api.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newGetFunc(t Transport) Get { // ----- API Definition ------------------------------------------------------- -// Get returns a document. +// Get get a document by its ID // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get. type Get func(index string, id string, o ...func(*GetRequest)) (*Response, error) // GetRequest configures the Get API request. @@ -57,8 +57,9 @@ type GetRequest struct { Preference string Realtime *bool Refresh *bool - Routing string + Routing []string Source []string + SourceExcludeVectors *bool SourceExcludes []string SourceIncludes []string StoredFields []string @@ -129,14 +130,18 @@ func (r GetRequest) Do(providedCtx context.Context, transport Transport) (*Respo params["refresh"] = strconv.FormatBool(*r.Refresh) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if len(r.Source) > 0 { params["_source"] = strings.Join(r.Source, ",") } + if r.SourceExcludeVectors != nil { + params["_source_exclude_vectors"] = strconv.FormatBool(*r.SourceExcludeVectors) + } + if len(r.SourceExcludes) > 0 { params["_source_excludes"] = strings.Join(r.SourceExcludes, ",") } @@ -264,7 +269,7 @@ func (f Get) WithRefresh(v bool) func(*GetRequest) { } // WithRouting - specific routing value. -func (f Get) WithRouting(v string) func(*GetRequest) { +func (f Get) WithRouting(v ...string) func(*GetRequest) { return func(r *GetRequest) { r.Routing = v } @@ -277,6 +282,13 @@ func (f Get) WithSource(v ...string) func(*GetRequest) { } } +// WithSourceExcludeVectors - whether vectors should be excluded from _source. +func (f Get) WithSourceExcludeVectors(v bool) func(*GetRequest) { + return func(r *GetRequest) { + r.SourceExcludeVectors = &v + } +} + // WithSourceExcludes - a list of fields to exclude from the returned _source field. func (f Get) WithSourceExcludes(v ...string) func(*GetRequest) { return func(r *GetRequest) { diff --git a/esapi/api.get_script.go b/esapi/api.get_script.go index 458416e504..8db3a720e3 100644 --- a/esapi/api.get_script.go +++ b/esapi/api.get_script.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newGetScriptFunc(t Transport) GetScript { // ----- API Definition ------------------------------------------------------- -// GetScript returns a script. +// GetScript get a script or search template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script. type GetScript func(id string, o ...func(*GetScriptRequest)) (*Response, error) // GetScriptRequest configures the Get Script API request. diff --git a/esapi/api.get_script_context.go b/esapi/api.get_script_context.go index a93a95a4e2..77a3c33c39 100644 --- a/esapi/api.get_script_context.go +++ b/esapi/api.get_script_context.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newGetScriptContextFunc(t Transport) GetScriptContext { // ----- API Definition ------------------------------------------------------- -// GetScriptContext returns all script contexts. +// GetScriptContext get script contexts // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-context. type GetScriptContext func(o ...func(*GetScriptContextRequest)) (*Response, error) // GetScriptContextRequest configures the Get Script Context API request. diff --git a/esapi/api.get_script_languages.go b/esapi/api.get_script_languages.go index 88b1b9af7d..b2ae944001 100644 --- a/esapi/api.get_script_languages.go +++ b/esapi/api.get_script_languages.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newGetScriptLanguagesFunc(t Transport) GetScriptLanguages { // ----- API Definition ------------------------------------------------------- -// GetScriptLanguages returns available script types, languages and contexts +// GetScriptLanguages get script languages // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-languages. type GetScriptLanguages func(o ...func(*GetScriptLanguagesRequest)) (*Response, error) // GetScriptLanguagesRequest configures the Get Script Languages API request. diff --git a/esapi/api.get_source.go b/esapi/api.get_source.go index 5241610232..3104330de8 100644 --- a/esapi/api.get_source.go +++ b/esapi/api.get_source.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newGetSourceFunc(t Transport) GetSource { // ----- API Definition ------------------------------------------------------- -// GetSource returns the source of a document. +// GetSource get a document's source // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get. type GetSource func(index string, id string, o ...func(*GetSourceRequest)) (*Response, error) // GetSourceRequest configures the Get Source API request. @@ -56,7 +56,7 @@ type GetSourceRequest struct { Preference string Realtime *bool Refresh *bool - Routing string + Routing []string Source []string SourceExcludes []string SourceIncludes []string @@ -123,8 +123,8 @@ func (r GetSourceRequest) Do(providedCtx context.Context, transport Transport) ( params["refresh"] = strconv.FormatBool(*r.Refresh) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if len(r.Source) > 0 { @@ -247,7 +247,7 @@ func (f GetSource) WithRefresh(v bool) func(*GetSourceRequest) { } // WithRouting - specific routing value. -func (f GetSource) WithRouting(v string) func(*GetSourceRequest) { +func (f GetSource) WithRouting(v ...string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.Routing = v } diff --git a/esapi/api.health_report.go b/esapi/api.health_report.go index acf8ae7ff4..c77ed43869 100644 --- a/esapi/api.health_report.go +++ b/esapi/api.health_report.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,14 +44,14 @@ func newHealthReportFunc(t Transport) HealthReport { // ----- API Definition ------------------------------------------------------- -// HealthReport returns the health of the cluster. +// HealthReport get the cluster health // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-health-report. type HealthReport func(o ...func(*HealthReportRequest)) (*Response, error) // HealthReportRequest configures the Health Report API request. type HealthReportRequest struct { - Feature string + Feature []string Size *int Timeout time.Duration @@ -88,15 +88,15 @@ func (r HealthReportRequest) Do(providedCtx context.Context, transport Transport method = "GET" - path.Grow(7 + 1 + len("_health_report") + 1 + len(r.Feature)) + path.Grow(7 + 1 + len("_health_report") + 1 + len(strings.Join(r.Feature, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_health_report") - if r.Feature != "" { + if len(r.Feature) > 0 { path.WriteString("/") - path.WriteString(r.Feature) + path.WriteString(strings.Join(r.Feature, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "feature", r.Feature) + instrument.RecordPathPart(ctx, "feature", strings.Join(r.Feature, ",")) } } @@ -192,8 +192,8 @@ func (f HealthReport) WithContext(v context.Context) func(*HealthReportRequest) } } -// WithFeature - a feature of the cluster, as returned by the top-level health api. -func (f HealthReport) WithFeature(v string) func(*HealthReportRequest) { +// WithFeature - comma-separated list of cluster features, as returned by the top-level health report api.. +func (f HealthReport) WithFeature(v ...string) func(*HealthReportRequest) { return func(r *HealthReportRequest) { r.Feature = v } diff --git a/esapi/api.index.go b/esapi/api.index.go index 54529ec543..60bfca6629 100644 --- a/esapi/api.index.go +++ b/esapi/api.index.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndexFunc(t Transport) Index { // ----- API Definition ------------------------------------------------------- -// Index creates or updates a document in an index. +// Index create or update a document in an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create. type Index func(index string, body io.Reader, o ...func(*IndexRequest)) (*Response, error) // IndexRequest configures the Index API request. @@ -65,7 +65,7 @@ type IndexRequest struct { Refresh string RequireAlias *bool RequireDataStream *bool - Routing string + Routing []string Timeout time.Duration Version *int VersionType string @@ -157,8 +157,8 @@ func (r IndexRequest) Do(providedCtx context.Context, transport Transport) (*Res params["require_data_stream"] = strconv.FormatBool(*r.RequireDataStream) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if r.Timeout != 0 { @@ -326,7 +326,7 @@ func (f Index) WithRequireDataStream(v bool) func(*IndexRequest) { } // WithRouting - specific routing value. -func (f Index) WithRouting(v string) func(*IndexRequest) { +func (f Index) WithRouting(v ...string) func(*IndexRequest) { return func(r *IndexRequest) { r.Routing = v } diff --git a/esapi/api.indices.add_block.go b/esapi/api.indices.add_block.go index 30cae1cda0..2bea7d9ea5 100644 --- a/esapi/api.indices.add_block.go +++ b/esapi/api.indices.add_block.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesAddBlockFunc(t Transport) IndicesAddBlock { // ----- API Definition ------------------------------------------------------- -// IndicesAddBlock adds a block to an index. +// IndicesAddBlock add an index block // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-add-block. type IndicesAddBlock func(index []string, block string, o ...func(*IndicesAddBlockRequest)) (*Response, error) // IndicesAddBlockRequest configures the Indices Add Block API request. @@ -57,7 +57,7 @@ type IndicesAddBlockRequest struct { Block string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool MasterTimeout time.Duration Timeout time.Duration @@ -118,8 +118,8 @@ func (r IndicesAddBlockRequest) Do(providedCtx context.Context, transport Transp params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -220,7 +220,7 @@ func (f IndicesAddBlock) WithAllowNoIndices(v bool) func(*IndicesAddBlockRequest } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesAddBlock) WithExpandWildcards(v string) func(*IndicesAddBlockRequest) { +func (f IndicesAddBlock) WithExpandWildcards(v ...string) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.analyze.go b/esapi/api.indices.analyze.go index 5362b939d2..cbc8a2cbde 100644 --- a/esapi/api.indices.analyze.go +++ b/esapi/api.indices.analyze.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -27,8 +27,8 @@ import ( ) func newIndicesAnalyzeFunc(t Transport) IndicesAnalyze { - return func(o ...func(*IndicesAnalyzeRequest)) (*Response, error) { - var r = IndicesAnalyzeRequest{} + return func(body io.Reader, o ...func(*IndicesAnalyzeRequest)) (*Response, error) { + var r = IndicesAnalyzeRequest{Body: body} for _, f := range o { f(&r) } @@ -43,10 +43,10 @@ func newIndicesAnalyzeFunc(t Transport) IndicesAnalyze { // ----- API Definition ------------------------------------------------------- -// IndicesAnalyze performs the analysis process on a text and return the tokens breakdown of the text. +// IndicesAnalyze get tokens from text analysis // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html. -type IndicesAnalyze func(o ...func(*IndicesAnalyzeRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-analyze. +type IndicesAnalyze func(body io.Reader, o ...func(*IndicesAnalyzeRequest)) (*Response, error) // IndicesAnalyzeRequest configures the Indices Analyze API request. type IndicesAnalyzeRequest struct { @@ -188,13 +188,6 @@ func (f IndicesAnalyze) WithContext(v context.Context) func(*IndicesAnalyzeReque } } -// WithBody - Define analyzer/tokenizer parameters and the text on which the analysis should be performed. -func (f IndicesAnalyze) WithBody(v io.Reader) func(*IndicesAnalyzeRequest) { - return func(r *IndicesAnalyzeRequest) { - r.Body = v - } -} - // WithIndex - the name of the index to scope the operation. func (f IndicesAnalyze) WithIndex(v string) func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { diff --git a/esapi/api.indices.cancel_migrate_reindex.go b/esapi/api.indices.cancel_migrate_reindex.go index cb50796d5f..c3cfdf9e0d 100644 --- a/esapi/api.indices.cancel_migrate_reindex.go +++ b/esapi/api.indices.cancel_migrate_reindex.go @@ -15,18 +15,19 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strings" ) func newIndicesCancelMigrateReindexFunc(t Transport) IndicesCancelMigrateReindex { - return func(index string, o ...func(*IndicesCancelMigrateReindexRequest)) (*Response, error) { + return func(index []string, o ...func(*IndicesCancelMigrateReindexRequest)) (*Response, error) { var r = IndicesCancelMigrateReindexRequest{Index: index} for _, f := range o { f(&r) @@ -42,16 +43,14 @@ func newIndicesCancelMigrateReindexFunc(t Transport) IndicesCancelMigrateReindex // ----- API Definition ------------------------------------------------------- -// IndicesCancelMigrateReindex this API returns the status of a migration reindex attempt for a data stream or index +// IndicesCancelMigrateReindex cancel a migration reindex operation // -// This API is experimental. -// -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex-cancel-api.html. -type IndicesCancelMigrateReindex func(index string, o ...func(*IndicesCancelMigrateReindexRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-cancel-migrate-reindex. +type IndicesCancelMigrateReindex func(index []string, o ...func(*IndicesCancelMigrateReindexRequest)) (*Response, error) // IndicesCancelMigrateReindexRequest configures the Indices Cancel Migrate Reindex API request. type IndicesCancelMigrateReindexRequest struct { - Index string + Index []string Pretty bool Human bool @@ -84,16 +83,20 @@ func (r IndicesCancelMigrateReindexRequest) Do(providedCtx context.Context, tran method = "POST" - path.Grow(7 + 1 + len("_migration") + 1 + len("reindex") + 1 + len(r.Index) + 1 + len("_cancel")) + if len(r.Index) == 0 { + return nil, errors.New("index is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_migration") + 1 + len("reindex") + 1 + len(strings.Join(r.Index, ",")) + 1 + len("_cancel")) path.WriteString("http://") path.WriteString("/") path.WriteString("_migration") path.WriteString("/") path.WriteString("reindex") path.WriteString("/") - path.WriteString(r.Index) + path.WriteString(strings.Join(r.Index, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "index", r.Index) + instrument.RecordPathPart(ctx, "index", strings.Join(r.Index, ",")) } path.WriteString("/") path.WriteString("_cancel") diff --git a/esapi/api.indices.clear_cache.go b/esapi/api.indices.clear_cache.go index 6b0e65f00e..6a82b0275a 100644 --- a/esapi/api.indices.clear_cache.go +++ b/esapi/api.indices.clear_cache.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesClearCacheFunc(t Transport) IndicesClearCache { // ----- API Definition ------------------------------------------------------- -// IndicesClearCache clears all or specific caches for one or more indices. +// IndicesClearCache clear the cache // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clear-cache. type IndicesClearCache func(o ...func(*IndicesClearCacheRequest)) (*Response, error) // IndicesClearCacheRequest configures the Indices Clear Cache API request. @@ -53,7 +53,7 @@ type IndicesClearCacheRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string Fielddata *bool Fields []string IgnoreUnavailable *bool @@ -111,8 +111,8 @@ func (r IndicesClearCacheRequest) Do(providedCtx context.Context, transport Tran params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Fielddata != nil { @@ -232,7 +232,7 @@ func (f IndicesClearCache) WithAllowNoIndices(v bool) func(*IndicesClearCacheReq } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesClearCache) WithExpandWildcards(v string) func(*IndicesClearCacheRequest) { +func (f IndicesClearCache) WithExpandWildcards(v ...string) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.clone.go b/esapi/api.indices.clone.go index 4cd3959297..4ad843b3b2 100644 --- a/esapi/api.indices.clone.go +++ b/esapi/api.indices.clone.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesCloneFunc(t Transport) IndicesClone { // ----- API Definition ------------------------------------------------------- -// IndicesClone clones an index +// IndicesClone clone an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clone. type IndicesClone func(index string, target string, o ...func(*IndicesCloneRequest)) (*Response, error) // IndicesCloneRequest configures the Indices Clone API request. diff --git a/esapi/api.indices.close.go b/esapi/api.indices.close.go index fc944a069d..d21858c761 100644 --- a/esapi/api.indices.close.go +++ b/esapi/api.indices.close.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesCloseFunc(t Transport) IndicesClose { // ----- API Definition ------------------------------------------------------- -// IndicesClose closes an index. +// IndicesClose close an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-close. type IndicesClose func(index []string, o ...func(*IndicesCloseRequest)) (*Response, error) // IndicesCloseRequest configures the Indices Close API request. @@ -55,7 +55,7 @@ type IndicesCloseRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool MasterTimeout time.Duration Timeout time.Duration @@ -112,8 +112,8 @@ func (r IndicesCloseRequest) Do(providedCtx context.Context, transport Transport params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -218,7 +218,7 @@ func (f IndicesClose) WithAllowNoIndices(v bool) func(*IndicesCloseRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesClose) WithExpandWildcards(v string) func(*IndicesCloseRequest) { +func (f IndicesClose) WithExpandWildcards(v ...string) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.create.go b/esapi/api.indices.create.go index e6036ed6e1..0a21fee047 100644 --- a/esapi/api.indices.create.go +++ b/esapi/api.indices.create.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesCreateFunc(t Transport) IndicesCreate { // ----- API Definition ------------------------------------------------------- -// IndicesCreate creates an index with optional settings and mappings. +// IndicesCreate create an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create. type IndicesCreate func(index string, o ...func(*IndicesCreateRequest)) (*Response, error) // IndicesCreateRequest configures the Indices Create API request. diff --git a/esapi/api.indices.create_from.go b/esapi/api.indices.create_from.go index 02ef4896e1..a1c8121213 100644 --- a/esapi/api.indices.create_from.go +++ b/esapi/api.indices.create_from.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,9 @@ func newIndicesCreateFromFunc(t Transport) IndicesCreateFrom { // ----- API Definition ------------------------------------------------------- -// IndicesCreateFrom this API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values. +// IndicesCreateFrom create an index from a source index // -// This API is experimental. -// -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index-from-source.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from. type IndicesCreateFrom func(dest string, source string, o ...func(*IndicesCreateFromRequest)) (*Response, error) // IndicesCreateFromRequest configures the Indices Create From API request. diff --git a/esapi/api.indices.delete.go b/esapi/api.indices.delete.go index 0cc6e27b05..6007bb5843 100644 --- a/esapi/api.indices.delete.go +++ b/esapi/api.indices.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesDeleteFunc(t Transport) IndicesDelete { // ----- API Definition ------------------------------------------------------- -// IndicesDelete deletes an index. +// IndicesDelete delete indices // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete. type IndicesDelete func(index []string, o ...func(*IndicesDeleteRequest)) (*Response, error) // IndicesDeleteRequest configures the Indices Delete API request. @@ -55,7 +55,7 @@ type IndicesDeleteRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool MasterTimeout time.Duration Timeout time.Duration @@ -109,8 +109,8 @@ func (r IndicesDeleteRequest) Do(providedCtx context.Context, transport Transpor params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -211,7 +211,7 @@ func (f IndicesDelete) WithAllowNoIndices(v bool) func(*IndicesDeleteRequest) { } // WithExpandWildcards - whether wildcard expressions should get expanded to open, closed, or hidden indices. -func (f IndicesDelete) WithExpandWildcards(v string) func(*IndicesDeleteRequest) { +func (f IndicesDelete) WithExpandWildcards(v ...string) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.delete_alias.go b/esapi/api.indices.delete_alias.go index 28be6f0386..85be12d482 100644 --- a/esapi/api.indices.delete_alias.go +++ b/esapi/api.indices.delete_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesDeleteAliasFunc(t Transport) IndicesDeleteAlias { // ----- API Definition ------------------------------------------------------- -// IndicesDeleteAlias deletes an alias. +// IndicesDeleteAlias delete an alias // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias. type IndicesDeleteAlias func(index []string, name []string, o ...func(*IndicesDeleteAliasRequest)) (*Response, error) // IndicesDeleteAliasRequest configures the Indices Delete Alias API request. diff --git a/esapi/api.indices.delete_data_lifecycle.go b/esapi/api.indices.delete_data_lifecycle.go index f91c78c5ca..08d80e5904 100644 --- a/esapi/api.indices.delete_data_lifecycle.go +++ b/esapi/api.indices.delete_data_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,16 +44,16 @@ func newIndicesDeleteDataLifecycleFunc(t Transport) IndicesDeleteDataLifecycle { // ----- API Definition ------------------------------------------------------- -// IndicesDeleteDataLifecycle deletes the data stream lifecycle of the selected data streams. +// IndicesDeleteDataLifecycle delete data stream lifecycles // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle. type IndicesDeleteDataLifecycle func(name []string, o ...func(*IndicesDeleteDataLifecycleRequest)) (*Response, error) // IndicesDeleteDataLifecycleRequest configures the Indices Delete Data Lifecycle API request. type IndicesDeleteDataLifecycleRequest struct { Name []string - ExpandWildcards string + ExpandWildcards []string MasterTimeout time.Duration Timeout time.Duration @@ -106,8 +106,8 @@ func (r IndicesDeleteDataLifecycleRequest) Do(providedCtx context.Context, trans params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.MasterTimeout != 0 { @@ -197,7 +197,7 @@ func (f IndicesDeleteDataLifecycle) WithContext(v context.Context) func(*Indices } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesDeleteDataLifecycle) WithExpandWildcards(v string) func(*IndicesDeleteDataLifecycleRequest) { +func (f IndicesDeleteDataLifecycle) WithExpandWildcards(v ...string) func(*IndicesDeleteDataLifecycleRequest) { return func(r *IndicesDeleteDataLifecycleRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.delete_index_template.go b/esapi/api.indices.delete_index_template.go index 0c756f79ad..ec7639e9d8 100644 --- a/esapi/api.indices.delete_index_template.go +++ b/esapi/api.indices.delete_index_template.go @@ -15,19 +15,20 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strings" "time" ) func newIndicesDeleteIndexTemplateFunc(t Transport) IndicesDeleteIndexTemplate { - return func(name string, o ...func(*IndicesDeleteIndexTemplateRequest)) (*Response, error) { + return func(name []string, o ...func(*IndicesDeleteIndexTemplateRequest)) (*Response, error) { var r = IndicesDeleteIndexTemplateRequest{Name: name} for _, f := range o { f(&r) @@ -43,14 +44,14 @@ func newIndicesDeleteIndexTemplateFunc(t Transport) IndicesDeleteIndexTemplate { // ----- API Definition ------------------------------------------------------- -// IndicesDeleteIndexTemplate deletes an index template. +// IndicesDeleteIndexTemplate delete an index template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html. -type IndicesDeleteIndexTemplate func(name string, o ...func(*IndicesDeleteIndexTemplateRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-index-template. +type IndicesDeleteIndexTemplate func(name []string, o ...func(*IndicesDeleteIndexTemplateRequest)) (*Response, error) // IndicesDeleteIndexTemplateRequest configures the Indices Delete Index Template API request. type IndicesDeleteIndexTemplateRequest struct { - Name string + Name []string MasterTimeout time.Duration Timeout time.Duration @@ -86,14 +87,18 @@ func (r IndicesDeleteIndexTemplateRequest) Do(providedCtx context.Context, trans method = "DELETE" - path.Grow(7 + 1 + len("_index_template") + 1 + len(r.Name)) + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_index_template") + 1 + len(strings.Join(r.Name, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_index_template") path.WriteString("/") - path.WriteString(r.Name) + path.WriteString(strings.Join(r.Name, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "name", r.Name) + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) } params = make(map[string]string) diff --git a/esapi/api.indices.delete_sample_configuration.go b/esapi/api.indices.delete_sample_configuration.go new file mode 100644 index 0000000000..691088a81d --- /dev/null +++ b/esapi/api.indices.delete_sample_configuration.go @@ -0,0 +1,253 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" + "time" +) + +func newIndicesDeleteSampleConfigurationFunc(t Transport) IndicesDeleteSampleConfiguration { + return func(index string, o ...func(*IndicesDeleteSampleConfigurationRequest)) (*Response, error) { + var r = IndicesDeleteSampleConfigurationRequest{Index: index} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesDeleteSampleConfiguration delete sampling configuration for an index or data stream +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. +type IndicesDeleteSampleConfiguration func(index string, o ...func(*IndicesDeleteSampleConfigurationRequest)) (*Response, error) + +// IndicesDeleteSampleConfigurationRequest configures the Indices Delete Sample Configuration API request. +type IndicesDeleteSampleConfigurationRequest struct { + Index string + + MasterTimeout time.Duration + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesDeleteSampleConfigurationRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.delete_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "DELETE" + + path.Grow(7 + 1 + len(r.Index) + 1 + len("_sample") + 1 + len("config")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString(r.Index) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.Index) + } + path.WriteString("/") + path.WriteString("_sample") + path.WriteString("/") + path.WriteString("config") + + params = make(map[string]string) + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.delete_sample_configuration") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.delete_sample_configuration") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesDeleteSampleConfiguration) WithContext(v context.Context) func(*IndicesDeleteSampleConfigurationRequest) { + return func(r *IndicesDeleteSampleConfigurationRequest) { + r.ctx = v + } +} + +// WithMasterTimeout - timeout for connection to master node. +func (f IndicesDeleteSampleConfiguration) WithMasterTimeout(v time.Duration) func(*IndicesDeleteSampleConfigurationRequest) { + return func(r *IndicesDeleteSampleConfigurationRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - timeout for the request. +func (f IndicesDeleteSampleConfiguration) WithTimeout(v time.Duration) func(*IndicesDeleteSampleConfigurationRequest) { + return func(r *IndicesDeleteSampleConfigurationRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesDeleteSampleConfiguration) WithPretty() func(*IndicesDeleteSampleConfigurationRequest) { + return func(r *IndicesDeleteSampleConfigurationRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesDeleteSampleConfiguration) WithHuman() func(*IndicesDeleteSampleConfigurationRequest) { + return func(r *IndicesDeleteSampleConfigurationRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesDeleteSampleConfiguration) WithErrorTrace() func(*IndicesDeleteSampleConfigurationRequest) { + return func(r *IndicesDeleteSampleConfigurationRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesDeleteSampleConfiguration) WithFilterPath(v ...string) func(*IndicesDeleteSampleConfigurationRequest) { + return func(r *IndicesDeleteSampleConfigurationRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesDeleteSampleConfiguration) WithHeader(h map[string]string) func(*IndicesDeleteSampleConfigurationRequest) { + return func(r *IndicesDeleteSampleConfigurationRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesDeleteSampleConfiguration) WithOpaqueID(s string) func(*IndicesDeleteSampleConfigurationRequest) { + return func(r *IndicesDeleteSampleConfigurationRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.indices.delete_template.go b/esapi/api.indices.delete_template.go index fd353af0f7..0c92395068 100644 --- a/esapi/api.indices.delete_template.go +++ b/esapi/api.indices.delete_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesDeleteTemplateFunc(t Transport) IndicesDeleteTemplate { // ----- API Definition ------------------------------------------------------- -// IndicesDeleteTemplate deletes an index template. +// IndicesDeleteTemplate delete a legacy index template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template-v1.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-template. type IndicesDeleteTemplate func(name string, o ...func(*IndicesDeleteTemplateRequest)) (*Response, error) // IndicesDeleteTemplateRequest configures the Indices Delete Template API request. diff --git a/esapi/api.indices.disk_usage.go b/esapi/api.indices.disk_usage.go index c1efafcf0d..4cd255a508 100644 --- a/esapi/api.indices.disk_usage.go +++ b/esapi/api.indices.disk_usage.go @@ -15,19 +15,20 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strconv" "strings" ) func newIndicesDiskUsageFunc(t Transport) IndicesDiskUsage { - return func(index string, o ...func(*IndicesDiskUsageRequest)) (*Response, error) { + return func(index []string, o ...func(*IndicesDiskUsageRequest)) (*Response, error) { var r = IndicesDiskUsageRequest{Index: index} for _, f := range o { f(&r) @@ -43,19 +44,19 @@ func newIndicesDiskUsageFunc(t Transport) IndicesDiskUsage { // ----- API Definition ------------------------------------------------------- -// IndicesDiskUsage analyzes the disk usage of each field of an index or data stream +// IndicesDiskUsage analyze the index disk usage // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html. -type IndicesDiskUsage func(index string, o ...func(*IndicesDiskUsageRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage. +type IndicesDiskUsage func(index []string, o ...func(*IndicesDiskUsageRequest)) (*Response, error) // IndicesDiskUsageRequest configures the Indices Disk Usage API request. type IndicesDiskUsageRequest struct { - Index string + Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string Flush *bool IgnoreUnavailable *bool RunExpensiveTasks *bool @@ -91,12 +92,16 @@ func (r IndicesDiskUsageRequest) Do(providedCtx context.Context, transport Trans method = "POST" - path.Grow(7 + 1 + len(r.Index) + 1 + len("_disk_usage")) + if len(r.Index) == 0 { + return nil, errors.New("index is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len(strings.Join(r.Index, ",")) + 1 + len("_disk_usage")) path.WriteString("http://") path.WriteString("/") - path.WriteString(r.Index) + path.WriteString(strings.Join(r.Index, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "index", r.Index) + instrument.RecordPathPart(ctx, "index", strings.Join(r.Index, ",")) } path.WriteString("/") path.WriteString("_disk_usage") @@ -107,8 +112,8 @@ func (r IndicesDiskUsageRequest) Do(providedCtx context.Context, transport Trans params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Flush != nil { @@ -209,7 +214,7 @@ func (f IndicesDiskUsage) WithAllowNoIndices(v bool) func(*IndicesDiskUsageReque } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesDiskUsage) WithExpandWildcards(v string) func(*IndicesDiskUsageRequest) { +func (f IndicesDiskUsage) WithExpandWildcards(v ...string) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.downsample.go b/esapi/api.indices.downsample.go index 76bff9ef85..e63786dc4c 100644 --- a/esapi/api.indices.downsample.go +++ b/esapi/api.indices.downsample.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -47,7 +47,7 @@ func newIndicesDownsampleFunc(t Transport) IndicesDownsample { // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample. type IndicesDownsample func(index string, body io.Reader, target_index string, o ...func(*IndicesDownsampleRequest)) (*Response, error) // IndicesDownsampleRequest configures the Indices Downsample API request. diff --git a/esapi/api.indices.exists.go b/esapi/api.indices.exists.go index 3b1488a4aa..317104a66f 100644 --- a/esapi/api.indices.exists.go +++ b/esapi/api.indices.exists.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesExistsFunc(t Transport) IndicesExists { // ----- API Definition ------------------------------------------------------- -// IndicesExists returns information about whether a particular index exists. +// IndicesExists check indices // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists. type IndicesExists func(index []string, o ...func(*IndicesExistsRequest)) (*Response, error) // IndicesExistsRequest configures the Indices Exists API request. @@ -54,7 +54,7 @@ type IndicesExistsRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string FlatSettings *bool IgnoreUnavailable *bool IncludeDefaults *bool @@ -109,8 +109,8 @@ func (r IndicesExistsRequest) Do(providedCtx context.Context, transport Transpor params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.FlatSettings != nil { @@ -215,7 +215,7 @@ func (f IndicesExists) WithAllowNoIndices(v bool) func(*IndicesExistsRequest) { } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesExists) WithExpandWildcards(v string) func(*IndicesExistsRequest) { +func (f IndicesExists) WithExpandWildcards(v ...string) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.exists_alias.go b/esapi/api.indices.exists_alias.go index 600e195cdb..a4e117fb3b 100644 --- a/esapi/api.indices.exists_alias.go +++ b/esapi/api.indices.exists_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesExistsAliasFunc(t Transport) IndicesExistsAlias { // ----- API Definition ------------------------------------------------------- -// IndicesExistsAlias returns information about whether a particular alias exists. +// IndicesExistsAlias check aliases // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-alias. type IndicesExistsAlias func(name []string, o ...func(*IndicesExistsAliasRequest)) (*Response, error) // IndicesExistsAliasRequest configures the Indices Exists Alias API request. @@ -57,7 +57,7 @@ type IndicesExistsAliasRequest struct { Name []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool MasterTimeout time.Duration @@ -119,8 +119,8 @@ func (r IndicesExistsAliasRequest) Do(providedCtx context.Context, transport Tra params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -224,7 +224,7 @@ func (f IndicesExistsAlias) WithAllowNoIndices(v bool) func(*IndicesExistsAliasR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesExistsAlias) WithExpandWildcards(v string) func(*IndicesExistsAliasRequest) { +func (f IndicesExistsAlias) WithExpandWildcards(v ...string) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.exists_index_template.go b/esapi/api.indices.exists_index_template.go index a37812da72..d13d1e3dad 100644 --- a/esapi/api.indices.exists_index_template.go +++ b/esapi/api.indices.exists_index_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesExistsIndexTemplateFunc(t Transport) IndicesExistsIndexTemplate { // ----- API Definition ------------------------------------------------------- -// IndicesExistsIndexTemplate returns information about whether a particular index template exists. +// IndicesExistsIndexTemplate check index templates // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-index-template. type IndicesExistsIndexTemplate func(name string, o ...func(*IndicesExistsIndexTemplateRequest)) (*Response, error) // IndicesExistsIndexTemplateRequest configures the Indices Exists Index Template API request. diff --git a/esapi/api.indices.exists_template.go b/esapi/api.indices.exists_template.go index 9c8cc9ed54..62e1456089 100644 --- a/esapi/api.indices.exists_template.go +++ b/esapi/api.indices.exists_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesExistsTemplateFunc(t Transport) IndicesExistsTemplate { // ----- API Definition ------------------------------------------------------- -// IndicesExistsTemplate returns information about whether a particular index template exists. +// IndicesExistsTemplate check existence of index templates // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-template-exists-v1.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-template. type IndicesExistsTemplate func(name []string, o ...func(*IndicesExistsTemplateRequest)) (*Response, error) // IndicesExistsTemplateRequest configures the Indices Exists Template API request. diff --git a/esapi/api.indices.explain_data_lifecycle.go b/esapi/api.indices.explain_data_lifecycle.go index e77b633935..64c3233958 100644 --- a/esapi/api.indices.explain_data_lifecycle.go +++ b/esapi/api.indices.explain_data_lifecycle.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strconv" "strings" @@ -28,7 +29,7 @@ import ( ) func newIndicesExplainDataLifecycleFunc(t Transport) IndicesExplainDataLifecycle { - return func(index string, o ...func(*IndicesExplainDataLifecycleRequest)) (*Response, error) { + return func(index []string, o ...func(*IndicesExplainDataLifecycleRequest)) (*Response, error) { var r = IndicesExplainDataLifecycleRequest{Index: index} for _, f := range o { f(&r) @@ -44,14 +45,14 @@ func newIndicesExplainDataLifecycleFunc(t Transport) IndicesExplainDataLifecycle // ----- API Definition ------------------------------------------------------- -// IndicesExplainDataLifecycle retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc. +// IndicesExplainDataLifecycle get the status for a data stream lifecycle // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html. -type IndicesExplainDataLifecycle func(index string, o ...func(*IndicesExplainDataLifecycleRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle. +type IndicesExplainDataLifecycle func(index []string, o ...func(*IndicesExplainDataLifecycleRequest)) (*Response, error) // IndicesExplainDataLifecycleRequest configures the Indices Explain Data Lifecycle API request. type IndicesExplainDataLifecycleRequest struct { - Index string + Index []string IncludeDefaults *bool MasterTimeout time.Duration @@ -87,12 +88,16 @@ func (r IndicesExplainDataLifecycleRequest) Do(providedCtx context.Context, tran method = "GET" - path.Grow(7 + 1 + len(r.Index) + 1 + len("_lifecycle") + 1 + len("explain")) + if len(r.Index) == 0 { + return nil, errors.New("index is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len(strings.Join(r.Index, ",")) + 1 + len("_lifecycle") + 1 + len("explain")) path.WriteString("http://") path.WriteString("/") - path.WriteString(r.Index) + path.WriteString(strings.Join(r.Index, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "index", r.Index) + instrument.RecordPathPart(ctx, "index", strings.Join(r.Index, ",")) } path.WriteString("/") path.WriteString("_lifecycle") diff --git a/esapi/api.indices.field_usage_stats.go b/esapi/api.indices.field_usage_stats.go index c8944d3c58..a6736364dc 100644 --- a/esapi/api.indices.field_usage_stats.go +++ b/esapi/api.indices.field_usage_stats.go @@ -15,19 +15,20 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strconv" "strings" ) func newIndicesFieldUsageStatsFunc(t Transport) IndicesFieldUsageStats { - return func(index string, o ...func(*IndicesFieldUsageStatsRequest)) (*Response, error) { + return func(index []string, o ...func(*IndicesFieldUsageStatsRequest)) (*Response, error) { var r = IndicesFieldUsageStatsRequest{Index: index} for _, f := range o { f(&r) @@ -43,19 +44,19 @@ func newIndicesFieldUsageStatsFunc(t Transport) IndicesFieldUsageStats { // ----- API Definition ------------------------------------------------------- -// IndicesFieldUsageStats returns the field usage stats for each field of an index +// IndicesFieldUsageStats get field usage stats // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/field-usage-stats.html. -type IndicesFieldUsageStats func(index string, o ...func(*IndicesFieldUsageStatsRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-field-usage-stats. +type IndicesFieldUsageStats func(index []string, o ...func(*IndicesFieldUsageStatsRequest)) (*Response, error) // IndicesFieldUsageStatsRequest configures the Indices Field Usage Stats API request. type IndicesFieldUsageStatsRequest struct { - Index string + Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string Fields []string IgnoreUnavailable *bool @@ -90,12 +91,16 @@ func (r IndicesFieldUsageStatsRequest) Do(providedCtx context.Context, transport method = "GET" - path.Grow(7 + 1 + len(r.Index) + 1 + len("_field_usage_stats")) + if len(r.Index) == 0 { + return nil, errors.New("index is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len(strings.Join(r.Index, ",")) + 1 + len("_field_usage_stats")) path.WriteString("http://") path.WriteString("/") - path.WriteString(r.Index) + path.WriteString(strings.Join(r.Index, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "index", r.Index) + instrument.RecordPathPart(ctx, "index", strings.Join(r.Index, ",")) } path.WriteString("/") path.WriteString("_field_usage_stats") @@ -106,8 +111,8 @@ func (r IndicesFieldUsageStatsRequest) Do(providedCtx context.Context, transport params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if len(r.Fields) > 0 { @@ -204,7 +209,7 @@ func (f IndicesFieldUsageStats) WithAllowNoIndices(v bool) func(*IndicesFieldUsa } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesFieldUsageStats) WithExpandWildcards(v string) func(*IndicesFieldUsageStatsRequest) { +func (f IndicesFieldUsageStats) WithExpandWildcards(v ...string) func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.flush.go b/esapi/api.indices.flush.go index 546476bb8a..ade182a598 100644 --- a/esapi/api.indices.flush.go +++ b/esapi/api.indices.flush.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesFlushFunc(t Transport) IndicesFlush { // ----- API Definition ------------------------------------------------------- -// IndicesFlush performs the flush operation on one or more indices. +// IndicesFlush flush data streams or indices // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush. type IndicesFlush func(o ...func(*IndicesFlushRequest)) (*Response, error) // IndicesFlushRequest configures the Indices Flush API request. @@ -53,7 +53,7 @@ type IndicesFlushRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string Force *bool IgnoreUnavailable *bool WaitIfOngoing *bool @@ -107,8 +107,8 @@ func (r IndicesFlushRequest) Do(providedCtx context.Context, transport Transport params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Force != nil { @@ -216,7 +216,7 @@ func (f IndicesFlush) WithAllowNoIndices(v bool) func(*IndicesFlushRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesFlush) WithExpandWildcards(v string) func(*IndicesFlushRequest) { +func (f IndicesFlush) WithExpandWildcards(v ...string) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.forcemerge.go b/esapi/api.indices.forcemerge.go index 36e4a3b819..b5ce88fe51 100644 --- a/esapi/api.indices.forcemerge.go +++ b/esapi/api.indices.forcemerge.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesForcemergeFunc(t Transport) IndicesForcemerge { // ----- API Definition ------------------------------------------------------- -// IndicesForcemerge performs the force merge operation on one or more indices. +// IndicesForcemerge force a merge // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge. type IndicesForcemerge func(o ...func(*IndicesForcemergeRequest)) (*Response, error) // IndicesForcemergeRequest configures the Indices Forcemerge API request. @@ -53,7 +53,7 @@ type IndicesForcemergeRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string Flush *bool IgnoreUnavailable *bool MaxNumSegments *int @@ -109,8 +109,8 @@ func (r IndicesForcemergeRequest) Do(providedCtx context.Context, transport Tran params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Flush != nil { @@ -226,7 +226,7 @@ func (f IndicesForcemerge) WithAllowNoIndices(v bool) func(*IndicesForcemergeReq } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesForcemerge) WithExpandWildcards(v string) func(*IndicesForcemergeRequest) { +func (f IndicesForcemerge) WithExpandWildcards(v ...string) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.get.go b/esapi/api.indices.get.go index 1a62666332..eb4ed28418 100644 --- a/esapi/api.indices.get.go +++ b/esapi/api.indices.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesGetFunc(t Transport) IndicesGet { // ----- API Definition ------------------------------------------------------- -// IndicesGet returns information about one or more indices. +// IndicesGet get index information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get. type IndicesGet func(index []string, o ...func(*IndicesGetRequest)) (*Response, error) // IndicesGetRequest configures the Indices Get API request. @@ -55,8 +55,8 @@ type IndicesGetRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string - Features string + ExpandWildcards []string + Features []string FlatSettings *bool IgnoreUnavailable *bool IncludeDefaults *bool @@ -112,12 +112,12 @@ func (r IndicesGetRequest) Do(providedCtx context.Context, transport Transport) params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } - if r.Features != "" { - params["features"] = r.Features + if len(r.Features) > 0 { + params["features"] = strings.Join(r.Features, ",") } if r.FlatSettings != nil { @@ -226,14 +226,14 @@ func (f IndicesGet) WithAllowNoIndices(v bool) func(*IndicesGetRequest) { } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesGet) WithExpandWildcards(v string) func(*IndicesGetRequest) { +func (f IndicesGet) WithExpandWildcards(v ...string) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.ExpandWildcards = v } } // WithFeatures - return only information on specified index features. -func (f IndicesGet) WithFeatures(v string) func(*IndicesGetRequest) { +func (f IndicesGet) WithFeatures(v ...string) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.Features = v } diff --git a/esapi/api.indices.get_alias.go b/esapi/api.indices.get_alias.go index 656d2ce0c3..06149f090c 100644 --- a/esapi/api.indices.get_alias.go +++ b/esapi/api.indices.get_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesGetAliasFunc(t Transport) IndicesGetAlias { // ----- API Definition ------------------------------------------------------- -// IndicesGetAlias returns an alias. +// IndicesGetAlias get aliases // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias. type IndicesGetAlias func(o ...func(*IndicesGetAliasRequest)) (*Response, error) // IndicesGetAliasRequest configures the Indices Get Alias API request. @@ -56,7 +56,7 @@ type IndicesGetAliasRequest struct { Name []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool MasterTimeout time.Duration @@ -116,8 +116,8 @@ func (r IndicesGetAliasRequest) Do(providedCtx context.Context, transport Transp params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -228,7 +228,7 @@ func (f IndicesGetAlias) WithAllowNoIndices(v bool) func(*IndicesGetAliasRequest } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesGetAlias) WithExpandWildcards(v string) func(*IndicesGetAliasRequest) { +func (f IndicesGetAlias) WithExpandWildcards(v ...string) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.get_all_sample_configuration.go b/esapi/api.indices.get_all_sample_configuration.go new file mode 100644 index 0000000000..457884c1cc --- /dev/null +++ b/esapi/api.indices.get_all_sample_configuration.go @@ -0,0 +1,231 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" + "time" +) + +func newIndicesGetAllSampleConfigurationFunc(t Transport) IndicesGetAllSampleConfiguration { + return func(o ...func(*IndicesGetAllSampleConfigurationRequest)) (*Response, error) { + var r = IndicesGetAllSampleConfigurationRequest{} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesGetAllSampleConfiguration get sampling configurations for all indices and data streams +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. +type IndicesGetAllSampleConfiguration func(o ...func(*IndicesGetAllSampleConfigurationRequest)) (*Response, error) + +// IndicesGetAllSampleConfigurationRequest configures the Indices Get All Sample Configuration API request. +type IndicesGetAllSampleConfigurationRequest struct { + MasterTimeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesGetAllSampleConfigurationRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_all_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + len("/_sample/config")) + path.WriteString("http://") + path.WriteString("/_sample/config") + + params = make(map[string]string) + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_all_sample_configuration") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_all_sample_configuration") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesGetAllSampleConfiguration) WithContext(v context.Context) func(*IndicesGetAllSampleConfigurationRequest) { + return func(r *IndicesGetAllSampleConfigurationRequest) { + r.ctx = v + } +} + +// WithMasterTimeout - timeout for connection to master node. +func (f IndicesGetAllSampleConfiguration) WithMasterTimeout(v time.Duration) func(*IndicesGetAllSampleConfigurationRequest) { + return func(r *IndicesGetAllSampleConfigurationRequest) { + r.MasterTimeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesGetAllSampleConfiguration) WithPretty() func(*IndicesGetAllSampleConfigurationRequest) { + return func(r *IndicesGetAllSampleConfigurationRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesGetAllSampleConfiguration) WithHuman() func(*IndicesGetAllSampleConfigurationRequest) { + return func(r *IndicesGetAllSampleConfigurationRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesGetAllSampleConfiguration) WithErrorTrace() func(*IndicesGetAllSampleConfigurationRequest) { + return func(r *IndicesGetAllSampleConfigurationRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesGetAllSampleConfiguration) WithFilterPath(v ...string) func(*IndicesGetAllSampleConfigurationRequest) { + return func(r *IndicesGetAllSampleConfigurationRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesGetAllSampleConfiguration) WithHeader(h map[string]string) func(*IndicesGetAllSampleConfigurationRequest) { + return func(r *IndicesGetAllSampleConfigurationRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesGetAllSampleConfiguration) WithOpaqueID(s string) func(*IndicesGetAllSampleConfigurationRequest) { + return func(r *IndicesGetAllSampleConfigurationRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.indices.get_data_lifecycle.go b/esapi/api.indices.get_data_lifecycle.go index b5bf410f54..269c8717cb 100644 --- a/esapi/api.indices.get_data_lifecycle.go +++ b/esapi/api.indices.get_data_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,16 +45,16 @@ func newIndicesGetDataLifecycleFunc(t Transport) IndicesGetDataLifecycle { // ----- API Definition ------------------------------------------------------- -// IndicesGetDataLifecycle returns the data stream lifecycle of the selected data streams. +// IndicesGetDataLifecycle get data stream lifecycles // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle. type IndicesGetDataLifecycle func(name []string, o ...func(*IndicesGetDataLifecycleRequest)) (*Response, error) // IndicesGetDataLifecycleRequest configures the Indices Get Data Lifecycle API request. type IndicesGetDataLifecycleRequest struct { Name []string - ExpandWildcards string + ExpandWildcards []string IncludeDefaults *bool MasterTimeout time.Duration @@ -107,8 +107,8 @@ func (r IndicesGetDataLifecycleRequest) Do(providedCtx context.Context, transpor params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IncludeDefaults != nil { @@ -198,7 +198,7 @@ func (f IndicesGetDataLifecycle) WithContext(v context.Context) func(*IndicesGet } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesGetDataLifecycle) WithExpandWildcards(v string) func(*IndicesGetDataLifecycleRequest) { +func (f IndicesGetDataLifecycle) WithExpandWildcards(v ...string) func(*IndicesGetDataLifecycleRequest) { return func(r *IndicesGetDataLifecycleRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.get_data_lifecycle_stats.go b/esapi/api.indices.get_data_lifecycle_stats.go index 76a9ed2ed7..8307ca6b85 100644 --- a/esapi/api.indices.get_data_lifecycle_stats.go +++ b/esapi/api.indices.get_data_lifecycle_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newIndicesGetDataLifecycleStatsFunc(t Transport) IndicesGetDataLifecycleSta // ----- API Definition ------------------------------------------------------- -// IndicesGetDataLifecycleStats get data stream lifecycle statistics. +// IndicesGetDataLifecycleStats get data stream lifecycle stats // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats. type IndicesGetDataLifecycleStats func(o ...func(*IndicesGetDataLifecycleStatsRequest)) (*Response, error) // IndicesGetDataLifecycleStatsRequest configures the Indices Get Data Lifecycle Stats API request. diff --git a/esapi/api.indices.get_field_mapping.go b/esapi/api.indices.get_field_mapping.go index 72ae95edcb..74412fbdb0 100644 --- a/esapi/api.indices.get_field_mapping.go +++ b/esapi/api.indices.get_field_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesGetFieldMappingFunc(t Transport) IndicesGetFieldMapping { // ----- API Definition ------------------------------------------------------- -// IndicesGetFieldMapping returns mapping for one or more fields. +// IndicesGetFieldMapping get mapping definitions // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping. type IndicesGetFieldMapping func(fields []string, o ...func(*IndicesGetFieldMappingRequest)) (*Response, error) // IndicesGetFieldMappingRequest configures the Indices Get Field Mapping API request. @@ -56,7 +56,7 @@ type IndicesGetFieldMappingRequest struct { Fields []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool IncludeDefaults *bool @@ -120,8 +120,8 @@ func (r IndicesGetFieldMappingRequest) Do(providedCtx context.Context, transport params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -225,7 +225,7 @@ func (f IndicesGetFieldMapping) WithAllowNoIndices(v bool) func(*IndicesGetField } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesGetFieldMapping) WithExpandWildcards(v string) func(*IndicesGetFieldMappingRequest) { +func (f IndicesGetFieldMapping) WithExpandWildcards(v ...string) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.get_index_template.go b/esapi/api.indices.get_index_template.go index 58c8773b87..0517704586 100644 --- a/esapi/api.indices.get_index_template.go +++ b/esapi/api.indices.get_index_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesGetIndexTemplateFunc(t Transport) IndicesGetIndexTemplate { // ----- API Definition ------------------------------------------------------- -// IndicesGetIndexTemplate returns an index template. +// IndicesGetIndexTemplate get index templates // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template. type IndicesGetIndexTemplate func(o ...func(*IndicesGetIndexTemplateRequest)) (*Response, error) // IndicesGetIndexTemplateRequest configures the Indices Get Index Template API request. diff --git a/esapi/api.indices.get_mapping.go b/esapi/api.indices.get_mapping.go index af256a1085..93b48bbccb 100644 --- a/esapi/api.indices.get_mapping.go +++ b/esapi/api.indices.get_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesGetMappingFunc(t Transport) IndicesGetMapping { // ----- API Definition ------------------------------------------------------- -// IndicesGetMapping returns mappings for one or more indices. +// IndicesGetMapping get mapping definitions // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping. type IndicesGetMapping func(o ...func(*IndicesGetMappingRequest)) (*Response, error) // IndicesGetMappingRequest configures the Indices Get Mapping API request. @@ -54,7 +54,7 @@ type IndicesGetMappingRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool Local *bool MasterTimeout time.Duration @@ -108,8 +108,8 @@ func (r IndicesGetMappingRequest) Do(providedCtx context.Context, transport Tran params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -217,7 +217,7 @@ func (f IndicesGetMapping) WithAllowNoIndices(v bool) func(*IndicesGetMappingReq } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesGetMapping) WithExpandWildcards(v string) func(*IndicesGetMappingRequest) { +func (f IndicesGetMapping) WithExpandWildcards(v ...string) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.get_migrate_reindex_status.go b/esapi/api.indices.get_migrate_reindex_status.go index 459a37c3fc..f22c20778e 100644 --- a/esapi/api.indices.get_migrate_reindex_status.go +++ b/esapi/api.indices.get_migrate_reindex_status.go @@ -15,18 +15,19 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strings" ) func newIndicesGetMigrateReindexStatusFunc(t Transport) IndicesGetMigrateReindexStatus { - return func(index string, o ...func(*IndicesGetMigrateReindexStatusRequest)) (*Response, error) { + return func(index []string, o ...func(*IndicesGetMigrateReindexStatusRequest)) (*Response, error) { var r = IndicesGetMigrateReindexStatusRequest{Index: index} for _, f := range o { f(&r) @@ -42,16 +43,14 @@ func newIndicesGetMigrateReindexStatusFunc(t Transport) IndicesGetMigrateReindex // ----- API Definition ------------------------------------------------------- -// IndicesGetMigrateReindexStatus this API returns the status of a migration reindex attempt for a data stream or index +// IndicesGetMigrateReindexStatus get the migration reindexing status // -// This API is experimental. -// -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex-status-api.html. -type IndicesGetMigrateReindexStatus func(index string, o ...func(*IndicesGetMigrateReindexStatusRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-migration. +type IndicesGetMigrateReindexStatus func(index []string, o ...func(*IndicesGetMigrateReindexStatusRequest)) (*Response, error) // IndicesGetMigrateReindexStatusRequest configures the Indices Get Migrate Reindex Status API request. type IndicesGetMigrateReindexStatusRequest struct { - Index string + Index []string Pretty bool Human bool @@ -84,16 +83,20 @@ func (r IndicesGetMigrateReindexStatusRequest) Do(providedCtx context.Context, t method = "GET" - path.Grow(7 + 1 + len("_migration") + 1 + len("reindex") + 1 + len(r.Index) + 1 + len("_status")) + if len(r.Index) == 0 { + return nil, errors.New("index is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_migration") + 1 + len("reindex") + 1 + len(strings.Join(r.Index, ",")) + 1 + len("_status")) path.WriteString("http://") path.WriteString("/") path.WriteString("_migration") path.WriteString("/") path.WriteString("reindex") path.WriteString("/") - path.WriteString(r.Index) + path.WriteString(strings.Join(r.Index, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "index", r.Index) + instrument.RecordPathPart(ctx, "index", strings.Join(r.Index, ",")) } path.WriteString("/") path.WriteString("_status") diff --git a/esapi/api.indices.get_sample.go b/esapi/api.indices.get_sample.go new file mode 100644 index 0000000000..0913a28a61 --- /dev/null +++ b/esapi/api.indices.get_sample.go @@ -0,0 +1,225 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newIndicesGetSampleFunc(t Transport) IndicesGetSample { + return func(index string, o ...func(*IndicesGetSampleRequest)) (*Response, error) { + var r = IndicesGetSampleRequest{Index: index} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesGetSample get random sample of ingested data +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. +type IndicesGetSample func(index string, o ...func(*IndicesGetSampleRequest)) (*Response, error) + +// IndicesGetSampleRequest configures the Indices Get Sample API request. +type IndicesGetSampleRequest struct { + Index string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesGetSampleRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_sample") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + 1 + len(r.Index) + 1 + len("_sample")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString(r.Index) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.Index) + } + path.WriteString("/") + path.WriteString("_sample") + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_sample") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_sample") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesGetSample) WithContext(v context.Context) func(*IndicesGetSampleRequest) { + return func(r *IndicesGetSampleRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesGetSample) WithPretty() func(*IndicesGetSampleRequest) { + return func(r *IndicesGetSampleRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesGetSample) WithHuman() func(*IndicesGetSampleRequest) { + return func(r *IndicesGetSampleRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesGetSample) WithErrorTrace() func(*IndicesGetSampleRequest) { + return func(r *IndicesGetSampleRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesGetSample) WithFilterPath(v ...string) func(*IndicesGetSampleRequest) { + return func(r *IndicesGetSampleRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesGetSample) WithHeader(h map[string]string) func(*IndicesGetSampleRequest) { + return func(r *IndicesGetSampleRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesGetSample) WithOpaqueID(s string) func(*IndicesGetSampleRequest) { + return func(r *IndicesGetSampleRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.indices.get_sample_configuration.go b/esapi/api.indices.get_sample_configuration.go new file mode 100644 index 0000000000..75db4f2a75 --- /dev/null +++ b/esapi/api.indices.get_sample_configuration.go @@ -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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" + "time" +) + +func newIndicesGetSampleConfigurationFunc(t Transport) IndicesGetSampleConfiguration { + return func(index string, o ...func(*IndicesGetSampleConfigurationRequest)) (*Response, error) { + var r = IndicesGetSampleConfigurationRequest{Index: index} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesGetSampleConfiguration get sampling configuration for an index or data stream +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. +type IndicesGetSampleConfiguration func(index string, o ...func(*IndicesGetSampleConfigurationRequest)) (*Response, error) + +// IndicesGetSampleConfigurationRequest configures the Indices Get Sample Configuration API request. +type IndicesGetSampleConfigurationRequest struct { + Index string + + MasterTimeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesGetSampleConfigurationRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + 1 + len(r.Index) + 1 + len("_sample") + 1 + len("config")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString(r.Index) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.Index) + } + path.WriteString("/") + path.WriteString("_sample") + path.WriteString("/") + path.WriteString("config") + + params = make(map[string]string) + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_sample_configuration") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_sample_configuration") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesGetSampleConfiguration) WithContext(v context.Context) func(*IndicesGetSampleConfigurationRequest) { + return func(r *IndicesGetSampleConfigurationRequest) { + r.ctx = v + } +} + +// WithMasterTimeout - timeout for connection to master node. +func (f IndicesGetSampleConfiguration) WithMasterTimeout(v time.Duration) func(*IndicesGetSampleConfigurationRequest) { + return func(r *IndicesGetSampleConfigurationRequest) { + r.MasterTimeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesGetSampleConfiguration) WithPretty() func(*IndicesGetSampleConfigurationRequest) { + return func(r *IndicesGetSampleConfigurationRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesGetSampleConfiguration) WithHuman() func(*IndicesGetSampleConfigurationRequest) { + return func(r *IndicesGetSampleConfigurationRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesGetSampleConfiguration) WithErrorTrace() func(*IndicesGetSampleConfigurationRequest) { + return func(r *IndicesGetSampleConfigurationRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesGetSampleConfiguration) WithFilterPath(v ...string) func(*IndicesGetSampleConfigurationRequest) { + return func(r *IndicesGetSampleConfigurationRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesGetSampleConfiguration) WithHeader(h map[string]string) func(*IndicesGetSampleConfigurationRequest) { + return func(r *IndicesGetSampleConfigurationRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesGetSampleConfiguration) WithOpaqueID(s string) func(*IndicesGetSampleConfigurationRequest) { + return func(r *IndicesGetSampleConfigurationRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.indices.get_sample_stats.go b/esapi/api.indices.get_sample_stats.go new file mode 100644 index 0000000000..32cbd37fbc --- /dev/null +++ b/esapi/api.indices.get_sample_stats.go @@ -0,0 +1,227 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newIndicesGetSampleStatsFunc(t Transport) IndicesGetSampleStats { + return func(index string, o ...func(*IndicesGetSampleStatsRequest)) (*Response, error) { + var r = IndicesGetSampleStatsRequest{Index: index} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesGetSampleStats get stats about a random sample of ingested data +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. +type IndicesGetSampleStats func(index string, o ...func(*IndicesGetSampleStatsRequest)) (*Response, error) + +// IndicesGetSampleStatsRequest configures the Indices Get Sample Stats API request. +type IndicesGetSampleStatsRequest struct { + Index string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesGetSampleStatsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_sample_stats") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + 1 + len(r.Index) + 1 + len("_sample") + 1 + len("stats")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString(r.Index) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.Index) + } + path.WriteString("/") + path.WriteString("_sample") + path.WriteString("/") + path.WriteString("stats") + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_sample_stats") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_sample_stats") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesGetSampleStats) WithContext(v context.Context) func(*IndicesGetSampleStatsRequest) { + return func(r *IndicesGetSampleStatsRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesGetSampleStats) WithPretty() func(*IndicesGetSampleStatsRequest) { + return func(r *IndicesGetSampleStatsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesGetSampleStats) WithHuman() func(*IndicesGetSampleStatsRequest) { + return func(r *IndicesGetSampleStatsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesGetSampleStats) WithErrorTrace() func(*IndicesGetSampleStatsRequest) { + return func(r *IndicesGetSampleStatsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesGetSampleStats) WithFilterPath(v ...string) func(*IndicesGetSampleStatsRequest) { + return func(r *IndicesGetSampleStatsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesGetSampleStats) WithHeader(h map[string]string) func(*IndicesGetSampleStatsRequest) { + return func(r *IndicesGetSampleStatsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesGetSampleStats) WithOpaqueID(s string) func(*IndicesGetSampleStatsRequest) { + return func(r *IndicesGetSampleStatsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.indices.get_settings.go b/esapi/api.indices.get_settings.go index 3b69abff7b..1a5d44020f 100644 --- a/esapi/api.indices.get_settings.go +++ b/esapi/api.indices.get_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesGetSettingsFunc(t Transport) IndicesGetSettings { // ----- API Definition ------------------------------------------------------- -// IndicesGetSettings returns settings for one or more indices. +// IndicesGetSettings get index settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings. type IndicesGetSettings func(o ...func(*IndicesGetSettingsRequest)) (*Response, error) // IndicesGetSettingsRequest configures the Indices Get Settings API request. @@ -56,7 +56,7 @@ type IndicesGetSettingsRequest struct { Name []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string FlatSettings *bool IgnoreUnavailable *bool IncludeDefaults *bool @@ -119,8 +119,8 @@ func (r IndicesGetSettingsRequest) Do(providedCtx context.Context, transport Tra params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.FlatSettings != nil { @@ -243,7 +243,7 @@ func (f IndicesGetSettings) WithAllowNoIndices(v bool) func(*IndicesGetSettingsR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesGetSettings) WithExpandWildcards(v string) func(*IndicesGetSettingsRequest) { +func (f IndicesGetSettings) WithExpandWildcards(v ...string) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.get_template.go b/esapi/api.indices.get_template.go index 73f9e72091..a041fa61fb 100644 --- a/esapi/api.indices.get_template.go +++ b/esapi/api.indices.get_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesGetTemplateFunc(t Transport) IndicesGetTemplate { // ----- API Definition ------------------------------------------------------- -// IndicesGetTemplate returns an index template. +// IndicesGetTemplate get legacy index templates // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-template. type IndicesGetTemplate func(o ...func(*IndicesGetTemplateRequest)) (*Response, error) // IndicesGetTemplateRequest configures the Indices Get Template API request. diff --git a/esapi/api.indices.migrate_reindex.go b/esapi/api.indices.migrate_reindex.go index caaaa9a6c8..dacdb4b990 100644 --- a/esapi/api.indices.migrate_reindex.go +++ b/esapi/api.indices.migrate_reindex.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,9 @@ func newIndicesMigrateReindexFunc(t Transport) IndicesMigrateReindex { // ----- API Definition ------------------------------------------------------- -// IndicesMigrateReindex this API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task +// IndicesMigrateReindex reindex legacy backing indices // -// This API is experimental. -// -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-reindex. type IndicesMigrateReindex func(body io.Reader, o ...func(*IndicesMigrateReindexRequest)) (*Response, error) // IndicesMigrateReindexRequest configures the Indices Migrate Reindex API request. diff --git a/esapi/api.indices.modify_data_stream.go b/esapi/api.indices.modify_data_stream.go index 0777d22b21..97c67c8384 100644 --- a/esapi/api.indices.modify_data_stream.go +++ b/esapi/api.indices.modify_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesModifyDataStreamFunc(t Transport) IndicesModifyDataStream { // ----- API Definition ------------------------------------------------------- -// IndicesModifyDataStream modifies a data stream +// IndicesModifyDataStream update data streams // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream. type IndicesModifyDataStream func(body io.Reader, o ...func(*IndicesModifyDataStreamRequest)) (*Response, error) // IndicesModifyDataStreamRequest configures the Indices Modify Data Stream API request. diff --git a/esapi/api.indices.open.go b/esapi/api.indices.open.go index 85251e1ffa..f708305ca3 100644 --- a/esapi/api.indices.open.go +++ b/esapi/api.indices.open.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesOpenFunc(t Transport) IndicesOpen { // ----- API Definition ------------------------------------------------------- -// IndicesOpen opens an index. +// IndicesOpen open a closed index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open. type IndicesOpen func(index []string, o ...func(*IndicesOpenRequest)) (*Response, error) // IndicesOpenRequest configures the Indices Open API request. @@ -55,7 +55,7 @@ type IndicesOpenRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool MasterTimeout time.Duration Timeout time.Duration @@ -112,8 +112,8 @@ func (r IndicesOpenRequest) Do(providedCtx context.Context, transport Transport) params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -218,7 +218,7 @@ func (f IndicesOpen) WithAllowNoIndices(v bool) func(*IndicesOpenRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesOpen) WithExpandWildcards(v string) func(*IndicesOpenRequest) { +func (f IndicesOpen) WithExpandWildcards(v ...string) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.put_alias.go b/esapi/api.indices.put_alias.go index 49f31875fb..6308a1228e 100644 --- a/esapi/api.indices.put_alias.go +++ b/esapi/api.indices.put_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesPutAliasFunc(t Transport) IndicesPutAlias { // ----- API Definition ------------------------------------------------------- -// IndicesPutAlias creates or updates an alias. +// IndicesPutAlias create or update an alias // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias. type IndicesPutAlias func(index []string, name string, o ...func(*IndicesPutAliasRequest)) (*Response, error) // IndicesPutAliasRequest configures the Indices Put Alias API request. diff --git a/esapi/api.indices.put_data_lifecycle.go b/esapi/api.indices.put_data_lifecycle.go index bb1ad59e59..0edc1e1f39 100644 --- a/esapi/api.indices.put_data_lifecycle.go +++ b/esapi/api.indices.put_data_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -29,8 +29,8 @@ import ( ) func newIndicesPutDataLifecycleFunc(t Transport) IndicesPutDataLifecycle { - return func(name []string, o ...func(*IndicesPutDataLifecycleRequest)) (*Response, error) { - var r = IndicesPutDataLifecycleRequest{Name: name} + return func(name []string, body io.Reader, o ...func(*IndicesPutDataLifecycleRequest)) (*Response, error) { + var r = IndicesPutDataLifecycleRequest{Name: name, Body: body} for _, f := range o { f(&r) } @@ -45,10 +45,10 @@ func newIndicesPutDataLifecycleFunc(t Transport) IndicesPutDataLifecycle { // ----- API Definition ------------------------------------------------------- -// IndicesPutDataLifecycle updates the data stream lifecycle of the selected data streams. +// IndicesPutDataLifecycle update data stream lifecycles // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html. -type IndicesPutDataLifecycle func(name []string, o ...func(*IndicesPutDataLifecycleRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle. +type IndicesPutDataLifecycle func(name []string, body io.Reader, o ...func(*IndicesPutDataLifecycleRequest)) (*Response, error) // IndicesPutDataLifecycleRequest configures the Indices Put Data Lifecycle API request. type IndicesPutDataLifecycleRequest struct { @@ -56,7 +56,7 @@ type IndicesPutDataLifecycleRequest struct { Name []string - ExpandWildcards string + ExpandWildcards []string MasterTimeout time.Duration Timeout time.Duration @@ -109,8 +109,8 @@ func (r IndicesPutDataLifecycleRequest) Do(providedCtx context.Context, transpor params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.MasterTimeout != 0 { @@ -206,15 +206,8 @@ func (f IndicesPutDataLifecycle) WithContext(v context.Context) func(*IndicesPut } } -// WithBody - The data stream lifecycle configuration that consist of the data retention. -func (f IndicesPutDataLifecycle) WithBody(v io.Reader) func(*IndicesPutDataLifecycleRequest) { - return func(r *IndicesPutDataLifecycleRequest) { - r.Body = v - } -} - // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesPutDataLifecycle) WithExpandWildcards(v string) func(*IndicesPutDataLifecycleRequest) { +func (f IndicesPutDataLifecycle) WithExpandWildcards(v ...string) func(*IndicesPutDataLifecycleRequest) { return func(r *IndicesPutDataLifecycleRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.put_data_stream_mappings.go b/esapi/api.indices.put_data_stream_mappings.go new file mode 100644 index 0000000000..6a79e5058c --- /dev/null +++ b/esapi/api.indices.put_data_stream_mappings.go @@ -0,0 +1,279 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "errors" + "io" + "net/http" + "strconv" + "strings" + "time" +) + +func newIndicesPutDataStreamMappingsFunc(t Transport) IndicesPutDataStreamMappings { + return func(name []string, body io.Reader, o ...func(*IndicesPutDataStreamMappingsRequest)) (*Response, error) { + var r = IndicesPutDataStreamMappingsRequest{Name: name, Body: body} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesPutDataStreamMappings update data stream mappings +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-mappings. +type IndicesPutDataStreamMappings func(name []string, body io.Reader, o ...func(*IndicesPutDataStreamMappingsRequest)) (*Response, error) + +// IndicesPutDataStreamMappingsRequest configures the Indices Put Data Stream Mappings API request. +type IndicesPutDataStreamMappingsRequest struct { + Body io.Reader + + Name []string + + DryRun *bool + MasterTimeout time.Duration + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesPutDataStreamMappingsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.put_data_stream_mappings") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_data_stream") + 1 + len(strings.Join(r.Name, ",")) + 1 + len("_mappings")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + path.WriteString(strings.Join(r.Name, ",")) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) + } + path.WriteString("/") + path.WriteString("_mappings") + + params = make(map[string]string) + + if r.DryRun != nil { + params["dry_run"] = strconv.FormatBool(*r.DryRun) + } + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.put_data_stream_mappings") + if reader := instrument.RecordRequestBody(ctx, "indices.put_data_stream_mappings", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.put_data_stream_mappings") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesPutDataStreamMappings) WithContext(v context.Context) func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + r.ctx = v + } +} + +// WithDryRun - whether this request should only be a dry run rather than actually applying mappings. +func (f IndicesPutDataStreamMappings) WithDryRun(v bool) func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + r.DryRun = &v + } +} + +// WithMasterTimeout - period to wait for a connection to the master node. +func (f IndicesPutDataStreamMappings) WithMasterTimeout(v time.Duration) func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - period to wait for a response. +func (f IndicesPutDataStreamMappings) WithTimeout(v time.Duration) func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesPutDataStreamMappings) WithPretty() func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesPutDataStreamMappings) WithHuman() func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesPutDataStreamMappings) WithErrorTrace() func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesPutDataStreamMappings) WithFilterPath(v ...string) func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesPutDataStreamMappings) WithHeader(h map[string]string) func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesPutDataStreamMappings) WithOpaqueID(s string) func(*IndicesPutDataStreamMappingsRequest) { + return func(r *IndicesPutDataStreamMappingsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.indices.put_data_stream_options.go b/esapi/api.indices.put_data_stream_options.go index 5214a3160c..f366358297 100644 --- a/esapi/api.indices.put_data_stream_options.go +++ b/esapi/api.indices.put_data_stream_options.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -29,8 +29,8 @@ import ( ) func newIndicesPutDataStreamOptionsFunc(t Transport) IndicesPutDataStreamOptions { - return func(name []string, o ...func(*IndicesPutDataStreamOptionsRequest)) (*Response, error) { - var r = IndicesPutDataStreamOptionsRequest{Name: name} + return func(name []string, body io.Reader, o ...func(*IndicesPutDataStreamOptionsRequest)) (*Response, error) { + var r = IndicesPutDataStreamOptionsRequest{Name: name, Body: body} for _, f := range o { f(&r) } @@ -45,10 +45,10 @@ func newIndicesPutDataStreamOptionsFunc(t Transport) IndicesPutDataStreamOptions // ----- API Definition ------------------------------------------------------- -// IndicesPutDataStreamOptions updates the data stream options of the selected data streams. +// IndicesPutDataStreamOptions update data stream options // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html. -type IndicesPutDataStreamOptions func(name []string, o ...func(*IndicesPutDataStreamOptionsRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-options. +type IndicesPutDataStreamOptions func(name []string, body io.Reader, o ...func(*IndicesPutDataStreamOptionsRequest)) (*Response, error) // IndicesPutDataStreamOptionsRequest configures the Indices Put Data Stream Options API request. type IndicesPutDataStreamOptionsRequest struct { @@ -56,7 +56,7 @@ type IndicesPutDataStreamOptionsRequest struct { Name []string - ExpandWildcards string + ExpandWildcards []string MasterTimeout time.Duration Timeout time.Duration @@ -109,8 +109,8 @@ func (r IndicesPutDataStreamOptionsRequest) Do(providedCtx context.Context, tran params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.MasterTimeout != 0 { @@ -206,15 +206,8 @@ func (f IndicesPutDataStreamOptions) WithContext(v context.Context) func(*Indice } } -// WithBody - The data stream options configuration that consist of the failure store configuration. -func (f IndicesPutDataStreamOptions) WithBody(v io.Reader) func(*IndicesPutDataStreamOptionsRequest) { - return func(r *IndicesPutDataStreamOptionsRequest) { - r.Body = v - } -} - // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesPutDataStreamOptions) WithExpandWildcards(v string) func(*IndicesPutDataStreamOptionsRequest) { +func (f IndicesPutDataStreamOptions) WithExpandWildcards(v ...string) func(*IndicesPutDataStreamOptionsRequest) { return func(r *IndicesPutDataStreamOptionsRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.put_data_stream_settings.go b/esapi/api.indices.put_data_stream_settings.go index 7fd81804a5..0ba89ef392 100644 --- a/esapi/api.indices.put_data_stream_settings.go +++ b/esapi/api.indices.put_data_stream_settings.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "io" "net/http" "strconv" @@ -29,7 +30,7 @@ import ( ) func newIndicesPutDataStreamSettingsFunc(t Transport) IndicesPutDataStreamSettings { - return func(name string, body io.Reader, o ...func(*IndicesPutDataStreamSettingsRequest)) (*Response, error) { + return func(name []string, body io.Reader, o ...func(*IndicesPutDataStreamSettingsRequest)) (*Response, error) { var r = IndicesPutDataStreamSettingsRequest{Name: name, Body: body} for _, f := range o { f(&r) @@ -45,16 +46,16 @@ func newIndicesPutDataStreamSettingsFunc(t Transport) IndicesPutDataStreamSettin // ----- API Definition ------------------------------------------------------- -// IndicesPutDataStreamSettings updates a data stream's settings +// IndicesPutDataStreamSettings update data stream settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. -type IndicesPutDataStreamSettings func(name string, body io.Reader, o ...func(*IndicesPutDataStreamSettingsRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-settings. +type IndicesPutDataStreamSettings func(name []string, body io.Reader, o ...func(*IndicesPutDataStreamSettingsRequest)) (*Response, error) // IndicesPutDataStreamSettingsRequest configures the Indices Put Data Stream Settings API request. type IndicesPutDataStreamSettingsRequest struct { Body io.Reader - Name string + Name []string DryRun *bool MasterTimeout time.Duration @@ -91,14 +92,18 @@ func (r IndicesPutDataStreamSettingsRequest) Do(providedCtx context.Context, tra method = "PUT" - path.Grow(7 + 1 + len("_data_stream") + 1 + len(r.Name) + 1 + len("_settings")) + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_data_stream") + 1 + len(strings.Join(r.Name, ",")) + 1 + len("_settings")) path.WriteString("http://") path.WriteString("/") path.WriteString("_data_stream") path.WriteString("/") - path.WriteString(r.Name) + path.WriteString(strings.Join(r.Name, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "name", r.Name) + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) } path.WriteString("/") path.WriteString("_settings") diff --git a/esapi/api.indices.put_index_template.go b/esapi/api.indices.put_index_template.go index 722dfe0b91..928ab70219 100644 --- a/esapi/api.indices.put_index_template.go +++ b/esapi/api.indices.put_index_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesPutIndexTemplateFunc(t Transport) IndicesPutIndexTemplate { // ----- API Definition ------------------------------------------------------- -// IndicesPutIndexTemplate creates or updates an index template. +// IndicesPutIndexTemplate create or update an index template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-index-template. type IndicesPutIndexTemplate func(name string, body io.Reader, o ...func(*IndicesPutIndexTemplateRequest)) (*Response, error) // IndicesPutIndexTemplateRequest configures the Indices Put Index Template API request. diff --git a/esapi/api.indices.put_mapping.go b/esapi/api.indices.put_mapping.go index 0478686384..b207fce439 100644 --- a/esapi/api.indices.put_mapping.go +++ b/esapi/api.indices.put_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesPutMappingFunc(t Transport) IndicesPutMapping { // ----- API Definition ------------------------------------------------------- -// IndicesPutMapping updates the index mappings. +// IndicesPutMapping update field mappings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping. type IndicesPutMapping func(index []string, body io.Reader, o ...func(*IndicesPutMappingRequest)) (*Response, error) // IndicesPutMappingRequest configures the Indices Put Mapping API request. @@ -57,7 +57,7 @@ type IndicesPutMappingRequest struct { Body io.Reader AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool MasterTimeout time.Duration Timeout time.Duration @@ -108,8 +108,8 @@ func (r IndicesPutMappingRequest) Do(providedCtx context.Context, transport Tran params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -221,7 +221,7 @@ func (f IndicesPutMapping) WithAllowNoIndices(v bool) func(*IndicesPutMappingReq } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesPutMapping) WithExpandWildcards(v string) func(*IndicesPutMappingRequest) { +func (f IndicesPutMapping) WithExpandWildcards(v ...string) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.put_sample_configuration.go b/esapi/api.indices.put_sample_configuration.go new file mode 100644 index 0000000000..3cb0d52823 --- /dev/null +++ b/esapi/api.indices.put_sample_configuration.go @@ -0,0 +1,263 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" + "time" +) + +func newIndicesPutSampleConfigurationFunc(t Transport) IndicesPutSampleConfiguration { + return func(index string, body io.Reader, o ...func(*IndicesPutSampleConfigurationRequest)) (*Response, error) { + var r = IndicesPutSampleConfigurationRequest{Index: index, Body: body} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesPutSampleConfiguration configure sampling for an index or data stream +// +// This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. +type IndicesPutSampleConfiguration func(index string, body io.Reader, o ...func(*IndicesPutSampleConfigurationRequest)) (*Response, error) + +// IndicesPutSampleConfigurationRequest configures the Indices Put Sample Configuration API request. +type IndicesPutSampleConfigurationRequest struct { + Index string + + Body io.Reader + + MasterTimeout time.Duration + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesPutSampleConfigurationRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.put_sample_configuration") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len(r.Index) + 1 + len("_sample") + 1 + len("config")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString(r.Index) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.Index) + } + path.WriteString("/") + path.WriteString("_sample") + path.WriteString("/") + path.WriteString("config") + + params = make(map[string]string) + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.put_sample_configuration") + if reader := instrument.RecordRequestBody(ctx, "indices.put_sample_configuration", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.put_sample_configuration") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesPutSampleConfiguration) WithContext(v context.Context) func(*IndicesPutSampleConfigurationRequest) { + return func(r *IndicesPutSampleConfigurationRequest) { + r.ctx = v + } +} + +// WithMasterTimeout - timeout for connection to master node. +func (f IndicesPutSampleConfiguration) WithMasterTimeout(v time.Duration) func(*IndicesPutSampleConfigurationRequest) { + return func(r *IndicesPutSampleConfigurationRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - timeout for the request. +func (f IndicesPutSampleConfiguration) WithTimeout(v time.Duration) func(*IndicesPutSampleConfigurationRequest) { + return func(r *IndicesPutSampleConfigurationRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesPutSampleConfiguration) WithPretty() func(*IndicesPutSampleConfigurationRequest) { + return func(r *IndicesPutSampleConfigurationRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesPutSampleConfiguration) WithHuman() func(*IndicesPutSampleConfigurationRequest) { + return func(r *IndicesPutSampleConfigurationRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesPutSampleConfiguration) WithErrorTrace() func(*IndicesPutSampleConfigurationRequest) { + return func(r *IndicesPutSampleConfigurationRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesPutSampleConfiguration) WithFilterPath(v ...string) func(*IndicesPutSampleConfigurationRequest) { + return func(r *IndicesPutSampleConfigurationRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesPutSampleConfiguration) WithHeader(h map[string]string) func(*IndicesPutSampleConfigurationRequest) { + return func(r *IndicesPutSampleConfigurationRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesPutSampleConfiguration) WithOpaqueID(s string) func(*IndicesPutSampleConfigurationRequest) { + return func(r *IndicesPutSampleConfigurationRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.indices.put_settings.go b/esapi/api.indices.put_settings.go index c604a6ffc7..77ae92f989 100644 --- a/esapi/api.indices.put_settings.go +++ b/esapi/api.indices.put_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesPutSettingsFunc(t Transport) IndicesPutSettings { // ----- API Definition ------------------------------------------------------- -// IndicesPutSettings updates the index settings. +// IndicesPutSettings update index settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings. type IndicesPutSettings func(body io.Reader, o ...func(*IndicesPutSettingsRequest)) (*Response, error) // IndicesPutSettingsRequest configures the Indices Put Settings API request. @@ -57,7 +57,7 @@ type IndicesPutSettingsRequest struct { Body io.Reader AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string FlatSettings *bool IgnoreUnavailable *bool MasterTimeout time.Duration @@ -114,8 +114,8 @@ func (r IndicesPutSettingsRequest) Do(providedCtx context.Context, transport Tra params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.FlatSettings != nil { @@ -242,7 +242,7 @@ func (f IndicesPutSettings) WithAllowNoIndices(v bool) func(*IndicesPutSettingsR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesPutSettings) WithExpandWildcards(v string) func(*IndicesPutSettingsRequest) { +func (f IndicesPutSettings) WithExpandWildcards(v ...string) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.put_template.go b/esapi/api.indices.put_template.go index 875b0896e7..43af510651 100644 --- a/esapi/api.indices.put_template.go +++ b/esapi/api.indices.put_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesPutTemplateFunc(t Transport) IndicesPutTemplate { // ----- API Definition ------------------------------------------------------- -// IndicesPutTemplate creates or updates an index template. +// IndicesPutTemplate create or update a legacy index template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-template. type IndicesPutTemplate func(name string, body io.Reader, o ...func(*IndicesPutTemplateRequest)) (*Response, error) // IndicesPutTemplateRequest configures the Indices Put Template API request. diff --git a/esapi/api.indices.recovery.go b/esapi/api.indices.recovery.go index f87008e9d7..46bc387a7a 100644 --- a/esapi/api.indices.recovery.go +++ b/esapi/api.indices.recovery.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesRecoveryFunc(t Transport) IndicesRecovery { // ----- API Definition ------------------------------------------------------- -// IndicesRecovery returns information about ongoing index shard recoveries. +// IndicesRecovery get index recovery information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-recovery. type IndicesRecovery func(o ...func(*IndicesRecoveryRequest)) (*Response, error) // IndicesRecoveryRequest configures the Indices Recovery API request. @@ -55,7 +55,7 @@ type IndicesRecoveryRequest struct { ActiveOnly *bool AllowNoIndices *bool Detailed *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool Pretty bool @@ -115,8 +115,8 @@ func (r IndicesRecoveryRequest) Do(providedCtx context.Context, transport Transp params["detailed"] = strconv.FormatBool(*r.Detailed) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -230,7 +230,7 @@ func (f IndicesRecovery) WithDetailed(v bool) func(*IndicesRecoveryRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesRecovery) WithExpandWildcards(v string) func(*IndicesRecoveryRequest) { +func (f IndicesRecovery) WithExpandWildcards(v ...string) func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.refresh.go b/esapi/api.indices.refresh.go index be6e230382..822b493212 100644 --- a/esapi/api.indices.refresh.go +++ b/esapi/api.indices.refresh.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesRefreshFunc(t Transport) IndicesRefresh { // ----- API Definition ------------------------------------------------------- -// IndicesRefresh performs the refresh operation in one or more indices. +// IndicesRefresh refresh an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh. type IndicesRefresh func(o ...func(*IndicesRefreshRequest)) (*Response, error) // IndicesRefreshRequest configures the Indices Refresh API request. @@ -53,7 +53,7 @@ type IndicesRefreshRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool Pretty bool @@ -105,8 +105,8 @@ func (r IndicesRefreshRequest) Do(providedCtx context.Context, transport Transpo params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -206,7 +206,7 @@ func (f IndicesRefresh) WithAllowNoIndices(v bool) func(*IndicesRefreshRequest) } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesRefresh) WithExpandWildcards(v string) func(*IndicesRefreshRequest) { +func (f IndicesRefresh) WithExpandWildcards(v ...string) func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.remove_block.go b/esapi/api.indices.remove_block.go index e348d8ef7d..e1a10dc4aa 100644 --- a/esapi/api.indices.remove_block.go +++ b/esapi/api.indices.remove_block.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesRemoveBlockFunc(t Transport) IndicesRemoveBlock { // ----- API Definition ------------------------------------------------------- -// IndicesRemoveBlock removes a block from an index. +// IndicesRemoveBlock remove an index block // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-remove-block. type IndicesRemoveBlock func(index []string, block string, o ...func(*IndicesRemoveBlockRequest)) (*Response, error) // IndicesRemoveBlockRequest configures the Indices Remove Block API request. @@ -57,7 +57,7 @@ type IndicesRemoveBlockRequest struct { Block string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool MasterTimeout time.Duration Timeout time.Duration @@ -118,8 +118,8 @@ func (r IndicesRemoveBlockRequest) Do(providedCtx context.Context, transport Tra params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -220,7 +220,7 @@ func (f IndicesRemoveBlock) WithAllowNoIndices(v bool) func(*IndicesRemoveBlockR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesRemoveBlock) WithExpandWildcards(v string) func(*IndicesRemoveBlockRequest) { +func (f IndicesRemoveBlock) WithExpandWildcards(v ...string) func(*IndicesRemoveBlockRequest) { return func(r *IndicesRemoveBlockRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.resolve_cluster.go b/esapi/api.indices.resolve_cluster.go index 3ead8fc06f..d2cf8d776c 100644 --- a/esapi/api.indices.resolve_cluster.go +++ b/esapi/api.indices.resolve_cluster.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesResolveClusterFunc(t Transport) IndicesResolveCluster { // ----- API Definition ------------------------------------------------------- -// IndicesResolveCluster resolves the specified index expressions to return information about each cluster. If no index expression is provided, this endpoint will return information about all the remote clusters that are configured on the local cluster. +// IndicesResolveCluster resolve the cluster // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster. type IndicesResolveCluster func(o ...func(*IndicesResolveClusterRequest)) (*Response, error) // IndicesResolveClusterRequest configures the Indices Resolve Cluster API request. @@ -54,7 +54,7 @@ type IndicesResolveClusterRequest struct { Name []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreThrottled *bool IgnoreUnavailable *bool Timeout time.Duration @@ -110,8 +110,8 @@ func (r IndicesResolveClusterRequest) Do(providedCtx context.Context, transport params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreThrottled != nil { @@ -219,7 +219,7 @@ func (f IndicesResolveCluster) WithAllowNoIndices(v bool) func(*IndicesResolveCl } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). only allowed when providing an index expression.. -func (f IndicesResolveCluster) WithExpandWildcards(v string) func(*IndicesResolveClusterRequest) { +func (f IndicesResolveCluster) WithExpandWildcards(v ...string) func(*IndicesResolveClusterRequest) { return func(r *IndicesResolveClusterRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.resolve_index.go b/esapi/api.indices.resolve_index.go index 6cb0be31d6..05ce5a53c8 100644 --- a/esapi/api.indices.resolve_index.go +++ b/esapi/api.indices.resolve_index.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesResolveIndexFunc(t Transport) IndicesResolveIndex { // ----- API Definition ------------------------------------------------------- -// IndicesResolveIndex returns information about any matching indices, aliases, and data streams +// IndicesResolveIndex resolve indices // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-index. type IndicesResolveIndex func(name []string, o ...func(*IndicesResolveIndexRequest)) (*Response, error) // IndicesResolveIndexRequest configures the Indices Resolve Index API request. @@ -54,8 +54,10 @@ type IndicesResolveIndexRequest struct { Name []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool + Mode []string + ProjectRouting string Pretty bool Human bool @@ -110,14 +112,22 @@ func (r IndicesResolveIndexRequest) Do(providedCtx context.Context, transport Tr params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) } + if len(r.Mode) > 0 { + params["mode"] = strings.Join(r.Mode, ",") + } + + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.Pretty { params["pretty"] = "true" } @@ -204,7 +214,7 @@ func (f IndicesResolveIndex) WithAllowNoIndices(v bool) func(*IndicesResolveInde } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesResolveIndex) WithExpandWildcards(v string) func(*IndicesResolveIndexRequest) { +func (f IndicesResolveIndex) WithExpandWildcards(v ...string) func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { r.ExpandWildcards = v } @@ -217,6 +227,20 @@ func (f IndicesResolveIndex) WithIgnoreUnavailable(v bool) func(*IndicesResolveI } } +// WithMode - filter indices by index mode. comma-separated list of indexmode. empty means no filter.. +func (f IndicesResolveIndex) WithMode(v ...string) func(*IndicesResolveIndexRequest) { + return func(r *IndicesResolveIndexRequest) { + r.Mode = v + } +} + +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f IndicesResolveIndex) WithProjectRouting(v string) func(*IndicesResolveIndexRequest) { + return func(r *IndicesResolveIndexRequest) { + r.ProjectRouting = v + } +} + // WithPretty makes the response body pretty-printed. func (f IndicesResolveIndex) WithPretty() func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { diff --git a/esapi/api.indices.rollover.go b/esapi/api.indices.rollover.go index 21bb0c2bc4..264d6a7a12 100644 --- a/esapi/api.indices.rollover.go +++ b/esapi/api.indices.rollover.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,10 +45,9 @@ func newIndicesRolloverFunc(t Transport) IndicesRollover { // ----- API Definition ------------------------------------------------------- -// IndicesRollover updates an alias to point to a new index when the existing index -// is considered to be too large or too old. +// IndicesRollover roll over to a new index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-rollover. type IndicesRollover func(alias string, o ...func(*IndicesRolloverRequest)) (*Response, error) // IndicesRolloverRequest configures the Indices Rollover API request. diff --git a/esapi/api.indices.segments.go b/esapi/api.indices.segments.go index b1c3b4a3be..60b0290dc0 100644 --- a/esapi/api.indices.segments.go +++ b/esapi/api.indices.segments.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesSegmentsFunc(t Transport) IndicesSegments { // ----- API Definition ------------------------------------------------------- -// IndicesSegments provides low-level information about segments in a Lucene index. +// IndicesSegments get index segments // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-segments. type IndicesSegments func(o ...func(*IndicesSegmentsRequest)) (*Response, error) // IndicesSegmentsRequest configures the Indices Segments API request. @@ -53,7 +53,7 @@ type IndicesSegmentsRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool Pretty bool @@ -105,8 +105,8 @@ func (r IndicesSegmentsRequest) Do(providedCtx context.Context, transport Transp params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -206,7 +206,7 @@ func (f IndicesSegments) WithAllowNoIndices(v bool) func(*IndicesSegmentsRequest } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesSegments) WithExpandWildcards(v string) func(*IndicesSegmentsRequest) { +func (f IndicesSegments) WithExpandWildcards(v ...string) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.shard_stores.go b/esapi/api.indices.shard_stores.go index a44e92cd25..f6d3a69e70 100644 --- a/esapi/api.indices.shard_stores.go +++ b/esapi/api.indices.shard_stores.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesShardStoresFunc(t Transport) IndicesShardStores { // ----- API Definition ------------------------------------------------------- -// IndicesShardStores provides store information for shard copies of indices. +// IndicesShardStores get index shard stores // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shard-stores. type IndicesShardStores func(o ...func(*IndicesShardStoresRequest)) (*Response, error) // IndicesShardStoresRequest configures the Indices Shard Stores API request. @@ -53,7 +53,7 @@ type IndicesShardStoresRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool Status []string @@ -106,8 +106,8 @@ func (r IndicesShardStoresRequest) Do(providedCtx context.Context, transport Tra params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -211,7 +211,7 @@ func (f IndicesShardStores) WithAllowNoIndices(v bool) func(*IndicesShardStoresR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesShardStores) WithExpandWildcards(v string) func(*IndicesShardStoresRequest) { +func (f IndicesShardStores) WithExpandWildcards(v ...string) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.shrink.go b/esapi/api.indices.shrink.go index 40acbfce5a..f89f8fc636 100644 --- a/esapi/api.indices.shrink.go +++ b/esapi/api.indices.shrink.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -28,8 +28,8 @@ import ( ) func newIndicesShrinkFunc(t Transport) IndicesShrink { - return func(index string, target string, o ...func(*IndicesShrinkRequest)) (*Response, error) { - var r = IndicesShrinkRequest{Index: index, Target: target} + return func(index string, body io.Reader, target string, o ...func(*IndicesShrinkRequest)) (*Response, error) { + var r = IndicesShrinkRequest{Index: index, Body: body, Target: target} for _, f := range o { f(&r) } @@ -44,10 +44,10 @@ func newIndicesShrinkFunc(t Transport) IndicesShrink { // ----- API Definition ------------------------------------------------------- -// IndicesShrink allow to shrink an existing index into a new index with fewer primary shards. +// IndicesShrink shrink an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html. -type IndicesShrink func(index string, target string, o ...func(*IndicesShrinkRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shrink. +type IndicesShrink func(index string, body io.Reader, target string, o ...func(*IndicesShrinkRequest)) (*Response, error) // IndicesShrinkRequest configures the Indices Shrink API request. type IndicesShrinkRequest struct { @@ -206,13 +206,6 @@ func (f IndicesShrink) WithContext(v context.Context) func(*IndicesShrinkRequest } } -// WithBody - The configuration for the target index (`settings` and `aliases`). -func (f IndicesShrink) WithBody(v io.Reader) func(*IndicesShrinkRequest) { - return func(r *IndicesShrinkRequest) { - r.Body = v - } -} - // WithMasterTimeout - specify timeout for connection to master. func (f IndicesShrink) WithMasterTimeout(v time.Duration) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { diff --git a/esapi/api.indices.simulate_index_template.go b/esapi/api.indices.simulate_index_template.go index 139d6fc5db..b404675853 100644 --- a/esapi/api.indices.simulate_index_template.go +++ b/esapi/api.indices.simulate_index_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesSimulateIndexTemplateFunc(t Transport) IndicesSimulateIndexTempla // ----- API Definition ------------------------------------------------------- -// IndicesSimulateIndexTemplate simulate matching the given index name against the index templates in the system +// IndicesSimulateIndexTemplate simulate an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template. type IndicesSimulateIndexTemplate func(name string, o ...func(*IndicesSimulateIndexTemplateRequest)) (*Response, error) // IndicesSimulateIndexTemplateRequest configures the Indices Simulate Index Template API request. diff --git a/esapi/api.indices.simulate_template.go b/esapi/api.indices.simulate_template.go index 3c48d17ea8..8968055cb7 100644 --- a/esapi/api.indices.simulate_template.go +++ b/esapi/api.indices.simulate_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIndicesSimulateTemplateFunc(t Transport) IndicesSimulateTemplate { // ----- API Definition ------------------------------------------------------- -// IndicesSimulateTemplate simulate resolving the given template name or body +// IndicesSimulateTemplate simulate an index template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template. type IndicesSimulateTemplate func(o ...func(*IndicesSimulateTemplateRequest)) (*Response, error) // IndicesSimulateTemplateRequest configures the Indices Simulate Template API request. diff --git a/esapi/api.indices.split.go b/esapi/api.indices.split.go index 64b71b9b7a..dfe3f1ac1c 100644 --- a/esapi/api.indices.split.go +++ b/esapi/api.indices.split.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -28,8 +28,8 @@ import ( ) func newIndicesSplitFunc(t Transport) IndicesSplit { - return func(index string, target string, o ...func(*IndicesSplitRequest)) (*Response, error) { - var r = IndicesSplitRequest{Index: index, Target: target} + return func(index string, body io.Reader, target string, o ...func(*IndicesSplitRequest)) (*Response, error) { + var r = IndicesSplitRequest{Index: index, Body: body, Target: target} for _, f := range o { f(&r) } @@ -44,10 +44,10 @@ func newIndicesSplitFunc(t Transport) IndicesSplit { // ----- API Definition ------------------------------------------------------- -// IndicesSplit allows you to split an existing index into a new index with more primary shards. +// IndicesSplit split an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html. -type IndicesSplit func(index string, target string, o ...func(*IndicesSplitRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-split. +type IndicesSplit func(index string, body io.Reader, target string, o ...func(*IndicesSplitRequest)) (*Response, error) // IndicesSplitRequest configures the Indices Split API request. type IndicesSplitRequest struct { @@ -206,13 +206,6 @@ func (f IndicesSplit) WithContext(v context.Context) func(*IndicesSplitRequest) } } -// WithBody - The configuration for the target index (`settings` and `aliases`). -func (f IndicesSplit) WithBody(v io.Reader) func(*IndicesSplitRequest) { - return func(r *IndicesSplitRequest) { - r.Body = v - } -} - // WithMasterTimeout - specify timeout for connection to master. func (f IndicesSplit) WithMasterTimeout(v time.Duration) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { diff --git a/esapi/api.indices.stats.go b/esapi/api.indices.stats.go index 89fb373361..7ae96803a8 100644 --- a/esapi/api.indices.stats.go +++ b/esapi/api.indices.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesStatsFunc(t Transport) IndicesStats { // ----- API Definition ------------------------------------------------------- -// IndicesStats provides statistics on operations happening in an index. +// IndicesStats get index statistics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-stats. type IndicesStats func(o ...func(*IndicesStatsRequest)) (*Response, error) // IndicesStatsRequest configures the Indices Stats API request. @@ -55,7 +55,7 @@ type IndicesStatsRequest struct { Metric []string CompletionFields []string - ExpandWildcards string + ExpandWildcards []string FielddataFields []string Fields []string ForbidClosedIndices *bool @@ -120,8 +120,8 @@ func (r IndicesStatsRequest) Do(providedCtx context.Context, transport Transport params["completion_fields"] = strings.Join(r.CompletionFields, ",") } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if len(r.FielddataFields) > 0 { @@ -252,7 +252,7 @@ func (f IndicesStats) WithCompletionFields(v ...string) func(*IndicesStatsReques } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesStats) WithExpandWildcards(v string) func(*IndicesStatsRequest) { +func (f IndicesStats) WithExpandWildcards(v ...string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.indices.update_aliases.go b/esapi/api.indices.update_aliases.go index 61cb935385..5cc8e3e442 100644 --- a/esapi/api.indices.update_aliases.go +++ b/esapi/api.indices.update_aliases.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesUpdateAliasesFunc(t Transport) IndicesUpdateAliases { // ----- API Definition ------------------------------------------------------- -// IndicesUpdateAliases updates index aliases. +// IndicesUpdateAliases create or update an alias // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases. type IndicesUpdateAliases func(body io.Reader, o ...func(*IndicesUpdateAliasesRequest)) (*Response, error) // IndicesUpdateAliasesRequest configures the Indices Update Aliases API request. diff --git a/esapi/api.indices.validate_query.go b/esapi/api.indices.validate_query.go index 82f163cd89..ddda76668c 100644 --- a/esapi/api.indices.validate_query.go +++ b/esapi/api.indices.validate_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesValidateQueryFunc(t Transport) IndicesValidateQuery { // ----- API Definition ------------------------------------------------------- -// IndicesValidateQuery allows a user to validate a potentially expensive query without executing it. +// IndicesValidateQuery validate a query // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query. type IndicesValidateQuery func(o ...func(*IndicesValidateQueryRequest)) (*Response, error) // IndicesValidateQueryRequest configures the Indices Validate Query API request. @@ -61,7 +61,7 @@ type IndicesValidateQueryRequest struct { AnalyzeWildcard *bool DefaultOperator string Df string - ExpandWildcards string + ExpandWildcards []string Explain *bool IgnoreUnavailable *bool Lenient *bool @@ -139,8 +139,8 @@ func (r IndicesValidateQueryRequest) Do(providedCtx context.Context, transport T params["df"] = r.Df } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Explain != nil { @@ -305,7 +305,7 @@ func (f IndicesValidateQuery) WithDf(v string) func(*IndicesValidateQueryRequest } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesValidateQuery) WithExpandWildcards(v string) func(*IndicesValidateQueryRequest) { +func (f IndicesValidateQuery) WithExpandWildcards(v ...string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.inference.chat_completion_unified.go b/esapi/api.inference.chat_completion_unified.go index f7c25a3b8d..8175be7fa8 100644 --- a/esapi/api.inference.chat_completion_unified.go +++ b/esapi/api.inference.chat_completion_unified.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferenceChatCompletionUnifiedFunc(t Transport) InferenceChatCompletionUnified { - return func(inference_id string, o ...func(*InferenceChatCompletionUnifiedRequest)) (*Response, error) { - var r = InferenceChatCompletionUnifiedRequest{InferenceID: inference_id} + return func(body io.Reader, inference_id string, o ...func(*InferenceChatCompletionUnifiedRequest)) (*Response, error) { + var r = InferenceChatCompletionUnifiedRequest{Body: body, InferenceID: inference_id} for _, f := range o { f(&r) } @@ -45,8 +46,8 @@ func newInferenceChatCompletionUnifiedFunc(t Transport) InferenceChatCompletionU // InferenceChatCompletionUnified perform chat completion inference // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/chat-completion-inference.html. -type InferenceChatCompletionUnified func(inference_id string, o ...func(*InferenceChatCompletionUnifiedRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-unified-inference. +type InferenceChatCompletionUnified func(body io.Reader, inference_id string, o ...func(*InferenceChatCompletionUnifiedRequest)) (*Response, error) // InferenceChatCompletionUnifiedRequest configures the Inference Chat Completion Unified API request. type InferenceChatCompletionUnifiedRequest struct { @@ -54,6 +55,8 @@ type InferenceChatCompletionUnifiedRequest struct { InferenceID string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -101,6 +104,10 @@ func (r InferenceChatCompletionUnifiedRequest) Do(providedCtx context.Context, t params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -186,10 +193,10 @@ func (f InferenceChatCompletionUnified) WithContext(v context.Context) func(*Inf } } -// WithBody - The inference payload. -func (f InferenceChatCompletionUnified) WithBody(v io.Reader) func(*InferenceChatCompletionUnifiedRequest) { +// WithTimeout - specifies the amount of time to wait for the inference request to complete.. +func (f InferenceChatCompletionUnified) WithTimeout(v time.Duration) func(*InferenceChatCompletionUnifiedRequest) { return func(r *InferenceChatCompletionUnifiedRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.completion.go b/esapi/api.inference.completion.go index 86f289ee39..e54556d1e7 100644 --- a/esapi/api.inference.completion.go +++ b/esapi/api.inference.completion.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferenceCompletionFunc(t Transport) InferenceCompletion { - return func(inference_id string, o ...func(*InferenceCompletionRequest)) (*Response, error) { - var r = InferenceCompletionRequest{InferenceID: inference_id} + return func(body io.Reader, inference_id string, o ...func(*InferenceCompletionRequest)) (*Response, error) { + var r = InferenceCompletionRequest{Body: body, InferenceID: inference_id} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferenceCompletionFunc(t Transport) InferenceCompletion { // ----- API Definition ------------------------------------------------------- -// InferenceCompletion perform completion inference +// InferenceCompletion perform completion inference on the service // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html. -type InferenceCompletion func(inference_id string, o ...func(*InferenceCompletionRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference. +type InferenceCompletion func(body io.Reader, inference_id string, o ...func(*InferenceCompletionRequest)) (*Response, error) // InferenceCompletionRequest configures the Inference Completion API request. type InferenceCompletionRequest struct { @@ -54,6 +55,8 @@ type InferenceCompletionRequest struct { InferenceID string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -99,6 +102,10 @@ func (r InferenceCompletionRequest) Do(providedCtx context.Context, transport Tr params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -184,10 +191,10 @@ func (f InferenceCompletion) WithContext(v context.Context) func(*InferenceCompl } } -// WithBody - The inference payload. -func (f InferenceCompletion) WithBody(v io.Reader) func(*InferenceCompletionRequest) { +// WithTimeout - specifies the amount of time to wait for the inference request to complete.. +func (f InferenceCompletion) WithTimeout(v time.Duration) func(*InferenceCompletionRequest) { return func(r *InferenceCompletionRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.delete.go b/esapi/api.inference.delete.go index a1b92adc40..f9655b17c7 100644 --- a/esapi/api.inference.delete.go +++ b/esapi/api.inference.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,7 +45,7 @@ func newInferenceDeleteFunc(t Transport) InferenceDelete { // InferenceDelete delete an inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete. type InferenceDelete func(inference_id string, o ...func(*InferenceDeleteRequest)) (*Response, error) // InferenceDeleteRequest configures the Inference Delete API request. diff --git a/esapi/api.inference.get.go b/esapi/api.inference.get.go index 4750bf64b6..7135a2aa6e 100644 --- a/esapi/api.inference.get.go +++ b/esapi/api.inference.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,7 +44,7 @@ func newInferenceGetFunc(t Transport) InferenceGet { // InferenceGet get an inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get. type InferenceGet func(o ...func(*InferenceGetRequest)) (*Response, error) // InferenceGetRequest configures the Inference Get API request. diff --git a/esapi/api.inference.inference.go b/esapi/api.inference.inference.go index ad9205669b..ae16397d23 100644 --- a/esapi/api.inference.inference.go +++ b/esapi/api.inference.inference.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferenceInferenceFunc(t Transport) InferenceInference { - return func(inference_id string, o ...func(*InferenceInferenceRequest)) (*Response, error) { - var r = InferenceInferenceRequest{InferenceID: inference_id} + return func(body io.Reader, inference_id string, o ...func(*InferenceInferenceRequest)) (*Response, error) { + var r = InferenceInferenceRequest{Body: body, InferenceID: inference_id} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferenceInferenceFunc(t Transport) InferenceInference { // ----- API Definition ------------------------------------------------------- -// InferenceInference perform inference +// InferenceInference perform inference on the service // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html. -type InferenceInference func(inference_id string, o ...func(*InferenceInferenceRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference. +type InferenceInference func(body io.Reader, inference_id string, o ...func(*InferenceInferenceRequest)) (*Response, error) // InferenceInferenceRequest configures the Inference Inference API request. type InferenceInferenceRequest struct { @@ -55,6 +56,8 @@ type InferenceInferenceRequest struct { InferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -105,6 +108,10 @@ func (r InferenceInferenceRequest) Do(providedCtx context.Context, transport Tra params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -190,17 +197,17 @@ func (f InferenceInference) WithContext(v context.Context) func(*InferenceInfere } } -// WithBody - The inference payload. -func (f InferenceInference) WithBody(v io.Reader) func(*InferenceInferenceRequest) { +// WithTaskType - the task type. +func (f InferenceInference) WithTaskType(v string) func(*InferenceInferenceRequest) { return func(r *InferenceInferenceRequest) { - r.Body = v + r.TaskType = v } } -// WithTaskType - the task type. -func (f InferenceInference) WithTaskType(v string) func(*InferenceInferenceRequest) { +// WithTimeout - the amount of time to wait for the inference request to complete.. +func (f InferenceInference) WithTimeout(v time.Duration) func(*InferenceInferenceRequest) { return func(r *InferenceInferenceRequest) { - r.TaskType = v + r.Timeout = v } } diff --git a/esapi/api.inference.put.go b/esapi/api.inference.put.go index 8146f46d0d..39dcba3ce8 100644 --- a/esapi/api.inference.put.go +++ b/esapi/api.inference.put.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutFunc(t Transport) InferencePut { - return func(inference_id string, o ...func(*InferencePutRequest)) (*Response, error) { - var r = InferencePutRequest{InferenceID: inference_id} + return func(body io.Reader, inference_id string, o ...func(*InferencePutRequest)) (*Response, error) { + var r = InferencePutRequest{Body: body, InferenceID: inference_id} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutFunc(t Transport) InferencePut { // ----- API Definition ------------------------------------------------------- -// InferencePut configure an inference endpoint for use in the Inference API +// InferencePut create an inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html. -type InferencePut func(inference_id string, o ...func(*InferencePutRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put. +type InferencePut func(body io.Reader, inference_id string, o ...func(*InferencePutRequest)) (*Response, error) // InferencePutRequest configures the Inference Put API request. type InferencePutRequest struct { @@ -55,6 +56,8 @@ type InferencePutRequest struct { InferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -105,6 +108,10 @@ func (r InferencePutRequest) Do(providedCtx context.Context, transport Transport params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -190,17 +197,17 @@ func (f InferencePut) WithContext(v context.Context) func(*InferencePutRequest) } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePut) WithBody(v io.Reader) func(*InferencePutRequest) { +// WithTaskType - the task type. +func (f InferencePut) WithTaskType(v string) func(*InferencePutRequest) { return func(r *InferencePutRequest) { - r.Body = v + r.TaskType = v } } -// WithTaskType - the task type. -func (f InferencePut) WithTaskType(v string) func(*InferencePutRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePut) WithTimeout(v time.Duration) func(*InferencePutRequest) { return func(r *InferencePutRequest) { - r.TaskType = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_ai21.go b/esapi/api.inference.put_ai21.go new file mode 100644 index 0000000000..2b8d1b3a99 --- /dev/null +++ b/esapi/api.inference.put_ai21.go @@ -0,0 +1,253 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" + "time" +) + +func newInferencePutAi21Func(t Transport) InferencePutAi21 { + return func(body io.Reader, ai21_inference_id string, task_type string, o ...func(*InferencePutAi21Request)) (*Response, error) { + var r = InferencePutAi21Request{Body: body, Ai21InferenceID: ai21_inference_id, TaskType: task_type} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// InferencePutAi21 create a AI21 inference endpoint +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-ai21. +type InferencePutAi21 func(body io.Reader, ai21_inference_id string, task_type string, o ...func(*InferencePutAi21Request)) (*Response, error) + +// InferencePutAi21Request configures the Inference Put Ai21 API request. +type InferencePutAi21Request struct { + Body io.Reader + + Ai21InferenceID string + TaskType string + + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r InferencePutAi21Request) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_ai21") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len("_inference") + 1 + len(r.TaskType) + 1 + len(r.Ai21InferenceID)) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + path.WriteString(r.TaskType) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "task_type", r.TaskType) + } + path.WriteString("/") + path.WriteString(r.Ai21InferenceID) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "ai21_inference_id", r.Ai21InferenceID) + } + + params = make(map[string]string) + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_ai21") + if reader := instrument.RecordRequestBody(ctx, "inference.put_ai21", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_ai21") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f InferencePutAi21) WithContext(v context.Context) func(*InferencePutAi21Request) { + return func(r *InferencePutAi21Request) { + r.ctx = v + } +} + +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutAi21) WithTimeout(v time.Duration) func(*InferencePutAi21Request) { + return func(r *InferencePutAi21Request) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f InferencePutAi21) WithPretty() func(*InferencePutAi21Request) { + return func(r *InferencePutAi21Request) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f InferencePutAi21) WithHuman() func(*InferencePutAi21Request) { + return func(r *InferencePutAi21Request) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f InferencePutAi21) WithErrorTrace() func(*InferencePutAi21Request) { + return func(r *InferencePutAi21Request) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f InferencePutAi21) WithFilterPath(v ...string) func(*InferencePutAi21Request) { + return func(r *InferencePutAi21Request) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f InferencePutAi21) WithHeader(h map[string]string) func(*InferencePutAi21Request) { + return func(r *InferencePutAi21Request) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f InferencePutAi21) WithOpaqueID(s string) func(*InferencePutAi21Request) { + return func(r *InferencePutAi21Request) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.inference.put_alibabacloud.go b/esapi/api.inference.put_alibabacloud.go index 79daa0b4d2..add92792de 100644 --- a/esapi/api.inference.put_alibabacloud.go +++ b/esapi/api.inference.put_alibabacloud.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutAlibabacloudFunc(t Transport) InferencePutAlibabacloud { - return func(alibabacloud_inference_id string, task_type string, o ...func(*InferencePutAlibabacloudRequest)) (*Response, error) { - var r = InferencePutAlibabacloudRequest{AlibabacloudInferenceID: alibabacloud_inference_id, TaskType: task_type} + return func(body io.Reader, alibabacloud_inference_id string, task_type string, o ...func(*InferencePutAlibabacloudRequest)) (*Response, error) { + var r = InferencePutAlibabacloudRequest{Body: body, AlibabacloudInferenceID: alibabacloud_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutAlibabacloudFunc(t Transport) InferencePutAlibabacloud { // ----- API Definition ------------------------------------------------------- -// InferencePutAlibabacloud configure an AlibabaCloud AI Search inference endpoint +// InferencePutAlibabacloud create an AlibabaCloud AI Search inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-alibabacloud-ai-search.html. -type InferencePutAlibabacloud func(alibabacloud_inference_id string, task_type string, o ...func(*InferencePutAlibabacloudRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-alibabacloud. +type InferencePutAlibabacloud func(body io.Reader, alibabacloud_inference_id string, task_type string, o ...func(*InferencePutAlibabacloudRequest)) (*Response, error) // InferencePutAlibabacloudRequest configures the Inference Put Alibabacloud API request. type InferencePutAlibabacloudRequest struct { @@ -55,6 +56,8 @@ type InferencePutAlibabacloudRequest struct { AlibabacloudInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutAlibabacloudRequest) Do(providedCtx context.Context, transpo params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutAlibabacloud) WithContext(v context.Context) func(*Inference } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutAlibabacloud) WithBody(v io.Reader) func(*InferencePutAlibabacloudRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutAlibabacloud) WithTimeout(v time.Duration) func(*InferencePutAlibabacloudRequest) { return func(r *InferencePutAlibabacloudRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_amazonbedrock.go b/esapi/api.inference.put_amazonbedrock.go index 5fc7822598..24d852acb2 100644 --- a/esapi/api.inference.put_amazonbedrock.go +++ b/esapi/api.inference.put_amazonbedrock.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutAmazonbedrockFunc(t Transport) InferencePutAmazonbedrock { - return func(amazonbedrock_inference_id string, task_type string, o ...func(*InferencePutAmazonbedrockRequest)) (*Response, error) { - var r = InferencePutAmazonbedrockRequest{AmazonbedrockInferenceID: amazonbedrock_inference_id, TaskType: task_type} + return func(body io.Reader, amazonbedrock_inference_id string, task_type string, o ...func(*InferencePutAmazonbedrockRequest)) (*Response, error) { + var r = InferencePutAmazonbedrockRequest{Body: body, AmazonbedrockInferenceID: amazonbedrock_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutAmazonbedrockFunc(t Transport) InferencePutAmazonbedrock { // ----- API Definition ------------------------------------------------------- -// InferencePutAmazonbedrock configure an Amazon Bedrock inference endpoint +// InferencePutAmazonbedrock create an Amazon Bedrock inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-bedrock.html. -type InferencePutAmazonbedrock func(amazonbedrock_inference_id string, task_type string, o ...func(*InferencePutAmazonbedrockRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonbedrock. +type InferencePutAmazonbedrock func(body io.Reader, amazonbedrock_inference_id string, task_type string, o ...func(*InferencePutAmazonbedrockRequest)) (*Response, error) // InferencePutAmazonbedrockRequest configures the Inference Put Amazonbedrock API request. type InferencePutAmazonbedrockRequest struct { @@ -55,6 +56,8 @@ type InferencePutAmazonbedrockRequest struct { AmazonbedrockInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutAmazonbedrockRequest) Do(providedCtx context.Context, transp params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutAmazonbedrock) WithContext(v context.Context) func(*Inferenc } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutAmazonbedrock) WithBody(v io.Reader) func(*InferencePutAmazonbedrockRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutAmazonbedrock) WithTimeout(v time.Duration) func(*InferencePutAmazonbedrockRequest) { return func(r *InferencePutAmazonbedrockRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_amazonsagemaker.go b/esapi/api.inference.put_amazonsagemaker.go index 4dc2eb09ca..eefc63dba3 100644 --- a/esapi/api.inference.put_amazonsagemaker.go +++ b/esapi/api.inference.put_amazonsagemaker.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutAmazonsagemakerFunc(t Transport) InferencePutAmazonsagemaker { - return func(amazonsagemaker_inference_id string, task_type string, o ...func(*InferencePutAmazonsagemakerRequest)) (*Response, error) { - var r = InferencePutAmazonsagemakerRequest{AmazonsagemakerInferenceID: amazonsagemaker_inference_id, TaskType: task_type} + return func(body io.Reader, amazonsagemaker_inference_id string, task_type string, o ...func(*InferencePutAmazonsagemakerRequest)) (*Response, error) { + var r = InferencePutAmazonsagemakerRequest{Body: body, AmazonsagemakerInferenceID: amazonsagemaker_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutAmazonsagemakerFunc(t Transport) InferencePutAmazonsagemaker // ----- API Definition ------------------------------------------------------- -// InferencePutAmazonsagemaker configure a Amazon SageMaker inference endpoint +// InferencePutAmazonsagemaker create an Amazon SageMaker inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-sagemaker.html. -type InferencePutAmazonsagemaker func(amazonsagemaker_inference_id string, task_type string, o ...func(*InferencePutAmazonsagemakerRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker. +type InferencePutAmazonsagemaker func(body io.Reader, amazonsagemaker_inference_id string, task_type string, o ...func(*InferencePutAmazonsagemakerRequest)) (*Response, error) // InferencePutAmazonsagemakerRequest configures the Inference Put Amazonsagemaker API request. type InferencePutAmazonsagemakerRequest struct { @@ -55,6 +56,8 @@ type InferencePutAmazonsagemakerRequest struct { AmazonsagemakerInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutAmazonsagemakerRequest) Do(providedCtx context.Context, tran params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutAmazonsagemaker) WithContext(v context.Context) func(*Infere } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutAmazonsagemaker) WithBody(v io.Reader) func(*InferencePutAmazonsagemakerRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutAmazonsagemaker) WithTimeout(v time.Duration) func(*InferencePutAmazonsagemakerRequest) { return func(r *InferencePutAmazonsagemakerRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_anthropic.go b/esapi/api.inference.put_anthropic.go index 427ae680b3..6543161a96 100644 --- a/esapi/api.inference.put_anthropic.go +++ b/esapi/api.inference.put_anthropic.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutAnthropicFunc(t Transport) InferencePutAnthropic { - return func(anthropic_inference_id string, task_type string, o ...func(*InferencePutAnthropicRequest)) (*Response, error) { - var r = InferencePutAnthropicRequest{AnthropicInferenceID: anthropic_inference_id, TaskType: task_type} + return func(body io.Reader, anthropic_inference_id string, task_type string, o ...func(*InferencePutAnthropicRequest)) (*Response, error) { + var r = InferencePutAnthropicRequest{Body: body, AnthropicInferenceID: anthropic_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutAnthropicFunc(t Transport) InferencePutAnthropic { // ----- API Definition ------------------------------------------------------- -// InferencePutAnthropic configure an Anthropic inference endpoint +// InferencePutAnthropic create an Anthropic inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-anthropic.html. -type InferencePutAnthropic func(anthropic_inference_id string, task_type string, o ...func(*InferencePutAnthropicRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-anthropic. +type InferencePutAnthropic func(body io.Reader, anthropic_inference_id string, task_type string, o ...func(*InferencePutAnthropicRequest)) (*Response, error) // InferencePutAnthropicRequest configures the Inference Put Anthropic API request. type InferencePutAnthropicRequest struct { @@ -55,6 +56,8 @@ type InferencePutAnthropicRequest struct { AnthropicInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutAnthropicRequest) Do(providedCtx context.Context, transport params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutAnthropic) WithContext(v context.Context) func(*InferencePut } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutAnthropic) WithBody(v io.Reader) func(*InferencePutAnthropicRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutAnthropic) WithTimeout(v time.Duration) func(*InferencePutAnthropicRequest) { return func(r *InferencePutAnthropicRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_azureaistudio.go b/esapi/api.inference.put_azureaistudio.go index 187125862a..af82ce3dfb 100644 --- a/esapi/api.inference.put_azureaistudio.go +++ b/esapi/api.inference.put_azureaistudio.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutAzureaistudioFunc(t Transport) InferencePutAzureaistudio { - return func(azureaistudio_inference_id string, task_type string, o ...func(*InferencePutAzureaistudioRequest)) (*Response, error) { - var r = InferencePutAzureaistudioRequest{AzureaistudioInferenceID: azureaistudio_inference_id, TaskType: task_type} + return func(body io.Reader, azureaistudio_inference_id string, task_type string, o ...func(*InferencePutAzureaistudioRequest)) (*Response, error) { + var r = InferencePutAzureaistudioRequest{Body: body, AzureaistudioInferenceID: azureaistudio_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutAzureaistudioFunc(t Transport) InferencePutAzureaistudio { // ----- API Definition ------------------------------------------------------- -// InferencePutAzureaistudio configure an Azure AI Studio inference endpoint +// InferencePutAzureaistudio create an Azure AI studio inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-ai-studio.html. -type InferencePutAzureaistudio func(azureaistudio_inference_id string, task_type string, o ...func(*InferencePutAzureaistudioRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureaistudio. +type InferencePutAzureaistudio func(body io.Reader, azureaistudio_inference_id string, task_type string, o ...func(*InferencePutAzureaistudioRequest)) (*Response, error) // InferencePutAzureaistudioRequest configures the Inference Put Azureaistudio API request. type InferencePutAzureaistudioRequest struct { @@ -55,6 +56,8 @@ type InferencePutAzureaistudioRequest struct { AzureaistudioInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutAzureaistudioRequest) Do(providedCtx context.Context, transp params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutAzureaistudio) WithContext(v context.Context) func(*Inferenc } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutAzureaistudio) WithBody(v io.Reader) func(*InferencePutAzureaistudioRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutAzureaistudio) WithTimeout(v time.Duration) func(*InferencePutAzureaistudioRequest) { return func(r *InferencePutAzureaistudioRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_azureopenai.go b/esapi/api.inference.put_azureopenai.go index 7b370c1240..980257076e 100644 --- a/esapi/api.inference.put_azureopenai.go +++ b/esapi/api.inference.put_azureopenai.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutAzureopenaiFunc(t Transport) InferencePutAzureopenai { - return func(azureopenai_inference_id string, task_type string, o ...func(*InferencePutAzureopenaiRequest)) (*Response, error) { - var r = InferencePutAzureopenaiRequest{AzureopenaiInferenceID: azureopenai_inference_id, TaskType: task_type} + return func(body io.Reader, azureopenai_inference_id string, task_type string, o ...func(*InferencePutAzureopenaiRequest)) (*Response, error) { + var r = InferencePutAzureopenaiRequest{Body: body, AzureopenaiInferenceID: azureopenai_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutAzureopenaiFunc(t Transport) InferencePutAzureopenai { // ----- API Definition ------------------------------------------------------- -// InferencePutAzureopenai configure an Azure OpenAI inference endpoint +// InferencePutAzureopenai create an Azure OpenAI inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-openai.html. -type InferencePutAzureopenai func(azureopenai_inference_id string, task_type string, o ...func(*InferencePutAzureopenaiRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureopenai. +type InferencePutAzureopenai func(body io.Reader, azureopenai_inference_id string, task_type string, o ...func(*InferencePutAzureopenaiRequest)) (*Response, error) // InferencePutAzureopenaiRequest configures the Inference Put Azureopenai API request. type InferencePutAzureopenaiRequest struct { @@ -55,6 +56,8 @@ type InferencePutAzureopenaiRequest struct { AzureopenaiInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutAzureopenaiRequest) Do(providedCtx context.Context, transpor params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutAzureopenai) WithContext(v context.Context) func(*InferenceP } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutAzureopenai) WithBody(v io.Reader) func(*InferencePutAzureopenaiRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutAzureopenai) WithTimeout(v time.Duration) func(*InferencePutAzureopenaiRequest) { return func(r *InferencePutAzureopenaiRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_cohere.go b/esapi/api.inference.put_cohere.go index 732509ee55..bdd8895951 100644 --- a/esapi/api.inference.put_cohere.go +++ b/esapi/api.inference.put_cohere.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutCohereFunc(t Transport) InferencePutCohere { - return func(cohere_inference_id string, task_type string, o ...func(*InferencePutCohereRequest)) (*Response, error) { - var r = InferencePutCohereRequest{CohereInferenceID: cohere_inference_id, TaskType: task_type} + return func(body io.Reader, cohere_inference_id string, task_type string, o ...func(*InferencePutCohereRequest)) (*Response, error) { + var r = InferencePutCohereRequest{Body: body, CohereInferenceID: cohere_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutCohereFunc(t Transport) InferencePutCohere { // ----- API Definition ------------------------------------------------------- -// InferencePutCohere configure a Cohere inference endpoint +// InferencePutCohere create a Cohere inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-cohere.html. -type InferencePutCohere func(cohere_inference_id string, task_type string, o ...func(*InferencePutCohereRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-cohere. +type InferencePutCohere func(body io.Reader, cohere_inference_id string, task_type string, o ...func(*InferencePutCohereRequest)) (*Response, error) // InferencePutCohereRequest configures the Inference Put Cohere API request. type InferencePutCohereRequest struct { @@ -55,6 +56,8 @@ type InferencePutCohereRequest struct { CohereInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutCohereRequest) Do(providedCtx context.Context, transport Tra params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutCohere) WithContext(v context.Context) func(*InferencePutCoh } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutCohere) WithBody(v io.Reader) func(*InferencePutCohereRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutCohere) WithTimeout(v time.Duration) func(*InferencePutCohereRequest) { return func(r *InferencePutCohereRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_contextualai.go b/esapi/api.inference.put_contextualai.go new file mode 100644 index 0000000000..14042a4d53 --- /dev/null +++ b/esapi/api.inference.put_contextualai.go @@ -0,0 +1,253 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" + "time" +) + +func newInferencePutContextualaiFunc(t Transport) InferencePutContextualai { + return func(body io.Reader, contextualai_inference_id string, task_type string, o ...func(*InferencePutContextualaiRequest)) (*Response, error) { + var r = InferencePutContextualaiRequest{Body: body, ContextualaiInferenceID: contextualai_inference_id, TaskType: task_type} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// InferencePutContextualai create an Contextual AI inference endpoint +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-contextualai. +type InferencePutContextualai func(body io.Reader, contextualai_inference_id string, task_type string, o ...func(*InferencePutContextualaiRequest)) (*Response, error) + +// InferencePutContextualaiRequest configures the Inference Put Contextualai API request. +type InferencePutContextualaiRequest struct { + Body io.Reader + + ContextualaiInferenceID string + TaskType string + + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r InferencePutContextualaiRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_contextualai") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len("_inference") + 1 + len(r.TaskType) + 1 + len(r.ContextualaiInferenceID)) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + path.WriteString(r.TaskType) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "task_type", r.TaskType) + } + path.WriteString("/") + path.WriteString(r.ContextualaiInferenceID) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "contextualai_inference_id", r.ContextualaiInferenceID) + } + + params = make(map[string]string) + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_contextualai") + if reader := instrument.RecordRequestBody(ctx, "inference.put_contextualai", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_contextualai") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f InferencePutContextualai) WithContext(v context.Context) func(*InferencePutContextualaiRequest) { + return func(r *InferencePutContextualaiRequest) { + r.ctx = v + } +} + +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutContextualai) WithTimeout(v time.Duration) func(*InferencePutContextualaiRequest) { + return func(r *InferencePutContextualaiRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f InferencePutContextualai) WithPretty() func(*InferencePutContextualaiRequest) { + return func(r *InferencePutContextualaiRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f InferencePutContextualai) WithHuman() func(*InferencePutContextualaiRequest) { + return func(r *InferencePutContextualaiRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f InferencePutContextualai) WithErrorTrace() func(*InferencePutContextualaiRequest) { + return func(r *InferencePutContextualaiRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f InferencePutContextualai) WithFilterPath(v ...string) func(*InferencePutContextualaiRequest) { + return func(r *InferencePutContextualaiRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f InferencePutContextualai) WithHeader(h map[string]string) func(*InferencePutContextualaiRequest) { + return func(r *InferencePutContextualaiRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f InferencePutContextualai) WithOpaqueID(s string) func(*InferencePutContextualaiRequest) { + return func(r *InferencePutContextualaiRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.inference.put_custom.go b/esapi/api.inference.put_custom.go index 46cc733578..444015b1f4 100644 --- a/esapi/api.inference.put_custom.go +++ b/esapi/api.inference.put_custom.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -27,8 +27,8 @@ import ( ) func newInferencePutCustomFunc(t Transport) InferencePutCustom { - return func(custom_inference_id string, task_type string, o ...func(*InferencePutCustomRequest)) (*Response, error) { - var r = InferencePutCustomRequest{CustomInferenceID: custom_inference_id, TaskType: task_type} + return func(body io.Reader, custom_inference_id string, task_type string, o ...func(*InferencePutCustomRequest)) (*Response, error) { + var r = InferencePutCustomRequest{Body: body, CustomInferenceID: custom_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +43,10 @@ func newInferencePutCustomFunc(t Transport) InferencePutCustom { // ----- API Definition ------------------------------------------------------- -// InferencePutCustom configure a custom inference endpoint +// InferencePutCustom create a custom inference endpoint // // See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom. -type InferencePutCustom func(custom_inference_id string, task_type string, o ...func(*InferencePutCustomRequest)) (*Response, error) +type InferencePutCustom func(body io.Reader, custom_inference_id string, task_type string, o ...func(*InferencePutCustomRequest)) (*Response, error) // InferencePutCustomRequest configures the Inference Put Custom API request. type InferencePutCustomRequest struct { @@ -188,13 +188,6 @@ func (f InferencePutCustom) WithContext(v context.Context) func(*InferencePutCus } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutCustom) WithBody(v io.Reader) func(*InferencePutCustomRequest) { - return func(r *InferencePutCustomRequest) { - r.Body = v - } -} - // WithPretty makes the response body pretty-printed. func (f InferencePutCustom) WithPretty() func(*InferencePutCustomRequest) { return func(r *InferencePutCustomRequest) { diff --git a/esapi/api.inference.put_deepseek.go b/esapi/api.inference.put_deepseek.go index dc1c458572..574db237f4 100644 --- a/esapi/api.inference.put_deepseek.go +++ b/esapi/api.inference.put_deepseek.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutDeepseekFunc(t Transport) InferencePutDeepseek { - return func(deepseek_inference_id string, task_type string, o ...func(*InferencePutDeepseekRequest)) (*Response, error) { - var r = InferencePutDeepseekRequest{DeepseekInferenceID: deepseek_inference_id, TaskType: task_type} + return func(body io.Reader, deepseek_inference_id string, task_type string, o ...func(*InferencePutDeepseekRequest)) (*Response, error) { + var r = InferencePutDeepseekRequest{Body: body, DeepseekInferenceID: deepseek_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutDeepseekFunc(t Transport) InferencePutDeepseek { // ----- API Definition ------------------------------------------------------- -// InferencePutDeepseek configure a DeepSeek inference endpoint +// InferencePutDeepseek create a DeepSeek inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-deepseek.html. -type InferencePutDeepseek func(deepseek_inference_id string, task_type string, o ...func(*InferencePutDeepseekRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-deepseek. +type InferencePutDeepseek func(body io.Reader, deepseek_inference_id string, task_type string, o ...func(*InferencePutDeepseekRequest)) (*Response, error) // InferencePutDeepseekRequest configures the Inference Put Deepseek API request. type InferencePutDeepseekRequest struct { @@ -55,6 +56,8 @@ type InferencePutDeepseekRequest struct { DeepseekInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutDeepseekRequest) Do(providedCtx context.Context, transport T params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutDeepseek) WithContext(v context.Context) func(*InferencePutD } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutDeepseek) WithBody(v io.Reader) func(*InferencePutDeepseekRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutDeepseek) WithTimeout(v time.Duration) func(*InferencePutDeepseekRequest) { return func(r *InferencePutDeepseekRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_elasticsearch.go b/esapi/api.inference.put_elasticsearch.go index 9acf9bb4dc..b774ba1038 100644 --- a/esapi/api.inference.put_elasticsearch.go +++ b/esapi/api.inference.put_elasticsearch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutElasticsearchFunc(t Transport) InferencePutElasticsearch { - return func(elasticsearch_inference_id string, task_type string, o ...func(*InferencePutElasticsearchRequest)) (*Response, error) { - var r = InferencePutElasticsearchRequest{ElasticsearchInferenceID: elasticsearch_inference_id, TaskType: task_type} + return func(body io.Reader, elasticsearch_inference_id string, task_type string, o ...func(*InferencePutElasticsearchRequest)) (*Response, error) { + var r = InferencePutElasticsearchRequest{Body: body, ElasticsearchInferenceID: elasticsearch_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutElasticsearchFunc(t Transport) InferencePutElasticsearch { // ----- API Definition ------------------------------------------------------- -// InferencePutElasticsearch configure an Elasticsearch inference endpoint +// InferencePutElasticsearch create an Elasticsearch inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elasticsearch.html. -type InferencePutElasticsearch func(elasticsearch_inference_id string, task_type string, o ...func(*InferencePutElasticsearchRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elasticsearch. +type InferencePutElasticsearch func(body io.Reader, elasticsearch_inference_id string, task_type string, o ...func(*InferencePutElasticsearchRequest)) (*Response, error) // InferencePutElasticsearchRequest configures the Inference Put Elasticsearch API request. type InferencePutElasticsearchRequest struct { @@ -55,6 +56,8 @@ type InferencePutElasticsearchRequest struct { ElasticsearchInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutElasticsearchRequest) Do(providedCtx context.Context, transp params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutElasticsearch) WithContext(v context.Context) func(*Inferenc } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutElasticsearch) WithBody(v io.Reader) func(*InferencePutElasticsearchRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutElasticsearch) WithTimeout(v time.Duration) func(*InferencePutElasticsearchRequest) { return func(r *InferencePutElasticsearchRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_elser.go b/esapi/api.inference.put_elser.go index 6536e3a173..c83d012d26 100644 --- a/esapi/api.inference.put_elser.go +++ b/esapi/api.inference.put_elser.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutElserFunc(t Transport) InferencePutElser { - return func(elser_inference_id string, task_type string, o ...func(*InferencePutElserRequest)) (*Response, error) { - var r = InferencePutElserRequest{ElserInferenceID: elser_inference_id, TaskType: task_type} + return func(body io.Reader, elser_inference_id string, task_type string, o ...func(*InferencePutElserRequest)) (*Response, error) { + var r = InferencePutElserRequest{Body: body, ElserInferenceID: elser_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutElserFunc(t Transport) InferencePutElser { // ----- API Definition ------------------------------------------------------- -// InferencePutElser configure an ELSER inference endpoint +// InferencePutElser create an ELSER inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elser.html. -type InferencePutElser func(elser_inference_id string, task_type string, o ...func(*InferencePutElserRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elser. +type InferencePutElser func(body io.Reader, elser_inference_id string, task_type string, o ...func(*InferencePutElserRequest)) (*Response, error) // InferencePutElserRequest configures the Inference Put Elser API request. type InferencePutElserRequest struct { @@ -55,6 +56,8 @@ type InferencePutElserRequest struct { ElserInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutElserRequest) Do(providedCtx context.Context, transport Tran params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutElser) WithContext(v context.Context) func(*InferencePutElse } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutElser) WithBody(v io.Reader) func(*InferencePutElserRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutElser) WithTimeout(v time.Duration) func(*InferencePutElserRequest) { return func(r *InferencePutElserRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_googleaistudio.go b/esapi/api.inference.put_googleaistudio.go index 05c849b143..916fe19ad9 100644 --- a/esapi/api.inference.put_googleaistudio.go +++ b/esapi/api.inference.put_googleaistudio.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutGoogleaistudioFunc(t Transport) InferencePutGoogleaistudio { - return func(googleaistudio_inference_id string, task_type string, o ...func(*InferencePutGoogleaistudioRequest)) (*Response, error) { - var r = InferencePutGoogleaistudioRequest{GoogleaistudioInferenceID: googleaistudio_inference_id, TaskType: task_type} + return func(body io.Reader, googleaistudio_inference_id string, task_type string, o ...func(*InferencePutGoogleaistudioRequest)) (*Response, error) { + var r = InferencePutGoogleaistudioRequest{Body: body, GoogleaistudioInferenceID: googleaistudio_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutGoogleaistudioFunc(t Transport) InferencePutGoogleaistudio { // ----- API Definition ------------------------------------------------------- -// InferencePutGoogleaistudio configure a Google AI Studio inference endpoint +// InferencePutGoogleaistudio create an Google AI Studio inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-ai-studio.html. -type InferencePutGoogleaistudio func(googleaistudio_inference_id string, task_type string, o ...func(*InferencePutGoogleaistudioRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googleaistudio. +type InferencePutGoogleaistudio func(body io.Reader, googleaistudio_inference_id string, task_type string, o ...func(*InferencePutGoogleaistudioRequest)) (*Response, error) // InferencePutGoogleaistudioRequest configures the Inference Put Googleaistudio API request. type InferencePutGoogleaistudioRequest struct { @@ -55,6 +56,8 @@ type InferencePutGoogleaistudioRequest struct { GoogleaistudioInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutGoogleaistudioRequest) Do(providedCtx context.Context, trans params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutGoogleaistudio) WithContext(v context.Context) func(*Inferen } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutGoogleaistudio) WithBody(v io.Reader) func(*InferencePutGoogleaistudioRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutGoogleaistudio) WithTimeout(v time.Duration) func(*InferencePutGoogleaistudioRequest) { return func(r *InferencePutGoogleaistudioRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_googlevertexai.go b/esapi/api.inference.put_googlevertexai.go index a34714a4d4..57944736a3 100644 --- a/esapi/api.inference.put_googlevertexai.go +++ b/esapi/api.inference.put_googlevertexai.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutGooglevertexaiFunc(t Transport) InferencePutGooglevertexai { - return func(googlevertexai_inference_id string, task_type string, o ...func(*InferencePutGooglevertexaiRequest)) (*Response, error) { - var r = InferencePutGooglevertexaiRequest{GooglevertexaiInferenceID: googlevertexai_inference_id, TaskType: task_type} + return func(body io.Reader, googlevertexai_inference_id string, task_type string, o ...func(*InferencePutGooglevertexaiRequest)) (*Response, error) { + var r = InferencePutGooglevertexaiRequest{Body: body, GooglevertexaiInferenceID: googlevertexai_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutGooglevertexaiFunc(t Transport) InferencePutGooglevertexai { // ----- API Definition ------------------------------------------------------- -// InferencePutGooglevertexai configure a Google Vertex AI inference endpoint +// InferencePutGooglevertexai create a Google Vertex AI inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-vertex-ai.html. -type InferencePutGooglevertexai func(googlevertexai_inference_id string, task_type string, o ...func(*InferencePutGooglevertexaiRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googlevertexai. +type InferencePutGooglevertexai func(body io.Reader, googlevertexai_inference_id string, task_type string, o ...func(*InferencePutGooglevertexaiRequest)) (*Response, error) // InferencePutGooglevertexaiRequest configures the Inference Put Googlevertexai API request. type InferencePutGooglevertexaiRequest struct { @@ -55,6 +56,8 @@ type InferencePutGooglevertexaiRequest struct { GooglevertexaiInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutGooglevertexaiRequest) Do(providedCtx context.Context, trans params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutGooglevertexai) WithContext(v context.Context) func(*Inferen } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutGooglevertexai) WithBody(v io.Reader) func(*InferencePutGooglevertexaiRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutGooglevertexai) WithTimeout(v time.Duration) func(*InferencePutGooglevertexaiRequest) { return func(r *InferencePutGooglevertexaiRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_hugging_face.go b/esapi/api.inference.put_hugging_face.go index 5cc5ff1a12..05c9b82318 100644 --- a/esapi/api.inference.put_hugging_face.go +++ b/esapi/api.inference.put_hugging_face.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutHuggingFaceFunc(t Transport) InferencePutHuggingFace { - return func(huggingface_inference_id string, task_type string, o ...func(*InferencePutHuggingFaceRequest)) (*Response, error) { - var r = InferencePutHuggingFaceRequest{HuggingfaceInferenceID: huggingface_inference_id, TaskType: task_type} + return func(body io.Reader, huggingface_inference_id string, task_type string, o ...func(*InferencePutHuggingFaceRequest)) (*Response, error) { + var r = InferencePutHuggingFaceRequest{Body: body, HuggingfaceInferenceID: huggingface_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutHuggingFaceFunc(t Transport) InferencePutHuggingFace { // ----- API Definition ------------------------------------------------------- -// InferencePutHuggingFace configure a HuggingFace inference endpoint +// InferencePutHuggingFace create a Hugging Face inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-hugging-face.html. -type InferencePutHuggingFace func(huggingface_inference_id string, task_type string, o ...func(*InferencePutHuggingFaceRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-hugging-face. +type InferencePutHuggingFace func(body io.Reader, huggingface_inference_id string, task_type string, o ...func(*InferencePutHuggingFaceRequest)) (*Response, error) // InferencePutHuggingFaceRequest configures the Inference Put Hugging Face API request. type InferencePutHuggingFaceRequest struct { @@ -55,6 +56,8 @@ type InferencePutHuggingFaceRequest struct { HuggingfaceInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutHuggingFaceRequest) Do(providedCtx context.Context, transpor params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutHuggingFace) WithContext(v context.Context) func(*InferenceP } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutHuggingFace) WithBody(v io.Reader) func(*InferencePutHuggingFaceRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutHuggingFace) WithTimeout(v time.Duration) func(*InferencePutHuggingFaceRequest) { return func(r *InferencePutHuggingFaceRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_jinaai.go b/esapi/api.inference.put_jinaai.go index 8c25e3f5a0..1224a62a62 100644 --- a/esapi/api.inference.put_jinaai.go +++ b/esapi/api.inference.put_jinaai.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutJinaaiFunc(t Transport) InferencePutJinaai { - return func(jinaai_inference_id string, task_type string, o ...func(*InferencePutJinaaiRequest)) (*Response, error) { - var r = InferencePutJinaaiRequest{JinaaiInferenceID: jinaai_inference_id, TaskType: task_type} + return func(body io.Reader, jinaai_inference_id string, task_type string, o ...func(*InferencePutJinaaiRequest)) (*Response, error) { + var r = InferencePutJinaaiRequest{Body: body, JinaaiInferenceID: jinaai_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutJinaaiFunc(t Transport) InferencePutJinaai { // ----- API Definition ------------------------------------------------------- -// InferencePutJinaai configure a JinaAI inference endpoint +// InferencePutJinaai create an JinaAI inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-jinaai.html. -type InferencePutJinaai func(jinaai_inference_id string, task_type string, o ...func(*InferencePutJinaaiRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-jinaai. +type InferencePutJinaai func(body io.Reader, jinaai_inference_id string, task_type string, o ...func(*InferencePutJinaaiRequest)) (*Response, error) // InferencePutJinaaiRequest configures the Inference Put Jinaai API request. type InferencePutJinaaiRequest struct { @@ -55,6 +56,8 @@ type InferencePutJinaaiRequest struct { JinaaiInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutJinaaiRequest) Do(providedCtx context.Context, transport Tra params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutJinaai) WithContext(v context.Context) func(*InferencePutJin } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutJinaai) WithBody(v io.Reader) func(*InferencePutJinaaiRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutJinaai) WithTimeout(v time.Duration) func(*InferencePutJinaaiRequest) { return func(r *InferencePutJinaaiRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_llama.go b/esapi/api.inference.put_llama.go new file mode 100644 index 0000000000..d85812a6bb --- /dev/null +++ b/esapi/api.inference.put_llama.go @@ -0,0 +1,253 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" + "time" +) + +func newInferencePutLlamaFunc(t Transport) InferencePutLlama { + return func(body io.Reader, llama_inference_id string, task_type string, o ...func(*InferencePutLlamaRequest)) (*Response, error) { + var r = InferencePutLlamaRequest{Body: body, LlamaInferenceID: llama_inference_id, TaskType: task_type} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// InferencePutLlama create a Llama inference endpoint +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-llama. +type InferencePutLlama func(body io.Reader, llama_inference_id string, task_type string, o ...func(*InferencePutLlamaRequest)) (*Response, error) + +// InferencePutLlamaRequest configures the Inference Put Llama API request. +type InferencePutLlamaRequest struct { + Body io.Reader + + LlamaInferenceID string + TaskType string + + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r InferencePutLlamaRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_llama") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len("_inference") + 1 + len(r.TaskType) + 1 + len(r.LlamaInferenceID)) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + path.WriteString(r.TaskType) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "task_type", r.TaskType) + } + path.WriteString("/") + path.WriteString(r.LlamaInferenceID) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "llama_inference_id", r.LlamaInferenceID) + } + + params = make(map[string]string) + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_llama") + if reader := instrument.RecordRequestBody(ctx, "inference.put_llama", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_llama") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f InferencePutLlama) WithContext(v context.Context) func(*InferencePutLlamaRequest) { + return func(r *InferencePutLlamaRequest) { + r.ctx = v + } +} + +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutLlama) WithTimeout(v time.Duration) func(*InferencePutLlamaRequest) { + return func(r *InferencePutLlamaRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f InferencePutLlama) WithPretty() func(*InferencePutLlamaRequest) { + return func(r *InferencePutLlamaRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f InferencePutLlama) WithHuman() func(*InferencePutLlamaRequest) { + return func(r *InferencePutLlamaRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f InferencePutLlama) WithErrorTrace() func(*InferencePutLlamaRequest) { + return func(r *InferencePutLlamaRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f InferencePutLlama) WithFilterPath(v ...string) func(*InferencePutLlamaRequest) { + return func(r *InferencePutLlamaRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f InferencePutLlama) WithHeader(h map[string]string) func(*InferencePutLlamaRequest) { + return func(r *InferencePutLlamaRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f InferencePutLlama) WithOpaqueID(s string) func(*InferencePutLlamaRequest) { + return func(r *InferencePutLlamaRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.inference.put_mistral.go b/esapi/api.inference.put_mistral.go index 2e3c452d82..f40df2efc6 100644 --- a/esapi/api.inference.put_mistral.go +++ b/esapi/api.inference.put_mistral.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutMistralFunc(t Transport) InferencePutMistral { - return func(mistral_inference_id string, task_type string, o ...func(*InferencePutMistralRequest)) (*Response, error) { - var r = InferencePutMistralRequest{MistralInferenceID: mistral_inference_id, TaskType: task_type} + return func(body io.Reader, mistral_inference_id string, task_type string, o ...func(*InferencePutMistralRequest)) (*Response, error) { + var r = InferencePutMistralRequest{Body: body, MistralInferenceID: mistral_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutMistralFunc(t Transport) InferencePutMistral { // ----- API Definition ------------------------------------------------------- -// InferencePutMistral configure a Mistral inference endpoint +// InferencePutMistral create a Mistral inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-mistral.html. -type InferencePutMistral func(mistral_inference_id string, task_type string, o ...func(*InferencePutMistralRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-mistral. +type InferencePutMistral func(body io.Reader, mistral_inference_id string, task_type string, o ...func(*InferencePutMistralRequest)) (*Response, error) // InferencePutMistralRequest configures the Inference Put Mistral API request. type InferencePutMistralRequest struct { @@ -55,6 +56,8 @@ type InferencePutMistralRequest struct { MistralInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutMistralRequest) Do(providedCtx context.Context, transport Tr params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutMistral) WithContext(v context.Context) func(*InferencePutMi } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutMistral) WithBody(v io.Reader) func(*InferencePutMistralRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutMistral) WithTimeout(v time.Duration) func(*InferencePutMistralRequest) { return func(r *InferencePutMistralRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_openai.go b/esapi/api.inference.put_openai.go index b74f0b4f1f..884f1a8dcc 100644 --- a/esapi/api.inference.put_openai.go +++ b/esapi/api.inference.put_openai.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutOpenaiFunc(t Transport) InferencePutOpenai { - return func(openai_inference_id string, task_type string, o ...func(*InferencePutOpenaiRequest)) (*Response, error) { - var r = InferencePutOpenaiRequest{OpenaiInferenceID: openai_inference_id, TaskType: task_type} + return func(body io.Reader, openai_inference_id string, task_type string, o ...func(*InferencePutOpenaiRequest)) (*Response, error) { + var r = InferencePutOpenaiRequest{Body: body, OpenaiInferenceID: openai_inference_id, TaskType: task_type} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutOpenaiFunc(t Transport) InferencePutOpenai { // ----- API Definition ------------------------------------------------------- -// InferencePutOpenai configure an OpenAI inference endpoint +// InferencePutOpenai create an OpenAI inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-openai.html. -type InferencePutOpenai func(openai_inference_id string, task_type string, o ...func(*InferencePutOpenaiRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openai. +type InferencePutOpenai func(body io.Reader, openai_inference_id string, task_type string, o ...func(*InferencePutOpenaiRequest)) (*Response, error) // InferencePutOpenaiRequest configures the Inference Put Openai API request. type InferencePutOpenaiRequest struct { @@ -55,6 +56,8 @@ type InferencePutOpenaiRequest struct { OpenaiInferenceID string TaskType string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutOpenaiRequest) Do(providedCtx context.Context, transport Tra params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutOpenai) WithContext(v context.Context) func(*InferencePutOpe } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutOpenai) WithBody(v io.Reader) func(*InferencePutOpenaiRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutOpenai) WithTimeout(v time.Duration) func(*InferencePutOpenaiRequest) { return func(r *InferencePutOpenaiRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_openshift_ai.go b/esapi/api.inference.put_openshift_ai.go new file mode 100644 index 0000000000..31f72c2d24 --- /dev/null +++ b/esapi/api.inference.put_openshift_ai.go @@ -0,0 +1,253 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" + "time" +) + +func newInferencePutOpenshiftAiFunc(t Transport) InferencePutOpenshiftAi { + return func(body io.Reader, openshiftai_inference_id string, task_type string, o ...func(*InferencePutOpenshiftAiRequest)) (*Response, error) { + var r = InferencePutOpenshiftAiRequest{Body: body, OpenshiftaiInferenceID: openshiftai_inference_id, TaskType: task_type} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// InferencePutOpenshiftAi create an OpenShift AI inference endpoint +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openshift-ai. +type InferencePutOpenshiftAi func(body io.Reader, openshiftai_inference_id string, task_type string, o ...func(*InferencePutOpenshiftAiRequest)) (*Response, error) + +// InferencePutOpenshiftAiRequest configures the Inference Put Openshift Ai API request. +type InferencePutOpenshiftAiRequest struct { + Body io.Reader + + OpenshiftaiInferenceID string + TaskType string + + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r InferencePutOpenshiftAiRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_openshift_ai") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len("_inference") + 1 + len(r.TaskType) + 1 + len(r.OpenshiftaiInferenceID)) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + path.WriteString(r.TaskType) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "task_type", r.TaskType) + } + path.WriteString("/") + path.WriteString(r.OpenshiftaiInferenceID) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "openshiftai_inference_id", r.OpenshiftaiInferenceID) + } + + params = make(map[string]string) + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_openshift_ai") + if reader := instrument.RecordRequestBody(ctx, "inference.put_openshift_ai", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_openshift_ai") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f InferencePutOpenshiftAi) WithContext(v context.Context) func(*InferencePutOpenshiftAiRequest) { + return func(r *InferencePutOpenshiftAiRequest) { + r.ctx = v + } +} + +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutOpenshiftAi) WithTimeout(v time.Duration) func(*InferencePutOpenshiftAiRequest) { + return func(r *InferencePutOpenshiftAiRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f InferencePutOpenshiftAi) WithPretty() func(*InferencePutOpenshiftAiRequest) { + return func(r *InferencePutOpenshiftAiRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f InferencePutOpenshiftAi) WithHuman() func(*InferencePutOpenshiftAiRequest) { + return func(r *InferencePutOpenshiftAiRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f InferencePutOpenshiftAi) WithErrorTrace() func(*InferencePutOpenshiftAiRequest) { + return func(r *InferencePutOpenshiftAiRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f InferencePutOpenshiftAi) WithFilterPath(v ...string) func(*InferencePutOpenshiftAiRequest) { + return func(r *InferencePutOpenshiftAiRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f InferencePutOpenshiftAi) WithHeader(h map[string]string) func(*InferencePutOpenshiftAiRequest) { + return func(r *InferencePutOpenshiftAiRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f InferencePutOpenshiftAi) WithOpaqueID(s string) func(*InferencePutOpenshiftAiRequest) { + return func(r *InferencePutOpenshiftAiRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.inference.put_voyageai.go b/esapi/api.inference.put_voyageai.go index 66f4e7f367..0c275e9985 100644 --- a/esapi/api.inference.put_voyageai.go +++ b/esapi/api.inference.put_voyageai.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutVoyageaiFunc(t Transport) InferencePutVoyageai { - return func(task_type string, voyageai_inference_id string, o ...func(*InferencePutVoyageaiRequest)) (*Response, error) { - var r = InferencePutVoyageaiRequest{TaskType: task_type, VoyageaiInferenceID: voyageai_inference_id} + return func(body io.Reader, task_type string, voyageai_inference_id string, o ...func(*InferencePutVoyageaiRequest)) (*Response, error) { + var r = InferencePutVoyageaiRequest{Body: body, TaskType: task_type, VoyageaiInferenceID: voyageai_inference_id} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutVoyageaiFunc(t Transport) InferencePutVoyageai { // ----- API Definition ------------------------------------------------------- -// InferencePutVoyageai configure a VoyageAI inference endpoint +// InferencePutVoyageai create a VoyageAI inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-apis.html. -type InferencePutVoyageai func(task_type string, voyageai_inference_id string, o ...func(*InferencePutVoyageaiRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-voyageai. +type InferencePutVoyageai func(body io.Reader, task_type string, voyageai_inference_id string, o ...func(*InferencePutVoyageaiRequest)) (*Response, error) // InferencePutVoyageaiRequest configures the Inference Put Voyageai API request. type InferencePutVoyageaiRequest struct { @@ -55,6 +56,8 @@ type InferencePutVoyageaiRequest struct { TaskType string VoyageaiInferenceID string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutVoyageaiRequest) Do(providedCtx context.Context, transport T params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutVoyageai) WithContext(v context.Context) func(*InferencePutV } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutVoyageai) WithBody(v io.Reader) func(*InferencePutVoyageaiRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutVoyageai) WithTimeout(v time.Duration) func(*InferencePutVoyageaiRequest) { return func(r *InferencePutVoyageaiRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.put_watsonx.go b/esapi/api.inference.put_watsonx.go index 3c2a75422f..d685534821 100644 --- a/esapi/api.inference.put_watsonx.go +++ b/esapi/api.inference.put_watsonx.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferencePutWatsonxFunc(t Transport) InferencePutWatsonx { - return func(task_type string, watsonx_inference_id string, o ...func(*InferencePutWatsonxRequest)) (*Response, error) { - var r = InferencePutWatsonxRequest{TaskType: task_type, WatsonxInferenceID: watsonx_inference_id} + return func(body io.Reader, task_type string, watsonx_inference_id string, o ...func(*InferencePutWatsonxRequest)) (*Response, error) { + var r = InferencePutWatsonxRequest{Body: body, TaskType: task_type, WatsonxInferenceID: watsonx_inference_id} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferencePutWatsonxFunc(t Transport) InferencePutWatsonx { // ----- API Definition ------------------------------------------------------- -// InferencePutWatsonx configure a Watsonx inference endpoint +// InferencePutWatsonx create a Watsonx inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-watsonx-ai.html. -type InferencePutWatsonx func(task_type string, watsonx_inference_id string, o ...func(*InferencePutWatsonxRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-watsonx. +type InferencePutWatsonx func(body io.Reader, task_type string, watsonx_inference_id string, o ...func(*InferencePutWatsonxRequest)) (*Response, error) // InferencePutWatsonxRequest configures the Inference Put Watsonx API request. type InferencePutWatsonxRequest struct { @@ -55,6 +56,8 @@ type InferencePutWatsonxRequest struct { TaskType string WatsonxInferenceID string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r InferencePutWatsonxRequest) Do(providedCtx context.Context, transport Tr params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,10 +195,10 @@ func (f InferencePutWatsonx) WithContext(v context.Context) func(*InferencePutWa } } -// WithBody - The inference endpoint's task and service settings. -func (f InferencePutWatsonx) WithBody(v io.Reader) func(*InferencePutWatsonxRequest) { +// WithTimeout - specifies the amount of time to wait for the inference endpoint to be created.. +func (f InferencePutWatsonx) WithTimeout(v time.Duration) func(*InferencePutWatsonxRequest) { return func(r *InferencePutWatsonxRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.rerank.go b/esapi/api.inference.rerank.go index 5c516a85c7..e8df383139 100644 --- a/esapi/api.inference.rerank.go +++ b/esapi/api.inference.rerank.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferenceRerankFunc(t Transport) InferenceRerank { - return func(inference_id string, o ...func(*InferenceRerankRequest)) (*Response, error) { - var r = InferenceRerankRequest{InferenceID: inference_id} + return func(body io.Reader, inference_id string, o ...func(*InferenceRerankRequest)) (*Response, error) { + var r = InferenceRerankRequest{Body: body, InferenceID: inference_id} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferenceRerankFunc(t Transport) InferenceRerank { // ----- API Definition ------------------------------------------------------- -// InferenceRerank perform reranking inference +// InferenceRerank perform reranking inference on the service // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html. -type InferenceRerank func(inference_id string, o ...func(*InferenceRerankRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference. +type InferenceRerank func(body io.Reader, inference_id string, o ...func(*InferenceRerankRequest)) (*Response, error) // InferenceRerankRequest configures the Inference Rerank API request. type InferenceRerankRequest struct { @@ -54,6 +55,8 @@ type InferenceRerankRequest struct { InferenceID string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -99,6 +102,10 @@ func (r InferenceRerankRequest) Do(providedCtx context.Context, transport Transp params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -184,10 +191,10 @@ func (f InferenceRerank) WithContext(v context.Context) func(*InferenceRerankReq } } -// WithBody - The inference payload. -func (f InferenceRerank) WithBody(v io.Reader) func(*InferenceRerankRequest) { +// WithTimeout - the amount of time to wait for the inference request to complete.. +func (f InferenceRerank) WithTimeout(v time.Duration) func(*InferenceRerankRequest) { return func(r *InferenceRerankRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.sparse_embedding.go b/esapi/api.inference.sparse_embedding.go index fd258eef90..49d6b96577 100644 --- a/esapi/api.inference.sparse_embedding.go +++ b/esapi/api.inference.sparse_embedding.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferenceSparseEmbeddingFunc(t Transport) InferenceSparseEmbedding { - return func(inference_id string, o ...func(*InferenceSparseEmbeddingRequest)) (*Response, error) { - var r = InferenceSparseEmbeddingRequest{InferenceID: inference_id} + return func(body io.Reader, inference_id string, o ...func(*InferenceSparseEmbeddingRequest)) (*Response, error) { + var r = InferenceSparseEmbeddingRequest{Body: body, InferenceID: inference_id} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferenceSparseEmbeddingFunc(t Transport) InferenceSparseEmbedding { // ----- API Definition ------------------------------------------------------- -// InferenceSparseEmbedding perform sparse embedding inference +// InferenceSparseEmbedding perform sparse embedding inference on the service // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html. -type InferenceSparseEmbedding func(inference_id string, o ...func(*InferenceSparseEmbeddingRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference. +type InferenceSparseEmbedding func(body io.Reader, inference_id string, o ...func(*InferenceSparseEmbeddingRequest)) (*Response, error) // InferenceSparseEmbeddingRequest configures the Inference Sparse Embedding API request. type InferenceSparseEmbeddingRequest struct { @@ -54,6 +55,8 @@ type InferenceSparseEmbeddingRequest struct { InferenceID string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -99,6 +102,10 @@ func (r InferenceSparseEmbeddingRequest) Do(providedCtx context.Context, transpo params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -184,10 +191,10 @@ func (f InferenceSparseEmbedding) WithContext(v context.Context) func(*Inference } } -// WithBody - The inference payload. -func (f InferenceSparseEmbedding) WithBody(v io.Reader) func(*InferenceSparseEmbeddingRequest) { +// WithTimeout - specifies the amount of time to wait for the inference request to complete.. +func (f InferenceSparseEmbedding) WithTimeout(v time.Duration) func(*InferenceSparseEmbeddingRequest) { return func(r *InferenceSparseEmbeddingRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.stream_completion.go b/esapi/api.inference.stream_completion.go index a5f7c2490c..160bcbfa9f 100644 --- a/esapi/api.inference.stream_completion.go +++ b/esapi/api.inference.stream_completion.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferenceStreamCompletionFunc(t Transport) InferenceStreamCompletion { - return func(inference_id string, o ...func(*InferenceStreamCompletionRequest)) (*Response, error) { - var r = InferenceStreamCompletionRequest{InferenceID: inference_id} + return func(body io.Reader, inference_id string, o ...func(*InferenceStreamCompletionRequest)) (*Response, error) { + var r = InferenceStreamCompletionRequest{Body: body, InferenceID: inference_id} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferenceStreamCompletionFunc(t Transport) InferenceStreamCompletion { // ----- API Definition ------------------------------------------------------- -// InferenceStreamCompletion perform streaming completion inference +// InferenceStreamCompletion perform streaming inference // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html. -type InferenceStreamCompletion func(inference_id string, o ...func(*InferenceStreamCompletionRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-stream-inference. +type InferenceStreamCompletion func(body io.Reader, inference_id string, o ...func(*InferenceStreamCompletionRequest)) (*Response, error) // InferenceStreamCompletionRequest configures the Inference Stream Completion API request. type InferenceStreamCompletionRequest struct { @@ -54,6 +55,8 @@ type InferenceStreamCompletionRequest struct { InferenceID string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -101,6 +104,10 @@ func (r InferenceStreamCompletionRequest) Do(providedCtx context.Context, transp params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -186,10 +193,10 @@ func (f InferenceStreamCompletion) WithContext(v context.Context) func(*Inferenc } } -// WithBody - The inference payload. -func (f InferenceStreamCompletion) WithBody(v io.Reader) func(*InferenceStreamCompletionRequest) { +// WithTimeout - the amount of time to wait for the inference request to complete.. +func (f InferenceStreamCompletion) WithTimeout(v time.Duration) func(*InferenceStreamCompletionRequest) { return func(r *InferenceStreamCompletionRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.text_embedding.go b/esapi/api.inference.text_embedding.go index 3de2cf3597..b4b1b95c52 100644 --- a/esapi/api.inference.text_embedding.go +++ b/esapi/api.inference.text_embedding.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -24,11 +24,12 @@ import ( "io" "net/http" "strings" + "time" ) func newInferenceTextEmbeddingFunc(t Transport) InferenceTextEmbedding { - return func(inference_id string, o ...func(*InferenceTextEmbeddingRequest)) (*Response, error) { - var r = InferenceTextEmbeddingRequest{InferenceID: inference_id} + return func(body io.Reader, inference_id string, o ...func(*InferenceTextEmbeddingRequest)) (*Response, error) { + var r = InferenceTextEmbeddingRequest{Body: body, InferenceID: inference_id} for _, f := range o { f(&r) } @@ -43,10 +44,10 @@ func newInferenceTextEmbeddingFunc(t Transport) InferenceTextEmbedding { // ----- API Definition ------------------------------------------------------- -// InferenceTextEmbedding perform text embedding inference +// InferenceTextEmbedding perform text embedding inference on the service // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html. -type InferenceTextEmbedding func(inference_id string, o ...func(*InferenceTextEmbeddingRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference. +type InferenceTextEmbedding func(body io.Reader, inference_id string, o ...func(*InferenceTextEmbeddingRequest)) (*Response, error) // InferenceTextEmbeddingRequest configures the Inference Text Embedding API request. type InferenceTextEmbeddingRequest struct { @@ -54,6 +55,8 @@ type InferenceTextEmbeddingRequest struct { InferenceID string + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -99,6 +102,10 @@ func (r InferenceTextEmbeddingRequest) Do(providedCtx context.Context, transport params = make(map[string]string) + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -184,10 +191,10 @@ func (f InferenceTextEmbedding) WithContext(v context.Context) func(*InferenceTe } } -// WithBody - The inference payload. -func (f InferenceTextEmbedding) WithBody(v io.Reader) func(*InferenceTextEmbeddingRequest) { +// WithTimeout - specifies the amount of time to wait for the inference request to complete.. +func (f InferenceTextEmbedding) WithTimeout(v time.Duration) func(*InferenceTextEmbeddingRequest) { return func(r *InferenceTextEmbeddingRequest) { - r.Body = v + r.Timeout = v } } diff --git a/esapi/api.inference.update.go b/esapi/api.inference.update.go index 98e4e4dc6e..6c55facb96 100644 --- a/esapi/api.inference.update.go +++ b/esapi/api.inference.update.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -27,8 +27,8 @@ import ( ) func newInferenceUpdateFunc(t Transport) InferenceUpdate { - return func(inference_id string, o ...func(*InferenceUpdateRequest)) (*Response, error) { - var r = InferenceUpdateRequest{InferenceID: inference_id} + return func(body io.Reader, inference_id string, o ...func(*InferenceUpdateRequest)) (*Response, error) { + var r = InferenceUpdateRequest{Body: body, InferenceID: inference_id} for _, f := range o { f(&r) } @@ -43,10 +43,10 @@ func newInferenceUpdateFunc(t Transport) InferenceUpdate { // ----- API Definition ------------------------------------------------------- -// InferenceUpdate update inference +// InferenceUpdate update an inference endpoint // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-inference-api.html. -type InferenceUpdate func(inference_id string, o ...func(*InferenceUpdateRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-update. +type InferenceUpdate func(body io.Reader, inference_id string, o ...func(*InferenceUpdateRequest)) (*Response, error) // InferenceUpdateRequest configures the Inference Update API request. type InferenceUpdateRequest struct { @@ -192,13 +192,6 @@ func (f InferenceUpdate) WithContext(v context.Context) func(*InferenceUpdateReq } } -// WithBody - The inference endpoint's task and service settings. -func (f InferenceUpdate) WithBody(v io.Reader) func(*InferenceUpdateRequest) { - return func(r *InferenceUpdateRequest) { - r.Body = v - } -} - // WithTaskType - the task type. func (f InferenceUpdate) WithTaskType(v string) func(*InferenceUpdateRequest) { return func(r *InferenceUpdateRequest) { diff --git a/esapi/api.info.go b/esapi/api.info.go index 6f4cc9ad19..d3a058f411 100644 --- a/esapi/api.info.go +++ b/esapi/api.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newInfoFunc(t Transport) Info { // ----- API Definition ------------------------------------------------------- -// Info returns basic information about the cluster. +// Info get cluster info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info. type Info func(o ...func(*InfoRequest)) (*Response, error) // InfoRequest configures the Info API request. diff --git a/esapi/api.ingest.delete_geoip_database.go b/esapi/api.ingest.delete_geoip_database.go index 07af96fad3..bfd0c816cd 100644 --- a/esapi/api.ingest.delete_geoip_database.go +++ b/esapi/api.ingest.delete_geoip_database.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIngestDeleteGeoipDatabaseFunc(t Transport) IngestDeleteGeoipDatabase { // ----- API Definition ------------------------------------------------------- -// IngestDeleteGeoipDatabase deletes a geoip database configuration +// IngestDeleteGeoipDatabase delete GeoIP database configurations // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-geoip-database-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-geoip-database. type IngestDeleteGeoipDatabase func(id []string, o ...func(*IngestDeleteGeoipDatabaseRequest)) (*Response, error) // IngestDeleteGeoipDatabaseRequest configures the Ingest Delete Geoip Database API request. diff --git a/esapi/api.ingest.delete_ip_location_database.go b/esapi/api.ingest.delete_ip_location_database.go index 8986e23ed0..1e9e39a4a4 100644 --- a/esapi/api.ingest.delete_ip_location_database.go +++ b/esapi/api.ingest.delete_ip_location_database.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIngestDeleteIPLocationDatabaseFunc(t Transport) IngestDeleteIPLocationDa // ----- API Definition ------------------------------------------------------- -// IngestDeleteIPLocationDatabase deletes an ip location database configuration +// IngestDeleteIPLocationDatabase delete IP geolocation database configurations // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-ip-location-database-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-ip-location-database. type IngestDeleteIPLocationDatabase func(id []string, o ...func(*IngestDeleteIPLocationDatabaseRequest)) (*Response, error) // IngestDeleteIPLocationDatabaseRequest configures the Ingest DeleteIP Location Database API request. diff --git a/esapi/api.ingest.delete_pipeline.go b/esapi/api.ingest.delete_pipeline.go index 6e90d29b29..19f2153338 100644 --- a/esapi/api.ingest.delete_pipeline.go +++ b/esapi/api.ingest.delete_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIngestDeletePipelineFunc(t Transport) IngestDeletePipeline { // ----- API Definition ------------------------------------------------------- -// IngestDeletePipeline deletes a pipeline. +// IngestDeletePipeline delete pipelines // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline. type IngestDeletePipeline func(id string, o ...func(*IngestDeletePipelineRequest)) (*Response, error) // IngestDeletePipelineRequest configures the Ingest Delete Pipeline API request. diff --git a/esapi/api.ingest.geo_ip_stats.go b/esapi/api.ingest.geo_ip_stats.go index 847d7953ab..cf9a11a3a3 100644 --- a/esapi/api.ingest.geo_ip_stats.go +++ b/esapi/api.ingest.geo_ip_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newIngestGeoIPStatsFunc(t Transport) IngestGeoIPStats { // ----- API Definition ------------------------------------------------------- -// IngestGeoIPStats returns statistical information about geoip databases +// IngestGeoIPStats get GeoIP statistics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html. +// See full documentation at https://www.elastic.co/docs/reference/enrich-processor/geoip-processor. type IngestGeoIPStats func(o ...func(*IngestGeoIPStatsRequest)) (*Response, error) // IngestGeoIPStatsRequest configures the Ingest GeoIP Stats API request. diff --git a/esapi/api.ingest.get_geoip_database.go b/esapi/api.ingest.get_geoip_database.go index fc6ed06f1d..0eacbd9dcd 100644 --- a/esapi/api.ingest.get_geoip_database.go +++ b/esapi/api.ingest.get_geoip_database.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newIngestGetGeoipDatabaseFunc(t Transport) IngestGetGeoipDatabase { // ----- API Definition ------------------------------------------------------- -// IngestGetGeoipDatabase returns geoip database configuration. +// IngestGetGeoipDatabase get GeoIP database configurations // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-geoip-database-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-geoip-database. type IngestGetGeoipDatabase func(o ...func(*IngestGetGeoipDatabaseRequest)) (*Response, error) // IngestGetGeoipDatabaseRequest configures the Ingest Get Geoip Database API request. diff --git a/esapi/api.ingest.get_ip_location_database.go b/esapi/api.ingest.get_ip_location_database.go index b42300cf80..8583cf649c 100644 --- a/esapi/api.ingest.get_ip_location_database.go +++ b/esapi/api.ingest.get_ip_location_database.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newIngestGetIPLocationDatabaseFunc(t Transport) IngestGetIPLocationDatabase // ----- API Definition ------------------------------------------------------- -// IngestGetIPLocationDatabase returns the specified ip location database configuration +// IngestGetIPLocationDatabase get IP geolocation database configurations // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-ip-location-database-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-ip-location-database. type IngestGetIPLocationDatabase func(o ...func(*IngestGetIPLocationDatabaseRequest)) (*Response, error) // IngestGetIPLocationDatabaseRequest configures the Ingest GetIP Location Database API request. diff --git a/esapi/api.ingest.get_pipeline.go b/esapi/api.ingest.get_pipeline.go index 17faf7282e..c25a1cb6dd 100644 --- a/esapi/api.ingest.get_pipeline.go +++ b/esapi/api.ingest.get_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIngestGetPipelineFunc(t Transport) IngestGetPipeline { // ----- API Definition ------------------------------------------------------- -// IngestGetPipeline returns a pipeline. +// IngestGetPipeline get pipelines // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-pipeline. type IngestGetPipeline func(o ...func(*IngestGetPipelineRequest)) (*Response, error) // IngestGetPipelineRequest configures the Ingest Get Pipeline API request. diff --git a/esapi/api.ingest.processor_grok.go b/esapi/api.ingest.processor_grok.go index b5eabd9155..da0f64540c 100644 --- a/esapi/api.ingest.processor_grok.go +++ b/esapi/api.ingest.processor_grok.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newIngestProcessorGrokFunc(t Transport) IngestProcessorGrok { // ----- API Definition ------------------------------------------------------- -// IngestProcessorGrok returns a list of the built-in patterns. +// IngestProcessorGrok run a grok processor // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get. +// See full documentation at https://www.elastic.co/docs/reference/enrich-processor/grok-processor. type IngestProcessorGrok func(o ...func(*IngestProcessorGrokRequest)) (*Response, error) // IngestProcessorGrokRequest configures the Ingest Processor Grok API request. diff --git a/esapi/api.ingest.put_geoip_database.go b/esapi/api.ingest.put_geoip_database.go index 234ca48a96..9fb11fa105 100644 --- a/esapi/api.ingest.put_geoip_database.go +++ b/esapi/api.ingest.put_geoip_database.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIngestPutGeoipDatabaseFunc(t Transport) IngestPutGeoipDatabase { // ----- API Definition ------------------------------------------------------- -// IngestPutGeoipDatabase puts the configuration for a geoip database to be downloaded +// IngestPutGeoipDatabase create or update a GeoIP database configuration // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-geoip-database-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-geoip-database. type IngestPutGeoipDatabase func(id string, body io.Reader, o ...func(*IngestPutGeoipDatabaseRequest)) (*Response, error) // IngestPutGeoipDatabaseRequest configures the Ingest Put Geoip Database API request. diff --git a/esapi/api.ingest.put_ip_location_database.go b/esapi/api.ingest.put_ip_location_database.go index 4c2ae516dd..fe0a22a0b9 100644 --- a/esapi/api.ingest.put_ip_location_database.go +++ b/esapi/api.ingest.put_ip_location_database.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIngestPutIPLocationDatabaseFunc(t Transport) IngestPutIPLocationDatabase // ----- API Definition ------------------------------------------------------- -// IngestPutIPLocationDatabase puts the configuration for a ip location database to be downloaded +// IngestPutIPLocationDatabase create or update an IP geolocation database configuration // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-ip-location-database-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-ip-location-database. type IngestPutIPLocationDatabase func(id string, body io.Reader, o ...func(*IngestPutIPLocationDatabaseRequest)) (*Response, error) // IngestPutIPLocationDatabaseRequest configures the Ingest PutIP Location Database API request. diff --git a/esapi/api.ingest.put_pipeline.go b/esapi/api.ingest.put_pipeline.go index 361c1517f6..e838ddf851 100644 --- a/esapi/api.ingest.put_pipeline.go +++ b/esapi/api.ingest.put_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newIngestPutPipelineFunc(t Transport) IngestPutPipeline { // ----- API Definition ------------------------------------------------------- -// IngestPutPipeline creates or updates a pipeline. +// IngestPutPipeline create or update a pipeline // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html. +// See full documentation at https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines. type IngestPutPipeline func(id string, body io.Reader, o ...func(*IngestPutPipelineRequest)) (*Response, error) // IngestPutPipelineRequest configures the Ingest Put Pipeline API request. diff --git a/esapi/api.ingest.simulate.go b/esapi/api.ingest.simulate.go index 890761c840..95aeb915bb 100644 --- a/esapi/api.ingest.simulate.go +++ b/esapi/api.ingest.simulate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIngestSimulateFunc(t Transport) IngestSimulate { // ----- API Definition ------------------------------------------------------- -// IngestSimulate allows to simulate a pipeline with example documents. +// IngestSimulate simulate a pipeline // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-simulate. type IngestSimulate func(body io.Reader, o ...func(*IngestSimulateRequest)) (*Response, error) // IngestSimulateRequest configures the Ingest Simulate API request. diff --git a/esapi/api.mget.go b/esapi/api.mget.go index 0c7c417133..ed4b9017b7 100644 --- a/esapi/api.mget.go +++ b/esapi/api.mget.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMgetFunc(t Transport) Mget { // ----- API Definition ------------------------------------------------------- -// Mget allows to get multiple documents in one request. +// Mget get multiple documents // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-mget. type Mget func(body io.Reader, o ...func(*MgetRequest)) (*Response, error) // MgetRequest configures the Mget API request. @@ -59,7 +59,7 @@ type MgetRequest struct { Preference string Realtime *bool Refresh *bool - Routing string + Routing []string Source []string SourceExcludes []string SourceIncludes []string @@ -126,8 +126,8 @@ func (r MgetRequest) Do(providedCtx context.Context, transport Transport) (*Resp params["refresh"] = strconv.FormatBool(*r.Refresh) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if len(r.Source) > 0 { @@ -267,7 +267,7 @@ func (f Mget) WithRefresh(v bool) func(*MgetRequest) { } // WithRouting - specific routing value. -func (f Mget) WithRouting(v string) func(*MgetRequest) { +func (f Mget) WithRouting(v ...string) func(*MgetRequest) { return func(r *MgetRequest) { r.Routing = v } diff --git a/esapi/api.msearch.go b/esapi/api.msearch.go index ddcafc932d..1c3aa12a63 100644 --- a/esapi/api.msearch.go +++ b/esapi/api.msearch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMsearchFunc(t Transport) Msearch { // ----- API Definition ------------------------------------------------------- -// Msearch allows to execute several search operations in one request. +// Msearch run multiple searches // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch. type Msearch func(body io.Reader, o ...func(*MsearchRequest)) (*Response, error) // MsearchRequest configures the Msearch API request. @@ -57,13 +57,14 @@ type MsearchRequest struct { AllowNoIndices *bool CcsMinimizeRoundtrips *bool - ExpandWildcards string + ExpandWildcards []string IgnoreThrottled *bool IgnoreUnavailable *bool IncludeNamedQueriesScore *bool MaxConcurrentSearches *int MaxConcurrentShardRequests *int PreFilterShardSize *int + ProjectRouting string RestTotalHitsAsInt *bool Routing []string SearchType string @@ -122,8 +123,8 @@ func (r MsearchRequest) Do(providedCtx context.Context, transport Transport) (*R params["ccs_minimize_roundtrips"] = strconv.FormatBool(*r.CcsMinimizeRoundtrips) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreThrottled != nil { @@ -154,6 +155,10 @@ func (r MsearchRequest) Do(providedCtx context.Context, transport Transport) (*R params["pre_filter_shard_size"] = strconv.FormatInt(int64(*r.PreFilterShardSize), 10) } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.RestTotalHitsAsInt != nil { params["rest_total_hits_as_int"] = strconv.FormatBool(*r.RestTotalHitsAsInt) } @@ -277,7 +282,7 @@ func (f Msearch) WithCcsMinimizeRoundtrips(v bool) func(*MsearchRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f Msearch) WithExpandWildcards(v string) func(*MsearchRequest) { +func (f Msearch) WithExpandWildcards(v ...string) func(*MsearchRequest) { return func(r *MsearchRequest) { r.ExpandWildcards = v } @@ -318,13 +323,20 @@ func (f Msearch) WithMaxConcurrentShardRequests(v int) func(*MsearchRequest) { } } -// WithPreFilterShardSize - a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.. +// WithPreFilterShardSize - a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.. func (f Msearch) WithPreFilterShardSize(v int) func(*MsearchRequest) { return func(r *MsearchRequest) { r.PreFilterShardSize = &v } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f Msearch) WithProjectRouting(v string) func(*MsearchRequest) { + return func(r *MsearchRequest) { + r.ProjectRouting = v + } +} + // WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response. func (f Msearch) WithRestTotalHitsAsInt(v bool) func(*MsearchRequest) { return func(r *MsearchRequest) { diff --git a/esapi/api.msearch_template.go b/esapi/api.msearch_template.go index bbcd136408..5017fa311c 100644 --- a/esapi/api.msearch_template.go +++ b/esapi/api.msearch_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMsearchTemplateFunc(t Transport) MsearchTemplate { // ----- API Definition ------------------------------------------------------- -// MsearchTemplate allows to execute several search template operations in one request. +// MsearchTemplate run multiple templated searches // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch-template. type MsearchTemplate func(body io.Reader, o ...func(*MsearchTemplateRequest)) (*Response, error) // MsearchTemplateRequest configures the Msearch Template API request. @@ -57,6 +57,7 @@ type MsearchTemplateRequest struct { CcsMinimizeRoundtrips *bool MaxConcurrentSearches *int + ProjectRouting string RestTotalHitsAsInt *bool SearchType string TypedKeys *bool @@ -116,6 +117,10 @@ func (r MsearchTemplateRequest) Do(providedCtx context.Context, transport Transp params["max_concurrent_searches"] = strconv.FormatInt(int64(*r.MaxConcurrentSearches), 10) } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.RestTotalHitsAsInt != nil { params["rest_total_hits_as_int"] = strconv.FormatBool(*r.RestTotalHitsAsInt) } @@ -234,6 +239,13 @@ func (f MsearchTemplate) WithMaxConcurrentSearches(v int) func(*MsearchTemplateR } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f MsearchTemplate) WithProjectRouting(v string) func(*MsearchTemplateRequest) { + return func(r *MsearchTemplateRequest) { + r.ProjectRouting = v + } +} + // WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response. func (f MsearchTemplate) WithRestTotalHitsAsInt(v bool) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { diff --git a/esapi/api.mtermvectors.go b/esapi/api.mtermvectors.go index 7c4caa17c8..bb58f9d150 100644 --- a/esapi/api.mtermvectors.go +++ b/esapi/api.mtermvectors.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMtermvectorsFunc(t Transport) Mtermvectors { // ----- API Definition ------------------------------------------------------- -// Mtermvectors returns multiple termvectors in one request. +// Mtermvectors get multiple term vectors // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-mtermvectors. type Mtermvectors func(o ...func(*MtermvectorsRequest)) (*Response, error) // MtermvectorsRequest configures the Mtermvectors API request. @@ -63,7 +63,7 @@ type MtermvectorsRequest struct { Positions *bool Preference string Realtime *bool - Routing string + Routing []string TermStatistics *bool Version *int VersionType string @@ -145,8 +145,8 @@ func (r MtermvectorsRequest) Do(providedCtx context.Context, transport Transport params["realtime"] = strconv.FormatBool(*r.Realtime) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if r.TermStatistics != nil { @@ -317,7 +317,7 @@ func (f Mtermvectors) WithRealtime(v bool) func(*MtermvectorsRequest) { } // WithRouting - specific routing value. applies to all returned documents unless otherwise specified in body "params" or "docs".. -func (f Mtermvectors) WithRouting(v string) func(*MtermvectorsRequest) { +func (f Mtermvectors) WithRouting(v ...string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Routing = v } diff --git a/esapi/api.nodes.clear_repositories_metering_archive.go b/esapi/api.nodes.clear_repositories_metering_archive.go index 1b13fde661..fe68aefcf0 100644 --- a/esapi/api.nodes.clear_repositories_metering_archive.go +++ b/esapi/api.nodes.clear_repositories_metering_archive.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,11 +44,11 @@ func newNodesClearRepositoriesMeteringArchiveFunc(t Transport) NodesClearReposit // ----- API Definition ------------------------------------------------------- -// NodesClearRepositoriesMeteringArchive removes the archived repositories metering information present in the cluster. +// NodesClearRepositoriesMeteringArchive clear the archived repositories metering // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive. type NodesClearRepositoriesMeteringArchive func(max_archive_version *int, node_id []string, o ...func(*NodesClearRepositoriesMeteringArchiveRequest)) (*Response, error) // NodesClearRepositoriesMeteringArchiveRequest configures the Nodes Clear Repositories Metering Archive API request. diff --git a/esapi/api.nodes.get_repositories_metering_info.go b/esapi/api.nodes.get_repositories_metering_info.go index 452ce675d5..d0e13c14fc 100644 --- a/esapi/api.nodes.get_repositories_metering_info.go +++ b/esapi/api.nodes.get_repositories_metering_info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newNodesGetRepositoriesMeteringInfoFunc(t Transport) NodesGetRepositoriesMe // ----- API Definition ------------------------------------------------------- -// NodesGetRepositoriesMeteringInfo returns cluster repositories metering information. +// NodesGetRepositoriesMeteringInfo get cluster repositories metering // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-get-repositories-metering-info. type NodesGetRepositoriesMeteringInfo func(node_id []string, o ...func(*NodesGetRepositoriesMeteringInfoRequest)) (*Response, error) // NodesGetRepositoriesMeteringInfoRequest configures the Nodes Get Repositories Metering Info API request. diff --git a/esapi/api.nodes.hot_threads.go b/esapi/api.nodes.hot_threads.go index a0f495b8a0..9eb3ff561b 100644 --- a/esapi/api.nodes.hot_threads.go +++ b/esapi/api.nodes.hot_threads.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newNodesHotThreadsFunc(t Transport) NodesHotThreads { // ----- API Definition ------------------------------------------------------- -// NodesHotThreads returns information about hot threads on each node in the cluster. +// NodesHotThreads get the hot threads for nodes // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-hot-threads. type NodesHotThreads func(o ...func(*NodesHotThreadsRequest)) (*Response, error) // NodesHotThreadsRequest configures the Nodes Hot Threads API request. diff --git a/esapi/api.nodes.info.go b/esapi/api.nodes.info.go index e2cc0d0d13..ab2764afd3 100644 --- a/esapi/api.nodes.info.go +++ b/esapi/api.nodes.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newNodesInfoFunc(t Transport) NodesInfo { // ----- API Definition ------------------------------------------------------- -// NodesInfo returns information about nodes in the cluster. +// NodesInfo get node information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-info. type NodesInfo func(o ...func(*NodesInfoRequest)) (*Response, error) // NodesInfoRequest configures the Nodes Info API request. diff --git a/esapi/api.nodes.reload_secure_settings.go b/esapi/api.nodes.reload_secure_settings.go index db4399828c..6584ec74e8 100644 --- a/esapi/api.nodes.reload_secure_settings.go +++ b/esapi/api.nodes.reload_secure_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newNodesReloadSecureSettingsFunc(t Transport) NodesReloadSecureSettings { // ----- API Definition ------------------------------------------------------- -// NodesReloadSecureSettings reloads secure settings. +// NodesReloadSecureSettings reload the keystore on nodes in the cluster // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-reload-secure-settings. type NodesReloadSecureSettings func(o ...func(*NodesReloadSecureSettingsRequest)) (*Response, error) // NodesReloadSecureSettingsRequest configures the Nodes Reload Secure Settings API request. diff --git a/esapi/api.nodes.stats.go b/esapi/api.nodes.stats.go index fffc7645a7..2cfa2cb8c5 100644 --- a/esapi/api.nodes.stats.go +++ b/esapi/api.nodes.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newNodesStatsFunc(t Transport) NodesStats { // ----- API Definition ------------------------------------------------------- -// NodesStats returns statistical information about nodes in the cluster. +// NodesStats get node statistics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-stats. type NodesStats func(o ...func(*NodesStatsRequest)) (*Response, error) // NodesStatsRequest configures the Nodes Stats API request. diff --git a/esapi/api.nodes.usage.go b/esapi/api.nodes.usage.go index 9842b0868e..1a5ce72e9a 100644 --- a/esapi/api.nodes.usage.go +++ b/esapi/api.nodes.usage.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newNodesUsageFunc(t Transport) NodesUsage { // ----- API Definition ------------------------------------------------------- -// NodesUsage returns low-level information about REST actions usage on nodes. +// NodesUsage get feature usage information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-usage. type NodesUsage func(o ...func(*NodesUsageRequest)) (*Response, error) // NodesUsageRequest configures the Nodes Usage API request. diff --git a/esapi/api.ping.go b/esapi/api.ping.go index faa8fb02c1..c01f1c3657 100644 --- a/esapi/api.ping.go +++ b/esapi/api.ping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newPingFunc(t Transport) Ping { // ----- API Definition ------------------------------------------------------- -// Ping returns whether the cluster is running. +// Ping ping the cluster // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster. type Ping func(o ...func(*PingRequest)) (*Response, error) // PingRequest configures the Ping API request. diff --git a/esapi/api.profiling.stacktraces.go b/esapi/api.profiling.stacktraces.go index 4bc11a41b3..5c41daee12 100644 --- a/esapi/api.profiling.stacktraces.go +++ b/esapi/api.profiling.stacktraces.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,7 +43,7 @@ func newProfilingStacktracesFunc(t Transport) ProfilingStacktraces { // ----- API Definition ------------------------------------------------------- -// ProfilingStacktraces extracts raw stacktrace information from Universal Profiling. +// ProfilingStacktraces extracts raw stacktrace information from Universal Profiling // // See full documentation at https://www.elastic.co/guide/en/observability/current/universal-profiling.html. type ProfilingStacktraces func(body io.Reader, o ...func(*ProfilingStacktracesRequest)) (*Response, error) diff --git a/esapi/api.profiling.status.go b/esapi/api.profiling.status.go index 40e212bea6..3b035677b2 100644 --- a/esapi/api.profiling.status.go +++ b/esapi/api.profiling.status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,7 +44,7 @@ func newProfilingStatusFunc(t Transport) ProfilingStatus { // ----- API Definition ------------------------------------------------------- -// ProfilingStatus returns basic information about the status of Universal Profiling. +// ProfilingStatus returns basic information about the status of Universal Profiling // // See full documentation at https://www.elastic.co/guide/en/observability/current/universal-profiling.html. type ProfilingStatus func(o ...func(*ProfilingStatusRequest)) (*Response, error) diff --git a/esapi/api.profiling.topn_functions.go b/esapi/api.profiling.topn_functions.go index 1b9562e216..558593ffaf 100644 --- a/esapi/api.profiling.topn_functions.go +++ b/esapi/api.profiling.topn_functions.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,7 +43,7 @@ func newProfilingTopnFunctionsFunc(t Transport) ProfilingTopnFunctions { // ----- API Definition ------------------------------------------------------- -// ProfilingTopnFunctions extracts a list of topN functions from Universal Profiling. +// ProfilingTopnFunctions extracts a list of topN functions from Universal Profiling // // See full documentation at https://www.elastic.co/guide/en/observability/current/universal-profiling.html. type ProfilingTopnFunctions func(body io.Reader, o ...func(*ProfilingTopnFunctionsRequest)) (*Response, error) diff --git a/esapi/api.project.tags.go b/esapi/api.project.tags.go new file mode 100644 index 0000000000..eb8beb0aa9 --- /dev/null +++ b/esapi/api.project.tags.go @@ -0,0 +1,215 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newProjectTagsFunc(t Transport) ProjectTags { + return func(o ...func(*ProjectTagsRequest)) (*Response, error) { + var r = ProjectTagsRequest{} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// ProjectTags return tags defined for the project +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-project-tags. +type ProjectTags func(o ...func(*ProjectTagsRequest)) (*Response, error) + +// ProjectTagsRequest configures the Project Tags API request. +type ProjectTagsRequest struct { + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r ProjectTagsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "project.tags") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + len("/_project/tags")) + path.WriteString("http://") + path.WriteString("/_project/tags") + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "project.tags") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "project.tags") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f ProjectTags) WithContext(v context.Context) func(*ProjectTagsRequest) { + return func(r *ProjectTagsRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f ProjectTags) WithPretty() func(*ProjectTagsRequest) { + return func(r *ProjectTagsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f ProjectTags) WithHuman() func(*ProjectTagsRequest) { + return func(r *ProjectTagsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f ProjectTags) WithErrorTrace() func(*ProjectTagsRequest) { + return func(r *ProjectTagsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f ProjectTags) WithFilterPath(v ...string) func(*ProjectTagsRequest) { + return func(r *ProjectTagsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f ProjectTags) WithHeader(h map[string]string) func(*ProjectTagsRequest) { + return func(r *ProjectTagsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f ProjectTags) WithOpaqueID(s string) func(*ProjectTagsRequest) { + return func(r *ProjectTagsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.put_script.go b/esapi/api.put_script.go index e3722cb26a..801a6b25be 100644 --- a/esapi/api.put_script.go +++ b/esapi/api.put_script.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newPutScriptFunc(t Transport) PutScript { // ----- API Definition ------------------------------------------------------- -// PutScript creates or updates a script. +// PutScript create or update a script or search template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script. type PutScript func(id string, body io.Reader, o ...func(*PutScriptRequest)) (*Response, error) // PutScriptRequest configures the Put Script API request. diff --git a/esapi/api.query_rules.delete_rule.go b/esapi/api.query_rules.delete_rule.go index 622b34333d..86b61c1f85 100644 --- a/esapi/api.query_rules.delete_rule.go +++ b/esapi/api.query_rules.delete_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newQueryRulesDeleteRuleFunc(t Transport) QueryRulesDeleteRule { // ----- API Definition ------------------------------------------------------- -// QueryRulesDeleteRule deletes an individual query rule within a ruleset. +// QueryRulesDeleteRule delete a query rule // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-query-rule.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-rule. type QueryRulesDeleteRule func(rule_id string, ruleset_id string, o ...func(*QueryRulesDeleteRuleRequest)) (*Response, error) // QueryRulesDeleteRuleRequest configures the Query Rules Delete Rule API request. diff --git a/esapi/api.query_rules.delete_ruleset.go b/esapi/api.query_rules.delete_ruleset.go index 6b76bfedca..9abde6b0c8 100644 --- a/esapi/api.query_rules.delete_ruleset.go +++ b/esapi/api.query_rules.delete_ruleset.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newQueryRulesDeleteRulesetFunc(t Transport) QueryRulesDeleteRuleset { // ----- API Definition ------------------------------------------------------- -// QueryRulesDeleteRuleset deletes a query ruleset. +// QueryRulesDeleteRuleset delete a query ruleset // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-query-ruleset.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-ruleset. type QueryRulesDeleteRuleset func(ruleset_id string, o ...func(*QueryRulesDeleteRulesetRequest)) (*Response, error) // QueryRulesDeleteRulesetRequest configures the Query Rules Delete Ruleset API request. diff --git a/esapi/api.query_rules.get_rule.go b/esapi/api.query_rules.get_rule.go index 1da4aa03bb..ef33bb679f 100644 --- a/esapi/api.query_rules.get_rule.go +++ b/esapi/api.query_rules.get_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newQueryRulesGetRuleFunc(t Transport) QueryRulesGetRule { // ----- API Definition ------------------------------------------------------- -// QueryRulesGetRule returns the details about an individual query rule within a ruleset. +// QueryRulesGetRule get a query rule // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-query-rule.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-rule. type QueryRulesGetRule func(rule_id string, ruleset_id string, o ...func(*QueryRulesGetRuleRequest)) (*Response, error) // QueryRulesGetRuleRequest configures the Query Rules Get Rule API request. diff --git a/esapi/api.query_rules.get_ruleset.go b/esapi/api.query_rules.get_ruleset.go index 9624967dad..bcfb567b98 100644 --- a/esapi/api.query_rules.get_ruleset.go +++ b/esapi/api.query_rules.get_ruleset.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newQueryRulesGetRulesetFunc(t Transport) QueryRulesGetRuleset { // ----- API Definition ------------------------------------------------------- -// QueryRulesGetRuleset returns the details about a query ruleset. +// QueryRulesGetRuleset get a query ruleset // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-query-ruleset.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset. type QueryRulesGetRuleset func(ruleset_id string, o ...func(*QueryRulesGetRulesetRequest)) (*Response, error) // QueryRulesGetRulesetRequest configures the Query Rules Get Ruleset API request. diff --git a/esapi/api.query_rules.list_rulesets.go b/esapi/api.query_rules.list_rulesets.go index 12eb99cd82..d19f9fac6c 100644 --- a/esapi/api.query_rules.list_rulesets.go +++ b/esapi/api.query_rules.list_rulesets.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newQueryRulesListRulesetsFunc(t Transport) QueryRulesListRulesets { // ----- API Definition ------------------------------------------------------- -// QueryRulesListRulesets lists query rulesets. +// QueryRulesListRulesets get all query rulesets // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/list-query-rulesets.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets. type QueryRulesListRulesets func(o ...func(*QueryRulesListRulesetsRequest)) (*Response, error) // QueryRulesListRulesetsRequest configures the Query Rules List Rulesets API request. diff --git a/esapi/api.query_rules.put_rule.go b/esapi/api.query_rules.put_rule.go index 74d4b8c1b6..cf380583cb 100644 --- a/esapi/api.query_rules.put_rule.go +++ b/esapi/api.query_rules.put_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newQueryRulesPutRuleFunc(t Transport) QueryRulesPutRule { // ----- API Definition ------------------------------------------------------- -// QueryRulesPutRule creates or updates a query rule within a ruleset. +// QueryRulesPutRule create or update a query rule // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-query-rule.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-put-rule. type QueryRulesPutRule func(body io.Reader, rule_id string, ruleset_id string, o ...func(*QueryRulesPutRuleRequest)) (*Response, error) // QueryRulesPutRuleRequest configures the Query Rules Put Rule API request. diff --git a/esapi/api.query_rules.put_ruleset.go b/esapi/api.query_rules.put_ruleset.go index 29f53f0e87..7996907e5d 100644 --- a/esapi/api.query_rules.put_ruleset.go +++ b/esapi/api.query_rules.put_ruleset.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newQueryRulesPutRulesetFunc(t Transport) QueryRulesPutRuleset { // ----- API Definition ------------------------------------------------------- -// QueryRulesPutRuleset creates or updates a query ruleset. +// QueryRulesPutRuleset create or update a query ruleset // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-query-ruleset.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-put-ruleset. type QueryRulesPutRuleset func(body io.Reader, ruleset_id string, o ...func(*QueryRulesPutRulesetRequest)) (*Response, error) // QueryRulesPutRulesetRequest configures the Query Rules Put Ruleset API request. diff --git a/esapi/api.query_rules.test.go b/esapi/api.query_rules.test.go index 8d7bf9f284..068e17cf9f 100644 --- a/esapi/api.query_rules.test.go +++ b/esapi/api.query_rules.test.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,9 @@ func newQueryRulesTestFunc(t Transport) QueryRulesTest { // ----- API Definition ------------------------------------------------------- -// QueryRulesTest tests a query ruleset to identify the rules that would match input criteria +// QueryRulesTest test a query ruleset // -// This API is experimental. -// -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/test-query-ruleset.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-test. type QueryRulesTest func(body io.Reader, ruleset_id string, o ...func(*QueryRulesTestRequest)) (*Response, error) // QueryRulesTestRequest configures the Query Rules Test API request. diff --git a/esapi/api.rank_eval.go b/esapi/api.rank_eval.go index 25e99041d6..bf7400b64e 100644 --- a/esapi/api.rank_eval.go +++ b/esapi/api.rank_eval.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newRankEvalFunc(t Transport) RankEval { // ----- API Definition ------------------------------------------------------- -// RankEval allows to evaluate the quality of ranked search results over a set of typical search queries +// RankEval evaluate ranked search results // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rank-eval. type RankEval func(body io.Reader, o ...func(*RankEvalRequest)) (*Response, error) // RankEvalRequest configures the Rank Eval API request. @@ -56,7 +56,7 @@ type RankEvalRequest struct { Body io.Reader AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool SearchType string @@ -109,8 +109,8 @@ func (r RankEvalRequest) Do(providedCtx context.Context, transport Transport) (* params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -221,7 +221,7 @@ func (f RankEval) WithAllowNoIndices(v bool) func(*RankEvalRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f RankEval) WithExpandWildcards(v string) func(*RankEvalRequest) { +func (f RankEval) WithExpandWildcards(v ...string) func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.reindex.go b/esapi/api.reindex.go index ebea311a54..b166edc11c 100644 --- a/esapi/api.reindex.go +++ b/esapi/api.reindex.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -46,11 +46,9 @@ func newReindexFunc(t Transport) Reindex { // ----- API Definition ------------------------------------------------------- -// 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 reindex documents // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex. type Reindex func(body io.Reader, o ...func(*ReindexRequest)) (*Response, error) // ReindexRequest configures the Reindex API request. diff --git a/esapi/api.reindex_rethrottle.go b/esapi/api.reindex_rethrottle.go index db5275f667..392542ef5d 100644 --- a/esapi/api.reindex_rethrottle.go +++ b/esapi/api.reindex_rethrottle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newReindexRethrottleFunc(t Transport) ReindexRethrottle { // ----- API Definition ------------------------------------------------------- -// ReindexRethrottle changes the number of requests per second for a particular Reindex operation. +// ReindexRethrottle throttle a reindex operation // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex. type ReindexRethrottle func(task_id string, requests_per_second *int, o ...func(*ReindexRethrottleRequest)) (*Response, error) // ReindexRethrottleRequest configures the Reindex Rethrottle API request. diff --git a/esapi/api.render_search_template.go b/esapi/api.render_search_template.go index 15a6f4fe32..83d7c5e2b0 100644 --- a/esapi/api.render_search_template.go +++ b/esapi/api.render_search_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -27,8 +27,8 @@ import ( ) func newRenderSearchTemplateFunc(t Transport) RenderSearchTemplate { - return func(o ...func(*RenderSearchTemplateRequest)) (*Response, error) { - var r = RenderSearchTemplateRequest{} + return func(body io.Reader, o ...func(*RenderSearchTemplateRequest)) (*Response, error) { + var r = RenderSearchTemplateRequest{Body: body} for _, f := range o { f(&r) } @@ -43,10 +43,10 @@ func newRenderSearchTemplateFunc(t Transport) RenderSearchTemplate { // ----- API Definition ------------------------------------------------------- -// RenderSearchTemplate allows to use the Mustache language to pre-render a search definition. +// RenderSearchTemplate render a search template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html. -type RenderSearchTemplate func(o ...func(*RenderSearchTemplateRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template. +type RenderSearchTemplate func(body io.Reader, o ...func(*RenderSearchTemplateRequest)) (*Response, error) // RenderSearchTemplateRequest configures the Render Search Template API request. type RenderSearchTemplateRequest struct { @@ -186,13 +186,6 @@ func (f RenderSearchTemplate) WithContext(v context.Context) func(*RenderSearchT } } -// WithBody - The search definition template and its params. -func (f RenderSearchTemplate) WithBody(v io.Reader) func(*RenderSearchTemplateRequest) { - return func(r *RenderSearchTemplateRequest) { - r.Body = v - } -} - // WithTemplateID - the ID of the stored search template. func (f RenderSearchTemplate) WithTemplateID(v string) func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { diff --git a/esapi/api.scripts_painless_execute.go b/esapi/api.scripts_painless_execute.go index aed66e300f..730e87082a 100644 --- a/esapi/api.scripts_painless_execute.go +++ b/esapi/api.scripts_painless_execute.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -27,8 +27,8 @@ import ( ) func newScriptsPainlessExecuteFunc(t Transport) ScriptsPainlessExecute { - return func(o ...func(*ScriptsPainlessExecuteRequest)) (*Response, error) { - var r = ScriptsPainlessExecuteRequest{} + return func(body io.Reader, o ...func(*ScriptsPainlessExecuteRequest)) (*Response, error) { + var r = ScriptsPainlessExecuteRequest{Body: body} for _, f := range o { f(&r) } @@ -43,12 +43,12 @@ func newScriptsPainlessExecuteFunc(t Transport) ScriptsPainlessExecute { // ----- API Definition ------------------------------------------------------- -// ScriptsPainlessExecute allows an arbitrary script to be executed and a result to be returned +// ScriptsPainlessExecute run a script // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html. -type ScriptsPainlessExecute func(o ...func(*ScriptsPainlessExecuteRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/reference/scripting-languages/painless/painless-api-examples. +type ScriptsPainlessExecute func(body io.Reader, o ...func(*ScriptsPainlessExecuteRequest)) (*Response, error) // ScriptsPainlessExecuteRequest configures the Scripts Painless Execute API request. type ScriptsPainlessExecuteRequest struct { @@ -176,13 +176,6 @@ func (f ScriptsPainlessExecute) WithContext(v context.Context) func(*ScriptsPain } } -// WithBody - The script to execute. -func (f ScriptsPainlessExecute) WithBody(v io.Reader) func(*ScriptsPainlessExecuteRequest) { - return func(r *ScriptsPainlessExecuteRequest) { - r.Body = v - } -} - // WithPretty makes the response body pretty-printed. func (f ScriptsPainlessExecute) WithPretty() func(*ScriptsPainlessExecuteRequest) { return func(r *ScriptsPainlessExecuteRequest) { diff --git a/esapi/api.scroll.go b/esapi/api.scroll.go index f13365eaa9..41e395b1cc 100644 --- a/esapi/api.scroll.go +++ b/esapi/api.scroll.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newScrollFunc(t Transport) Scroll { // ----- API Definition ------------------------------------------------------- -// Scroll allows to retrieve a large numbers of results from a single search request. +// Scroll run a scrolling search // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scroll. type Scroll func(o ...func(*ScrollRequest)) (*Response, error) // ScrollRequest configures the Scroll API request. diff --git a/esapi/api.search.go b/esapi/api.search.go index 9d943a4a6f..978d0949dc 100644 --- a/esapi/api.search.go +++ b/esapi/api.search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -46,9 +46,9 @@ func newSearchFunc(t Transport) Search { // ----- API Definition ------------------------------------------------------- -// Search returns results matching a query. +// Search run a search // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search. type Search func(o ...func(*SearchRequest)) (*Response, error) // SearchRequest configures the Search API request. @@ -66,7 +66,7 @@ type SearchRequest struct { DefaultOperator string Df string DocvalueFields []string - ExpandWildcards string + ExpandWildcards []string Explain *bool ForceSyntheticSource *bool From *int @@ -77,6 +77,7 @@ type SearchRequest struct { MaxConcurrentShardRequests *int Preference string PreFilterShardSize *int + ProjectRouting string Query string RequestCache *bool RestTotalHitsAsInt *bool @@ -87,6 +88,7 @@ type SearchRequest struct { Size *int Sort []string Source []string + SourceExcludeVectors *bool SourceExcludes []string SourceIncludes []string Stats []string @@ -183,8 +185,8 @@ func (r SearchRequest) Do(providedCtx context.Context, transport Transport) (*Re params["docvalue_fields"] = strings.Join(r.DocvalueFields, ",") } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Explain != nil { @@ -227,6 +229,10 @@ func (r SearchRequest) Do(providedCtx context.Context, transport Transport) (*Re params["pre_filter_shard_size"] = strconv.FormatInt(int64(*r.PreFilterShardSize), 10) } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.Query != "" { params["q"] = r.Query } @@ -267,6 +273,10 @@ func (r SearchRequest) Do(providedCtx context.Context, transport Transport) (*Re params["_source"] = strings.Join(r.Source, ",") } + if r.SourceExcludeVectors != nil { + params["_source_exclude_vectors"] = strconv.FormatBool(*r.SourceExcludeVectors) + } + if len(r.SourceExcludes) > 0 { params["_source_excludes"] = strings.Join(r.SourceExcludes, ",") } @@ -486,7 +496,7 @@ func (f Search) WithDocvalueFields(v ...string) func(*SearchRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f Search) WithExpandWildcards(v string) func(*SearchRequest) { +func (f Search) WithExpandWildcards(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.ExpandWildcards = v } @@ -555,13 +565,20 @@ func (f Search) WithPreference(v string) func(*SearchRequest) { } } -// WithPreFilterShardSize - a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.. +// WithPreFilterShardSize - a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.. func (f Search) WithPreFilterShardSize(v int) func(*SearchRequest) { return func(r *SearchRequest) { r.PreFilterShardSize = &v } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f Search) WithProjectRouting(v string) func(*SearchRequest) { + return func(r *SearchRequest) { + r.ProjectRouting = v + } +} + // WithQuery - query in the lucene query string syntax. func (f Search) WithQuery(v string) func(*SearchRequest) { return func(r *SearchRequest) { @@ -632,6 +649,13 @@ func (f Search) WithSource(v ...string) func(*SearchRequest) { } } +// WithSourceExcludeVectors - whether vectors should be excluded from _source. +func (f Search) WithSourceExcludeVectors(v bool) func(*SearchRequest) { + return func(r *SearchRequest) { + r.SourceExcludeVectors = &v + } +} + // WithSourceExcludes - a list of fields to exclude from the returned _source field. func (f Search) WithSourceExcludes(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { diff --git a/esapi/api.search_application.delete.go b/esapi/api.search_application.delete.go index 15c58d20c7..b660702737 100644 --- a/esapi/api.search_application.delete.go +++ b/esapi/api.search_application.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newSearchApplicationDeleteFunc(t Transport) SearchApplicationDelete { // ----- API Definition ------------------------------------------------------- -// SearchApplicationDelete deletes a search application. +// SearchApplicationDelete delete a search application // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete. type SearchApplicationDelete func(name string, o ...func(*SearchApplicationDeleteRequest)) (*Response, error) // SearchApplicationDeleteRequest configures the Search Application Delete API request. diff --git a/esapi/api.search_application.delete_behavioral_analytics.go b/esapi/api.search_application.delete_behavioral_analytics.go index c825547e4b..4b05c32ecf 100644 --- a/esapi/api.search_application.delete_behavioral_analytics.go +++ b/esapi/api.search_application.delete_behavioral_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newSearchApplicationDeleteBehavioralAnalyticsFunc(t Transport) SearchApplic // ----- API Definition ------------------------------------------------------- -// SearchApplicationDeleteBehavioralAnalytics delete a behavioral analytics collection. +// SearchApplicationDeleteBehavioralAnalytics delete a behavioral analytics collection // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete-behavioral-analytics. type SearchApplicationDeleteBehavioralAnalytics func(name string, o ...func(*SearchApplicationDeleteBehavioralAnalyticsRequest)) (*Response, error) // SearchApplicationDeleteBehavioralAnalyticsRequest configures the Search Application Delete Behavioral Analytics API request. diff --git a/esapi/api.search_application.get.go b/esapi/api.search_application.get.go index fc2c96c5ab..99143eec77 100644 --- a/esapi/api.search_application.get.go +++ b/esapi/api.search_application.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newSearchApplicationGetFunc(t Transport) SearchApplicationGet { // ----- API Definition ------------------------------------------------------- -// SearchApplicationGet returns the details about a search application. +// SearchApplicationGet get search application details // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get. type SearchApplicationGet func(name string, o ...func(*SearchApplicationGetRequest)) (*Response, error) // SearchApplicationGetRequest configures the Search Application Get API request. diff --git a/esapi/api.search_application.get_behavioral_analytics.go b/esapi/api.search_application.get_behavioral_analytics.go index 0e522025f2..44c2405ad9 100644 --- a/esapi/api.search_application.get_behavioral_analytics.go +++ b/esapi/api.search_application.get_behavioral_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newSearchApplicationGetBehavioralAnalyticsFunc(t Transport) SearchApplicati // ----- API Definition ------------------------------------------------------- -// SearchApplicationGetBehavioralAnalytics returns the existing behavioral analytics collections. +// SearchApplicationGetBehavioralAnalytics get behavioral analytics collections // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics. type SearchApplicationGetBehavioralAnalytics func(o ...func(*SearchApplicationGetBehavioralAnalyticsRequest)) (*Response, error) // SearchApplicationGetBehavioralAnalyticsRequest configures the Search Application Get Behavioral Analytics API request. diff --git a/esapi/api.search_application.list.go b/esapi/api.search_application.list.go index 820bcd1f5f..45362e13b5 100644 --- a/esapi/api.search_application.list.go +++ b/esapi/api.search_application.list.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newSearchApplicationListFunc(t Transport) SearchApplicationList { // ----- API Definition ------------------------------------------------------- -// SearchApplicationList returns the existing search applications. +// SearchApplicationList get search applications // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics. type SearchApplicationList func(o ...func(*SearchApplicationListRequest)) (*Response, error) // SearchApplicationListRequest configures the Search Application List API request. diff --git a/esapi/api.search_application.post_behavioral_analytics_event.go b/esapi/api.search_application.post_behavioral_analytics_event.go index e78491b27d..5cbecdd128 100644 --- a/esapi/api.search_application.post_behavioral_analytics_event.go +++ b/esapi/api.search_application.post_behavioral_analytics_event.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,11 +44,11 @@ func newSearchApplicationPostBehavioralAnalyticsEventFunc(t Transport) SearchApp // ----- API Definition ------------------------------------------------------- -// SearchApplicationPostBehavioralAnalyticsEvent creates a behavioral analytics event for existing collection. +// SearchApplicationPostBehavioralAnalyticsEvent create a behavioral analytics collection event // // This API is experimental. // -// See full documentation at http://todo.com/tbd. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-post-behavioral-analytics-event. type SearchApplicationPostBehavioralAnalyticsEvent func(body io.Reader, collection_name string, event_type string, o ...func(*SearchApplicationPostBehavioralAnalyticsEventRequest)) (*Response, error) // SearchApplicationPostBehavioralAnalyticsEventRequest configures the Search Application Post Behavioral Analytics Event API request. diff --git a/esapi/api.search_application.put.go b/esapi/api.search_application.put.go index a8bedc92f9..c45a6eb047 100644 --- a/esapi/api.search_application.put.go +++ b/esapi/api.search_application.put.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,11 +44,11 @@ func newSearchApplicationPutFunc(t Transport) SearchApplicationPut { // ----- API Definition ------------------------------------------------------- -// SearchApplicationPut creates or updates a search application. +// SearchApplicationPut create or update a search application // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put. type SearchApplicationPut func(name string, body io.Reader, o ...func(*SearchApplicationPutRequest)) (*Response, error) // SearchApplicationPutRequest configures the Search Application Put API request. diff --git a/esapi/api.search_application.put_behavioral_analytics.go b/esapi/api.search_application.put_behavioral_analytics.go index 4db751f7c4..1342f1b843 100644 --- a/esapi/api.search_application.put_behavioral_analytics.go +++ b/esapi/api.search_application.put_behavioral_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newSearchApplicationPutBehavioralAnalyticsFunc(t Transport) SearchApplicati // ----- API Definition ------------------------------------------------------- -// SearchApplicationPutBehavioralAnalytics creates a behavioral analytics collection. +// SearchApplicationPutBehavioralAnalytics create a behavioral analytics collection // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put-behavioral-analytics. type SearchApplicationPutBehavioralAnalytics func(name string, o ...func(*SearchApplicationPutBehavioralAnalyticsRequest)) (*Response, error) // SearchApplicationPutBehavioralAnalyticsRequest configures the Search Application Put Behavioral Analytics API request. diff --git a/esapi/api.search_application.render_query.go b/esapi/api.search_application.render_query.go index 13e6590217..d1b709e58a 100644 --- a/esapi/api.search_application.render_query.go +++ b/esapi/api.search_application.render_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newSearchApplicationRenderQueryFunc(t Transport) SearchApplicationRenderQue // ----- API Definition ------------------------------------------------------- -// SearchApplicationRenderQuery renders a query for given search application search parameters +// SearchApplicationRenderQuery render a search application query // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-render-query.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-render-query. type SearchApplicationRenderQuery func(name string, o ...func(*SearchApplicationRenderQueryRequest)) (*Response, error) // SearchApplicationRenderQueryRequest configures the Search Application Render Query API request. diff --git a/esapi/api.search_application.search.go b/esapi/api.search_application.search.go index 549df9b53d..89d8e9ebf3 100644 --- a/esapi/api.search_application.search.go +++ b/esapi/api.search_application.search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,11 +44,11 @@ func newSearchApplicationSearchFunc(t Transport) SearchApplicationSearch { // ----- API Definition ------------------------------------------------------- -// SearchApplicationSearch perform a search against a search application +// SearchApplicationSearch run a search application search // -// This API is experimental. +// This API is beta. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-search. type SearchApplicationSearch func(name string, o ...func(*SearchApplicationSearchRequest)) (*Response, error) // SearchApplicationSearchRequest configures the Search Application Search API request. diff --git a/esapi/api.search_mvt.go b/esapi/api.search_mvt.go index 84b72dbcbb..fa6421aa09 100644 --- a/esapi/api.search_mvt.go +++ b/esapi/api.search_mvt.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -46,11 +46,9 @@ func newSearchMvtFunc(t Transport) SearchMvt { // ----- API Definition ------------------------------------------------------- -// SearchMvt searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile. +// SearchMvt search a vector tile // -// This API is experimental. -// -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt. type SearchMvt func(index []string, field string, x *int, y *int, zoom *int, o ...func(*SearchMvtRequest)) (*Response, error) // SearchMvtRequest configures the Search Mvt API request. @@ -69,6 +67,7 @@ type SearchMvtRequest struct { GridAgg string GridPrecision *int GridType string + ProjectRouting string Size *int TrackTotalHits interface{} WithLabels *bool @@ -169,6 +168,10 @@ func (r SearchMvtRequest) Do(providedCtx context.Context, transport Transport) ( params["grid_type"] = r.GridType } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.Size != nil { params["size"] = strconv.FormatInt(int64(*r.Size), 10) } @@ -308,6 +311,13 @@ func (f SearchMvt) WithGridType(v string) func(*SearchMvtRequest) { } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f SearchMvt) WithProjectRouting(v string) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.ProjectRouting = v + } +} + // WithSize - maximum number of features to return in the hits layer. accepts 0-10000.. func (f SearchMvt) WithSize(v int) func(*SearchMvtRequest) { return func(r *SearchMvtRequest) { diff --git a/esapi/api.search_shards.go b/esapi/api.search_shards.go index 993021b168..43d1da3ea4 100644 --- a/esapi/api.search_shards.go +++ b/esapi/api.search_shards.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSearchShardsFunc(t Transport) SearchShards { // ----- API Definition ------------------------------------------------------- -// SearchShards returns information about the indices and shards that a search request would be executed against. +// SearchShards get the search shards // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-shards. type SearchShards func(o ...func(*SearchShardsRequest)) (*Response, error) // SearchShardsRequest configures the Search Shards API request. @@ -54,12 +54,12 @@ type SearchShardsRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool Local *bool MasterTimeout time.Duration Preference string - Routing string + Routing []string Pretty bool Human bool @@ -110,8 +110,8 @@ func (r SearchShardsRequest) Do(providedCtx context.Context, transport Transport params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -130,8 +130,8 @@ func (r SearchShardsRequest) Do(providedCtx context.Context, transport Transport params["preference"] = r.Preference } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if r.Pretty { @@ -227,7 +227,7 @@ func (f SearchShards) WithAllowNoIndices(v bool) func(*SearchShardsRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f SearchShards) WithExpandWildcards(v string) func(*SearchShardsRequest) { +func (f SearchShards) WithExpandWildcards(v ...string) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.ExpandWildcards = v } @@ -262,7 +262,7 @@ func (f SearchShards) WithPreference(v string) func(*SearchShardsRequest) { } // WithRouting - specific routing value. -func (f SearchShards) WithRouting(v string) func(*SearchShardsRequest) { +func (f SearchShards) WithRouting(v ...string) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.Routing = v } diff --git a/esapi/api.search_template.go b/esapi/api.search_template.go index 78d8a5857d..6a8a83b411 100644 --- a/esapi/api.search_template.go +++ b/esapi/api.search_template.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newSearchTemplateFunc(t Transport) SearchTemplate { // ----- API Definition ------------------------------------------------------- -// SearchTemplate allows to use the Mustache language to pre-render a search definition. +// SearchTemplate run a search with a search template // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-template. type SearchTemplate func(body io.Reader, o ...func(*SearchTemplateRequest)) (*Response, error) // SearchTemplateRequest configures the Search Template API request. @@ -58,12 +58,13 @@ type SearchTemplateRequest struct { AllowNoIndices *bool CcsMinimizeRoundtrips *bool - ExpandWildcards string + ExpandWildcards []string Explain *bool IgnoreThrottled *bool IgnoreUnavailable *bool Preference string Profile *bool + ProjectRouting string RestTotalHitsAsInt *bool Routing []string Scroll time.Duration @@ -125,8 +126,8 @@ func (r SearchTemplateRequest) Do(providedCtx context.Context, transport Transpo params["ccs_minimize_roundtrips"] = strconv.FormatBool(*r.CcsMinimizeRoundtrips) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Explain != nil { @@ -149,6 +150,10 @@ func (r SearchTemplateRequest) Do(providedCtx context.Context, transport Transpo params["profile"] = strconv.FormatBool(*r.Profile) } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.RestTotalHitsAsInt != nil { params["rest_total_hits_as_int"] = strconv.FormatBool(*r.RestTotalHitsAsInt) } @@ -276,7 +281,7 @@ func (f SearchTemplate) WithCcsMinimizeRoundtrips(v bool) func(*SearchTemplateRe } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f SearchTemplate) WithExpandWildcards(v string) func(*SearchTemplateRequest) { +func (f SearchTemplate) WithExpandWildcards(v ...string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.ExpandWildcards = v } @@ -317,6 +322,13 @@ func (f SearchTemplate) WithProfile(v bool) func(*SearchTemplateRequest) { } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f SearchTemplate) WithProjectRouting(v string) func(*SearchTemplateRequest) { + return func(r *SearchTemplateRequest) { + r.ProjectRouting = v + } +} + // WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response. func (f SearchTemplate) WithRestTotalHitsAsInt(v bool) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { diff --git a/esapi/api.shutdown.delete_node.go b/esapi/api.shutdown.delete_node.go index 3d257910a7..088ac5e1f6 100644 --- a/esapi/api.shutdown.delete_node.go +++ b/esapi/api.shutdown.delete_node.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newShutdownDeleteNodeFunc(t Transport) ShutdownDeleteNode { // ----- API Definition ------------------------------------------------------- -// ShutdownDeleteNode removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. +// ShutdownDeleteNode cancel node shutdown preparations // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-delete-node. type ShutdownDeleteNode func(node_id string, o ...func(*ShutdownDeleteNodeRequest)) (*Response, error) // ShutdownDeleteNodeRequest configures the Shutdown Delete Node API request. diff --git a/esapi/api.shutdown.get_node.go b/esapi/api.shutdown.get_node.go index 63a09d2cb1..3c298607cb 100644 --- a/esapi/api.shutdown.get_node.go +++ b/esapi/api.shutdown.get_node.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,14 +43,14 @@ func newShutdownGetNodeFunc(t Transport) ShutdownGetNode { // ----- API Definition ------------------------------------------------------- -// ShutdownGetNode retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. +// ShutdownGetNode get the shutdown status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-get-node. type ShutdownGetNode func(o ...func(*ShutdownGetNodeRequest)) (*Response, error) // ShutdownGetNodeRequest configures the Shutdown Get Node API request. type ShutdownGetNodeRequest struct { - NodeID string + NodeID []string MasterTimeout time.Duration @@ -85,15 +85,15 @@ func (r ShutdownGetNodeRequest) Do(providedCtx context.Context, transport Transp method = "GET" - path.Grow(7 + 1 + len("_nodes") + 1 + len(r.NodeID) + 1 + len("shutdown")) + path.Grow(7 + 1 + len("_nodes") + 1 + len(strings.Join(r.NodeID, ",")) + 1 + len("shutdown")) path.WriteString("http://") path.WriteString("/") path.WriteString("_nodes") - if r.NodeID != "" { + if len(r.NodeID) > 0 { path.WriteString("/") - path.WriteString(r.NodeID) + path.WriteString(strings.Join(r.NodeID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "node_id", r.NodeID) + instrument.RecordPathPart(ctx, "node_id", strings.Join(r.NodeID, ",")) } } path.WriteString("/") @@ -183,8 +183,8 @@ func (f ShutdownGetNode) WithContext(v context.Context) func(*ShutdownGetNodeReq } } -// WithNodeID - which node for which to retrieve the shutdown status. -func (f ShutdownGetNode) WithNodeID(v string) func(*ShutdownGetNodeRequest) { +// WithNodeID - comma-separated list of nodes for which to retrieve the shutdown status. +func (f ShutdownGetNode) WithNodeID(v ...string) func(*ShutdownGetNodeRequest) { return func(r *ShutdownGetNodeRequest) { r.NodeID = v } diff --git a/esapi/api.shutdown.put_node.go b/esapi/api.shutdown.put_node.go index b32f9fd1e4..8fa89aa8df 100644 --- a/esapi/api.shutdown.put_node.go +++ b/esapi/api.shutdown.put_node.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newShutdownPutNodeFunc(t Transport) ShutdownPutNode { // ----- API Definition ------------------------------------------------------- -// ShutdownPutNode adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. +// ShutdownPutNode prepare a node to be shut down // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-put-node. type ShutdownPutNode func(body io.Reader, node_id string, o ...func(*ShutdownPutNodeRequest)) (*Response, error) // ShutdownPutNodeRequest configures the Shutdown Put Node API request. diff --git a/esapi/api.simulate.ingest.go b/esapi/api.simulate.ingest.go index 4835d0f0de..1d6ffbe17f 100644 --- a/esapi/api.simulate.ingest.go +++ b/esapi/api.simulate.ingest.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newSimulateIngestFunc(t Transport) SimulateIngest { // ----- API Definition ------------------------------------------------------- -// SimulateIngest simulates running ingest with example documents. +// SimulateIngest simulate data ingestion // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-ingest-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-simulate-ingest. type SimulateIngest func(body io.Reader, o ...func(*SimulateIngestRequest)) (*Response, error) // SimulateIngestRequest configures the Simulate Ingest API request. @@ -56,7 +56,8 @@ type SimulateIngestRequest struct { Body io.Reader - Pipeline string + MergeType string + Pipeline string Pretty bool Human bool @@ -105,6 +106,10 @@ func (r SimulateIngestRequest) Do(providedCtx context.Context, transport Transpo params = make(map[string]string) + if r.MergeType != "" { + params["merge_type"] = r.MergeType + } + if r.Pipeline != "" { params["pipeline"] = r.Pipeline } @@ -201,6 +206,13 @@ func (f SimulateIngest) WithIndex(v string) func(*SimulateIngestRequest) { } } +// WithMergeType - the mapping merge type if mapping overrides are being provided in mapping_addition.the allowed values are one of index or template.the index option merges mappings the way they would be merged into an existing index.the template option merges mappings the way they would be merged into a template.. +func (f SimulateIngest) WithMergeType(v string) func(*SimulateIngestRequest) { + return func(r *SimulateIngestRequest) { + r.MergeType = v + } +} + // WithPipeline - the pipeline ID to preprocess incoming documents with if no pipeline is given for a particular document. func (f SimulateIngest) WithPipeline(v string) func(*SimulateIngestRequest) { return func(r *SimulateIngestRequest) { diff --git a/esapi/api.snapshot.cleanup_repository.go b/esapi/api.snapshot.cleanup_repository.go index b842939970..de41798e90 100644 --- a/esapi/api.snapshot.cleanup_repository.go +++ b/esapi/api.snapshot.cleanup_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSnapshotCleanupRepositoryFunc(t Transport) SnapshotCleanupRepository { // ----- API Definition ------------------------------------------------------- -// SnapshotCleanupRepository removes stale data from repository. +// SnapshotCleanupRepository clean up the snapshot repository // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-cleanup-repository. type SnapshotCleanupRepository func(repository string, o ...func(*SnapshotCleanupRepositoryRequest)) (*Response, error) // SnapshotCleanupRepositoryRequest configures the Snapshot Cleanup Repository API request. diff --git a/esapi/api.snapshot.clone.go b/esapi/api.snapshot.clone.go index 905ac1622b..8603e174e2 100644 --- a/esapi/api.snapshot.clone.go +++ b/esapi/api.snapshot.clone.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSnapshotCloneFunc(t Transport) SnapshotClone { // ----- API Definition ------------------------------------------------------- -// SnapshotClone clones indices from one snapshot into another snapshot in the same repository. +// SnapshotClone clone a snapshot // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-clone. type SnapshotClone func(repository string, snapshot string, body io.Reader, target_snapshot string, o ...func(*SnapshotCloneRequest)) (*Response, error) // SnapshotCloneRequest configures the Snapshot Clone API request. diff --git a/esapi/api.snapshot.create.go b/esapi/api.snapshot.create.go index 32a8f93178..a5fe89f976 100644 --- a/esapi/api.snapshot.create.go +++ b/esapi/api.snapshot.create.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newSnapshotCreateFunc(t Transport) SnapshotCreate { // ----- API Definition ------------------------------------------------------- -// SnapshotCreate creates a snapshot in a repository. +// SnapshotCreate create a snapshot // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create. type SnapshotCreate func(repository string, snapshot string, o ...func(*SnapshotCreateRequest)) (*Response, error) // SnapshotCreateRequest configures the Snapshot Create API request. diff --git a/esapi/api.snapshot.create_repository.go b/esapi/api.snapshot.create_repository.go index 38f89b06e9..66624293b3 100644 --- a/esapi/api.snapshot.create_repository.go +++ b/esapi/api.snapshot.create_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newSnapshotCreateRepositoryFunc(t Transport) SnapshotCreateRepository { // ----- API Definition ------------------------------------------------------- -// SnapshotCreateRepository creates a repository. +// SnapshotCreateRepository create or update a snapshot repository // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create-repository. type SnapshotCreateRepository func(repository string, body io.Reader, o ...func(*SnapshotCreateRepositoryRequest)) (*Response, error) // SnapshotCreateRepositoryRequest configures the Snapshot Create Repository API request. diff --git a/esapi/api.snapshot.delete.go b/esapi/api.snapshot.delete.go index 78a1374d05..7ec1e98526 100644 --- a/esapi/api.snapshot.delete.go +++ b/esapi/api.snapshot.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newSnapshotDeleteFunc(t Transport) SnapshotDelete { // ----- API Definition ------------------------------------------------------- -// SnapshotDelete deletes one or more snapshots. +// SnapshotDelete delete snapshots // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete. type SnapshotDelete func(repository string, snapshot []string, o ...func(*SnapshotDeleteRequest)) (*Response, error) // SnapshotDeleteRequest configures the Snapshot Delete API request. diff --git a/esapi/api.snapshot.delete_repository.go b/esapi/api.snapshot.delete_repository.go index a886af9867..571afefbf1 100644 --- a/esapi/api.snapshot.delete_repository.go +++ b/esapi/api.snapshot.delete_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSnapshotDeleteRepositoryFunc(t Transport) SnapshotDeleteRepository { // ----- API Definition ------------------------------------------------------- -// SnapshotDeleteRepository deletes a repository. +// SnapshotDeleteRepository delete snapshot repositories // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete-repository. type SnapshotDeleteRepository func(repository []string, o ...func(*SnapshotDeleteRepositoryRequest)) (*Response, error) // SnapshotDeleteRepositoryRequest configures the Snapshot Delete Repository API request. diff --git a/esapi/api.snapshot.get.go b/esapi/api.snapshot.get.go index 0a66843fd3..2c89b6e3d4 100644 --- a/esapi/api.snapshot.get.go +++ b/esapi/api.snapshot.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newSnapshotGetFunc(t Transport) SnapshotGet { // ----- API Definition ------------------------------------------------------- -// SnapshotGet returns information about a snapshot. +// SnapshotGet get snapshot information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get. type SnapshotGet func(repository string, snapshot []string, o ...func(*SnapshotGetRequest)) (*Response, error) // SnapshotGetRequest configures the Snapshot Get API request. diff --git a/esapi/api.snapshot.get_repository.go b/esapi/api.snapshot.get_repository.go index 282c1b722c..242c5de14a 100644 --- a/esapi/api.snapshot.get_repository.go +++ b/esapi/api.snapshot.get_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSnapshotGetRepositoryFunc(t Transport) SnapshotGetRepository { // ----- API Definition ------------------------------------------------------- -// SnapshotGetRepository returns information about a repository. +// SnapshotGetRepository get snapshot repository information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get-repository. type SnapshotGetRepository func(o ...func(*SnapshotGetRepositoryRequest)) (*Response, error) // SnapshotGetRepositoryRequest configures the Snapshot Get Repository API request. diff --git a/esapi/api.snapshot.repository_analyze.go b/esapi/api.snapshot.repository_analyze.go index 672c0bb8d9..3a41c91cef 100644 --- a/esapi/api.snapshot.repository_analyze.go +++ b/esapi/api.snapshot.repository_analyze.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "fmt" "net/http" "strconv" "strings" @@ -44,9 +45,9 @@ func newSnapshotRepositoryAnalyzeFunc(t Transport) SnapshotRepositoryAnalyze { // ----- API Definition ------------------------------------------------------- -// SnapshotRepositoryAnalyze analyzes a repository for correctness and performance +// SnapshotRepositoryAnalyze analyze a snapshot repository // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-analyze. type SnapshotRepositoryAnalyze func(repository string, o ...func(*SnapshotRepositoryAnalyzeRequest)) (*Response, error) // SnapshotRepositoryAnalyzeRequest configures the Snapshot Repository Analyze API request. @@ -59,7 +60,7 @@ type SnapshotRepositoryAnalyzeRequest struct { EarlyReadNodeCount *int MaxBlobSize string MaxTotalDataSize string - RareActionProbability *int + RareActionProbability interface{} RarelyAbortWrites *bool ReadNodeCount *int RegisterOperationCount *int @@ -136,7 +137,7 @@ func (r SnapshotRepositoryAnalyzeRequest) Do(providedCtx context.Context, transp } if r.RareActionProbability != nil { - params["rare_action_probability"] = strconv.FormatInt(int64(*r.RareActionProbability), 10) + params["rare_action_probability"] = fmt.Sprintf("%v", r.RareActionProbability) } if r.RarelyAbortWrites != nil { @@ -280,9 +281,9 @@ func (f SnapshotRepositoryAnalyze) WithMaxTotalDataSize(v string) func(*Snapshot } // WithRareActionProbability - probability of taking a rare action such as an early read or an overwrite. defaults to 0.02.. -func (f SnapshotRepositoryAnalyze) WithRareActionProbability(v int) func(*SnapshotRepositoryAnalyzeRequest) { +func (f SnapshotRepositoryAnalyze) WithRareActionProbability(v interface{}) func(*SnapshotRepositoryAnalyzeRequest) { return func(r *SnapshotRepositoryAnalyzeRequest) { - r.RareActionProbability = &v + r.RareActionProbability = v } } diff --git a/esapi/api.snapshot.repository_verify_integrity.go b/esapi/api.snapshot.repository_verify_integrity.go index 815e82a864..7b01392617 100644 --- a/esapi/api.snapshot.repository_verify_integrity.go +++ b/esapi/api.snapshot.repository_verify_integrity.go @@ -15,19 +15,20 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strconv" "strings" ) func newSnapshotRepositoryVerifyIntegrityFunc(t Transport) SnapshotRepositoryVerifyIntegrity { - return func(repository string, o ...func(*SnapshotRepositoryVerifyIntegrityRequest)) (*Response, error) { + return func(repository []string, o ...func(*SnapshotRepositoryVerifyIntegrityRequest)) (*Response, error) { var r = SnapshotRepositoryVerifyIntegrityRequest{Repository: repository} for _, f := range o { f(&r) @@ -43,16 +44,16 @@ func newSnapshotRepositoryVerifyIntegrityFunc(t Transport) SnapshotRepositoryVer // ----- API Definition ------------------------------------------------------- -// SnapshotRepositoryVerifyIntegrity verifies the integrity of the contents of a snapshot repository +// SnapshotRepositoryVerifyIntegrity verify the repository integrity // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. -type SnapshotRepositoryVerifyIntegrity func(repository string, o ...func(*SnapshotRepositoryVerifyIntegrityRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-verify-integrity. +type SnapshotRepositoryVerifyIntegrity func(repository []string, o ...func(*SnapshotRepositoryVerifyIntegrityRequest)) (*Response, error) // SnapshotRepositoryVerifyIntegrityRequest configures the Snapshot Repository Verify Integrity API request. type SnapshotRepositoryVerifyIntegrityRequest struct { - Repository string + Repository []string BlobThreadPoolConcurrency *int IndexSnapshotVerificationConcurrency *int @@ -94,14 +95,18 @@ func (r SnapshotRepositoryVerifyIntegrityRequest) Do(providedCtx context.Context method = "POST" - path.Grow(7 + 1 + len("_snapshot") + 1 + len(r.Repository) + 1 + len("_verify_integrity")) + if len(r.Repository) == 0 { + return nil, errors.New("repository is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_snapshot") + 1 + len(strings.Join(r.Repository, ",")) + 1 + len("_verify_integrity")) path.WriteString("http://") path.WriteString("/") path.WriteString("_snapshot") path.WriteString("/") - path.WriteString(r.Repository) + path.WriteString(strings.Join(r.Repository, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "repository", r.Repository) + instrument.RecordPathPart(ctx, "repository", strings.Join(r.Repository, ",")) } path.WriteString("/") path.WriteString("_verify_integrity") diff --git a/esapi/api.snapshot.restore.go b/esapi/api.snapshot.restore.go index fef2df59d8..fcd076f01f 100644 --- a/esapi/api.snapshot.restore.go +++ b/esapi/api.snapshot.restore.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newSnapshotRestoreFunc(t Transport) SnapshotRestore { // ----- API Definition ------------------------------------------------------- -// SnapshotRestore restores a snapshot. +// SnapshotRestore restore a snapshot // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore. type SnapshotRestore func(repository string, snapshot string, o ...func(*SnapshotRestoreRequest)) (*Response, error) // SnapshotRestoreRequest configures the Snapshot Restore API request. diff --git a/esapi/api.snapshot.status.go b/esapi/api.snapshot.status.go index 8e1ea3aa16..ae4f3db22b 100644 --- a/esapi/api.snapshot.status.go +++ b/esapi/api.snapshot.status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSnapshotStatusFunc(t Transport) SnapshotStatus { // ----- API Definition ------------------------------------------------------- -// SnapshotStatus returns information about the status of a snapshot. +// SnapshotStatus get the snapshot status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-status. type SnapshotStatus func(o ...func(*SnapshotStatusRequest)) (*Response, error) // SnapshotStatusRequest configures the Snapshot Status API request. diff --git a/esapi/api.snapshot.verify_repository.go b/esapi/api.snapshot.verify_repository.go index cbe1dbdd42..dd6dc23f81 100644 --- a/esapi/api.snapshot.verify_repository.go +++ b/esapi/api.snapshot.verify_repository.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSnapshotVerifyRepositoryFunc(t Transport) SnapshotVerifyRepository { // ----- API Definition ------------------------------------------------------- -// SnapshotVerifyRepository verifies a repository. +// SnapshotVerifyRepository verify a snapshot repository // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository. type SnapshotVerifyRepository func(repository string, o ...func(*SnapshotVerifyRepositoryRequest)) (*Response, error) // SnapshotVerifyRepositoryRequest configures the Snapshot Verify Repository API request. diff --git a/esapi/api.streams.logs_disable.go b/esapi/api.streams.logs_disable.go index e7e91da47a..dad1b9d04d 100644 --- a/esapi/api.streams.logs_disable.go +++ b/esapi/api.streams.logs_disable.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,7 +45,9 @@ func newStreamsLogsDisableFunc(t Transport) StreamsLogsDisable { // StreamsLogsDisable disable the Logs Streams feature for this cluster // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-disable.html. +// This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. type StreamsLogsDisable func(o ...func(*StreamsLogsDisableRequest)) (*Response, error) // StreamsLogsDisableRequest configures the Streams Logs Disable API request. diff --git a/esapi/api.streams.logs_enable.go b/esapi/api.streams.logs_enable.go index b883b0ba3b..31e85e19b5 100644 --- a/esapi/api.streams.logs_enable.go +++ b/esapi/api.streams.logs_enable.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,7 +45,9 @@ func newStreamsLogsEnableFunc(t Transport) StreamsLogsEnable { // StreamsLogsEnable enable the Logs Streams feature for this cluster // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-enable.html. +// This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. type StreamsLogsEnable func(o ...func(*StreamsLogsEnableRequest)) (*Response, error) // StreamsLogsEnableRequest configures the Streams Logs Enable API request. diff --git a/esapi/api.streams.status.go b/esapi/api.streams.status.go index 91ddf87a9f..0ee534ff34 100644 --- a/esapi/api.streams.status.go +++ b/esapi/api.streams.status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,12 +45,14 @@ func newStreamsStatusFunc(t Transport) StreamsStatus { // StreamsStatus return the current status of the streams feature for each streams type // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-status.html. +// This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch#TODO. type StreamsStatus func(o ...func(*StreamsStatusRequest)) (*Response, error) // StreamsStatusRequest configures the Streams Status API request. type StreamsStatusRequest struct { - MaterTimeout time.Duration + MasterTimeout time.Duration Pretty bool Human bool @@ -89,8 +91,8 @@ func (r StreamsStatusRequest) Do(providedCtx context.Context, transport Transpor params = make(map[string]string) - if r.MaterTimeout != 0 { - params["mater_timeout"] = formatDuration(r.MaterTimeout) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) } if r.Pretty { @@ -171,10 +173,10 @@ func (f StreamsStatus) WithContext(v context.Context) func(*StreamsStatusRequest } } -// WithMaterTimeout - period to wait for a response. if no response is received before the timeout expires, the request fails and returns an error.. -func (f StreamsStatus) WithMaterTimeout(v time.Duration) func(*StreamsStatusRequest) { +// WithMasterTimeout - period to wait for a response. if no response is received before the timeout expires, the request fails and returns an error.. +func (f StreamsStatus) WithMasterTimeout(v time.Duration) func(*StreamsStatusRequest) { return func(r *StreamsStatusRequest) { - r.MaterTimeout = v + r.MasterTimeout = v } } diff --git a/esapi/api.synonyms.delete_synonym.go b/esapi/api.synonyms.delete_synonym.go index 9f4ba9ef88..d4fe47cb9c 100644 --- a/esapi/api.synonyms.delete_synonym.go +++ b/esapi/api.synonyms.delete_synonym.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSynonymsDeleteSynonymFunc(t Transport) SynonymsDeleteSynonym { // ----- API Definition ------------------------------------------------------- -// SynonymsDeleteSynonym deletes a synonym set +// SynonymsDeleteSynonym delete a synonym set // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonyms-set.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym. type SynonymsDeleteSynonym func(id string, o ...func(*SynonymsDeleteSynonymRequest)) (*Response, error) // SynonymsDeleteSynonymRequest configures the Synonyms Delete Synonym API request. diff --git a/esapi/api.synonyms.delete_synonym_rule.go b/esapi/api.synonyms.delete_synonym_rule.go index b2c79cd9cf..3d3314f08f 100644 --- a/esapi/api.synonyms.delete_synonym_rule.go +++ b/esapi/api.synonyms.delete_synonym_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSynonymsDeleteSynonymRuleFunc(t Transport) SynonymsDeleteSynonymRule { // ----- API Definition ------------------------------------------------------- -// SynonymsDeleteSynonymRule deletes a synonym rule in a synonym set +// SynonymsDeleteSynonymRule delete a synonym rule // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonym-rule.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule. type SynonymsDeleteSynonymRule func(rule_id string, set_id string, o ...func(*SynonymsDeleteSynonymRuleRequest)) (*Response, error) // SynonymsDeleteSynonymRuleRequest configures the Synonyms Delete Synonym Rule API request. diff --git a/esapi/api.synonyms.get_synonym.go b/esapi/api.synonyms.get_synonym.go index e180aff552..e7a99e6c79 100644 --- a/esapi/api.synonyms.get_synonym.go +++ b/esapi/api.synonyms.get_synonym.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSynonymsGetSynonymFunc(t Transport) SynonymsGetSynonym { // ----- API Definition ------------------------------------------------------- -// SynonymsGetSynonym retrieves a synonym set +// SynonymsGetSynonym get a synonym set // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonyms-set.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym. type SynonymsGetSynonym func(id string, o ...func(*SynonymsGetSynonymRequest)) (*Response, error) // SynonymsGetSynonymRequest configures the Synonyms Get Synonym API request. diff --git a/esapi/api.synonyms.get_synonym_rule.go b/esapi/api.synonyms.get_synonym_rule.go index 28807bc925..60bbc14da2 100644 --- a/esapi/api.synonyms.get_synonym_rule.go +++ b/esapi/api.synonyms.get_synonym_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSynonymsGetSynonymRuleFunc(t Transport) SynonymsGetSynonymRule { // ----- API Definition ------------------------------------------------------- -// SynonymsGetSynonymRule retrieves a synonym rule from a synonym set +// SynonymsGetSynonymRule get a synonym rule // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonym-rule.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule. type SynonymsGetSynonymRule func(rule_id string, set_id string, o ...func(*SynonymsGetSynonymRuleRequest)) (*Response, error) // SynonymsGetSynonymRuleRequest configures the Synonyms Get Synonym Rule API request. diff --git a/esapi/api.synonyms.get_synonyms_sets.go b/esapi/api.synonyms.get_synonyms_sets.go index b90a153754..47b33626eb 100644 --- a/esapi/api.synonyms.get_synonyms_sets.go +++ b/esapi/api.synonyms.get_synonyms_sets.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSynonymsGetSynonymsSetsFunc(t Transport) SynonymsGetSynonymsSets { // ----- API Definition ------------------------------------------------------- -// SynonymsGetSynonymsSets retrieves a summary of all defined synonym sets +// SynonymsGetSynonymsSets get all synonym sets // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/list-synonyms-sets.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym. type SynonymsGetSynonymsSets func(o ...func(*SynonymsGetSynonymsSetsRequest)) (*Response, error) // SynonymsGetSynonymsSetsRequest configures the Synonyms Get Synonyms Sets API request. diff --git a/esapi/api.synonyms.put_synonym.go b/esapi/api.synonyms.put_synonym.go index 00bf711b14..b6454e5d8e 100644 --- a/esapi/api.synonyms.put_synonym.go +++ b/esapi/api.synonyms.put_synonym.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSynonymsPutSynonymFunc(t Transport) SynonymsPutSynonym { // ----- API Definition ------------------------------------------------------- -// SynonymsPutSynonym creates or updates a synonyms set +// SynonymsPutSynonym create or update a synonym set // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonyms-set.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym. type SynonymsPutSynonym func(id string, body io.Reader, o ...func(*SynonymsPutSynonymRequest)) (*Response, error) // SynonymsPutSynonymRequest configures the Synonyms Put Synonym API request. diff --git a/esapi/api.synonyms.put_synonym_rule.go b/esapi/api.synonyms.put_synonym_rule.go index eb28efc524..d954ccca15 100644 --- a/esapi/api.synonyms.put_synonym_rule.go +++ b/esapi/api.synonyms.put_synonym_rule.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSynonymsPutSynonymRuleFunc(t Transport) SynonymsPutSynonymRule { // ----- API Definition ------------------------------------------------------- -// SynonymsPutSynonymRule creates or updates a synonym rule in a synonym set +// SynonymsPutSynonymRule create or update a synonym rule // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonym-rule.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym-rule. type SynonymsPutSynonymRule func(body io.Reader, rule_id string, set_id string, o ...func(*SynonymsPutSynonymRuleRequest)) (*Response, error) // SynonymsPutSynonymRuleRequest configures the Synonyms Put Synonym Rule API request. diff --git a/esapi/api.tasks.cancel.go b/esapi/api.tasks.cancel.go index ab08e54565..62b9119871 100644 --- a/esapi/api.tasks.cancel.go +++ b/esapi/api.tasks.cancel.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newTasksCancelFunc(t Transport) TasksCancel { // ----- API Definition ------------------------------------------------------- -// TasksCancel cancels a task, if it can be cancelled through an API. +// TasksCancel cancel a task // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks. type TasksCancel func(o ...func(*TasksCancelRequest)) (*Response, error) // TasksCancelRequest configures the Tasks Cancel API request. diff --git a/esapi/api.tasks.get.go b/esapi/api.tasks.get.go index f75bb13a3e..d585a983e3 100644 --- a/esapi/api.tasks.get.go +++ b/esapi/api.tasks.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,11 +44,11 @@ func newTasksGetFunc(t Transport) TasksGet { // ----- API Definition ------------------------------------------------------- -// TasksGet returns information about a task. +// TasksGet get task information // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks. type TasksGet func(task_id string, o ...func(*TasksGetRequest)) (*Response, error) // TasksGetRequest configures the Tasks Get API request. diff --git a/esapi/api.tasks.list.go b/esapi/api.tasks.list.go index 87d367586a..548601c665 100644 --- a/esapi/api.tasks.list.go +++ b/esapi/api.tasks.list.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,11 +44,11 @@ func newTasksListFunc(t Transport) TasksList { // ----- API Definition ------------------------------------------------------- -// TasksList returns a list of tasks. +// TasksList get all tasks // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks. type TasksList func(o ...func(*TasksListRequest)) (*Response, error) // TasksListRequest configures the Tasks List API request. diff --git a/esapi/api.terms_enum.go b/esapi/api.terms_enum.go index b3c9ebc87d..8bd43ae32d 100644 --- a/esapi/api.terms_enum.go +++ b/esapi/api.terms_enum.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -28,8 +28,8 @@ import ( ) func newTermsEnumFunc(t Transport) TermsEnum { - return func(index []string, o ...func(*TermsEnumRequest)) (*Response, error) { - var r = TermsEnumRequest{Index: index} + return func(index []string, body io.Reader, o ...func(*TermsEnumRequest)) (*Response, error) { + var r = TermsEnumRequest{Index: index, Body: body} for _, f := range o { f(&r) } @@ -44,10 +44,10 @@ func newTermsEnumFunc(t Transport) TermsEnum { // ----- API Definition ------------------------------------------------------- -// TermsEnum the terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios. +// TermsEnum get terms in an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html. -type TermsEnum func(index []string, o ...func(*TermsEnumRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-terms-enum. +type TermsEnum func(index []string, body io.Reader, o ...func(*TermsEnumRequest)) (*Response, error) // TermsEnumRequest configures the Terms Enum API request. type TermsEnumRequest struct { @@ -187,13 +187,6 @@ func (f TermsEnum) WithContext(v context.Context) func(*TermsEnumRequest) { } } -// WithBody - field name, string which is the prefix expected in matching terms, timeout and size for max number of results. -func (f TermsEnum) WithBody(v io.Reader) func(*TermsEnumRequest) { - return func(r *TermsEnumRequest) { - r.Body = v - } -} - // WithPretty makes the response body pretty-printed. func (f TermsEnum) WithPretty() func(*TermsEnumRequest) { return func(r *TermsEnumRequest) { diff --git a/esapi/api.termvectors.go b/esapi/api.termvectors.go index 0bf9263197..9e07a8aed1 100644 --- a/esapi/api.termvectors.go +++ b/esapi/api.termvectors.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newTermvectorsFunc(t Transport) Termvectors { // ----- API Definition ------------------------------------------------------- -// Termvectors returns information and statistics about terms in the fields of a particular document. +// Termvectors get term vector information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-termvectors. type Termvectors func(index string, o ...func(*TermvectorsRequest)) (*Response, error) // TermvectorsRequest configures the Termvectors API request. @@ -63,7 +63,7 @@ type TermvectorsRequest struct { Positions *bool Preference string Realtime *bool - Routing string + Routing []string TermStatistics *bool Version *int VersionType string @@ -146,8 +146,8 @@ func (r TermvectorsRequest) Do(providedCtx context.Context, transport Transport) params["realtime"] = strconv.FormatBool(*r.Realtime) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if r.TermStatistics != nil { @@ -311,7 +311,7 @@ func (f Termvectors) WithRealtime(v bool) func(*TermvectorsRequest) { } // WithRouting - specific routing value.. -func (f Termvectors) WithRouting(v string) func(*TermvectorsRequest) { +func (f Termvectors) WithRouting(v ...string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Routing = v } diff --git a/esapi/api.update.go b/esapi/api.update.go index 3adf1df184..a3d4d2b420 100644 --- a/esapi/api.update.go +++ b/esapi/api.update.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newUpdateFunc(t Transport) Update { // ----- API Definition ------------------------------------------------------- -// Update updates a document with a script or partial document. +// Update update a document // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update. type Update func(index string, id string, body io.Reader, o ...func(*UpdateRequest)) (*Response, error) // UpdateRequest configures the Update API request. @@ -64,7 +64,7 @@ type UpdateRequest struct { Refresh string RequireAlias *bool RetryOnConflict *int - Routing string + Routing []string Source []string SourceExcludes []string SourceIncludes []string @@ -147,8 +147,8 @@ func (r UpdateRequest) Do(providedCtx context.Context, transport Transport) (*Re params["retry_on_conflict"] = strconv.FormatInt(int64(*r.RetryOnConflict), 10) } - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if len(r.Source) > 0 { @@ -306,7 +306,7 @@ func (f Update) WithRetryOnConflict(v int) func(*UpdateRequest) { } // WithRouting - specific routing value. -func (f Update) WithRouting(v string) func(*UpdateRequest) { +func (f Update) WithRouting(v ...string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.Routing = v } diff --git a/esapi/api.update_by_query.go b/esapi/api.update_by_query.go index c61b42c8a3..a4634eea37 100644 --- a/esapi/api.update_by_query.go +++ b/esapi/api.update_by_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -47,10 +47,9 @@ func newUpdateByQueryFunc(t Transport) UpdateByQuery { // ----- API Definition ------------------------------------------------------- -// UpdateByQuery performs an update on every document in the index without changing the source, -// for example to pick up a mapping change. +// UpdateByQuery update documents // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query. type UpdateByQuery func(index []string, o ...func(*UpdateByQueryRequest)) (*Response, error) // UpdateByQueryRequest configures the Update By Query API request. @@ -65,7 +64,7 @@ type UpdateByQueryRequest struct { Conflicts string DefaultOperator string Df string - ExpandWildcards string + ExpandWildcards []string From *int IgnoreUnavailable *bool Lenient *bool @@ -162,8 +161,8 @@ func (r UpdateByQueryRequest) Do(providedCtx context.Context, transport Transpor params["df"] = r.Df } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.From != nil { @@ -397,7 +396,7 @@ func (f UpdateByQuery) WithDf(v string) func(*UpdateByQueryRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f UpdateByQuery) WithExpandWildcards(v string) func(*UpdateByQueryRequest) { +func (f UpdateByQuery) WithExpandWildcards(v ...string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.update_by_query_rethrottle.go b/esapi/api.update_by_query_rethrottle.go index 299d0e13c6..d68b78db0e 100644 --- a/esapi/api.update_by_query_rethrottle.go +++ b/esapi/api.update_by_query_rethrottle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newUpdateByQueryRethrottleFunc(t Transport) UpdateByQueryRethrottle { // ----- API Definition ------------------------------------------------------- -// UpdateByQueryRethrottle changes the number of requests per second for a particular Update By Query operation. +// UpdateByQueryRethrottle throttle an update by query operation // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query-rethrottle. type UpdateByQueryRethrottle func(task_id string, requests_per_second *int, o ...func(*UpdateByQueryRethrottleRequest)) (*Response, error) // UpdateByQueryRethrottleRequest configures the Update By Query Rethrottle API request. diff --git a/esapi/api.xpack.async_search.delete.go b/esapi/api.xpack.async_search.delete.go index 362e9a5124..8f9973bf3f 100644 --- a/esapi/api.xpack.async_search.delete.go +++ b/esapi/api.xpack.async_search.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newAsyncSearchDeleteFunc(t Transport) AsyncSearchDelete { // ----- API Definition ------------------------------------------------------- -// AsyncSearchDelete - Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. +// AsyncSearchDelete - Delete an async search // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit. type AsyncSearchDelete func(id string, o ...func(*AsyncSearchDeleteRequest)) (*Response, error) // AsyncSearchDeleteRequest configures the Async Search Delete API request. diff --git a/esapi/api.xpack.async_search.get.go b/esapi/api.xpack.async_search.get.go index 0c28944e4f..4a58ce8af0 100644 --- a/esapi/api.xpack.async_search.get.go +++ b/esapi/api.xpack.async_search.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newAsyncSearchGetFunc(t Transport) AsyncSearchGet { // ----- API Definition ------------------------------------------------------- -// AsyncSearchGet - Retrieves the results of a previously submitted async search request given its ID. +// AsyncSearchGet - Get async search results // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit. type AsyncSearchGet func(id string, o ...func(*AsyncSearchGetRequest)) (*Response, error) // AsyncSearchGetRequest configures the Async Search Get API request. diff --git a/esapi/api.xpack.async_search.status.go b/esapi/api.xpack.async_search.status.go index 964a4d7069..77184ef766 100644 --- a/esapi/api.xpack.async_search.status.go +++ b/esapi/api.xpack.async_search.status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newAsyncSearchStatusFunc(t Transport) AsyncSearchStatus { // ----- API Definition ------------------------------------------------------- -// AsyncSearchStatus - Retrieves the status of a previously submitted async search request given its ID. +// AsyncSearchStatus - Get the async search status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit. type AsyncSearchStatus func(id string, o ...func(*AsyncSearchStatusRequest)) (*Response, error) // AsyncSearchStatusRequest configures the Async Search Status API request. diff --git a/esapi/api.xpack.async_search.submit.go b/esapi/api.xpack.async_search.submit.go index 5efc99c4ad..02124b5704 100644 --- a/esapi/api.xpack.async_search.submit.go +++ b/esapi/api.xpack.async_search.submit.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -46,9 +46,9 @@ func newAsyncSearchSubmitFunc(t Transport) AsyncSearchSubmit { // ----- API Definition ------------------------------------------------------- -// AsyncSearchSubmit - Executes a search request asynchronously. +// AsyncSearchSubmit - Run an async search // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit. type AsyncSearchSubmit func(o ...func(*AsyncSearchSubmitRequest)) (*Response, error) // AsyncSearchSubmitRequest configures the Async Search Submit API request. @@ -66,7 +66,7 @@ type AsyncSearchSubmitRequest struct { DefaultOperator string Df string DocvalueFields []string - ExpandWildcards string + ExpandWildcards []string Explain *bool From *int IgnoreThrottled *bool @@ -76,6 +76,7 @@ type AsyncSearchSubmitRequest struct { Lenient *bool MaxConcurrentShardRequests *int Preference string + ProjectRouting string Query string RequestCache *bool RestTotalHitsAsInt *bool @@ -182,8 +183,8 @@ func (r AsyncSearchSubmitRequest) Do(providedCtx context.Context, transport Tran params["docvalue_fields"] = strings.Join(r.DocvalueFields, ",") } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.Explain != nil { @@ -222,6 +223,10 @@ func (r AsyncSearchSubmitRequest) Do(providedCtx context.Context, transport Tran params["preference"] = r.Preference } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.Query != "" { params["q"] = r.Query } @@ -481,7 +486,7 @@ func (f AsyncSearchSubmit) WithDocvalueFields(v ...string) func(*AsyncSearchSubm } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f AsyncSearchSubmit) WithExpandWildcards(v string) func(*AsyncSearchSubmitRequest) { +func (f AsyncSearchSubmit) WithExpandWildcards(v ...string) func(*AsyncSearchSubmitRequest) { return func(r *AsyncSearchSubmitRequest) { r.ExpandWildcards = v } @@ -550,6 +555,13 @@ func (f AsyncSearchSubmit) WithPreference(v string) func(*AsyncSearchSubmitReque } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f AsyncSearchSubmit) WithProjectRouting(v string) func(*AsyncSearchSubmitRequest) { + return func(r *AsyncSearchSubmitRequest) { + r.ProjectRouting = v + } +} + // WithQuery - query in the lucene query string syntax. func (f AsyncSearchSubmit) WithQuery(v string) func(*AsyncSearchSubmitRequest) { return func(r *AsyncSearchSubmitRequest) { diff --git a/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go b/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go index 805e7c9ba6..8701bb15b5 100644 --- a/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go +++ b/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newAutoscalingDeleteAutoscalingPolicyFunc(t Transport) AutoscalingDeleteAut // ----- API Definition ------------------------------------------------------- -// AutoscalingDeleteAutoscalingPolicy - Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. +// AutoscalingDeleteAutoscalingPolicy - Delete an autoscaling policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-delete-autoscaling-policy. type AutoscalingDeleteAutoscalingPolicy func(name string, o ...func(*AutoscalingDeleteAutoscalingPolicyRequest)) (*Response, error) // AutoscalingDeleteAutoscalingPolicyRequest configures the Autoscaling Delete Autoscaling Policy API request. diff --git a/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go b/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go index f0d0f25092..d3e1114100 100644 --- a/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go +++ b/esapi/api.xpack.autoscaling.get_autoscaling_capacity.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newAutoscalingGetAutoscalingCapacityFunc(t Transport) AutoscalingGetAutosca // ----- API Definition ------------------------------------------------------- -// AutoscalingGetAutoscalingCapacity - Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. +// AutoscalingGetAutoscalingCapacity - Get the autoscaling capacity // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity. type AutoscalingGetAutoscalingCapacity func(o ...func(*AutoscalingGetAutoscalingCapacityRequest)) (*Response, error) // AutoscalingGetAutoscalingCapacityRequest configures the Autoscaling Get Autoscaling Capacity API request. diff --git a/esapi/api.xpack.autoscaling.get_autoscaling_policy.go b/esapi/api.xpack.autoscaling.get_autoscaling_policy.go index 7484e20c97..7691612b60 100644 --- a/esapi/api.xpack.autoscaling.get_autoscaling_policy.go +++ b/esapi/api.xpack.autoscaling.get_autoscaling_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newAutoscalingGetAutoscalingPolicyFunc(t Transport) AutoscalingGetAutoscali // ----- API Definition ------------------------------------------------------- -// AutoscalingGetAutoscalingPolicy - Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. +// AutoscalingGetAutoscalingPolicy - Get an autoscaling policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity. type AutoscalingGetAutoscalingPolicy func(name string, o ...func(*AutoscalingGetAutoscalingPolicyRequest)) (*Response, error) // AutoscalingGetAutoscalingPolicyRequest configures the Autoscaling Get Autoscaling Policy API request. diff --git a/esapi/api.xpack.autoscaling.put_autoscaling_policy.go b/esapi/api.xpack.autoscaling.put_autoscaling_policy.go index da8f366bdd..84b97e78d3 100644 --- a/esapi/api.xpack.autoscaling.put_autoscaling_policy.go +++ b/esapi/api.xpack.autoscaling.put_autoscaling_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newAutoscalingPutAutoscalingPolicyFunc(t Transport) AutoscalingPutAutoscali // ----- API Definition ------------------------------------------------------- -// AutoscalingPutAutoscalingPolicy - Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. +// AutoscalingPutAutoscalingPolicy - Create or update an autoscaling policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-put-autoscaling-policy. type AutoscalingPutAutoscalingPolicy func(name string, body io.Reader, o ...func(*AutoscalingPutAutoscalingPolicyRequest)) (*Response, error) // AutoscalingPutAutoscalingPolicyRequest configures the Autoscaling Put Autoscaling Policy API request. diff --git a/esapi/api.xpack.cat.ml_data_frame_analytics.go b/esapi/api.xpack.cat.ml_data_frame_analytics.go index 703d6f49cb..7dac1abe67 100644 --- a/esapi/api.xpack.cat.ml_data_frame_analytics.go +++ b/esapi/api.xpack.cat.ml_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCatMLDataFrameAnalyticsFunc(t Transport) CatMLDataFrameAnalytics { // ----- API Definition ------------------------------------------------------- -// CatMLDataFrameAnalytics - Gets configuration and usage information about data frame analytics jobs. +// CatMLDataFrameAnalytics - Get data frame analytics jobs // -// See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-data-frame-analytics. type CatMLDataFrameAnalytics func(o ...func(*CatMLDataFrameAnalyticsRequest)) (*Response, error) // CatMLDataFrameAnalyticsRequest configures the CatML Data Frame Analytics API request. diff --git a/esapi/api.xpack.cat.ml_datafeeds.go b/esapi/api.xpack.cat.ml_datafeeds.go index 41e689e03c..006d957dec 100644 --- a/esapi/api.xpack.cat.ml_datafeeds.go +++ b/esapi/api.xpack.cat.ml_datafeeds.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCatMLDatafeedsFunc(t Transport) CatMLDatafeeds { // ----- API Definition ------------------------------------------------------- -// CatMLDatafeeds - Gets configuration and usage information about datafeeds. +// CatMLDatafeeds - Get datafeeds // -// See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-datafeeds. type CatMLDatafeeds func(o ...func(*CatMLDatafeedsRequest)) (*Response, error) // CatMLDatafeedsRequest configures the CatML Datafeeds API request. @@ -53,6 +53,7 @@ type CatMLDatafeedsRequest struct { DatafeedID string AllowNoMatch *bool + Bytes string Format string H []string Help *bool @@ -113,6 +114,10 @@ func (r CatMLDatafeedsRequest) Do(providedCtx context.Context, transport Transpo params["allow_no_match"] = strconv.FormatBool(*r.AllowNoMatch) } + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -229,6 +234,13 @@ func (f CatMLDatafeeds) WithAllowNoMatch(v bool) func(*CatMLDatafeedsRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatMLDatafeeds) WithBytes(v string) func(*CatMLDatafeedsRequest) { + return func(r *CatMLDatafeedsRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatMLDatafeeds) WithFormat(v string) func(*CatMLDatafeedsRequest) { return func(r *CatMLDatafeedsRequest) { diff --git a/esapi/api.xpack.cat.ml_jobs.go b/esapi/api.xpack.cat.ml_jobs.go index 4933b449af..308f20e842 100644 --- a/esapi/api.xpack.cat.ml_jobs.go +++ b/esapi/api.xpack.cat.ml_jobs.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCatMLJobsFunc(t Transport) CatMLJobs { // ----- API Definition ------------------------------------------------------- -// CatMLJobs - Gets configuration and usage information about anomaly detection jobs. +// CatMLJobs - Get anomaly detection jobs // -// See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-jobs. type CatMLJobs func(o ...func(*CatMLJobsRequest)) (*Response, error) // CatMLJobsRequest configures the CatML Jobs API request. diff --git a/esapi/api.xpack.cat.ml_trained_models.go b/esapi/api.xpack.cat.ml_trained_models.go index aa97b55e9c..44bf8097d5 100644 --- a/esapi/api.xpack.cat.ml_trained_models.go +++ b/esapi/api.xpack.cat.ml_trained_models.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCatMLTrainedModelsFunc(t Transport) CatMLTrainedModels { // ----- API Definition ------------------------------------------------------- -// CatMLTrainedModels - Gets configuration and usage information about inference trained models. +// CatMLTrainedModels - Get trained models // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-trained-models. type CatMLTrainedModels func(o ...func(*CatMLTrainedModelsRequest)) (*Response, error) // CatMLTrainedModelsRequest configures the CatML Trained Models API request. diff --git a/esapi/api.xpack.cat.transforms.go b/esapi/api.xpack.cat.transforms.go index bcaac8734b..14e9c33a0c 100644 --- a/esapi/api.xpack.cat.transforms.go +++ b/esapi/api.xpack.cat.transforms.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCatTransformsFunc(t Transport) CatTransforms { // ----- API Definition ------------------------------------------------------- -// CatTransforms - Gets configuration and usage information about transforms. +// CatTransforms - Get transform information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-transforms. type CatTransforms func(o ...func(*CatTransformsRequest)) (*Response, error) // CatTransformsRequest configures the Cat Transforms API request. @@ -53,6 +53,7 @@ type CatTransformsRequest struct { TransformID string AllowNoMatch *bool + Bytes string Format string From *int H []string @@ -113,6 +114,10 @@ func (r CatTransformsRequest) Do(providedCtx context.Context, transport Transpor params["allow_no_match"] = strconv.FormatBool(*r.AllowNoMatch) } + if r.Bytes != "" { + params["bytes"] = r.Bytes + } + if r.Format != "" { params["format"] = r.Format } @@ -237,6 +242,13 @@ func (f CatTransforms) WithAllowNoMatch(v bool) func(*CatTransformsRequest) { } } +// WithBytes - the unit in which to display byte values. +func (f CatTransforms) WithBytes(v string) func(*CatTransformsRequest) { + return func(r *CatTransformsRequest) { + r.Bytes = v + } +} + // WithFormat - a short version of the accept header, e.g. json, yaml. func (f CatTransforms) WithFormat(v string) func(*CatTransformsRequest) { return func(r *CatTransformsRequest) { diff --git a/esapi/api.xpack.ccr.delete_auto_follow_pattern.go b/esapi/api.xpack.ccr.delete_auto_follow_pattern.go index 72e4dcf2d6..e995ff022e 100644 --- a/esapi/api.xpack.ccr.delete_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.delete_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCCRDeleteAutoFollowPatternFunc(t Transport) CCRDeleteAutoFollowPattern { // ----- API Definition ------------------------------------------------------- -// CCRDeleteAutoFollowPattern - Deletes auto-follow patterns. +// CCRDeleteAutoFollowPattern - Delete auto-follow patterns // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-delete-auto-follow-pattern. type CCRDeleteAutoFollowPattern func(name string, o ...func(*CCRDeleteAutoFollowPatternRequest)) (*Response, error) // CCRDeleteAutoFollowPatternRequest configures the CCR Delete Auto Follow Pattern API request. diff --git a/esapi/api.xpack.ccr.follow.go b/esapi/api.xpack.ccr.follow.go index f1717bca7b..50003d1c79 100644 --- a/esapi/api.xpack.ccr.follow.go +++ b/esapi/api.xpack.ccr.follow.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCCRFollowFunc(t Transport) CCRFollow { // ----- API Definition ------------------------------------------------------- -// CCRFollow - Creates a new follower index configured to follow the referenced leader index. +// CCRFollow - Create a follower // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow. type CCRFollow func(index string, body io.Reader, o ...func(*CCRFollowRequest)) (*Response, error) // CCRFollowRequest configures the CCR Follow API request. diff --git a/esapi/api.xpack.ccr.follow_info.go b/esapi/api.xpack.ccr.follow_info.go index e7df5f8de6..e61d814d55 100644 --- a/esapi/api.xpack.ccr.follow_info.go +++ b/esapi/api.xpack.ccr.follow_info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCCRFollowInfoFunc(t Transport) CCRFollowInfo { // ----- API Definition ------------------------------------------------------- -// CCRFollowInfo - Retrieves information about all follower indices, including parameters and status for each follower index +// CCRFollowInfo - Get follower information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow-info. type CCRFollowInfo func(index []string, o ...func(*CCRFollowInfoRequest)) (*Response, error) // CCRFollowInfoRequest configures the CCR Follow Info API request. diff --git a/esapi/api.xpack.ccr.follow_stats.go b/esapi/api.xpack.ccr.follow_stats.go index c06d77bfbe..abc1e709ed 100644 --- a/esapi/api.xpack.ccr.follow_stats.go +++ b/esapi/api.xpack.ccr.follow_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCCRFollowStatsFunc(t Transport) CCRFollowStats { // ----- API Definition ------------------------------------------------------- -// CCRFollowStats - Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices. +// CCRFollowStats - Get follower stats // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow-stats. type CCRFollowStats func(index []string, o ...func(*CCRFollowStatsRequest)) (*Response, error) // CCRFollowStatsRequest configures the CCR Follow Stats API request. diff --git a/esapi/api.xpack.ccr.forget_follower.go b/esapi/api.xpack.ccr.forget_follower.go index 5511c686c9..f83ec40a41 100644 --- a/esapi/api.xpack.ccr.forget_follower.go +++ b/esapi/api.xpack.ccr.forget_follower.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCCRForgetFollowerFunc(t Transport) CCRForgetFollower { // ----- API Definition ------------------------------------------------------- -// CCRForgetFollower - Removes the follower retention leases from the leader. +// CCRForgetFollower - Forget a follower // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-forget-follower. type CCRForgetFollower func(index string, body io.Reader, o ...func(*CCRForgetFollowerRequest)) (*Response, error) // CCRForgetFollowerRequest configures the CCR Forget Follower API request. diff --git a/esapi/api.xpack.ccr.get_auto_follow_pattern.go b/esapi/api.xpack.ccr.get_auto_follow_pattern.go index 6645b337a1..8621791838 100644 --- a/esapi/api.xpack.ccr.get_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.get_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCCRGetAutoFollowPatternFunc(t Transport) CCRGetAutoFollowPattern { // ----- API Definition ------------------------------------------------------- -// CCRGetAutoFollowPattern - Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection. +// CCRGetAutoFollowPattern - Get auto-follow patterns // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-get-auto-follow-pattern-1. type CCRGetAutoFollowPattern func(o ...func(*CCRGetAutoFollowPatternRequest)) (*Response, error) // CCRGetAutoFollowPatternRequest configures the CCR Get Auto Follow Pattern API request. diff --git a/esapi/api.xpack.ccr.pause_auto_follow_pattern.go b/esapi/api.xpack.ccr.pause_auto_follow_pattern.go index 7028ffb7e4..6aeb583492 100644 --- a/esapi/api.xpack.ccr.pause_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.pause_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCCRPauseAutoFollowPatternFunc(t Transport) CCRPauseAutoFollowPattern { // ----- API Definition ------------------------------------------------------- -// CCRPauseAutoFollowPattern - Pauses an auto-follow pattern +// CCRPauseAutoFollowPattern - Pause an auto-follow pattern // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-pause-auto-follow-pattern. type CCRPauseAutoFollowPattern func(name string, o ...func(*CCRPauseAutoFollowPatternRequest)) (*Response, error) // CCRPauseAutoFollowPatternRequest configures the CCR Pause Auto Follow Pattern API request. diff --git a/esapi/api.xpack.ccr.pause_follow.go b/esapi/api.xpack.ccr.pause_follow.go index 23e5c469eb..c4f938f478 100644 --- a/esapi/api.xpack.ccr.pause_follow.go +++ b/esapi/api.xpack.ccr.pause_follow.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCCRPauseFollowFunc(t Transport) CCRPauseFollow { // ----- API Definition ------------------------------------------------------- -// CCRPauseFollow - Pauses a follower index. The follower index will not fetch any additional operations from the leader index. +// CCRPauseFollow - Pause a follower // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-pause-follow. type CCRPauseFollow func(index string, o ...func(*CCRPauseFollowRequest)) (*Response, error) // CCRPauseFollowRequest configures the CCR Pause Follow API request. diff --git a/esapi/api.xpack.ccr.put_auto_follow_pattern.go b/esapi/api.xpack.ccr.put_auto_follow_pattern.go index 08e1453568..9965937b5d 100644 --- a/esapi/api.xpack.ccr.put_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.put_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCCRPutAutoFollowPatternFunc(t Transport) CCRPutAutoFollowPattern { // ----- API Definition ------------------------------------------------------- -// CCRPutAutoFollowPattern - Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices. +// CCRPutAutoFollowPattern - Create or update auto-follow patterns // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-put-auto-follow-pattern. type CCRPutAutoFollowPattern func(name string, body io.Reader, o ...func(*CCRPutAutoFollowPatternRequest)) (*Response, error) // CCRPutAutoFollowPatternRequest configures the CCR Put Auto Follow Pattern API request. diff --git a/esapi/api.xpack.ccr.resume_auto_follow_pattern.go b/esapi/api.xpack.ccr.resume_auto_follow_pattern.go index 0142645052..b15bd21d59 100644 --- a/esapi/api.xpack.ccr.resume_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.resume_auto_follow_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCCRResumeAutoFollowPatternFunc(t Transport) CCRResumeAutoFollowPattern { // ----- API Definition ------------------------------------------------------- -// CCRResumeAutoFollowPattern - Resumes an auto-follow pattern that has been paused +// CCRResumeAutoFollowPattern - Resume an auto-follow pattern // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-auto-follow-pattern. type CCRResumeAutoFollowPattern func(name string, o ...func(*CCRResumeAutoFollowPatternRequest)) (*Response, error) // CCRResumeAutoFollowPatternRequest configures the CCR Resume Auto Follow Pattern API request. diff --git a/esapi/api.xpack.ccr.resume_follow.go b/esapi/api.xpack.ccr.resume_follow.go index 4c9a2b18c3..53b8424e5d 100644 --- a/esapi/api.xpack.ccr.resume_follow.go +++ b/esapi/api.xpack.ccr.resume_follow.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newCCRResumeFollowFunc(t Transport) CCRResumeFollow { // ----- API Definition ------------------------------------------------------- -// CCRResumeFollow - Resumes a follower index that has been paused +// CCRResumeFollow - Resume a follower // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow. type CCRResumeFollow func(index string, o ...func(*CCRResumeFollowRequest)) (*Response, error) // CCRResumeFollowRequest configures the CCR Resume Follow API request. diff --git a/esapi/api.xpack.ccr.stats.go b/esapi/api.xpack.ccr.stats.go index 27dcea2f70..787098b0bf 100644 --- a/esapi/api.xpack.ccr.stats.go +++ b/esapi/api.xpack.ccr.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCCRStatsFunc(t Transport) CCRStats { // ----- API Definition ------------------------------------------------------- -// CCRStats - Gets all stats related to cross-cluster replication. +// CCRStats - Get cross-cluster replication stats // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-stats. type CCRStats func(o ...func(*CCRStatsRequest)) (*Response, error) // CCRStatsRequest configures the CCR Stats API request. diff --git a/esapi/api.xpack.ccr.unfollow.go b/esapi/api.xpack.ccr.unfollow.go index ea133d4a34..f37910392c 100644 --- a/esapi/api.xpack.ccr.unfollow.go +++ b/esapi/api.xpack.ccr.unfollow.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newCCRUnfollowFunc(t Transport) CCRUnfollow { // ----- API Definition ------------------------------------------------------- -// CCRUnfollow - Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. +// CCRUnfollow - Unfollow an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-unfollow. type CCRUnfollow func(index string, o ...func(*CCRUnfollowRequest)) (*Response, error) // CCRUnfollowRequest configures the CCR Unfollow API request. diff --git a/esapi/api.xpack.close_point_in_time.go b/esapi/api.xpack.close_point_in_time.go index dcb6a948cf..9205f9e715 100644 --- a/esapi/api.xpack.close_point_in_time.go +++ b/esapi/api.xpack.close_point_in_time.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -27,8 +27,8 @@ import ( ) func newClosePointInTimeFunc(t Transport) ClosePointInTime { - return func(o ...func(*ClosePointInTimeRequest)) (*Response, error) { - var r = ClosePointInTimeRequest{} + return func(body io.Reader, o ...func(*ClosePointInTimeRequest)) (*Response, error) { + var r = ClosePointInTimeRequest{Body: body} for _, f := range o { f(&r) } @@ -45,8 +45,8 @@ func newClosePointInTimeFunc(t Transport) ClosePointInTime { // ClosePointInTime - Close a point in time // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html. -type ClosePointInTime func(o ...func(*ClosePointInTimeRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time. +type ClosePointInTime func(body io.Reader, o ...func(*ClosePointInTimeRequest)) (*Response, error) // ClosePointInTimeRequest configures the Close Point In Time API request. type ClosePointInTimeRequest struct { @@ -174,13 +174,6 @@ func (f ClosePointInTime) WithContext(v context.Context) func(*ClosePointInTimeR } } -// WithBody - a point-in-time id to close. -func (f ClosePointInTime) WithBody(v io.Reader) func(*ClosePointInTimeRequest) { - return func(r *ClosePointInTimeRequest) { - r.Body = v - } -} - // WithPretty makes the response body pretty-printed. func (f ClosePointInTime) WithPretty() func(*ClosePointInTimeRequest) { return func(r *ClosePointInTimeRequest) { diff --git a/esapi/api.xpack.enrich.delete_policy.go b/esapi/api.xpack.enrich.delete_policy.go index 978bb78073..b649d9b89d 100644 --- a/esapi/api.xpack.enrich.delete_policy.go +++ b/esapi/api.xpack.enrich.delete_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newEnrichDeletePolicyFunc(t Transport) EnrichDeletePolicy { // ----- API Definition ------------------------------------------------------- -// EnrichDeletePolicy - Deletes an existing enrich policy and its enrich index. +// EnrichDeletePolicy - Delete an enrich policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-delete-policy. type EnrichDeletePolicy func(name string, o ...func(*EnrichDeletePolicyRequest)) (*Response, error) // EnrichDeletePolicyRequest configures the Enrich Delete Policy API request. diff --git a/esapi/api.xpack.enrich.execute_policy.go b/esapi/api.xpack.enrich.execute_policy.go index 185237a554..295009a75e 100644 --- a/esapi/api.xpack.enrich.execute_policy.go +++ b/esapi/api.xpack.enrich.execute_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newEnrichExecutePolicyFunc(t Transport) EnrichExecutePolicy { // ----- API Definition ------------------------------------------------------- -// EnrichExecutePolicy - Creates the enrich index for an existing enrich policy. +// EnrichExecutePolicy - Run an enrich policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy. type EnrichExecutePolicy func(name string, o ...func(*EnrichExecutePolicyRequest)) (*Response, error) // EnrichExecutePolicyRequest configures the Enrich Execute Policy API request. diff --git a/esapi/api.xpack.enrich.get_policy.go b/esapi/api.xpack.enrich.get_policy.go index afbf3820ad..a6d02b0813 100644 --- a/esapi/api.xpack.enrich.get_policy.go +++ b/esapi/api.xpack.enrich.get_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newEnrichGetPolicyFunc(t Transport) EnrichGetPolicy { // ----- API Definition ------------------------------------------------------- -// EnrichGetPolicy - Gets information about an enrich policy. +// EnrichGetPolicy - Get an enrich policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-get-policy. type EnrichGetPolicy func(o ...func(*EnrichGetPolicyRequest)) (*Response, error) // EnrichGetPolicyRequest configures the Enrich Get Policy API request. diff --git a/esapi/api.xpack.enrich.put_policy.go b/esapi/api.xpack.enrich.put_policy.go index 52ca1d7d30..d6d91e5627 100644 --- a/esapi/api.xpack.enrich.put_policy.go +++ b/esapi/api.xpack.enrich.put_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newEnrichPutPolicyFunc(t Transport) EnrichPutPolicy { // ----- API Definition ------------------------------------------------------- -// EnrichPutPolicy - Creates a new enrich policy. +// EnrichPutPolicy - Create an enrich policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy. type EnrichPutPolicy func(name string, body io.Reader, o ...func(*EnrichPutPolicyRequest)) (*Response, error) // EnrichPutPolicyRequest configures the Enrich Put Policy API request. diff --git a/esapi/api.xpack.enrich.stats.go b/esapi/api.xpack.enrich.stats.go index 950dbc6d2d..4291ca854f 100644 --- a/esapi/api.xpack.enrich.stats.go +++ b/esapi/api.xpack.enrich.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newEnrichStatsFunc(t Transport) EnrichStats { // ----- API Definition ------------------------------------------------------- -// EnrichStats - Gets enrich coordinator statistics and information about enrich policies that are currently executing. +// EnrichStats - Get enrich stats // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-stats. type EnrichStats func(o ...func(*EnrichStatsRequest)) (*Response, error) // EnrichStatsRequest configures the Enrich Stats API request. diff --git a/esapi/api.xpack.eql.delete.go b/esapi/api.xpack.eql.delete.go index 8c815611ec..6a13b3ced8 100644 --- a/esapi/api.xpack.eql.delete.go +++ b/esapi/api.xpack.eql.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newEqlDeleteFunc(t Transport) EqlDelete { // ----- API Definition ------------------------------------------------------- -// EqlDelete - Deletes an async EQL search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. +// EqlDelete - Delete an async EQL search // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-delete. type EqlDelete func(id string, o ...func(*EqlDeleteRequest)) (*Response, error) // EqlDeleteRequest configures the Eql Delete API request. diff --git a/esapi/api.xpack.eql.get.go b/esapi/api.xpack.eql.get.go index 1f2c854a4e..15e09a758e 100644 --- a/esapi/api.xpack.eql.get.go +++ b/esapi/api.xpack.eql.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newEqlGetFunc(t Transport) EqlGet { // ----- API Definition ------------------------------------------------------- -// EqlGet - Returns async results from previously executed Event Query Language (EQL) search +// EqlGet - Get async EQL search results // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get. type EqlGet func(id string, o ...func(*EqlGetRequest)) (*Response, error) // EqlGetRequest configures the Eql Get API request. diff --git a/esapi/api.xpack.eql.get_status.go b/esapi/api.xpack.eql.get_status.go index 303d982bdb..9d0ea6e90a 100644 --- a/esapi/api.xpack.eql.get_status.go +++ b/esapi/api.xpack.eql.get_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newEqlGetStatusFunc(t Transport) EqlGetStatus { // ----- API Definition ------------------------------------------------------- -// EqlGetStatus - Returns the status of a previously submitted async or stored Event Query Language (EQL) search +// EqlGetStatus - Get the async EQL status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get-status. type EqlGetStatus func(id string, o ...func(*EqlGetStatusRequest)) (*Response, error) // EqlGetStatusRequest configures the Eql Get Status API request. diff --git a/esapi/api.xpack.eql.search.go b/esapi/api.xpack.eql.search.go index c467e17d8a..b442950429 100644 --- a/esapi/api.xpack.eql.search.go +++ b/esapi/api.xpack.eql.search.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "io" "net/http" "strconv" @@ -29,7 +30,7 @@ import ( ) func newEqlSearchFunc(t Transport) EqlSearch { - return func(index string, body io.Reader, o ...func(*EqlSearchRequest)) (*Response, error) { + return func(index []string, body io.Reader, o ...func(*EqlSearchRequest)) (*Response, error) { var r = EqlSearchRequest{Index: index, Body: body} for _, f := range o { f(&r) @@ -45,14 +46,14 @@ func newEqlSearchFunc(t Transport) EqlSearch { // ----- API Definition ------------------------------------------------------- -// EqlSearch - Returns results matching a query expressed in Event Query Language (EQL) +// EqlSearch - Get EQL search results // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html. -type EqlSearch func(index string, body io.Reader, o ...func(*EqlSearchRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search. +type EqlSearch func(index []string, body io.Reader, o ...func(*EqlSearchRequest)) (*Response, error) // EqlSearchRequest configures the Eql Search API request. type EqlSearchRequest struct { - Index string + Index []string Body io.Reader @@ -60,10 +61,11 @@ type EqlSearchRequest struct { AllowPartialSearchResults *bool AllowPartialSequenceResults *bool CcsMinimizeRoundtrips *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool KeepAlive time.Duration KeepOnCompletion *bool + ProjectRouting string WaitForCompletionTimeout time.Duration Pretty bool @@ -97,12 +99,16 @@ func (r EqlSearchRequest) Do(providedCtx context.Context, transport Transport) ( method = "POST" - path.Grow(7 + 1 + len(r.Index) + 1 + len("_eql") + 1 + len("search")) + if len(r.Index) == 0 { + return nil, errors.New("index is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len(strings.Join(r.Index, ",")) + 1 + len("_eql") + 1 + len("search")) path.WriteString("http://") path.WriteString("/") - path.WriteString(r.Index) + path.WriteString(strings.Join(r.Index, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "index", r.Index) + instrument.RecordPathPart(ctx, "index", strings.Join(r.Index, ",")) } path.WriteString("/") path.WriteString("_eql") @@ -127,8 +133,8 @@ func (r EqlSearchRequest) Do(providedCtx context.Context, transport Transport) ( params["ccs_minimize_roundtrips"] = strconv.FormatBool(*r.CcsMinimizeRoundtrips) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -143,6 +149,10 @@ func (r EqlSearchRequest) Do(providedCtx context.Context, transport Transport) ( params["keep_on_completion"] = strconv.FormatBool(*r.KeepOnCompletion) } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.WaitForCompletionTimeout != 0 { params["wait_for_completion_timeout"] = formatDuration(r.WaitForCompletionTimeout) } @@ -261,7 +271,7 @@ func (f EqlSearch) WithCcsMinimizeRoundtrips(v bool) func(*EqlSearchRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f EqlSearch) WithExpandWildcards(v string) func(*EqlSearchRequest) { +func (f EqlSearch) WithExpandWildcards(v ...string) func(*EqlSearchRequest) { return func(r *EqlSearchRequest) { r.ExpandWildcards = v } @@ -288,6 +298,13 @@ func (f EqlSearch) WithKeepOnCompletion(v bool) func(*EqlSearchRequest) { } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f EqlSearch) WithProjectRouting(v string) func(*EqlSearchRequest) { + return func(r *EqlSearchRequest) { + r.ProjectRouting = v + } +} + // WithWaitForCompletionTimeout - specify the time that the request should block waiting for the final response. func (f EqlSearch) WithWaitForCompletionTimeout(v time.Duration) func(*EqlSearchRequest) { return func(r *EqlSearchRequest) { diff --git a/esapi/api.xpack.esql.async_query.go b/esapi/api.xpack.esql.async_query.go index 57787a0ff2..6c525c50c3 100644 --- a/esapi/api.xpack.esql.async_query.go +++ b/esapi/api.xpack.esql.async_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newEsqlAsyncQueryFunc(t Transport) EsqlAsyncQuery { // ----- API Definition ------------------------------------------------------- -// EsqlAsyncQuery - Executes an ESQL request asynchronously +// EsqlAsyncQuery - Run an async ES|QL query // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query. type EsqlAsyncQuery func(body io.Reader, o ...func(*EsqlAsyncQueryRequest)) (*Response, error) // EsqlAsyncQueryRequest configures the Esql Async Query API request. @@ -217,7 +217,7 @@ func (f EsqlAsyncQuery) WithDropNullColumns(v bool) func(*EsqlAsyncQueryRequest) } } -// WithFormat - a short version of the accept header, e.g. json, yaml. +// WithFormat - a short version of the accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.for async requests, nothing will be returned if the async query doesn't finish within the timeout.the query ID and running status are available in the `x-elasticsearch-async-ID` and `x-elasticsearch-async-is-running` http headers of the response, respectively.. func (f EsqlAsyncQuery) WithFormat(v string) func(*EsqlAsyncQueryRequest) { return func(r *EsqlAsyncQueryRequest) { r.Format = v diff --git a/esapi/api.xpack.esql.async_query_delete.go b/esapi/api.xpack.esql.async_query_delete.go index 19c77c978e..8be91e5849 100644 --- a/esapi/api.xpack.esql.async_query_delete.go +++ b/esapi/api.xpack.esql.async_query_delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newEsqlAsyncQueryDeleteFunc(t Transport) EsqlAsyncQueryDelete { // ----- API Definition ------------------------------------------------------- -// EsqlAsyncQueryDelete - Delete an async query request given its ID. +// EsqlAsyncQueryDelete - Delete an async ES|QL query // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-delete-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-delete. type EsqlAsyncQueryDelete func(id string, o ...func(*EsqlAsyncQueryDeleteRequest)) (*Response, error) // EsqlAsyncQueryDeleteRequest configures the Esql Async Query Delete API request. diff --git a/esapi/api.xpack.esql.async_query_get.go b/esapi/api.xpack.esql.async_query_get.go index 69c2ec8cc1..189b905c35 100644 --- a/esapi/api.xpack.esql.async_query_get.go +++ b/esapi/api.xpack.esql.async_query_get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newEsqlAsyncQueryGetFunc(t Transport) EsqlAsyncQueryGet { // ----- API Definition ------------------------------------------------------- -// EsqlAsyncQueryGet - Retrieves the results of a previously submitted async query request given its ID. +// EsqlAsyncQueryGet - Get async ES|QL query results // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-get-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-get. type EsqlAsyncQueryGet func(id string, o ...func(*EsqlAsyncQueryGetRequest)) (*Response, error) // EsqlAsyncQueryGetRequest configures the Esql Async Query Get API request. @@ -204,7 +204,7 @@ func (f EsqlAsyncQueryGet) WithDropNullColumns(v bool) func(*EsqlAsyncQueryGetRe } } -// WithFormat - a short version of the accept header, e.g. json, yaml. +// WithFormat - a short version of the accept header, for example `json` or `yaml`.. func (f EsqlAsyncQueryGet) WithFormat(v string) func(*EsqlAsyncQueryGetRequest) { return func(r *EsqlAsyncQueryGetRequest) { r.Format = v diff --git a/esapi/api.xpack.esql.async_query_stop.go b/esapi/api.xpack.esql.async_query_stop.go index 2482148b9e..acaa41c058 100644 --- a/esapi/api.xpack.esql.async_query_stop.go +++ b/esapi/api.xpack.esql.async_query_stop.go @@ -15,13 +15,14 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" "net/http" + "strconv" "strings" ) @@ -42,15 +43,17 @@ func newEsqlAsyncQueryStopFunc(t Transport) EsqlAsyncQueryStop { // ----- API Definition ------------------------------------------------------- -// EsqlAsyncQueryStop - Stops a previously submitted async query request given its ID and collects the results. +// EsqlAsyncQueryStop - Stop async ES|QL query // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-stop-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop. type EsqlAsyncQueryStop func(id string, o ...func(*EsqlAsyncQueryStopRequest)) (*Response, error) // EsqlAsyncQueryStopRequest configures the Esql Async Query Stop API request. type EsqlAsyncQueryStopRequest struct { DocumentID string + DropNullColumns *bool + Pretty bool Human bool ErrorTrace bool @@ -98,6 +101,10 @@ func (r EsqlAsyncQueryStopRequest) Do(providedCtx context.Context, transport Tra params = make(map[string]string) + if r.DropNullColumns != nil { + params["drop_null_columns"] = strconv.FormatBool(*r.DropNullColumns) + } + if r.Pretty { params["pretty"] = "true" } @@ -176,6 +183,13 @@ func (f EsqlAsyncQueryStop) WithContext(v context.Context) func(*EsqlAsyncQueryS } } +// WithDropNullColumns - indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.. +func (f EsqlAsyncQueryStop) WithDropNullColumns(v bool) func(*EsqlAsyncQueryStopRequest) { + return func(r *EsqlAsyncQueryStopRequest) { + r.DropNullColumns = &v + } +} + // WithPretty makes the response body pretty-printed. func (f EsqlAsyncQueryStop) WithPretty() func(*EsqlAsyncQueryStopRequest) { return func(r *EsqlAsyncQueryStopRequest) { diff --git a/esapi/api.xpack.esql.get_query.go b/esapi/api.xpack.esql.get_query.go index 4616e78a1d..94da06e75f 100644 --- a/esapi/api.xpack.esql.get_query.go +++ b/esapi/api.xpack.esql.get_query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,11 @@ func newEsqlGetQueryFunc(t Transport) EsqlGetQuery { // ----- API Definition ------------------------------------------------------- -// EsqlGetQuery - Executes a get ESQL query request +// EsqlGetQuery - Get a specific running ES|QL query information // // This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-query. type EsqlGetQuery func(id string, o ...func(*EsqlGetQueryRequest)) (*Response, error) // EsqlGetQueryRequest configures the Esql Get Query API request. diff --git a/esapi/api.xpack.esql.list_queries.go b/esapi/api.xpack.esql.list_queries.go index 2b94eb0c03..163381da0c 100644 --- a/esapi/api.xpack.esql.list_queries.go +++ b/esapi/api.xpack.esql.list_queries.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,11 @@ func newEsqlListQueriesFunc(t Transport) EsqlListQueries { // ----- API Definition ------------------------------------------------------- -// EsqlListQueries - Executes a list ESQL queries request +// EsqlListQueries - Get running ES|QL queries information // // This API is experimental. +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-list-queries. type EsqlListQueries func(o ...func(*EsqlListQueriesRequest)) (*Response, error) // EsqlListQueriesRequest configures the Esql List Queries API request. diff --git a/esapi/api.xpack.esql.query.go b/esapi/api.xpack.esql.query.go index e0b1869bc6..eeb8df2a86 100644 --- a/esapi/api.xpack.esql.query.go +++ b/esapi/api.xpack.esql.query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newEsqlQueryFunc(t Transport) EsqlQuery { // ----- API Definition ------------------------------------------------------- -// EsqlQuery - Executes an ESQL request +// EsqlQuery - Run an ES|QL query // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html. +// See full documentation at https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest. type EsqlQuery func(body io.Reader, o ...func(*EsqlQueryRequest)) (*Response, error) // EsqlQueryRequest configures the Esql Query API request. @@ -217,7 +217,7 @@ func (f EsqlQuery) WithDropNullColumns(v bool) func(*EsqlQueryRequest) { } } -// WithFormat - a short version of the accept header, e.g. json, yaml. +// WithFormat - a short version of the accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.. func (f EsqlQuery) WithFormat(v string) func(*EsqlQueryRequest) { return func(r *EsqlQueryRequest) { r.Format = v diff --git a/esapi/api.xpack.graph.explore.go b/esapi/api.xpack.graph.explore.go index 36b5b2cd1f..a0c01a9682 100644 --- a/esapi/api.xpack.graph.explore.go +++ b/esapi/api.xpack.graph.explore.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -29,8 +29,8 @@ import ( ) func newGraphExploreFunc(t Transport) GraphExplore { - return func(index []string, o ...func(*GraphExploreRequest)) (*Response, error) { - var r = GraphExploreRequest{Index: index} + return func(index []string, body io.Reader, o ...func(*GraphExploreRequest)) (*Response, error) { + var r = GraphExploreRequest{Index: index, Body: body} for _, f := range o { f(&r) } @@ -45,10 +45,10 @@ func newGraphExploreFunc(t Transport) GraphExplore { // ----- API Definition ------------------------------------------------------- -// GraphExplore - Explore extracted and summarized information about the documents and terms in an index. +// GraphExplore - Explore graph analytics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html. -type GraphExplore func(index []string, o ...func(*GraphExploreRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-graph. +type GraphExplore func(index []string, body io.Reader, o ...func(*GraphExploreRequest)) (*Response, error) // GraphExploreRequest configures the Graph Explore API request. type GraphExploreRequest struct { @@ -56,7 +56,7 @@ type GraphExploreRequest struct { Body io.Reader - Routing string + Routing []string Timeout time.Duration Pretty bool @@ -108,8 +108,8 @@ func (r GraphExploreRequest) Do(providedCtx context.Context, transport Transport params = make(map[string]string) - if r.Routing != "" { - params["routing"] = r.Routing + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if r.Timeout != 0 { @@ -201,15 +201,8 @@ func (f GraphExplore) WithContext(v context.Context) func(*GraphExploreRequest) } } -// WithBody - Graph Query DSL. -func (f GraphExplore) WithBody(v io.Reader) func(*GraphExploreRequest) { - return func(r *GraphExploreRequest) { - r.Body = v - } -} - // WithRouting - specific routing value. -func (f GraphExplore) WithRouting(v string) func(*GraphExploreRequest) { +func (f GraphExplore) WithRouting(v ...string) func(*GraphExploreRequest) { return func(r *GraphExploreRequest) { r.Routing = v } diff --git a/esapi/api.xpack.ilm.delete_lifecycle.go b/esapi/api.xpack.ilm.delete_lifecycle.go index 0198983f86..e077ed4798 100644 --- a/esapi/api.xpack.ilm.delete_lifecycle.go +++ b/esapi/api.xpack.ilm.delete_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newILMDeleteLifecycleFunc(t Transport) ILMDeleteLifecycle { // ----- API Definition ------------------------------------------------------- -// ILMDeleteLifecycle - Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted. +// ILMDeleteLifecycle - Delete a lifecycle policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-delete-lifecycle. type ILMDeleteLifecycle func(policy string, o ...func(*ILMDeleteLifecycleRequest)) (*Response, error) // ILMDeleteLifecycleRequest configures the ILM Delete Lifecycle API request. diff --git a/esapi/api.xpack.ilm.explain_lifecycle.go b/esapi/api.xpack.ilm.explain_lifecycle.go index 16fba1eabb..58b4cb371c 100644 --- a/esapi/api.xpack.ilm.explain_lifecycle.go +++ b/esapi/api.xpack.ilm.explain_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newILMExplainLifecycleFunc(t Transport) ILMExplainLifecycle { // ----- API Definition ------------------------------------------------------- -// ILMExplainLifecycle - Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step. +// ILMExplainLifecycle - Explain the lifecycle state // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-explain-lifecycle. type ILMExplainLifecycle func(index string, o ...func(*ILMExplainLifecycleRequest)) (*Response, error) // ILMExplainLifecycleRequest configures the ILM Explain Lifecycle API request. diff --git a/esapi/api.xpack.ilm.get_lifecycle.go b/esapi/api.xpack.ilm.get_lifecycle.go index 5f0177d653..d2cf4cf3ea 100644 --- a/esapi/api.xpack.ilm.get_lifecycle.go +++ b/esapi/api.xpack.ilm.get_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newILMGetLifecycleFunc(t Transport) ILMGetLifecycle { // ----- API Definition ------------------------------------------------------- -// ILMGetLifecycle - Returns the specified policy definition. Includes the policy version and last modified date. +// ILMGetLifecycle - Get lifecycle policies // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-lifecycle. type ILMGetLifecycle func(o ...func(*ILMGetLifecycleRequest)) (*Response, error) // ILMGetLifecycleRequest configures the ILM Get Lifecycle API request. diff --git a/esapi/api.xpack.ilm.get_status.go b/esapi/api.xpack.ilm.get_status.go index f20c93b400..4387cec034 100644 --- a/esapi/api.xpack.ilm.get_status.go +++ b/esapi/api.xpack.ilm.get_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newILMGetStatusFunc(t Transport) ILMGetStatus { // ----- API Definition ------------------------------------------------------- -// ILMGetStatus - Retrieves the current index lifecycle management (ILM) status. +// ILMGetStatus - Get the ILM status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-status. type ILMGetStatus func(o ...func(*ILMGetStatusRequest)) (*Response, error) // ILMGetStatusRequest configures the ILM Get Status API request. diff --git a/esapi/api.xpack.ilm.migrate_to_data_tiers.go b/esapi/api.xpack.ilm.migrate_to_data_tiers.go index e0912f4401..b8da5f7b69 100644 --- a/esapi/api.xpack.ilm.migrate_to_data_tiers.go +++ b/esapi/api.xpack.ilm.migrate_to_data_tiers.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newILMMigrateToDataTiersFunc(t Transport) ILMMigrateToDataTiers { // ----- API Definition ------------------------------------------------------- -// ILMMigrateToDataTiers - Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing +// ILMMigrateToDataTiers - Migrate to data tiers routing // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-migrate-to-data-tiers. type ILMMigrateToDataTiers func(o ...func(*ILMMigrateToDataTiersRequest)) (*Response, error) // ILMMigrateToDataTiersRequest configures the ILM Migrate To Data Tiers API request. diff --git a/esapi/api.xpack.ilm.move_to_step.go b/esapi/api.xpack.ilm.move_to_step.go index 7b6360ef4c..5b79158b03 100644 --- a/esapi/api.xpack.ilm.move_to_step.go +++ b/esapi/api.xpack.ilm.move_to_step.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -27,8 +27,8 @@ import ( ) func newILMMoveToStepFunc(t Transport) ILMMoveToStep { - return func(index string, o ...func(*ILMMoveToStepRequest)) (*Response, error) { - var r = ILMMoveToStepRequest{Index: index} + return func(index string, body io.Reader, o ...func(*ILMMoveToStepRequest)) (*Response, error) { + var r = ILMMoveToStepRequest{Index: index, Body: body} for _, f := range o { f(&r) } @@ -43,10 +43,10 @@ func newILMMoveToStepFunc(t Transport) ILMMoveToStep { // ----- API Definition ------------------------------------------------------- -// ILMMoveToStep - Manually moves an index into the specified step and executes that step. +// ILMMoveToStep - Move to a lifecycle step // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html. -type ILMMoveToStep func(index string, o ...func(*ILMMoveToStepRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-move-to-step. +type ILMMoveToStep func(index string, body io.Reader, o ...func(*ILMMoveToStepRequest)) (*Response, error) // ILMMoveToStepRequest configures the ILM Move To Step API request. type ILMMoveToStepRequest struct { @@ -184,13 +184,6 @@ func (f ILMMoveToStep) WithContext(v context.Context) func(*ILMMoveToStepRequest } } -// WithBody - The new lifecycle step to move to. -func (f ILMMoveToStep) WithBody(v io.Reader) func(*ILMMoveToStepRequest) { - return func(r *ILMMoveToStepRequest) { - r.Body = v - } -} - // WithPretty makes the response body pretty-printed. func (f ILMMoveToStep) WithPretty() func(*ILMMoveToStepRequest) { return func(r *ILMMoveToStepRequest) { diff --git a/esapi/api.xpack.ilm.put_lifecycle.go b/esapi/api.xpack.ilm.put_lifecycle.go index 058df7ebbc..5b4e61957e 100644 --- a/esapi/api.xpack.ilm.put_lifecycle.go +++ b/esapi/api.xpack.ilm.put_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -28,8 +28,8 @@ import ( ) func newILMPutLifecycleFunc(t Transport) ILMPutLifecycle { - return func(policy string, o ...func(*ILMPutLifecycleRequest)) (*Response, error) { - var r = ILMPutLifecycleRequest{Policy: policy} + return func(body io.Reader, policy string, o ...func(*ILMPutLifecycleRequest)) (*Response, error) { + var r = ILMPutLifecycleRequest{Body: body, Policy: policy} for _, f := range o { f(&r) } @@ -44,10 +44,10 @@ func newILMPutLifecycleFunc(t Transport) ILMPutLifecycle { // ----- API Definition ------------------------------------------------------- -// ILMPutLifecycle - Creates a lifecycle policy +// ILMPutLifecycle - Create or update a lifecycle policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html. -type ILMPutLifecycle func(policy string, o ...func(*ILMPutLifecycleRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle. +type ILMPutLifecycle func(body io.Reader, policy string, o ...func(*ILMPutLifecycleRequest)) (*Response, error) // ILMPutLifecycleRequest configures the ILM Put Lifecycle API request. type ILMPutLifecycleRequest struct { @@ -196,13 +196,6 @@ func (f ILMPutLifecycle) WithContext(v context.Context) func(*ILMPutLifecycleReq } } -// WithBody - The lifecycle policy definition to register. -func (f ILMPutLifecycle) WithBody(v io.Reader) func(*ILMPutLifecycleRequest) { - return func(r *ILMPutLifecycleRequest) { - r.Body = v - } -} - // WithMasterTimeout - explicit operation timeout for connection to master node. func (f ILMPutLifecycle) WithMasterTimeout(v time.Duration) func(*ILMPutLifecycleRequest) { return func(r *ILMPutLifecycleRequest) { diff --git a/esapi/api.xpack.ilm.remove_policy.go b/esapi/api.xpack.ilm.remove_policy.go index 1f75ddf101..47c0b7fdb2 100644 --- a/esapi/api.xpack.ilm.remove_policy.go +++ b/esapi/api.xpack.ilm.remove_policy.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newILMRemovePolicyFunc(t Transport) ILMRemovePolicy { // ----- API Definition ------------------------------------------------------- -// ILMRemovePolicy - Removes the assigned lifecycle policy and stops managing the specified index +// ILMRemovePolicy - Remove policies from an index // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-remove-policy. type ILMRemovePolicy func(index string, o ...func(*ILMRemovePolicyRequest)) (*Response, error) // ILMRemovePolicyRequest configures the ILM Remove Policy API request. diff --git a/esapi/api.xpack.ilm.retry.go b/esapi/api.xpack.ilm.retry.go index ceda7e10e1..fedd3cc9cb 100644 --- a/esapi/api.xpack.ilm.retry.go +++ b/esapi/api.xpack.ilm.retry.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newILMRetryFunc(t Transport) ILMRetry { // ----- API Definition ------------------------------------------------------- -// ILMRetry - Retries executing the policy for an index that is in the ERROR step. +// ILMRetry - Retry a policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-retry. type ILMRetry func(index string, o ...func(*ILMRetryRequest)) (*Response, error) // ILMRetryRequest configures the ILM Retry API request. diff --git a/esapi/api.xpack.ilm.start.go b/esapi/api.xpack.ilm.start.go index 51e33f96f3..13d95c25c4 100644 --- a/esapi/api.xpack.ilm.start.go +++ b/esapi/api.xpack.ilm.start.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newILMStartFunc(t Transport) ILMStart { // ----- API Definition ------------------------------------------------------- -// ILMStart - Start the index lifecycle management (ILM) plugin. +// ILMStart - Start the ILM plugin // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-start. type ILMStart func(o ...func(*ILMStartRequest)) (*Response, error) // ILMStartRequest configures the ILM Start API request. diff --git a/esapi/api.xpack.ilm.stop.go b/esapi/api.xpack.ilm.stop.go index 3d6f11e200..9e2976d60b 100644 --- a/esapi/api.xpack.ilm.stop.go +++ b/esapi/api.xpack.ilm.stop.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newILMStopFunc(t Transport) ILMStop { // ----- API Definition ------------------------------------------------------- -// ILMStop - Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin +// ILMStop - Stop the ILM plugin // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-stop. type ILMStop func(o ...func(*ILMStopRequest)) (*Response, error) // ILMStopRequest configures the ILM Stop API request. diff --git a/esapi/api.xpack.indices.create_data_stream.go b/esapi/api.xpack.indices.create_data_stream.go index 69787a0677..10d6570eec 100644 --- a/esapi/api.xpack.indices.create_data_stream.go +++ b/esapi/api.xpack.indices.create_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesCreateDataStreamFunc(t Transport) IndicesCreateDataStream { // ----- API Definition ------------------------------------------------------- -// IndicesCreateDataStream - Creates a data stream +// IndicesCreateDataStream - Create a data stream // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-data-stream. type IndicesCreateDataStream func(name string, o ...func(*IndicesCreateDataStreamRequest)) (*Response, error) // IndicesCreateDataStreamRequest configures the Indices Create Data Stream API request. diff --git a/esapi/api.xpack.indices.data_streams_stats.go b/esapi/api.xpack.indices.data_streams_stats.go index 6d0709121e..282d57eb0e 100644 --- a/esapi/api.xpack.indices.data_streams_stats.go +++ b/esapi/api.xpack.indices.data_streams_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,15 +42,17 @@ func newIndicesDataStreamsStatsFunc(t Transport) IndicesDataStreamsStats { // ----- API Definition ------------------------------------------------------- -// IndicesDataStreamsStats - Provides statistics on operations happening in a data stream. +// IndicesDataStreamsStats - Get data stream stats // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-data-streams-stats-1. type IndicesDataStreamsStats func(o ...func(*IndicesDataStreamsStatsRequest)) (*Response, error) // IndicesDataStreamsStatsRequest configures the Indices Data Streams Stats API request. type IndicesDataStreamsStatsRequest struct { Name []string + ExpandWildcards []string + Pretty bool Human bool ErrorTrace bool @@ -98,6 +100,10 @@ func (r IndicesDataStreamsStatsRequest) Do(providedCtx context.Context, transpor params = make(map[string]string) + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") + } + if r.Pretty { params["pretty"] = "true" } @@ -183,6 +189,13 @@ func (f IndicesDataStreamsStats) WithName(v ...string) func(*IndicesDataStreamsS } } +// WithExpandWildcards - whether to expand wildcard expressions to concrete data stream names that are open, closed or both.. +func (f IndicesDataStreamsStats) WithExpandWildcards(v ...string) func(*IndicesDataStreamsStatsRequest) { + return func(r *IndicesDataStreamsStatsRequest) { + r.ExpandWildcards = v + } +} + // WithPretty makes the response body pretty-printed. func (f IndicesDataStreamsStats) WithPretty() func(*IndicesDataStreamsStatsRequest) { return func(r *IndicesDataStreamsStatsRequest) { diff --git a/esapi/api.xpack.indices.delete_data_stream.go b/esapi/api.xpack.indices.delete_data_stream.go index 9005c88a9f..feb0f6d1e1 100644 --- a/esapi/api.xpack.indices.delete_data_stream.go +++ b/esapi/api.xpack.indices.delete_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,16 +44,16 @@ func newIndicesDeleteDataStreamFunc(t Transport) IndicesDeleteDataStream { // ----- API Definition ------------------------------------------------------- -// IndicesDeleteDataStream - Deletes a data stream. +// IndicesDeleteDataStream - Delete data streams // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream. type IndicesDeleteDataStream func(name []string, o ...func(*IndicesDeleteDataStreamRequest)) (*Response, error) // IndicesDeleteDataStreamRequest configures the Indices Delete Data Stream API request. type IndicesDeleteDataStreamRequest struct { Name []string - ExpandWildcards string + ExpandWildcards []string MasterTimeout time.Duration Pretty bool @@ -103,8 +103,8 @@ func (r IndicesDeleteDataStreamRequest) Do(providedCtx context.Context, transpor params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.MasterTimeout != 0 { @@ -190,7 +190,7 @@ func (f IndicesDeleteDataStream) WithContext(v context.Context) func(*IndicesDel } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesDeleteDataStream) WithExpandWildcards(v string) func(*IndicesDeleteDataStreamRequest) { +func (f IndicesDeleteDataStream) WithExpandWildcards(v ...string) func(*IndicesDeleteDataStreamRequest) { return func(r *IndicesDeleteDataStreamRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.xpack.indices.delete_data_stream_options.go b/esapi/api.xpack.indices.delete_data_stream_options.go index eeb7035550..2074ef3f3e 100644 --- a/esapi/api.xpack.indices.delete_data_stream_options.go +++ b/esapi/api.xpack.indices.delete_data_stream_options.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,16 +44,16 @@ func newIndicesDeleteDataStreamOptionsFunc(t Transport) IndicesDeleteDataStreamO // ----- API Definition ------------------------------------------------------- -// IndicesDeleteDataStreamOptions - Deletes the data stream options of the selected data streams. +// IndicesDeleteDataStreamOptions - Delete data stream options // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options. type IndicesDeleteDataStreamOptions func(name []string, o ...func(*IndicesDeleteDataStreamOptionsRequest)) (*Response, error) // IndicesDeleteDataStreamOptionsRequest configures the Indices Delete Data Stream Options API request. type IndicesDeleteDataStreamOptionsRequest struct { Name []string - ExpandWildcards string + ExpandWildcards []string MasterTimeout time.Duration Timeout time.Duration @@ -106,8 +106,8 @@ func (r IndicesDeleteDataStreamOptionsRequest) Do(providedCtx context.Context, t params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.MasterTimeout != 0 { @@ -197,7 +197,7 @@ func (f IndicesDeleteDataStreamOptions) WithContext(v context.Context) func(*Ind } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesDeleteDataStreamOptions) WithExpandWildcards(v string) func(*IndicesDeleteDataStreamOptionsRequest) { +func (f IndicesDeleteDataStreamOptions) WithExpandWildcards(v ...string) func(*IndicesDeleteDataStreamOptionsRequest) { return func(r *IndicesDeleteDataStreamOptionsRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.xpack.indices.get_data_stream.go b/esapi/api.xpack.indices.get_data_stream.go index 9ccb279675..e84f17d188 100644 --- a/esapi/api.xpack.indices.get_data_stream.go +++ b/esapi/api.xpack.indices.get_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,16 +44,16 @@ func newIndicesGetDataStreamFunc(t Transport) IndicesGetDataStream { // ----- API Definition ------------------------------------------------------- -// IndicesGetDataStream - Returns data streams. +// IndicesGetDataStream - Get data streams // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream. type IndicesGetDataStream func(o ...func(*IndicesGetDataStreamRequest)) (*Response, error) // IndicesGetDataStreamRequest configures the Indices Get Data Stream API request. type IndicesGetDataStreamRequest struct { Name []string - ExpandWildcards string + ExpandWildcards []string IncludeDefaults *bool MasterTimeout time.Duration Verbose *bool @@ -103,8 +103,8 @@ func (r IndicesGetDataStreamRequest) Do(providedCtx context.Context, transport T params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IncludeDefaults != nil { @@ -205,7 +205,7 @@ func (f IndicesGetDataStream) WithName(v ...string) func(*IndicesGetDataStreamRe } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesGetDataStream) WithExpandWildcards(v string) func(*IndicesGetDataStreamRequest) { +func (f IndicesGetDataStream) WithExpandWildcards(v ...string) func(*IndicesGetDataStreamRequest) { return func(r *IndicesGetDataStreamRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.xpack.indices.get_data_stream_mappings.go b/esapi/api.xpack.indices.get_data_stream_mappings.go new file mode 100644 index 0000000000..1bff167332 --- /dev/null +++ b/esapi/api.xpack.indices.get_data_stream_mappings.go @@ -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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "errors" + "net/http" + "strings" + "time" +) + +func newIndicesGetDataStreamMappingsFunc(t Transport) IndicesGetDataStreamMappings { + return func(name []string, o ...func(*IndicesGetDataStreamMappingsRequest)) (*Response, error) { + var r = IndicesGetDataStreamMappingsRequest{Name: name} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesGetDataStreamMappings - Get data stream mappings +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-mappings. +type IndicesGetDataStreamMappings func(name []string, o ...func(*IndicesGetDataStreamMappingsRequest)) (*Response, error) + +// IndicesGetDataStreamMappingsRequest configures the Indices Get Data Stream Mappings API request. +type IndicesGetDataStreamMappingsRequest struct { + Name []string + + MasterTimeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesGetDataStreamMappingsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_data_stream_mappings") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_data_stream") + 1 + len(strings.Join(r.Name, ",")) + 1 + len("_mappings")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + path.WriteString(strings.Join(r.Name, ",")) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) + } + path.WriteString("/") + path.WriteString("_mappings") + + params = make(map[string]string) + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_data_stream_mappings") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_data_stream_mappings") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesGetDataStreamMappings) WithContext(v context.Context) func(*IndicesGetDataStreamMappingsRequest) { + return func(r *IndicesGetDataStreamMappingsRequest) { + r.ctx = v + } +} + +// WithMasterTimeout - period to wait for a connection to the master node. +func (f IndicesGetDataStreamMappings) WithMasterTimeout(v time.Duration) func(*IndicesGetDataStreamMappingsRequest) { + return func(r *IndicesGetDataStreamMappingsRequest) { + r.MasterTimeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesGetDataStreamMappings) WithPretty() func(*IndicesGetDataStreamMappingsRequest) { + return func(r *IndicesGetDataStreamMappingsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesGetDataStreamMappings) WithHuman() func(*IndicesGetDataStreamMappingsRequest) { + return func(r *IndicesGetDataStreamMappingsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesGetDataStreamMappings) WithErrorTrace() func(*IndicesGetDataStreamMappingsRequest) { + return func(r *IndicesGetDataStreamMappingsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesGetDataStreamMappings) WithFilterPath(v ...string) func(*IndicesGetDataStreamMappingsRequest) { + return func(r *IndicesGetDataStreamMappingsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesGetDataStreamMappings) WithHeader(h map[string]string) func(*IndicesGetDataStreamMappingsRequest) { + return func(r *IndicesGetDataStreamMappingsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesGetDataStreamMappings) WithOpaqueID(s string) func(*IndicesGetDataStreamMappingsRequest) { + return func(r *IndicesGetDataStreamMappingsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.xpack.indices.get_data_stream_options.go b/esapi/api.xpack.indices.get_data_stream_options.go index 8cc68ce2ec..f8b0c2a260 100644 --- a/esapi/api.xpack.indices.get_data_stream_options.go +++ b/esapi/api.xpack.indices.get_data_stream_options.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,16 +44,16 @@ func newIndicesGetDataStreamOptionsFunc(t Transport) IndicesGetDataStreamOptions // ----- API Definition ------------------------------------------------------- -// IndicesGetDataStreamOptions - Returns the data stream options of the selected data streams. +// IndicesGetDataStreamOptions - Get data stream options // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-options. type IndicesGetDataStreamOptions func(name []string, o ...func(*IndicesGetDataStreamOptionsRequest)) (*Response, error) // IndicesGetDataStreamOptionsRequest configures the Indices Get Data Stream Options API request. type IndicesGetDataStreamOptionsRequest struct { Name []string - ExpandWildcards string + ExpandWildcards []string MasterTimeout time.Duration Pretty bool @@ -105,8 +105,8 @@ func (r IndicesGetDataStreamOptionsRequest) Do(providedCtx context.Context, tran params = make(map[string]string) - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.MasterTimeout != 0 { @@ -192,7 +192,7 @@ func (f IndicesGetDataStreamOptions) WithContext(v context.Context) func(*Indice } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -func (f IndicesGetDataStreamOptions) WithExpandWildcards(v string) func(*IndicesGetDataStreamOptionsRequest) { +func (f IndicesGetDataStreamOptions) WithExpandWildcards(v ...string) func(*IndicesGetDataStreamOptionsRequest) { return func(r *IndicesGetDataStreamOptionsRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.xpack.indices.get_data_stream_settings.go b/esapi/api.xpack.indices.get_data_stream_settings.go index 931399b06a..50778b13a6 100644 --- a/esapi/api.xpack.indices.get_data_stream_settings.go +++ b/esapi/api.xpack.indices.get_data_stream_settings.go @@ -15,19 +15,20 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strings" "time" ) func newIndicesGetDataStreamSettingsFunc(t Transport) IndicesGetDataStreamSettings { - return func(name string, o ...func(*IndicesGetDataStreamSettingsRequest)) (*Response, error) { + return func(name []string, o ...func(*IndicesGetDataStreamSettingsRequest)) (*Response, error) { var r = IndicesGetDataStreamSettingsRequest{Name: name} for _, f := range o { f(&r) @@ -43,14 +44,14 @@ func newIndicesGetDataStreamSettingsFunc(t Transport) IndicesGetDataStreamSettin // ----- API Definition ------------------------------------------------------- -// IndicesGetDataStreamSettings - Gets a data stream's settings +// IndicesGetDataStreamSettings - Get data stream settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. -type IndicesGetDataStreamSettings func(name string, o ...func(*IndicesGetDataStreamSettingsRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-settings. +type IndicesGetDataStreamSettings func(name []string, o ...func(*IndicesGetDataStreamSettingsRequest)) (*Response, error) // IndicesGetDataStreamSettingsRequest configures the Indices Get Data Stream Settings API request. type IndicesGetDataStreamSettingsRequest struct { - Name string + Name []string MasterTimeout time.Duration @@ -85,14 +86,18 @@ func (r IndicesGetDataStreamSettingsRequest) Do(providedCtx context.Context, tra method = "GET" - path.Grow(7 + 1 + len("_data_stream") + 1 + len(r.Name) + 1 + len("_settings")) + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_data_stream") + 1 + len(strings.Join(r.Name, ",")) + 1 + len("_settings")) path.WriteString("http://") path.WriteString("/") path.WriteString("_data_stream") path.WriteString("/") - path.WriteString(r.Name) + path.WriteString(strings.Join(r.Name, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "name", r.Name) + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) } path.WriteString("/") path.WriteString("_settings") diff --git a/esapi/api.xpack.indices.migrate_to_data_stream.go b/esapi/api.xpack.indices.migrate_to_data_stream.go index 7743e39219..67e6fcf5dc 100644 --- a/esapi/api.xpack.indices.migrate_to_data_stream.go +++ b/esapi/api.xpack.indices.migrate_to_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesMigrateToDataStreamFunc(t Transport) IndicesMigrateToDataStream { // ----- API Definition ------------------------------------------------------- -// IndicesMigrateToDataStream - Migrates an alias to a data stream +// IndicesMigrateToDataStream - Convert an index alias to a data stream // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-to-data-stream. type IndicesMigrateToDataStream func(name string, o ...func(*IndicesMigrateToDataStreamRequest)) (*Response, error) // IndicesMigrateToDataStreamRequest configures the Indices Migrate To Data Stream API request. diff --git a/esapi/api.xpack.indices.promote_data_stream.go b/esapi/api.xpack.indices.promote_data_stream.go index 516841a8ed..6e30143e1c 100644 --- a/esapi/api.xpack.indices.promote_data_stream.go +++ b/esapi/api.xpack.indices.promote_data_stream.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newIndicesPromoteDataStreamFunc(t Transport) IndicesPromoteDataStream { // ----- API Definition ------------------------------------------------------- -// IndicesPromoteDataStream - Promotes a data stream from a replicated data stream managed by CCR to a regular data stream +// IndicesPromoteDataStream - Promote a data stream // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-promote-data-stream. type IndicesPromoteDataStream func(name string, o ...func(*IndicesPromoteDataStreamRequest)) (*Response, error) // IndicesPromoteDataStreamRequest configures the Indices Promote Data Stream API request. diff --git a/esapi/api.xpack.indices.reload_search_analyzers.go b/esapi/api.xpack.indices.reload_search_analyzers.go index 59b057f37a..29d89716ea 100644 --- a/esapi/api.xpack.indices.reload_search_analyzers.go +++ b/esapi/api.xpack.indices.reload_search_analyzers.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newIndicesReloadSearchAnalyzersFunc(t Transport) IndicesReloadSearchAnalyze // ----- API Definition ------------------------------------------------------- -// IndicesReloadSearchAnalyzers - Reloads an index's search analyzers and their resources. +// IndicesReloadSearchAnalyzers - Reload search analyzers // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-reload-analyzers.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-reload-search-analyzers. type IndicesReloadSearchAnalyzers func(index []string, o ...func(*IndicesReloadSearchAnalyzersRequest)) (*Response, error) // IndicesReloadSearchAnalyzersRequest configures the Indices Reload Search Analyzers API request. @@ -54,7 +54,7 @@ type IndicesReloadSearchAnalyzersRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool Resource string @@ -109,8 +109,8 @@ func (r IndicesReloadSearchAnalyzersRequest) Do(providedCtx context.Context, tra params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -207,7 +207,7 @@ func (f IndicesReloadSearchAnalyzers) WithAllowNoIndices(v bool) func(*IndicesRe } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f IndicesReloadSearchAnalyzers) WithExpandWildcards(v string) func(*IndicesReloadSearchAnalyzersRequest) { +func (f IndicesReloadSearchAnalyzers) WithExpandWildcards(v ...string) func(*IndicesReloadSearchAnalyzersRequest) { return func(r *IndicesReloadSearchAnalyzersRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.xpack.license.delete.go b/esapi/api.xpack.license.delete.go index b862a5aa98..ea1d4af1e2 100644 --- a/esapi/api.xpack.license.delete.go +++ b/esapi/api.xpack.license.delete.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newLicenseDeleteFunc(t Transport) LicenseDelete { // ----- API Definition ------------------------------------------------------- -// LicenseDelete - Deletes licensing information for the cluster +// LicenseDelete - Delete the license // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-delete. type LicenseDelete func(o ...func(*LicenseDeleteRequest)) (*Response, error) // LicenseDeleteRequest configures the License Delete API request. diff --git a/esapi/api.xpack.license.get.go b/esapi/api.xpack.license.get.go index 03c037464f..766e3217b0 100644 --- a/esapi/api.xpack.license.get.go +++ b/esapi/api.xpack.license.get.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newLicenseGetFunc(t Transport) LicenseGet { // ----- API Definition ------------------------------------------------------- -// LicenseGet - Retrieves licensing information for the cluster +// LicenseGet - Get license information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get. type LicenseGet func(o ...func(*LicenseGetRequest)) (*Response, error) // LicenseGetRequest configures the License Get API request. diff --git a/esapi/api.xpack.license.get_basic_status.go b/esapi/api.xpack.license.get_basic_status.go index 8179486b29..19bfb4bcd4 100644 --- a/esapi/api.xpack.license.get_basic_status.go +++ b/esapi/api.xpack.license.get_basic_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newLicenseGetBasicStatusFunc(t Transport) LicenseGetBasicStatus { // ----- API Definition ------------------------------------------------------- -// LicenseGetBasicStatus - Retrieves information about the status of the basic license. +// LicenseGetBasicStatus - Get the basic license status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-basic-status. type LicenseGetBasicStatus func(o ...func(*LicenseGetBasicStatusRequest)) (*Response, error) // LicenseGetBasicStatusRequest configures the License Get Basic Status API request. diff --git a/esapi/api.xpack.license.get_trial_status.go b/esapi/api.xpack.license.get_trial_status.go index 7983dbf296..e3635c1074 100644 --- a/esapi/api.xpack.license.get_trial_status.go +++ b/esapi/api.xpack.license.get_trial_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newLicenseGetTrialStatusFunc(t Transport) LicenseGetTrialStatus { // ----- API Definition ------------------------------------------------------- -// LicenseGetTrialStatus - Retrieves information about the status of the trial license. +// LicenseGetTrialStatus - Get the trial status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-trial-status. type LicenseGetTrialStatus func(o ...func(*LicenseGetTrialStatusRequest)) (*Response, error) // LicenseGetTrialStatusRequest configures the License Get Trial Status API request. diff --git a/esapi/api.xpack.license.post.go b/esapi/api.xpack.license.post.go index dbb13face8..b1132b75bb 100644 --- a/esapi/api.xpack.license.post.go +++ b/esapi/api.xpack.license.post.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newLicensePostFunc(t Transport) LicensePost { // ----- API Definition ------------------------------------------------------- -// LicensePost - Updates the license for the cluster. +// LicensePost - Update the license // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post. type LicensePost func(o ...func(*LicensePostRequest)) (*Response, error) // LicensePostRequest configures the License Post API request. diff --git a/esapi/api.xpack.license.post_start_basic.go b/esapi/api.xpack.license.post_start_basic.go index fda37250e9..5407178735 100644 --- a/esapi/api.xpack.license.post_start_basic.go +++ b/esapi/api.xpack.license.post_start_basic.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newLicensePostStartBasicFunc(t Transport) LicensePostStartBasic { // ----- API Definition ------------------------------------------------------- -// LicensePostStartBasic - Starts an indefinite basic license. +// LicensePostStartBasic - Start a basic license // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-basic. type LicensePostStartBasic func(o ...func(*LicensePostStartBasicRequest)) (*Response, error) // LicensePostStartBasicRequest configures the License Post Start Basic API request. diff --git a/esapi/api.xpack.license.post_start_trial.go b/esapi/api.xpack.license.post_start_trial.go index af68a61a29..80e129de7f 100644 --- a/esapi/api.xpack.license.post_start_trial.go +++ b/esapi/api.xpack.license.post_start_trial.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newLicensePostStartTrialFunc(t Transport) LicensePostStartTrial { // ----- API Definition ------------------------------------------------------- -// LicensePostStartTrial - starts a limited time trial license. +// LicensePostStartTrial - Start a trial // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-trial. type LicensePostStartTrial func(o ...func(*LicensePostStartTrialRequest)) (*Response, error) // LicensePostStartTrialRequest configures the License Post Start Trial API request. diff --git a/esapi/api.xpack.logstash.delete_pipeline.go b/esapi/api.xpack.logstash.delete_pipeline.go index a635069593..cae5178222 100644 --- a/esapi/api.xpack.logstash.delete_pipeline.go +++ b/esapi/api.xpack.logstash.delete_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newLogstashDeletePipelineFunc(t Transport) LogstashDeletePipeline { // ----- API Definition ------------------------------------------------------- -// LogstashDeletePipeline - Deletes Logstash Pipelines used by Central Management +// LogstashDeletePipeline - Delete a Logstash pipeline // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-delete-pipeline. type LogstashDeletePipeline func(id string, o ...func(*LogstashDeletePipelineRequest)) (*Response, error) // LogstashDeletePipelineRequest configures the Logstash Delete Pipeline API request. diff --git a/esapi/api.xpack.logstash.get_pipeline.go b/esapi/api.xpack.logstash.get_pipeline.go index 20b69e6adf..3531051df5 100644 --- a/esapi/api.xpack.logstash.get_pipeline.go +++ b/esapi/api.xpack.logstash.get_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,14 +42,14 @@ func newLogstashGetPipelineFunc(t Transport) LogstashGetPipeline { // ----- API Definition ------------------------------------------------------- -// LogstashGetPipeline - Retrieves Logstash Pipelines used by Central Management +// LogstashGetPipeline - Get Logstash pipelines // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-get-pipeline. type LogstashGetPipeline func(o ...func(*LogstashGetPipelineRequest)) (*Response, error) // LogstashGetPipelineRequest configures the Logstash Get Pipeline API request. type LogstashGetPipelineRequest struct { - DocumentID string + DocumentID []string Pretty bool Human bool @@ -82,17 +82,17 @@ func (r LogstashGetPipelineRequest) Do(providedCtx context.Context, transport Tr method = "GET" - path.Grow(7 + 1 + len("_logstash") + 1 + len("pipeline") + 1 + len(r.DocumentID)) + path.Grow(7 + 1 + len("_logstash") + 1 + len("pipeline") + 1 + len(strings.Join(r.DocumentID, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_logstash") path.WriteString("/") path.WriteString("pipeline") - if r.DocumentID != "" { + if len(r.DocumentID) > 0 { path.WriteString("/") - path.WriteString(r.DocumentID) + path.WriteString(strings.Join(r.DocumentID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "id", r.DocumentID) + instrument.RecordPathPart(ctx, "id", strings.Join(r.DocumentID, ",")) } } @@ -176,8 +176,8 @@ func (f LogstashGetPipeline) WithContext(v context.Context) func(*LogstashGetPip } } -// WithDocumentID - a list of pipeline ids. -func (f LogstashGetPipeline) WithDocumentID(v string) func(*LogstashGetPipelineRequest) { +// WithDocumentID - a list of pipeline identifiers.. +func (f LogstashGetPipeline) WithDocumentID(v ...string) func(*LogstashGetPipelineRequest) { return func(r *LogstashGetPipelineRequest) { r.DocumentID = v } diff --git a/esapi/api.xpack.logstash.put_pipeline.go b/esapi/api.xpack.logstash.put_pipeline.go index 520097b3ee..a9e7699fc3 100644 --- a/esapi/api.xpack.logstash.put_pipeline.go +++ b/esapi/api.xpack.logstash.put_pipeline.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newLogstashPutPipelineFunc(t Transport) LogstashPutPipeline { // ----- API Definition ------------------------------------------------------- -// LogstashPutPipeline - Adds and updates Logstash Pipelines used for Central Management +// LogstashPutPipeline - Create or update a Logstash pipeline // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-put-pipeline. type LogstashPutPipeline func(id string, body io.Reader, o ...func(*LogstashPutPipelineRequest)) (*Response, error) // LogstashPutPipelineRequest configures the Logstash Put Pipeline API request. diff --git a/esapi/api.xpack.migration.deprecations.go b/esapi/api.xpack.migration.deprecations.go index 2db7de447c..03e48e3e5d 100644 --- a/esapi/api.xpack.migration.deprecations.go +++ b/esapi/api.xpack.migration.deprecations.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMigrationDeprecationsFunc(t Transport) MigrationDeprecations { // ----- API Definition ------------------------------------------------------- -// MigrationDeprecations - Retrieves information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version. +// MigrationDeprecations - Get deprecation information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-deprecations. type MigrationDeprecations func(o ...func(*MigrationDeprecationsRequest)) (*Response, error) // MigrationDeprecationsRequest configures the Migration Deprecations API request. diff --git a/esapi/api.xpack.migration.get_feature_upgrade_status.go b/esapi/api.xpack.migration.get_feature_upgrade_status.go index 6115f7a55b..065fdd95b6 100644 --- a/esapi/api.xpack.migration.get_feature_upgrade_status.go +++ b/esapi/api.xpack.migration.get_feature_upgrade_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMigrationGetFeatureUpgradeStatusFunc(t Transport) MigrationGetFeatureUpg // ----- API Definition ------------------------------------------------------- -// MigrationGetFeatureUpgradeStatus - Find out whether system features need to be upgraded or not +// MigrationGetFeatureUpgradeStatus - Get feature migration information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status. type MigrationGetFeatureUpgradeStatus func(o ...func(*MigrationGetFeatureUpgradeStatusRequest)) (*Response, error) // MigrationGetFeatureUpgradeStatusRequest configures the Migration Get Feature Upgrade Status API request. diff --git a/esapi/api.xpack.migration.post_feature_upgrade.go b/esapi/api.xpack.migration.post_feature_upgrade.go index 5fcc613757..7c32b7e6ed 100644 --- a/esapi/api.xpack.migration.post_feature_upgrade.go +++ b/esapi/api.xpack.migration.post_feature_upgrade.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMigrationPostFeatureUpgradeFunc(t Transport) MigrationPostFeatureUpgrade // ----- API Definition ------------------------------------------------------- -// MigrationPostFeatureUpgrade - Begin upgrades for system features +// MigrationPostFeatureUpgrade - Start the feature migration // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status. type MigrationPostFeatureUpgrade func(o ...func(*MigrationPostFeatureUpgradeRequest)) (*Response, error) // MigrationPostFeatureUpgradeRequest configures the Migration Post Feature Upgrade API request. diff --git a/esapi/api.xpack.ml.clear_trained_model_deployment_cache.go b/esapi/api.xpack.ml.clear_trained_model_deployment_cache.go index 82fec86054..75d888cd20 100644 --- a/esapi/api.xpack.ml.clear_trained_model_deployment_cache.go +++ b/esapi/api.xpack.ml.clear_trained_model_deployment_cache.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMLClearTrainedModelDeploymentCacheFunc(t Transport) MLClearTrainedModelD // ----- API Definition ------------------------------------------------------- -// MLClearTrainedModelDeploymentCache - Clear the cached results from a trained model deployment +// MLClearTrainedModelDeploymentCache - Clear trained model deployment cache // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/clear-trained-model-deployment-cache.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-clear-trained-model-deployment-cache. type MLClearTrainedModelDeploymentCache func(model_id string, o ...func(*MLClearTrainedModelDeploymentCacheRequest)) (*Response, error) // MLClearTrainedModelDeploymentCacheRequest configures the ML Clear Trained Model Deployment Cache API request. diff --git a/esapi/api.xpack.ml.close_job.go b/esapi/api.xpack.ml.close_job.go index e61cb64377..bf818b4ccd 100644 --- a/esapi/api.xpack.ml.close_job.go +++ b/esapi/api.xpack.ml.close_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLCloseJobFunc(t Transport) MLCloseJob { // ----- API Definition ------------------------------------------------------- -// MLCloseJob - Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. +// MLCloseJob - Close anomaly detection jobs // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-close-job. type MLCloseJob func(job_id string, o ...func(*MLCloseJobRequest)) (*Response, error) // MLCloseJobRequest configures the ML Close Job API request. diff --git a/esapi/api.xpack.ml.delete_calendar.go b/esapi/api.xpack.ml.delete_calendar.go index 7e50e6b3fe..5a40dd971f 100644 --- a/esapi/api.xpack.ml.delete_calendar.go +++ b/esapi/api.xpack.ml.delete_calendar.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMLDeleteCalendarFunc(t Transport) MLDeleteCalendar { // ----- API Definition ------------------------------------------------------- -// MLDeleteCalendar - Deletes a calendar. +// MLDeleteCalendar - Delete a calendar // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar. type MLDeleteCalendar func(calendar_id string, o ...func(*MLDeleteCalendarRequest)) (*Response, error) // MLDeleteCalendarRequest configures the ML Delete Calendar API request. diff --git a/esapi/api.xpack.ml.delete_calendar_event.go b/esapi/api.xpack.ml.delete_calendar_event.go index 99bbb77046..c72579bc4b 100644 --- a/esapi/api.xpack.ml.delete_calendar_event.go +++ b/esapi/api.xpack.ml.delete_calendar_event.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMLDeleteCalendarEventFunc(t Transport) MLDeleteCalendarEvent { // ----- API Definition ------------------------------------------------------- -// MLDeleteCalendarEvent - Deletes scheduled events from a calendar. +// MLDeleteCalendarEvent - Delete events from a calendar // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-event. type MLDeleteCalendarEvent func(calendar_id string, event_id string, o ...func(*MLDeleteCalendarEventRequest)) (*Response, error) // MLDeleteCalendarEventRequest configures the ML Delete Calendar Event API request. diff --git a/esapi/api.xpack.ml.delete_calendar_job.go b/esapi/api.xpack.ml.delete_calendar_job.go index 6aa8d1f7f8..45f1393511 100644 --- a/esapi/api.xpack.ml.delete_calendar_job.go +++ b/esapi/api.xpack.ml.delete_calendar_job.go @@ -15,18 +15,19 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strings" ) func newMLDeleteCalendarJobFunc(t Transport) MLDeleteCalendarJob { - return func(calendar_id string, job_id string, o ...func(*MLDeleteCalendarJobRequest)) (*Response, error) { + return func(calendar_id string, job_id []string, o ...func(*MLDeleteCalendarJobRequest)) (*Response, error) { var r = MLDeleteCalendarJobRequest{CalendarID: calendar_id, JobID: job_id} for _, f := range o { f(&r) @@ -42,15 +43,15 @@ func newMLDeleteCalendarJobFunc(t Transport) MLDeleteCalendarJob { // ----- API Definition ------------------------------------------------------- -// MLDeleteCalendarJob - Deletes anomaly detection jobs from a calendar. +// MLDeleteCalendarJob - Delete anomaly jobs from a calendar // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html. -type MLDeleteCalendarJob func(calendar_id string, job_id string, o ...func(*MLDeleteCalendarJobRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-job. +type MLDeleteCalendarJob func(calendar_id string, job_id []string, o ...func(*MLDeleteCalendarJobRequest)) (*Response, error) // MLDeleteCalendarJobRequest configures the ML Delete Calendar Job API request. type MLDeleteCalendarJobRequest struct { CalendarID string - JobID string + JobID []string Pretty bool Human bool @@ -83,7 +84,11 @@ func (r MLDeleteCalendarJobRequest) Do(providedCtx context.Context, transport Tr method = "DELETE" - path.Grow(7 + 1 + len("_ml") + 1 + len("calendars") + 1 + len(r.CalendarID) + 1 + len("jobs") + 1 + len(r.JobID)) + if len(r.JobID) == 0 { + return nil, errors.New("job_id is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_ml") + 1 + len("calendars") + 1 + len(r.CalendarID) + 1 + len("jobs") + 1 + len(strings.Join(r.JobID, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_ml") @@ -97,9 +102,9 @@ func (r MLDeleteCalendarJobRequest) Do(providedCtx context.Context, transport Tr path.WriteString("/") path.WriteString("jobs") path.WriteString("/") - path.WriteString(r.JobID) + path.WriteString(strings.Join(r.JobID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "job_id", r.JobID) + instrument.RecordPathPart(ctx, "job_id", strings.Join(r.JobID, ",")) } params = make(map[string]string) diff --git a/esapi/api.xpack.ml.delete_data_frame_analytics.go b/esapi/api.xpack.ml.delete_data_frame_analytics.go index 931ecf2808..4fd90a87d1 100644 --- a/esapi/api.xpack.ml.delete_data_frame_analytics.go +++ b/esapi/api.xpack.ml.delete_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLDeleteDataFrameAnalyticsFunc(t Transport) MLDeleteDataFrameAnalytics { // ----- API Definition ------------------------------------------------------- -// MLDeleteDataFrameAnalytics - Deletes an existing data frame analytics job. +// MLDeleteDataFrameAnalytics - Delete a data frame analytics job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-data-frame-analytics. type MLDeleteDataFrameAnalytics func(id string, o ...func(*MLDeleteDataFrameAnalyticsRequest)) (*Response, error) // MLDeleteDataFrameAnalyticsRequest configures the ML Delete Data Frame Analytics API request. diff --git a/esapi/api.xpack.ml.delete_datafeed.go b/esapi/api.xpack.ml.delete_datafeed.go index 1d33eab05a..b004c1bb0d 100644 --- a/esapi/api.xpack.ml.delete_datafeed.go +++ b/esapi/api.xpack.ml.delete_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLDeleteDatafeedFunc(t Transport) MLDeleteDatafeed { // ----- API Definition ------------------------------------------------------- -// MLDeleteDatafeed - Deletes an existing datafeed. +// MLDeleteDatafeed - Delete a datafeed // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-datafeed. type MLDeleteDatafeed func(datafeed_id string, o ...func(*MLDeleteDatafeedRequest)) (*Response, error) // MLDeleteDatafeedRequest configures the ML Delete Datafeed API request. diff --git a/esapi/api.xpack.ml.delete_expired_data.go b/esapi/api.xpack.ml.delete_expired_data.go index 1873af3625..1e2a66d261 100644 --- a/esapi/api.xpack.ml.delete_expired_data.go +++ b/esapi/api.xpack.ml.delete_expired_data.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLDeleteExpiredDataFunc(t Transport) MLDeleteExpiredData { // ----- API Definition ------------------------------------------------------- -// MLDeleteExpiredData - Deletes expired and unused machine learning data. +// MLDeleteExpiredData - Delete expired ML data // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-expired-data. type MLDeleteExpiredData func(o ...func(*MLDeleteExpiredDataRequest)) (*Response, error) // MLDeleteExpiredDataRequest configures the ML Delete Expired Data API request. diff --git a/esapi/api.xpack.ml.delete_filter.go b/esapi/api.xpack.ml.delete_filter.go index b4329fc360..82aa53f0ce 100644 --- a/esapi/api.xpack.ml.delete_filter.go +++ b/esapi/api.xpack.ml.delete_filter.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMLDeleteFilterFunc(t Transport) MLDeleteFilter { // ----- API Definition ------------------------------------------------------- -// MLDeleteFilter - Deletes a filter. +// MLDeleteFilter - Delete a filter // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-filter. type MLDeleteFilter func(filter_id string, o ...func(*MLDeleteFilterRequest)) (*Response, error) // MLDeleteFilterRequest configures the ML Delete Filter API request. diff --git a/esapi/api.xpack.ml.delete_forecast.go b/esapi/api.xpack.ml.delete_forecast.go index 8f6c342f5a..b632f6e947 100644 --- a/esapi/api.xpack.ml.delete_forecast.go +++ b/esapi/api.xpack.ml.delete_forecast.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLDeleteForecastFunc(t Transport) MLDeleteForecast { // ----- API Definition ------------------------------------------------------- -// MLDeleteForecast - Deletes forecasts from a machine learning job. +// MLDeleteForecast - Delete forecasts from a job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-forecast. type MLDeleteForecast func(job_id string, o ...func(*MLDeleteForecastRequest)) (*Response, error) // MLDeleteForecastRequest configures the ML Delete Forecast API request. diff --git a/esapi/api.xpack.ml.delete_job.go b/esapi/api.xpack.ml.delete_job.go index 7284cdf47d..fd00778b57 100644 --- a/esapi/api.xpack.ml.delete_job.go +++ b/esapi/api.xpack.ml.delete_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLDeleteJobFunc(t Transport) MLDeleteJob { // ----- API Definition ------------------------------------------------------- -// MLDeleteJob - Deletes an existing anomaly detection job. +// MLDeleteJob - Delete an anomaly detection job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-job. type MLDeleteJob func(job_id string, o ...func(*MLDeleteJobRequest)) (*Response, error) // MLDeleteJobRequest configures the ML Delete Job API request. diff --git a/esapi/api.xpack.ml.delete_model_snapshot.go b/esapi/api.xpack.ml.delete_model_snapshot.go index 22389abbb2..f4fffd4a9f 100644 --- a/esapi/api.xpack.ml.delete_model_snapshot.go +++ b/esapi/api.xpack.ml.delete_model_snapshot.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMLDeleteModelSnapshotFunc(t Transport) MLDeleteModelSnapshot { // ----- API Definition ------------------------------------------------------- -// MLDeleteModelSnapshot - Deletes an existing model snapshot. +// MLDeleteModelSnapshot - Delete a model snapshot // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-model-snapshot. type MLDeleteModelSnapshot func(snapshot_id string, job_id string, o ...func(*MLDeleteModelSnapshotRequest)) (*Response, error) // MLDeleteModelSnapshotRequest configures the ML Delete Model Snapshot API request. diff --git a/esapi/api.xpack.ml.delete_trained_model.go b/esapi/api.xpack.ml.delete_trained_model.go index 7895f36b50..5dd460d339 100644 --- a/esapi/api.xpack.ml.delete_trained_model.go +++ b/esapi/api.xpack.ml.delete_trained_model.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLDeleteTrainedModelFunc(t Transport) MLDeleteTrainedModel { // ----- API Definition ------------------------------------------------------- -// MLDeleteTrainedModel - Deletes an existing trained inference model that is currently not referenced by an ingest pipeline. +// MLDeleteTrainedModel - Delete an unreferenced trained model // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model. type MLDeleteTrainedModel func(model_id string, o ...func(*MLDeleteTrainedModelRequest)) (*Response, error) // MLDeleteTrainedModelRequest configures the ML Delete Trained Model API request. diff --git a/esapi/api.xpack.ml.delete_trained_model_alias.go b/esapi/api.xpack.ml.delete_trained_model_alias.go index e6bc84f28b..8bdfb94b81 100644 --- a/esapi/api.xpack.ml.delete_trained_model_alias.go +++ b/esapi/api.xpack.ml.delete_trained_model_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMLDeleteTrainedModelAliasFunc(t Transport) MLDeleteTrainedModelAlias { // ----- API Definition ------------------------------------------------------- -// MLDeleteTrainedModelAlias - Deletes a model alias that refers to the trained model +// MLDeleteTrainedModelAlias - Delete a trained model alias // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model-alias. type MLDeleteTrainedModelAlias func(model_alias string, model_id string, o ...func(*MLDeleteTrainedModelAliasRequest)) (*Response, error) // MLDeleteTrainedModelAliasRequest configures the ML Delete Trained Model Alias API request. diff --git a/esapi/api.xpack.ml.estimate_model_memory.go b/esapi/api.xpack.ml.estimate_model_memory.go index 5c77a487fc..1d85df7ed9 100644 --- a/esapi/api.xpack.ml.estimate_model_memory.go +++ b/esapi/api.xpack.ml.estimate_model_memory.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLEstimateModelMemoryFunc(t Transport) MLEstimateModelMemory { // ----- API Definition ------------------------------------------------------- -// MLEstimateModelMemory - Estimates the model memory +// MLEstimateModelMemory - Estimate job model memory usage // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-estimate-model-memory. type MLEstimateModelMemory func(body io.Reader, o ...func(*MLEstimateModelMemoryRequest)) (*Response, error) // MLEstimateModelMemoryRequest configures the ML Estimate Model Memory API request. diff --git a/esapi/api.xpack.ml.evaluate_data_frame.go b/esapi/api.xpack.ml.evaluate_data_frame.go index f20c0eb72f..5e897a92b7 100644 --- a/esapi/api.xpack.ml.evaluate_data_frame.go +++ b/esapi/api.xpack.ml.evaluate_data_frame.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLEvaluateDataFrameFunc(t Transport) MLEvaluateDataFrame { // ----- API Definition ------------------------------------------------------- -// MLEvaluateDataFrame - Evaluates the data frame analytics for an annotated index. +// MLEvaluateDataFrame - Evaluate data frame analytics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-evaluate-data-frame. type MLEvaluateDataFrame func(body io.Reader, o ...func(*MLEvaluateDataFrameRequest)) (*Response, error) // MLEvaluateDataFrameRequest configures the ML Evaluate Data Frame API request. diff --git a/esapi/api.xpack.ml.explain_data_frame_analytics.go b/esapi/api.xpack.ml.explain_data_frame_analytics.go index 33e97e0086..90660da8ab 100644 --- a/esapi/api.xpack.ml.explain_data_frame_analytics.go +++ b/esapi/api.xpack.ml.explain_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLExplainDataFrameAnalyticsFunc(t Transport) MLExplainDataFrameAnalytics // ----- API Definition ------------------------------------------------------- -// MLExplainDataFrameAnalytics - Explains a data frame analytics config. +// MLExplainDataFrameAnalytics - Explain data frame analytics config // -// See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-explain-data-frame-analytics. type MLExplainDataFrameAnalytics func(o ...func(*MLExplainDataFrameAnalyticsRequest)) (*Response, error) // MLExplainDataFrameAnalyticsRequest configures the ML Explain Data Frame Analytics API request. diff --git a/esapi/api.xpack.ml.flush_job.go b/esapi/api.xpack.ml.flush_job.go index 391170a8ae..0c452de17c 100644 --- a/esapi/api.xpack.ml.flush_job.go +++ b/esapi/api.xpack.ml.flush_job.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "fmt" "io" "net/http" "strconv" @@ -44,9 +45,9 @@ func newMLFlushJobFunc(t Transport) MLFlushJob { // ----- API Definition ------------------------------------------------------- -// MLFlushJob - Forces any buffered data to be processed by the job. +// MLFlushJob - Force buffered data to be processed // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-flush-job. type MLFlushJob func(job_id string, o ...func(*MLFlushJobRequest)) (*Response, error) // MLFlushJobRequest configures the ML Flush Job API request. @@ -55,11 +56,11 @@ type MLFlushJobRequest struct { JobID string - AdvanceTime string + AdvanceTime interface{} CalcInterim *bool - End string - SkipTime string - Start string + End interface{} + SkipTime interface{} + Start interface{} Pretty bool Human bool @@ -108,24 +109,24 @@ func (r MLFlushJobRequest) Do(providedCtx context.Context, transport Transport) params = make(map[string]string) - if r.AdvanceTime != "" { - params["advance_time"] = r.AdvanceTime + if r.AdvanceTime != nil { + params["advance_time"] = fmt.Sprintf("%v", r.AdvanceTime) } if r.CalcInterim != nil { params["calc_interim"] = strconv.FormatBool(*r.CalcInterim) } - if r.End != "" { - params["end"] = r.End + if r.End != nil { + params["end"] = fmt.Sprintf("%v", r.End) } - if r.SkipTime != "" { - params["skip_time"] = r.SkipTime + if r.SkipTime != nil { + params["skip_time"] = fmt.Sprintf("%v", r.SkipTime) } - if r.Start != "" { - params["start"] = r.Start + if r.Start != nil { + params["start"] = fmt.Sprintf("%v", r.Start) } if r.Pretty { @@ -221,7 +222,7 @@ func (f MLFlushJob) WithBody(v io.Reader) func(*MLFlushJobRequest) { } // WithAdvanceTime - advances time to the given value generating results and updating the model for the advanced interval. -func (f MLFlushJob) WithAdvanceTime(v string) func(*MLFlushJobRequest) { +func (f MLFlushJob) WithAdvanceTime(v interface{}) func(*MLFlushJobRequest) { return func(r *MLFlushJobRequest) { r.AdvanceTime = v } @@ -235,21 +236,21 @@ func (f MLFlushJob) WithCalcInterim(v bool) func(*MLFlushJobRequest) { } // WithEnd - when used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results. -func (f MLFlushJob) WithEnd(v string) func(*MLFlushJobRequest) { +func (f MLFlushJob) WithEnd(v interface{}) func(*MLFlushJobRequest) { return func(r *MLFlushJobRequest) { r.End = v } } // WithSkipTime - skips time to the given value without generating results or updating the model for the skipped interval. -func (f MLFlushJob) WithSkipTime(v string) func(*MLFlushJobRequest) { +func (f MLFlushJob) WithSkipTime(v interface{}) func(*MLFlushJobRequest) { return func(r *MLFlushJobRequest) { r.SkipTime = v } } // WithStart - when used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results. -func (f MLFlushJob) WithStart(v string) func(*MLFlushJobRequest) { +func (f MLFlushJob) WithStart(v interface{}) func(*MLFlushJobRequest) { return func(r *MLFlushJobRequest) { r.Start = v } diff --git a/esapi/api.xpack.ml.forecast.go b/esapi/api.xpack.ml.forecast.go index 31bd37ecfe..93b628a63c 100644 --- a/esapi/api.xpack.ml.forecast.go +++ b/esapi/api.xpack.ml.forecast.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLForecastFunc(t Transport) MLForecast { // ----- API Definition ------------------------------------------------------- -// MLForecast - Predicts the future behavior of a time series by using its historical behavior. +// MLForecast - Predict future behavior of a time series // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-forecast. type MLForecast func(job_id string, o ...func(*MLForecastRequest)) (*Response, error) // MLForecastRequest configures the ML Forecast API request. diff --git a/esapi/api.xpack.ml.get_buckets.go b/esapi/api.xpack.ml.get_buckets.go index 74c1354de8..574da4f31e 100644 --- a/esapi/api.xpack.ml.get_buckets.go +++ b/esapi/api.xpack.ml.get_buckets.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLGetBucketsFunc(t Transport) MLGetBuckets { // ----- API Definition ------------------------------------------------------- -// MLGetBuckets - Retrieves anomaly detection job results for one or more buckets. +// MLGetBuckets - Get anomaly detection job results for buckets // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-buckets. type MLGetBuckets func(job_id string, o ...func(*MLGetBucketsRequest)) (*Response, error) // MLGetBucketsRequest configures the ML Get Buckets API request. @@ -59,13 +59,13 @@ type MLGetBucketsRequest struct { AnomalyScore interface{} Desc *bool - End string + End interface{} ExcludeInterim *bool Expand *bool From *int Size *int Sort string - Start string + Start interface{} Pretty bool Human bool @@ -131,8 +131,8 @@ func (r MLGetBucketsRequest) Do(providedCtx context.Context, transport Transport params["desc"] = strconv.FormatBool(*r.Desc) } - if r.End != "" { - params["end"] = r.End + if r.End != nil { + params["end"] = fmt.Sprintf("%v", r.End) } if r.ExcludeInterim != nil { @@ -155,8 +155,8 @@ func (r MLGetBucketsRequest) Do(providedCtx context.Context, transport Transport params["sort"] = r.Sort } - if r.Start != "" { - params["start"] = r.Start + if r.Start != nil { + params["start"] = fmt.Sprintf("%v", r.Start) } if r.Pretty { @@ -273,7 +273,7 @@ func (f MLGetBuckets) WithDesc(v bool) func(*MLGetBucketsRequest) { } // WithEnd - end time filter for buckets. -func (f MLGetBuckets) WithEnd(v string) func(*MLGetBucketsRequest) { +func (f MLGetBuckets) WithEnd(v interface{}) func(*MLGetBucketsRequest) { return func(r *MLGetBucketsRequest) { r.End = v } @@ -315,7 +315,7 @@ func (f MLGetBuckets) WithSort(v string) func(*MLGetBucketsRequest) { } // WithStart - start time filter for buckets. -func (f MLGetBuckets) WithStart(v string) func(*MLGetBucketsRequest) { +func (f MLGetBuckets) WithStart(v interface{}) func(*MLGetBucketsRequest) { return func(r *MLGetBucketsRequest) { r.Start = v } diff --git a/esapi/api.xpack.ml.get_calendar_events.go b/esapi/api.xpack.ml.get_calendar_events.go index f91a33a9ce..5f0a39e629 100644 --- a/esapi/api.xpack.ml.get_calendar_events.go +++ b/esapi/api.xpack.ml.get_calendar_events.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLGetCalendarEventsFunc(t Transport) MLGetCalendarEvents { // ----- API Definition ------------------------------------------------------- -// MLGetCalendarEvents - Retrieves information about the scheduled events in calendars. +// MLGetCalendarEvents - Get info about events in calendars // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendar-events. type MLGetCalendarEvents func(calendar_id string, o ...func(*MLGetCalendarEventsRequest)) (*Response, error) // MLGetCalendarEventsRequest configures the ML Get Calendar Events API request. @@ -57,7 +57,7 @@ type MLGetCalendarEventsRequest struct { From *int JobID string Size *int - Start string + Start interface{} Pretty bool Human bool @@ -122,8 +122,8 @@ func (r MLGetCalendarEventsRequest) Do(providedCtx context.Context, transport Tr params["size"] = strconv.FormatInt(int64(*r.Size), 10) } - if r.Start != "" { - params["start"] = r.Start + if r.Start != nil { + params["start"] = fmt.Sprintf("%v", r.Start) } if r.Pretty { @@ -233,7 +233,7 @@ func (f MLGetCalendarEvents) WithSize(v int) func(*MLGetCalendarEventsRequest) { } // WithStart - get events after this time. -func (f MLGetCalendarEvents) WithStart(v string) func(*MLGetCalendarEventsRequest) { +func (f MLGetCalendarEvents) WithStart(v interface{}) func(*MLGetCalendarEventsRequest) { return func(r *MLGetCalendarEventsRequest) { r.Start = v } diff --git a/esapi/api.xpack.ml.get_calendars.go b/esapi/api.xpack.ml.get_calendars.go index cc651c17c3..709a6d0734 100644 --- a/esapi/api.xpack.ml.get_calendars.go +++ b/esapi/api.xpack.ml.get_calendars.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLGetCalendarsFunc(t Transport) MLGetCalendars { // ----- API Definition ------------------------------------------------------- -// MLGetCalendars - Retrieves configuration information for calendars. +// MLGetCalendars - Get calendar configuration info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendars. type MLGetCalendars func(o ...func(*MLGetCalendarsRequest)) (*Response, error) // MLGetCalendarsRequest configures the ML Get Calendars API request. diff --git a/esapi/api.xpack.ml.get_categories.go b/esapi/api.xpack.ml.get_categories.go index 86a597f998..c569ad2e6a 100644 --- a/esapi/api.xpack.ml.get_categories.go +++ b/esapi/api.xpack.ml.get_categories.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLGetCategoriesFunc(t Transport) MLGetCategories { // ----- API Definition ------------------------------------------------------- -// MLGetCategories - Retrieves anomaly detection job results for one or more categories. +// MLGetCategories - Get anomaly detection job results for categories // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-categories. type MLGetCategories func(job_id string, o ...func(*MLGetCategoriesRequest)) (*Response, error) // MLGetCategoriesRequest configures the ML Get Categories API request. diff --git a/esapi/api.xpack.ml.get_data_frame_analytics.go b/esapi/api.xpack.ml.get_data_frame_analytics.go index b1cd2be83d..9397172725 100644 --- a/esapi/api.xpack.ml.get_data_frame_analytics.go +++ b/esapi/api.xpack.ml.get_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLGetDataFrameAnalyticsFunc(t Transport) MLGetDataFrameAnalytics { // ----- API Definition ------------------------------------------------------- -// MLGetDataFrameAnalytics - Retrieves configuration information for data frame analytics jobs. +// MLGetDataFrameAnalytics - Get data frame analytics job configuration info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics. type MLGetDataFrameAnalytics func(o ...func(*MLGetDataFrameAnalyticsRequest)) (*Response, error) // MLGetDataFrameAnalyticsRequest configures the ML Get Data Frame Analytics API request. diff --git a/esapi/api.xpack.ml.get_data_frame_analytics_stats.go b/esapi/api.xpack.ml.get_data_frame_analytics_stats.go index 132011f98e..c31ae043f8 100644 --- a/esapi/api.xpack.ml.get_data_frame_analytics_stats.go +++ b/esapi/api.xpack.ml.get_data_frame_analytics_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLGetDataFrameAnalyticsStatsFunc(t Transport) MLGetDataFrameAnalyticsSta // ----- API Definition ------------------------------------------------------- -// MLGetDataFrameAnalyticsStats - Retrieves usage information for data frame analytics jobs. +// MLGetDataFrameAnalyticsStats - Get data frame analytics job stats // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats. type MLGetDataFrameAnalyticsStats func(o ...func(*MLGetDataFrameAnalyticsStatsRequest)) (*Response, error) // MLGetDataFrameAnalyticsStatsRequest configures the ML Get Data Frame Analytics Stats API request. diff --git a/esapi/api.xpack.ml.get_datafeed_stats.go b/esapi/api.xpack.ml.get_datafeed_stats.go index 6516a1805a..fa3f1dd3e3 100644 --- a/esapi/api.xpack.ml.get_datafeed_stats.go +++ b/esapi/api.xpack.ml.get_datafeed_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,14 +43,14 @@ func newMLGetDatafeedStatsFunc(t Transport) MLGetDatafeedStats { // ----- API Definition ------------------------------------------------------- -// MLGetDatafeedStats - Retrieves usage information for datafeeds. +// MLGetDatafeedStats - Get datafeed stats // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeed-stats. type MLGetDatafeedStats func(o ...func(*MLGetDatafeedStatsRequest)) (*Response, error) // MLGetDatafeedStatsRequest configures the ML Get Datafeed Stats API request. type MLGetDatafeedStatsRequest struct { - DatafeedID string + DatafeedID []string AllowNoMatch *bool @@ -85,17 +85,17 @@ func (r MLGetDatafeedStatsRequest) Do(providedCtx context.Context, transport Tra method = "GET" - path.Grow(7 + 1 + len("_ml") + 1 + len("datafeeds") + 1 + len(r.DatafeedID) + 1 + len("_stats")) + path.Grow(7 + 1 + len("_ml") + 1 + len("datafeeds") + 1 + len(strings.Join(r.DatafeedID, ",")) + 1 + len("_stats")) path.WriteString("http://") path.WriteString("/") path.WriteString("_ml") path.WriteString("/") path.WriteString("datafeeds") - if r.DatafeedID != "" { + if len(r.DatafeedID) > 0 { path.WriteString("/") - path.WriteString(r.DatafeedID) + path.WriteString(strings.Join(r.DatafeedID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "datafeed_id", r.DatafeedID) + instrument.RecordPathPart(ctx, "datafeed_id", strings.Join(r.DatafeedID, ",")) } } path.WriteString("/") @@ -185,8 +185,8 @@ func (f MLGetDatafeedStats) WithContext(v context.Context) func(*MLGetDatafeedSt } } -// WithDatafeedID - the ID of the datafeeds stats to fetch. -func (f MLGetDatafeedStats) WithDatafeedID(v string) func(*MLGetDatafeedStatsRequest) { +// WithDatafeedID - comma-separated list of datafeed identifiers or wildcard expressions. if you do not specify one of these options, the api returns information about all datafeeds.. +func (f MLGetDatafeedStats) WithDatafeedID(v ...string) func(*MLGetDatafeedStatsRequest) { return func(r *MLGetDatafeedStatsRequest) { r.DatafeedID = v } diff --git a/esapi/api.xpack.ml.get_datafeeds.go b/esapi/api.xpack.ml.get_datafeeds.go index c4ad6d6af2..d4dc49f7b2 100644 --- a/esapi/api.xpack.ml.get_datafeeds.go +++ b/esapi/api.xpack.ml.get_datafeeds.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,14 +43,14 @@ func newMLGetDatafeedsFunc(t Transport) MLGetDatafeeds { // ----- API Definition ------------------------------------------------------- -// MLGetDatafeeds - Retrieves configuration information for datafeeds. +// MLGetDatafeeds - Get datafeeds configuration info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeeds. type MLGetDatafeeds func(o ...func(*MLGetDatafeedsRequest)) (*Response, error) // MLGetDatafeedsRequest configures the ML Get Datafeeds API request. type MLGetDatafeedsRequest struct { - DatafeedID string + DatafeedID []string AllowNoMatch *bool ExcludeGenerated *bool @@ -86,17 +86,17 @@ func (r MLGetDatafeedsRequest) Do(providedCtx context.Context, transport Transpo method = "GET" - path.Grow(7 + 1 + len("_ml") + 1 + len("datafeeds") + 1 + len(r.DatafeedID)) + path.Grow(7 + 1 + len("_ml") + 1 + len("datafeeds") + 1 + len(strings.Join(r.DatafeedID, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_ml") path.WriteString("/") path.WriteString("datafeeds") - if r.DatafeedID != "" { + if len(r.DatafeedID) > 0 { path.WriteString("/") - path.WriteString(r.DatafeedID) + path.WriteString(strings.Join(r.DatafeedID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "datafeed_id", r.DatafeedID) + instrument.RecordPathPart(ctx, "datafeed_id", strings.Join(r.DatafeedID, ",")) } } @@ -188,8 +188,8 @@ func (f MLGetDatafeeds) WithContext(v context.Context) func(*MLGetDatafeedsReque } } -// WithDatafeedID - the ID of the datafeeds to fetch. -func (f MLGetDatafeeds) WithDatafeedID(v string) func(*MLGetDatafeedsRequest) { +// WithDatafeedID - identifier for the datafeed. it can be a datafeed identifier or a wildcard expression. if you do not specify one of these options, the api returns information about all datafeeds.. +func (f MLGetDatafeeds) WithDatafeedID(v ...string) func(*MLGetDatafeedsRequest) { return func(r *MLGetDatafeedsRequest) { r.DatafeedID = v } diff --git a/esapi/api.xpack.ml.get_filters.go b/esapi/api.xpack.ml.get_filters.go index a4f27d50aa..bbf90ef1ea 100644 --- a/esapi/api.xpack.ml.get_filters.go +++ b/esapi/api.xpack.ml.get_filters.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,14 +43,14 @@ func newMLGetFiltersFunc(t Transport) MLGetFilters { // ----- API Definition ------------------------------------------------------- -// MLGetFilters - Retrieves filters. +// MLGetFilters - Get filters // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-filters. type MLGetFilters func(o ...func(*MLGetFiltersRequest)) (*Response, error) // MLGetFiltersRequest configures the ML Get Filters API request. type MLGetFiltersRequest struct { - FilterID string + FilterID []string From *int Size *int @@ -86,17 +86,17 @@ func (r MLGetFiltersRequest) Do(providedCtx context.Context, transport Transport method = "GET" - path.Grow(7 + 1 + len("_ml") + 1 + len("filters") + 1 + len(r.FilterID)) + path.Grow(7 + 1 + len("_ml") + 1 + len("filters") + 1 + len(strings.Join(r.FilterID, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_ml") path.WriteString("/") path.WriteString("filters") - if r.FilterID != "" { + if len(r.FilterID) > 0 { path.WriteString("/") - path.WriteString(r.FilterID) + path.WriteString(strings.Join(r.FilterID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "filter_id", r.FilterID) + instrument.RecordPathPart(ctx, "filter_id", strings.Join(r.FilterID, ",")) } } @@ -188,8 +188,8 @@ func (f MLGetFilters) WithContext(v context.Context) func(*MLGetFiltersRequest) } } -// WithFilterID - the ID of the filter to fetch. -func (f MLGetFilters) WithFilterID(v string) func(*MLGetFiltersRequest) { +// WithFilterID - comma-separated list of strings that uniquely identify a filter.. +func (f MLGetFilters) WithFilterID(v ...string) func(*MLGetFiltersRequest) { return func(r *MLGetFiltersRequest) { r.FilterID = v } diff --git a/esapi/api.xpack.ml.get_influencers.go b/esapi/api.xpack.ml.get_influencers.go index 8923d87284..88dfa36bf4 100644 --- a/esapi/api.xpack.ml.get_influencers.go +++ b/esapi/api.xpack.ml.get_influencers.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLGetInfluencersFunc(t Transport) MLGetInfluencers { // ----- API Definition ------------------------------------------------------- -// MLGetInfluencers - Retrieves anomaly detection job results for one or more influencers. +// MLGetInfluencers - Get anomaly detection job results for influencers // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-influencers. type MLGetInfluencers func(job_id string, o ...func(*MLGetInfluencersRequest)) (*Response, error) // MLGetInfluencersRequest configures the ML Get Influencers API request. @@ -57,13 +57,13 @@ type MLGetInfluencersRequest struct { JobID string Desc *bool - End string + End interface{} ExcludeInterim *bool From *int InfluencerScore interface{} Size *int Sort string - Start string + Start interface{} Pretty bool Human bool @@ -118,8 +118,8 @@ func (r MLGetInfluencersRequest) Do(providedCtx context.Context, transport Trans params["desc"] = strconv.FormatBool(*r.Desc) } - if r.End != "" { - params["end"] = r.End + if r.End != nil { + params["end"] = fmt.Sprintf("%v", r.End) } if r.ExcludeInterim != nil { @@ -142,8 +142,8 @@ func (r MLGetInfluencersRequest) Do(providedCtx context.Context, transport Trans params["sort"] = r.Sort } - if r.Start != "" { - params["start"] = r.Start + if r.Start != nil { + params["start"] = fmt.Sprintf("%v", r.Start) } if r.Pretty { @@ -246,7 +246,7 @@ func (f MLGetInfluencers) WithDesc(v bool) func(*MLGetInfluencersRequest) { } // WithEnd - end timestamp for the requested influencers. -func (f MLGetInfluencers) WithEnd(v string) func(*MLGetInfluencersRequest) { +func (f MLGetInfluencers) WithEnd(v interface{}) func(*MLGetInfluencersRequest) { return func(r *MLGetInfluencersRequest) { r.End = v } @@ -288,7 +288,7 @@ func (f MLGetInfluencers) WithSort(v string) func(*MLGetInfluencersRequest) { } // WithStart - start timestamp for the requested influencers. -func (f MLGetInfluencers) WithStart(v string) func(*MLGetInfluencersRequest) { +func (f MLGetInfluencers) WithStart(v interface{}) func(*MLGetInfluencersRequest) { return func(r *MLGetInfluencersRequest) { r.Start = v } diff --git a/esapi/api.xpack.ml.get_job_stats.go b/esapi/api.xpack.ml.get_job_stats.go index f5f463a86d..7e453bff9f 100644 --- a/esapi/api.xpack.ml.get_job_stats.go +++ b/esapi/api.xpack.ml.get_job_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLGetJobStatsFunc(t Transport) MLGetJobStats { // ----- API Definition ------------------------------------------------------- -// MLGetJobStats - Retrieves usage information for anomaly detection jobs. +// MLGetJobStats - Get anomaly detection job stats // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats. type MLGetJobStats func(o ...func(*MLGetJobStatsRequest)) (*Response, error) // MLGetJobStatsRequest configures the ML Get Job Stats API request. diff --git a/esapi/api.xpack.ml.get_jobs.go b/esapi/api.xpack.ml.get_jobs.go index 09a4c7c8b3..62401572ca 100644 --- a/esapi/api.xpack.ml.get_jobs.go +++ b/esapi/api.xpack.ml.get_jobs.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,14 +43,14 @@ func newMLGetJobsFunc(t Transport) MLGetJobs { // ----- API Definition ------------------------------------------------------- -// MLGetJobs - Retrieves configuration information for anomaly detection jobs. +// MLGetJobs - Get anomaly detection jobs configuration info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-jobs. type MLGetJobs func(o ...func(*MLGetJobsRequest)) (*Response, error) // MLGetJobsRequest configures the ML Get Jobs API request. type MLGetJobsRequest struct { - JobID string + JobID []string AllowNoMatch *bool ExcludeGenerated *bool @@ -86,17 +86,17 @@ func (r MLGetJobsRequest) Do(providedCtx context.Context, transport Transport) ( method = "GET" - path.Grow(7 + 1 + len("_ml") + 1 + len("anomaly_detectors") + 1 + len(r.JobID)) + path.Grow(7 + 1 + len("_ml") + 1 + len("anomaly_detectors") + 1 + len(strings.Join(r.JobID, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_ml") path.WriteString("/") path.WriteString("anomaly_detectors") - if r.JobID != "" { + if len(r.JobID) > 0 { path.WriteString("/") - path.WriteString(r.JobID) + path.WriteString(strings.Join(r.JobID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "job_id", r.JobID) + instrument.RecordPathPart(ctx, "job_id", strings.Join(r.JobID, ",")) } } @@ -188,8 +188,8 @@ func (f MLGetJobs) WithContext(v context.Context) func(*MLGetJobsRequest) { } } -// WithJobID - the ID of the jobs to fetch. -func (f MLGetJobs) WithJobID(v string) func(*MLGetJobsRequest) { +// WithJobID - comma-separated list of identifiers for the anomaly detection job. it can be a job identifier, a group name, or a wildcard expression. if you do not specify one of these options, the api returns information for all anomaly detection jobs.. +func (f MLGetJobs) WithJobID(v ...string) func(*MLGetJobsRequest) { return func(r *MLGetJobsRequest) { r.JobID = v } diff --git a/esapi/api.xpack.ml.get_memory_stats.go b/esapi/api.xpack.ml.get_memory_stats.go index da30b14715..2230b7f4b2 100644 --- a/esapi/api.xpack.ml.get_memory_stats.go +++ b/esapi/api.xpack.ml.get_memory_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLGetMemoryStatsFunc(t Transport) MLGetMemoryStats { // ----- API Definition ------------------------------------------------------- -// MLGetMemoryStats - Returns information on how ML is using memory. +// MLGetMemoryStats - Get machine learning memory usage info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-memory-stats. type MLGetMemoryStats func(o ...func(*MLGetMemoryStatsRequest)) (*Response, error) // MLGetMemoryStatsRequest configures the ML Get Memory Stats API request. diff --git a/esapi/api.xpack.ml.get_model_snapshot_upgrade_stats.go b/esapi/api.xpack.ml.get_model_snapshot_upgrade_stats.go index 92e65dc6ff..1fe86c367c 100644 --- a/esapi/api.xpack.ml.get_model_snapshot_upgrade_stats.go +++ b/esapi/api.xpack.ml.get_model_snapshot_upgrade_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLGetModelSnapshotUpgradeStatsFunc(t Transport) MLGetModelSnapshotUpgrad // ----- API Definition ------------------------------------------------------- -// MLGetModelSnapshotUpgradeStats - Gets stats for anomaly detection job model snapshot upgrades that are in progress. +// MLGetModelSnapshotUpgradeStats - Get anomaly detection job model snapshot upgrade usage info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshot-upgrade-stats. type MLGetModelSnapshotUpgradeStats func(snapshot_id string, job_id string, o ...func(*MLGetModelSnapshotUpgradeStatsRequest)) (*Response, error) // MLGetModelSnapshotUpgradeStatsRequest configures the ML Get Model Snapshot Upgrade Stats API request. diff --git a/esapi/api.xpack.ml.get_model_snapshots.go b/esapi/api.xpack.ml.get_model_snapshots.go index 435c71c3b1..2f97510747 100644 --- a/esapi/api.xpack.ml.get_model_snapshots.go +++ b/esapi/api.xpack.ml.get_model_snapshots.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLGetModelSnapshotsFunc(t Transport) MLGetModelSnapshots { // ----- API Definition ------------------------------------------------------- -// MLGetModelSnapshots - Retrieves information about model snapshots. +// MLGetModelSnapshots - Get model snapshots info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshots. type MLGetModelSnapshots func(job_id string, o ...func(*MLGetModelSnapshotsRequest)) (*Response, error) // MLGetModelSnapshotsRequest configures the ML Get Model Snapshots API request. diff --git a/esapi/api.xpack.ml.get_overall_buckets.go b/esapi/api.xpack.ml.get_overall_buckets.go index 4e70c65376..8db439b980 100644 --- a/esapi/api.xpack.ml.get_overall_buckets.go +++ b/esapi/api.xpack.ml.get_overall_buckets.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLGetOverallBucketsFunc(t Transport) MLGetOverallBuckets { // ----- API Definition ------------------------------------------------------- -// MLGetOverallBuckets - Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs. +// MLGetOverallBuckets - Get overall bucket results // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-overall-buckets. type MLGetOverallBuckets func(job_id string, o ...func(*MLGetOverallBucketsRequest)) (*Response, error) // MLGetOverallBucketsRequest configures the ML Get Overall Buckets API request. @@ -58,10 +58,10 @@ type MLGetOverallBucketsRequest struct { AllowNoMatch *bool BucketSpan string - End string + End interface{} ExcludeInterim *bool OverallScore interface{} - Start string + Start interface{} TopN *int Pretty bool @@ -121,8 +121,8 @@ func (r MLGetOverallBucketsRequest) Do(providedCtx context.Context, transport Tr params["bucket_span"] = r.BucketSpan } - if r.End != "" { - params["end"] = r.End + if r.End != nil { + params["end"] = fmt.Sprintf("%v", r.End) } if r.ExcludeInterim != nil { @@ -133,8 +133,8 @@ func (r MLGetOverallBucketsRequest) Do(providedCtx context.Context, transport Tr params["overall_score"] = fmt.Sprintf("%v", r.OverallScore) } - if r.Start != "" { - params["start"] = r.Start + if r.Start != nil { + params["start"] = fmt.Sprintf("%v", r.Start) } if r.TopN != nil { @@ -248,7 +248,7 @@ func (f MLGetOverallBuckets) WithBucketSpan(v string) func(*MLGetOverallBucketsR } // WithEnd - returns overall buckets with timestamps earlier than this time. -func (f MLGetOverallBuckets) WithEnd(v string) func(*MLGetOverallBucketsRequest) { +func (f MLGetOverallBuckets) WithEnd(v interface{}) func(*MLGetOverallBucketsRequest) { return func(r *MLGetOverallBucketsRequest) { r.End = v } @@ -269,7 +269,7 @@ func (f MLGetOverallBuckets) WithOverallScore(v interface{}) func(*MLGetOverallB } // WithStart - returns overall buckets with timestamps after this time. -func (f MLGetOverallBuckets) WithStart(v string) func(*MLGetOverallBucketsRequest) { +func (f MLGetOverallBuckets) WithStart(v interface{}) func(*MLGetOverallBucketsRequest) { return func(r *MLGetOverallBucketsRequest) { r.Start = v } diff --git a/esapi/api.xpack.ml.get_records.go b/esapi/api.xpack.ml.get_records.go index 63ae6e1506..c4b79760ca 100644 --- a/esapi/api.xpack.ml.get_records.go +++ b/esapi/api.xpack.ml.get_records.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLGetRecordsFunc(t Transport) MLGetRecords { // ----- API Definition ------------------------------------------------------- -// MLGetRecords - Retrieves anomaly records for an anomaly detection job. +// MLGetRecords - Get anomaly records for an anomaly detection job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-records. type MLGetRecords func(job_id string, o ...func(*MLGetRecordsRequest)) (*Response, error) // MLGetRecordsRequest configures the ML Get Records API request. @@ -57,13 +57,13 @@ type MLGetRecordsRequest struct { JobID string Desc *bool - End string + End interface{} ExcludeInterim *bool From *int RecordScore interface{} Size *int Sort string - Start string + Start interface{} Pretty bool Human bool @@ -118,8 +118,8 @@ func (r MLGetRecordsRequest) Do(providedCtx context.Context, transport Transport params["desc"] = strconv.FormatBool(*r.Desc) } - if r.End != "" { - params["end"] = r.End + if r.End != nil { + params["end"] = fmt.Sprintf("%v", r.End) } if r.ExcludeInterim != nil { @@ -142,8 +142,8 @@ func (r MLGetRecordsRequest) Do(providedCtx context.Context, transport Transport params["sort"] = r.Sort } - if r.Start != "" { - params["start"] = r.Start + if r.Start != nil { + params["start"] = fmt.Sprintf("%v", r.Start) } if r.Pretty { @@ -246,7 +246,7 @@ func (f MLGetRecords) WithDesc(v bool) func(*MLGetRecordsRequest) { } // WithEnd - end time filter for records. -func (f MLGetRecords) WithEnd(v string) func(*MLGetRecordsRequest) { +func (f MLGetRecords) WithEnd(v interface{}) func(*MLGetRecordsRequest) { return func(r *MLGetRecordsRequest) { r.End = v } @@ -288,7 +288,7 @@ func (f MLGetRecords) WithSort(v string) func(*MLGetRecordsRequest) { } // WithStart - start time filter for records. -func (f MLGetRecords) WithStart(v string) func(*MLGetRecordsRequest) { +func (f MLGetRecords) WithStart(v interface{}) func(*MLGetRecordsRequest) { return func(r *MLGetRecordsRequest) { r.Start = v } diff --git a/esapi/api.xpack.ml.get_trained_models.go b/esapi/api.xpack.ml.get_trained_models.go index 47a354ed4f..2cf72c5015 100644 --- a/esapi/api.xpack.ml.get_trained_models.go +++ b/esapi/api.xpack.ml.get_trained_models.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,14 +43,14 @@ func newMLGetTrainedModelsFunc(t Transport) MLGetTrainedModels { // ----- API Definition ------------------------------------------------------- -// MLGetTrainedModels - Retrieves configuration information for a trained inference model. +// MLGetTrainedModels - Get trained model configuration info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models. type MLGetTrainedModels func(o ...func(*MLGetTrainedModelsRequest)) (*Response, error) // MLGetTrainedModelsRequest configures the ML Get Trained Models API request. type MLGetTrainedModelsRequest struct { - ModelID string + ModelID []string AllowNoMatch *bool DecompressDefinition *bool @@ -91,17 +91,17 @@ func (r MLGetTrainedModelsRequest) Do(providedCtx context.Context, transport Tra method = "GET" - path.Grow(7 + 1 + len("_ml") + 1 + len("trained_models") + 1 + len(r.ModelID)) + path.Grow(7 + 1 + len("_ml") + 1 + len("trained_models") + 1 + len(strings.Join(r.ModelID, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_ml") path.WriteString("/") path.WriteString("trained_models") - if r.ModelID != "" { + if len(r.ModelID) > 0 { path.WriteString("/") - path.WriteString(r.ModelID) + path.WriteString(strings.Join(r.ModelID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "model_id", r.ModelID) + instrument.RecordPathPart(ctx, "model_id", strings.Join(r.ModelID, ",")) } } @@ -213,8 +213,8 @@ func (f MLGetTrainedModels) WithContext(v context.Context) func(*MLGetTrainedMod } } -// WithModelID - the ID of the trained models to fetch. -func (f MLGetTrainedModels) WithModelID(v string) func(*MLGetTrainedModelsRequest) { +// WithModelID - the unique identifier of the trained model or a model alias. you can get information for multiple trained models in a single api request by using a list of model ids or a wildcard expression.. +func (f MLGetTrainedModels) WithModelID(v ...string) func(*MLGetTrainedModelsRequest) { return func(r *MLGetTrainedModelsRequest) { r.ModelID = v } @@ -248,7 +248,7 @@ func (f MLGetTrainedModels) WithFrom(v int) func(*MLGetTrainedModelsRequest) { } } -// WithInclude - a comma-separate list of fields to optionally include. valid options are 'definition' and 'total_feature_importance'. default is none.. +// WithInclude - a comma delimited string of optional fields to include in the responsebody.. func (f MLGetTrainedModels) WithInclude(v string) func(*MLGetTrainedModelsRequest) { return func(r *MLGetTrainedModelsRequest) { r.Include = v diff --git a/esapi/api.xpack.ml.get_trained_models_stats.go b/esapi/api.xpack.ml.get_trained_models_stats.go index 345150efbc..95262a1c59 100644 --- a/esapi/api.xpack.ml.get_trained_models_stats.go +++ b/esapi/api.xpack.ml.get_trained_models_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,14 +43,14 @@ func newMLGetTrainedModelsStatsFunc(t Transport) MLGetTrainedModelsStats { // ----- API Definition ------------------------------------------------------- -// MLGetTrainedModelsStats - Retrieves usage information for trained inference models. +// MLGetTrainedModelsStats - Get trained models usage info // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models-stats. type MLGetTrainedModelsStats func(o ...func(*MLGetTrainedModelsStatsRequest)) (*Response, error) // MLGetTrainedModelsStatsRequest configures the ML Get Trained Models Stats API request. type MLGetTrainedModelsStatsRequest struct { - ModelID string + ModelID []string AllowNoMatch *bool From *int @@ -87,17 +87,17 @@ func (r MLGetTrainedModelsStatsRequest) Do(providedCtx context.Context, transpor method = "GET" - path.Grow(7 + 1 + len("_ml") + 1 + len("trained_models") + 1 + len(r.ModelID) + 1 + len("_stats")) + path.Grow(7 + 1 + len("_ml") + 1 + len("trained_models") + 1 + len(strings.Join(r.ModelID, ",")) + 1 + len("_stats")) path.WriteString("http://") path.WriteString("/") path.WriteString("_ml") path.WriteString("/") path.WriteString("trained_models") - if r.ModelID != "" { + if len(r.ModelID) > 0 { path.WriteString("/") - path.WriteString(r.ModelID) + path.WriteString(strings.Join(r.ModelID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "model_id", r.ModelID) + instrument.RecordPathPart(ctx, "model_id", strings.Join(r.ModelID, ",")) } } path.WriteString("/") @@ -195,8 +195,8 @@ func (f MLGetTrainedModelsStats) WithContext(v context.Context) func(*MLGetTrain } } -// WithModelID - the ID of the trained models stats to fetch. -func (f MLGetTrainedModelsStats) WithModelID(v string) func(*MLGetTrainedModelsStatsRequest) { +// WithModelID - the unique identifier of the trained model or a model alias. it can be a list or a wildcard expression.. +func (f MLGetTrainedModelsStats) WithModelID(v ...string) func(*MLGetTrainedModelsStatsRequest) { return func(r *MLGetTrainedModelsStatsRequest) { r.ModelID = v } diff --git a/esapi/api.xpack.ml.infer_trained_model.go b/esapi/api.xpack.ml.infer_trained_model.go index 1eea98fa5c..f92d5586f7 100644 --- a/esapi/api.xpack.ml.infer_trained_model.go +++ b/esapi/api.xpack.ml.infer_trained_model.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLInferTrainedModelFunc(t Transport) MLInferTrainedModel { // ----- API Definition ------------------------------------------------------- -// MLInferTrainedModel - Evaluate a trained model. +// MLInferTrainedModel - Evaluate a trained model // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model. type MLInferTrainedModel func(body io.Reader, model_id string, o ...func(*MLInferTrainedModelRequest)) (*Response, error) // MLInferTrainedModelRequest configures the ML Infer Trained Model API request. diff --git a/esapi/api.xpack.ml.info.go b/esapi/api.xpack.ml.info.go index 34dd4eed0c..e573e546a2 100644 --- a/esapi/api.xpack.ml.info.go +++ b/esapi/api.xpack.ml.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newMLInfoFunc(t Transport) MLInfo { // ----- API Definition ------------------------------------------------------- -// MLInfo - Returns defaults and limits used by machine learning. +// MLInfo - Get machine learning information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-info. type MLInfo func(o ...func(*MLInfoRequest)) (*Response, error) // MLInfoRequest configures the ML Info API request. diff --git a/esapi/api.xpack.ml.open_job.go b/esapi/api.xpack.ml.open_job.go index b26b2c5fee..4792e4d1c2 100644 --- a/esapi/api.xpack.ml.open_job.go +++ b/esapi/api.xpack.ml.open_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLOpenJobFunc(t Transport) MLOpenJob { // ----- API Definition ------------------------------------------------------- -// MLOpenJob - Opens one or more anomaly detection jobs. +// MLOpenJob - Open anomaly detection jobs // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-open-job. type MLOpenJob func(job_id string, o ...func(*MLOpenJobRequest)) (*Response, error) // MLOpenJobRequest configures the ML Open Job API request. diff --git a/esapi/api.xpack.ml.post_calendar_events.go b/esapi/api.xpack.ml.post_calendar_events.go index 62ee608a2c..423aa6dadb 100644 --- a/esapi/api.xpack.ml.post_calendar_events.go +++ b/esapi/api.xpack.ml.post_calendar_events.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLPostCalendarEventsFunc(t Transport) MLPostCalendarEvents { // ----- API Definition ------------------------------------------------------- -// MLPostCalendarEvents - Posts scheduled events in a calendar. +// MLPostCalendarEvents - Add scheduled events to the calendar // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-calendar-events. type MLPostCalendarEvents func(calendar_id string, body io.Reader, o ...func(*MLPostCalendarEventsRequest)) (*Response, error) // MLPostCalendarEventsRequest configures the ML Post Calendar Events API request. diff --git a/esapi/api.xpack.ml.post_data.go b/esapi/api.xpack.ml.post_data.go index 84ebfbb6e1..9bde4f4835 100644 --- a/esapi/api.xpack.ml.post_data.go +++ b/esapi/api.xpack.ml.post_data.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "fmt" "io" "net/http" "strings" @@ -43,9 +44,9 @@ func newMLPostDataFunc(t Transport) MLPostData { // ----- API Definition ------------------------------------------------------- -// MLPostData - Sends data to an anomaly detection job for analysis. +// MLPostData - Send data to an anomaly detection job for analysis // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-data. type MLPostData func(job_id string, body io.Reader, o ...func(*MLPostDataRequest)) (*Response, error) // MLPostDataRequest configures the ML Post Data API request. @@ -54,8 +55,8 @@ type MLPostDataRequest struct { JobID string - ResetEnd string - ResetStart string + ResetEnd interface{} + ResetStart interface{} Pretty bool Human bool @@ -104,12 +105,12 @@ func (r MLPostDataRequest) Do(providedCtx context.Context, transport Transport) params = make(map[string]string) - if r.ResetEnd != "" { - params["reset_end"] = r.ResetEnd + if r.ResetEnd != nil { + params["reset_end"] = fmt.Sprintf("%v", r.ResetEnd) } - if r.ResetStart != "" { - params["reset_start"] = r.ResetStart + if r.ResetStart != nil { + params["reset_start"] = fmt.Sprintf("%v", r.ResetStart) } if r.Pretty { @@ -198,14 +199,14 @@ func (f MLPostData) WithContext(v context.Context) func(*MLPostDataRequest) { } // WithResetEnd - optional parameter to specify the end of the bucket resetting range. -func (f MLPostData) WithResetEnd(v string) func(*MLPostDataRequest) { +func (f MLPostData) WithResetEnd(v interface{}) func(*MLPostDataRequest) { return func(r *MLPostDataRequest) { r.ResetEnd = v } } // WithResetStart - optional parameter to specify the start of the bucket resetting range. -func (f MLPostData) WithResetStart(v string) func(*MLPostDataRequest) { +func (f MLPostData) WithResetStart(v interface{}) func(*MLPostDataRequest) { return func(r *MLPostDataRequest) { r.ResetStart = v } diff --git a/esapi/api.xpack.ml.preview_data_frame_analytics.go b/esapi/api.xpack.ml.preview_data_frame_analytics.go index 4d7a6467ad..4de1f6356d 100644 --- a/esapi/api.xpack.ml.preview_data_frame_analytics.go +++ b/esapi/api.xpack.ml.preview_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLPreviewDataFrameAnalyticsFunc(t Transport) MLPreviewDataFrameAnalytics // ----- API Definition ------------------------------------------------------- -// MLPreviewDataFrameAnalytics - Previews that will be analyzed given a data frame analytics config. +// MLPreviewDataFrameAnalytics - Preview features used by data frame analytics // -// See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics. type MLPreviewDataFrameAnalytics func(o ...func(*MLPreviewDataFrameAnalyticsRequest)) (*Response, error) // MLPreviewDataFrameAnalyticsRequest configures the ML Preview Data Frame Analytics API request. diff --git a/esapi/api.xpack.ml.preview_datafeed.go b/esapi/api.xpack.ml.preview_datafeed.go index bf02350d78..9dbcf0cc64 100644 --- a/esapi/api.xpack.ml.preview_datafeed.go +++ b/esapi/api.xpack.ml.preview_datafeed.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "fmt" "io" "net/http" "strings" @@ -43,9 +44,9 @@ func newMLPreviewDatafeedFunc(t Transport) MLPreviewDatafeed { // ----- API Definition ------------------------------------------------------- -// MLPreviewDatafeed - Previews a datafeed. +// MLPreviewDatafeed - Preview a datafeed // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-datafeed. type MLPreviewDatafeed func(o ...func(*MLPreviewDatafeedRequest)) (*Response, error) // MLPreviewDatafeedRequest configures the ML Preview Datafeed API request. @@ -54,8 +55,8 @@ type MLPreviewDatafeedRequest struct { DatafeedID string - End string - Start string + End interface{} + Start interface{} Pretty bool Human bool @@ -106,12 +107,12 @@ func (r MLPreviewDatafeedRequest) Do(providedCtx context.Context, transport Tran params = make(map[string]string) - if r.End != "" { - params["end"] = r.End + if r.End != nil { + params["end"] = fmt.Sprintf("%v", r.End) } - if r.Start != "" { - params["start"] = r.Start + if r.Start != nil { + params["start"] = fmt.Sprintf("%v", r.Start) } if r.Pretty { @@ -214,14 +215,14 @@ func (f MLPreviewDatafeed) WithDatafeedID(v string) func(*MLPreviewDatafeedReque } // WithEnd - the end time when the datafeed preview should stop. -func (f MLPreviewDatafeed) WithEnd(v string) func(*MLPreviewDatafeedRequest) { +func (f MLPreviewDatafeed) WithEnd(v interface{}) func(*MLPreviewDatafeedRequest) { return func(r *MLPreviewDatafeedRequest) { r.End = v } } // WithStart - the start time from where the datafeed preview should begin. -func (f MLPreviewDatafeed) WithStart(v string) func(*MLPreviewDatafeedRequest) { +func (f MLPreviewDatafeed) WithStart(v interface{}) func(*MLPreviewDatafeedRequest) { return func(r *MLPreviewDatafeedRequest) { r.Start = v } diff --git a/esapi/api.xpack.ml.put_calendar.go b/esapi/api.xpack.ml.put_calendar.go index 9ac0f6f56e..19b18a60dd 100644 --- a/esapi/api.xpack.ml.put_calendar.go +++ b/esapi/api.xpack.ml.put_calendar.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLPutCalendarFunc(t Transport) MLPutCalendar { // ----- API Definition ------------------------------------------------------- -// MLPutCalendar - Instantiates a calendar. +// MLPutCalendar - Create a calendar // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar. type MLPutCalendar func(calendar_id string, o ...func(*MLPutCalendarRequest)) (*Response, error) // MLPutCalendarRequest configures the ML Put Calendar API request. diff --git a/esapi/api.xpack.ml.put_calendar_job.go b/esapi/api.xpack.ml.put_calendar_job.go index 5f6d727584..c2c4cbaf89 100644 --- a/esapi/api.xpack.ml.put_calendar_job.go +++ b/esapi/api.xpack.ml.put_calendar_job.go @@ -15,18 +15,19 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strings" ) func newMLPutCalendarJobFunc(t Transport) MLPutCalendarJob { - return func(calendar_id string, job_id string, o ...func(*MLPutCalendarJobRequest)) (*Response, error) { + return func(calendar_id string, job_id []string, o ...func(*MLPutCalendarJobRequest)) (*Response, error) { var r = MLPutCalendarJobRequest{CalendarID: calendar_id, JobID: job_id} for _, f := range o { f(&r) @@ -42,15 +43,15 @@ func newMLPutCalendarJobFunc(t Transport) MLPutCalendarJob { // ----- API Definition ------------------------------------------------------- -// MLPutCalendarJob - Adds an anomaly detection job to a calendar. +// MLPutCalendarJob - Add anomaly detection job to calendar // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html. -type MLPutCalendarJob func(calendar_id string, job_id string, o ...func(*MLPutCalendarJobRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar-job. +type MLPutCalendarJob func(calendar_id string, job_id []string, o ...func(*MLPutCalendarJobRequest)) (*Response, error) // MLPutCalendarJobRequest configures the ML Put Calendar Job API request. type MLPutCalendarJobRequest struct { CalendarID string - JobID string + JobID []string Pretty bool Human bool @@ -83,7 +84,11 @@ func (r MLPutCalendarJobRequest) Do(providedCtx context.Context, transport Trans method = "PUT" - path.Grow(7 + 1 + len("_ml") + 1 + len("calendars") + 1 + len(r.CalendarID) + 1 + len("jobs") + 1 + len(r.JobID)) + if len(r.JobID) == 0 { + return nil, errors.New("job_id is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_ml") + 1 + len("calendars") + 1 + len(r.CalendarID) + 1 + len("jobs") + 1 + len(strings.Join(r.JobID, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_ml") @@ -97,9 +102,9 @@ func (r MLPutCalendarJobRequest) Do(providedCtx context.Context, transport Trans path.WriteString("/") path.WriteString("jobs") path.WriteString("/") - path.WriteString(r.JobID) + path.WriteString(strings.Join(r.JobID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "job_id", r.JobID) + instrument.RecordPathPart(ctx, "job_id", strings.Join(r.JobID, ",")) } params = make(map[string]string) diff --git a/esapi/api.xpack.ml.put_data_frame_analytics.go b/esapi/api.xpack.ml.put_data_frame_analytics.go index 668e084eaa..47a9c03b0d 100644 --- a/esapi/api.xpack.ml.put_data_frame_analytics.go +++ b/esapi/api.xpack.ml.put_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLPutDataFrameAnalyticsFunc(t Transport) MLPutDataFrameAnalytics { // ----- API Definition ------------------------------------------------------- -// MLPutDataFrameAnalytics - Instantiates a data frame analytics job. +// MLPutDataFrameAnalytics - Create a data frame analytics job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-data-frame-analytics. type MLPutDataFrameAnalytics func(id string, body io.Reader, o ...func(*MLPutDataFrameAnalyticsRequest)) (*Response, error) // MLPutDataFrameAnalyticsRequest configures the ML Put Data Frame Analytics API request. diff --git a/esapi/api.xpack.ml.put_datafeed.go b/esapi/api.xpack.ml.put_datafeed.go index 13b255f603..c5b4ba4efd 100644 --- a/esapi/api.xpack.ml.put_datafeed.go +++ b/esapi/api.xpack.ml.put_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLPutDatafeedFunc(t Transport) MLPutDatafeed { // ----- API Definition ------------------------------------------------------- -// MLPutDatafeed - Instantiates a datafeed. +// MLPutDatafeed - Create a datafeed // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-datafeed. type MLPutDatafeed func(body io.Reader, datafeed_id string, o ...func(*MLPutDatafeedRequest)) (*Response, error) // MLPutDatafeedRequest configures the ML Put Datafeed API request. @@ -56,7 +56,7 @@ type MLPutDatafeedRequest struct { DatafeedID string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreThrottled *bool IgnoreUnavailable *bool @@ -109,8 +109,8 @@ func (r MLPutDatafeedRequest) Do(providedCtx context.Context, transport Transpor params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreThrottled != nil { @@ -214,7 +214,7 @@ func (f MLPutDatafeed) WithAllowNoIndices(v bool) func(*MLPutDatafeedRequest) { } // WithExpandWildcards - whether source index expressions should get expanded to open or closed indices (default: open). -func (f MLPutDatafeed) WithExpandWildcards(v string) func(*MLPutDatafeedRequest) { +func (f MLPutDatafeed) WithExpandWildcards(v ...string) func(*MLPutDatafeedRequest) { return func(r *MLPutDatafeedRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.xpack.ml.put_filter.go b/esapi/api.xpack.ml.put_filter.go index 406e2fbfde..24f8558591 100644 --- a/esapi/api.xpack.ml.put_filter.go +++ b/esapi/api.xpack.ml.put_filter.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLPutFilterFunc(t Transport) MLPutFilter { // ----- API Definition ------------------------------------------------------- -// MLPutFilter - Instantiates a filter. +// MLPutFilter - Create a filter // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-filter. type MLPutFilter func(body io.Reader, filter_id string, o ...func(*MLPutFilterRequest)) (*Response, error) // MLPutFilterRequest configures the ML Put Filter API request. diff --git a/esapi/api.xpack.ml.put_job.go b/esapi/api.xpack.ml.put_job.go index 88452e0ae7..4a402a3b42 100644 --- a/esapi/api.xpack.ml.put_job.go +++ b/esapi/api.xpack.ml.put_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLPutJobFunc(t Transport) MLPutJob { // ----- API Definition ------------------------------------------------------- -// MLPutJob - Instantiates an anomaly detection job. +// MLPutJob - Create an anomaly detection job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-job. type MLPutJob func(job_id string, body io.Reader, o ...func(*MLPutJobRequest)) (*Response, error) // MLPutJobRequest configures the ML Put Job API request. @@ -56,7 +56,7 @@ type MLPutJobRequest struct { JobID string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreThrottled *bool IgnoreUnavailable *bool @@ -109,8 +109,8 @@ func (r MLPutJobRequest) Do(providedCtx context.Context, transport Transport) (* params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreThrottled != nil { @@ -214,7 +214,7 @@ func (f MLPutJob) WithAllowNoIndices(v bool) func(*MLPutJobRequest) { } // WithExpandWildcards - whether source index expressions should get expanded to open or closed indices (default: open). only set if datafeed_config is provided.. -func (f MLPutJob) WithExpandWildcards(v string) func(*MLPutJobRequest) { +func (f MLPutJob) WithExpandWildcards(v ...string) func(*MLPutJobRequest) { return func(r *MLPutJobRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.xpack.ml.put_trained_model.go b/esapi/api.xpack.ml.put_trained_model.go index 4fd33e6df7..1762f850bf 100644 --- a/esapi/api.xpack.ml.put_trained_model.go +++ b/esapi/api.xpack.ml.put_trained_model.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLPutTrainedModelFunc(t Transport) MLPutTrainedModel { // ----- API Definition ------------------------------------------------------- -// MLPutTrainedModel - Creates an inference trained model. +// MLPutTrainedModel - Create a trained model // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model. type MLPutTrainedModel func(body io.Reader, model_id string, o ...func(*MLPutTrainedModelRequest)) (*Response, error) // MLPutTrainedModelRequest configures the ML Put Trained Model API request. diff --git a/esapi/api.xpack.ml.put_trained_model_alias.go b/esapi/api.xpack.ml.put_trained_model_alias.go index 6c9e588dfd..661ce89137 100644 --- a/esapi/api.xpack.ml.put_trained_model_alias.go +++ b/esapi/api.xpack.ml.put_trained_model_alias.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLPutTrainedModelAliasFunc(t Transport) MLPutTrainedModelAlias { // ----- API Definition ------------------------------------------------------- -// MLPutTrainedModelAlias - Creates a new model alias (or reassigns an existing one) to refer to the trained model +// MLPutTrainedModelAlias - Create or update a trained model alias // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-alias. type MLPutTrainedModelAlias func(model_alias string, model_id string, o ...func(*MLPutTrainedModelAliasRequest)) (*Response, error) // MLPutTrainedModelAliasRequest configures the ML Put Trained Model Alias API request. diff --git a/esapi/api.xpack.ml.put_trained_model_definition_part.go b/esapi/api.xpack.ml.put_trained_model_definition_part.go index 4c00133b22..6ef9cbf424 100644 --- a/esapi/api.xpack.ml.put_trained_model_definition_part.go +++ b/esapi/api.xpack.ml.put_trained_model_definition_part.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLPutTrainedModelDefinitionPartFunc(t Transport) MLPutTrainedModelDefini // ----- API Definition ------------------------------------------------------- -// MLPutTrainedModelDefinitionPart - Creates part of a trained model definition +// MLPutTrainedModelDefinitionPart - Create part of a trained model definition // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-definition-part. type MLPutTrainedModelDefinitionPart func(body io.Reader, model_id string, part *int, o ...func(*MLPutTrainedModelDefinitionPartRequest)) (*Response, error) // MLPutTrainedModelDefinitionPartRequest configures the ML Put Trained Model Definition Part API request. diff --git a/esapi/api.xpack.ml.put_trained_model_vocabulary.go b/esapi/api.xpack.ml.put_trained_model_vocabulary.go index 666b935b52..0bff911d29 100644 --- a/esapi/api.xpack.ml.put_trained_model_vocabulary.go +++ b/esapi/api.xpack.ml.put_trained_model_vocabulary.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLPutTrainedModelVocabularyFunc(t Transport) MLPutTrainedModelVocabulary // ----- API Definition ------------------------------------------------------- -// MLPutTrainedModelVocabulary - Creates a trained model vocabulary +// MLPutTrainedModelVocabulary - Create a trained model vocabulary // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-vocabulary. type MLPutTrainedModelVocabulary func(body io.Reader, model_id string, o ...func(*MLPutTrainedModelVocabularyRequest)) (*Response, error) // MLPutTrainedModelVocabularyRequest configures the ML Put Trained Model Vocabulary API request. diff --git a/esapi/api.xpack.ml.reset_job.go b/esapi/api.xpack.ml.reset_job.go index 01fe904357..e0b7a586f6 100644 --- a/esapi/api.xpack.ml.reset_job.go +++ b/esapi/api.xpack.ml.reset_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLResetJobFunc(t Transport) MLResetJob { // ----- API Definition ------------------------------------------------------- -// MLResetJob - Resets an existing anomaly detection job. +// MLResetJob - Reset an anomaly detection job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-reset-job. type MLResetJob func(job_id string, o ...func(*MLResetJobRequest)) (*Response, error) // MLResetJobRequest configures the ML Reset Job API request. diff --git a/esapi/api.xpack.ml.revert_model_snapshot.go b/esapi/api.xpack.ml.revert_model_snapshot.go index 17654d6fc8..e00c8c872b 100644 --- a/esapi/api.xpack.ml.revert_model_snapshot.go +++ b/esapi/api.xpack.ml.revert_model_snapshot.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLRevertModelSnapshotFunc(t Transport) MLRevertModelSnapshot { // ----- API Definition ------------------------------------------------------- -// MLRevertModelSnapshot - Reverts to a specific snapshot. +// MLRevertModelSnapshot - Revert to a snapshot // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-revert-model-snapshot. type MLRevertModelSnapshot func(snapshot_id string, job_id string, o ...func(*MLRevertModelSnapshotRequest)) (*Response, error) // MLRevertModelSnapshotRequest configures the ML Revert Model Snapshot API request. diff --git a/esapi/api.xpack.ml.set_upgrade_mode.go b/esapi/api.xpack.ml.set_upgrade_mode.go index cc1b3626ab..3e16e65b35 100644 --- a/esapi/api.xpack.ml.set_upgrade_mode.go +++ b/esapi/api.xpack.ml.set_upgrade_mode.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLSetUpgradeModeFunc(t Transport) MLSetUpgradeMode { // ----- API Definition ------------------------------------------------------- -// MLSetUpgradeMode - Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. +// MLSetUpgradeMode - Set upgrade_mode for ML indices // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-set-upgrade-mode. type MLSetUpgradeMode func(o ...func(*MLSetUpgradeModeRequest)) (*Response, error) // MLSetUpgradeModeRequest configures the ML Set Upgrade Mode API request. diff --git a/esapi/api.xpack.ml.start_data_frame_analytics.go b/esapi/api.xpack.ml.start_data_frame_analytics.go index af981c5149..d7c8d0e2dc 100644 --- a/esapi/api.xpack.ml.start_data_frame_analytics.go +++ b/esapi/api.xpack.ml.start_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLStartDataFrameAnalyticsFunc(t Transport) MLStartDataFrameAnalytics { // ----- API Definition ------------------------------------------------------- -// MLStartDataFrameAnalytics - Starts a data frame analytics job. +// MLStartDataFrameAnalytics - Start a data frame analytics job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-data-frame-analytics. type MLStartDataFrameAnalytics func(id string, o ...func(*MLStartDataFrameAnalyticsRequest)) (*Response, error) // MLStartDataFrameAnalyticsRequest configures the ML Start Data Frame Analytics API request. diff --git a/esapi/api.xpack.ml.start_datafeed.go b/esapi/api.xpack.ml.start_datafeed.go index d4ecbfc82a..1076da462e 100644 --- a/esapi/api.xpack.ml.start_datafeed.go +++ b/esapi/api.xpack.ml.start_datafeed.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "fmt" "io" "net/http" "strings" @@ -44,9 +45,9 @@ func newMLStartDatafeedFunc(t Transport) MLStartDatafeed { // ----- API Definition ------------------------------------------------------- -// MLStartDatafeed - Starts one or more datafeeds. +// MLStartDatafeed - Start datafeeds // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-datafeed. type MLStartDatafeed func(datafeed_id string, o ...func(*MLStartDatafeedRequest)) (*Response, error) // MLStartDatafeedRequest configures the ML Start Datafeed API request. @@ -55,8 +56,8 @@ type MLStartDatafeedRequest struct { DatafeedID string - End string - Start string + End interface{} + Start interface{} Timeout time.Duration Pretty bool @@ -106,12 +107,12 @@ func (r MLStartDatafeedRequest) Do(providedCtx context.Context, transport Transp params = make(map[string]string) - if r.End != "" { - params["end"] = r.End + if r.End != nil { + params["end"] = fmt.Sprintf("%v", r.End) } - if r.Start != "" { - params["start"] = r.Start + if r.Start != nil { + params["start"] = fmt.Sprintf("%v", r.Start) } if r.Timeout != 0 { @@ -211,14 +212,14 @@ func (f MLStartDatafeed) WithBody(v io.Reader) func(*MLStartDatafeedRequest) { } // WithEnd - the end time when the datafeed should stop. when not set, the datafeed continues in real time. -func (f MLStartDatafeed) WithEnd(v string) func(*MLStartDatafeedRequest) { +func (f MLStartDatafeed) WithEnd(v interface{}) func(*MLStartDatafeedRequest) { return func(r *MLStartDatafeedRequest) { r.End = v } } // WithStart - the start time from where the datafeed should begin. -func (f MLStartDatafeed) WithStart(v string) func(*MLStartDatafeedRequest) { +func (f MLStartDatafeed) WithStart(v interface{}) func(*MLStartDatafeedRequest) { return func(r *MLStartDatafeedRequest) { r.Start = v } diff --git a/esapi/api.xpack.ml.start_trained_model_deployment.go b/esapi/api.xpack.ml.start_trained_model_deployment.go index 707a9a3b96..6e72bb49b0 100644 --- a/esapi/api.xpack.ml.start_trained_model_deployment.go +++ b/esapi/api.xpack.ml.start_trained_model_deployment.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLStartTrainedModelDeploymentFunc(t Transport) MLStartTrainedModelDeploy // ----- API Definition ------------------------------------------------------- -// MLStartTrainedModelDeployment - Start a trained model deployment. +// MLStartTrainedModelDeployment - Start a trained model deployment // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-trained-model-deployment. type MLStartTrainedModelDeployment func(model_id string, o ...func(*MLStartTrainedModelDeploymentRequest)) (*Response, error) // MLStartTrainedModelDeploymentRequest configures the ML Start Trained Model Deployment API request. @@ -287,7 +287,7 @@ func (f MLStartTrainedModelDeployment) WithTimeout(v time.Duration) func(*MLStar } } -// WithWaitFor - the allocation status for which to wait. +// WithWaitFor - specifies the allocation status to wait for before returning.. func (f MLStartTrainedModelDeployment) WithWaitFor(v string) func(*MLStartTrainedModelDeploymentRequest) { return func(r *MLStartTrainedModelDeploymentRequest) { r.WaitFor = v diff --git a/esapi/api.xpack.ml.stop_data_frame_analytics.go b/esapi/api.xpack.ml.stop_data_frame_analytics.go index 6e70b0f88b..5e5ac97cda 100644 --- a/esapi/api.xpack.ml.stop_data_frame_analytics.go +++ b/esapi/api.xpack.ml.stop_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLStopDataFrameAnalyticsFunc(t Transport) MLStopDataFrameAnalytics { // ----- API Definition ------------------------------------------------------- -// MLStopDataFrameAnalytics - Stops one or more data frame analytics jobs. +// MLStopDataFrameAnalytics - Stop data frame analytics jobs // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-data-frame-analytics. type MLStopDataFrameAnalytics func(id string, o ...func(*MLStopDataFrameAnalyticsRequest)) (*Response, error) // MLStopDataFrameAnalyticsRequest configures the ML Stop Data Frame Analytics API request. diff --git a/esapi/api.xpack.ml.stop_datafeed.go b/esapi/api.xpack.ml.stop_datafeed.go index 5196b700a3..2310b835ed 100644 --- a/esapi/api.xpack.ml.stop_datafeed.go +++ b/esapi/api.xpack.ml.stop_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newMLStopDatafeedFunc(t Transport) MLStopDatafeed { // ----- API Definition ------------------------------------------------------- -// MLStopDatafeed - Stops one or more datafeeds. +// MLStopDatafeed - Stop datafeeds // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-datafeed. type MLStopDatafeed func(datafeed_id string, o ...func(*MLStopDatafeedRequest)) (*Response, error) // MLStopDatafeedRequest configures the ML Stop Datafeed API request. diff --git a/esapi/api.xpack.ml.stop_trained_model_deployment.go b/esapi/api.xpack.ml.stop_trained_model_deployment.go index baa49b0db5..2990e22c19 100644 --- a/esapi/api.xpack.ml.stop_trained_model_deployment.go +++ b/esapi/api.xpack.ml.stop_trained_model_deployment.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLStopTrainedModelDeploymentFunc(t Transport) MLStopTrainedModelDeployme // ----- API Definition ------------------------------------------------------- -// MLStopTrainedModelDeployment - Stop a trained model deployment. +// MLStopTrainedModelDeployment - Stop a trained model deployment // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/stop-trained-model-deployment.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-trained-model-deployment. type MLStopTrainedModelDeployment func(model_id string, o ...func(*MLStopTrainedModelDeploymentRequest)) (*Response, error) // MLStopTrainedModelDeploymentRequest configures the ML Stop Trained Model Deployment API request. diff --git a/esapi/api.xpack.ml.update_data_frame_analytics.go b/esapi/api.xpack.ml.update_data_frame_analytics.go index c03806ce99..775d0254f0 100644 --- a/esapi/api.xpack.ml.update_data_frame_analytics.go +++ b/esapi/api.xpack.ml.update_data_frame_analytics.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLUpdateDataFrameAnalyticsFunc(t Transport) MLUpdateDataFrameAnalytics { // ----- API Definition ------------------------------------------------------- -// MLUpdateDataFrameAnalytics - Updates certain properties of a data frame analytics job. +// MLUpdateDataFrameAnalytics - Update a data frame analytics job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics. type MLUpdateDataFrameAnalytics func(id string, body io.Reader, o ...func(*MLUpdateDataFrameAnalyticsRequest)) (*Response, error) // MLUpdateDataFrameAnalyticsRequest configures the ML Update Data Frame Analytics API request. diff --git a/esapi/api.xpack.ml.update_datafeed.go b/esapi/api.xpack.ml.update_datafeed.go index 5c6b7b5d81..6db347f4ae 100644 --- a/esapi/api.xpack.ml.update_datafeed.go +++ b/esapi/api.xpack.ml.update_datafeed.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLUpdateDatafeedFunc(t Transport) MLUpdateDatafeed { // ----- API Definition ------------------------------------------------------- -// MLUpdateDatafeed - Updates certain properties of a datafeed. +// MLUpdateDatafeed - Update a datafeed // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-datafeed. type MLUpdateDatafeed func(body io.Reader, datafeed_id string, o ...func(*MLUpdateDatafeedRequest)) (*Response, error) // MLUpdateDatafeedRequest configures the ML Update Datafeed API request. @@ -56,7 +56,7 @@ type MLUpdateDatafeedRequest struct { DatafeedID string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreThrottled *bool IgnoreUnavailable *bool @@ -111,8 +111,8 @@ func (r MLUpdateDatafeedRequest) Do(providedCtx context.Context, transport Trans params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreThrottled != nil { @@ -216,7 +216,7 @@ func (f MLUpdateDatafeed) WithAllowNoIndices(v bool) func(*MLUpdateDatafeedReque } // WithExpandWildcards - whether source index expressions should get expanded to open or closed indices (default: open). -func (f MLUpdateDatafeed) WithExpandWildcards(v string) func(*MLUpdateDatafeedRequest) { +func (f MLUpdateDatafeed) WithExpandWildcards(v ...string) func(*MLUpdateDatafeedRequest) { return func(r *MLUpdateDatafeedRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.xpack.ml.update_filter.go b/esapi/api.xpack.ml.update_filter.go index 9c0974d0fb..9b8e7479ea 100644 --- a/esapi/api.xpack.ml.update_filter.go +++ b/esapi/api.xpack.ml.update_filter.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLUpdateFilterFunc(t Transport) MLUpdateFilter { // ----- API Definition ------------------------------------------------------- -// MLUpdateFilter - Updates the description of a filter, adds items, or removes items. +// MLUpdateFilter - Update a filter // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-filter. type MLUpdateFilter func(body io.Reader, filter_id string, o ...func(*MLUpdateFilterRequest)) (*Response, error) // MLUpdateFilterRequest configures the ML Update Filter API request. diff --git a/esapi/api.xpack.ml.update_job.go b/esapi/api.xpack.ml.update_job.go index 4aaad15ff2..312e49e9d0 100644 --- a/esapi/api.xpack.ml.update_job.go +++ b/esapi/api.xpack.ml.update_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLUpdateJobFunc(t Transport) MLUpdateJob { // ----- API Definition ------------------------------------------------------- -// MLUpdateJob - Updates certain properties of an anomaly detection job. +// MLUpdateJob - Update an anomaly detection job // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-job. type MLUpdateJob func(job_id string, body io.Reader, o ...func(*MLUpdateJobRequest)) (*Response, error) // MLUpdateJobRequest configures the ML Update Job API request. diff --git a/esapi/api.xpack.ml.update_model_snapshot.go b/esapi/api.xpack.ml.update_model_snapshot.go index 6fc4f29c18..460ae42dca 100644 --- a/esapi/api.xpack.ml.update_model_snapshot.go +++ b/esapi/api.xpack.ml.update_model_snapshot.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newMLUpdateModelSnapshotFunc(t Transport) MLUpdateModelSnapshot { // ----- API Definition ------------------------------------------------------- -// MLUpdateModelSnapshot - Updates certain properties of a snapshot. +// MLUpdateModelSnapshot - Update a snapshot // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-model-snapshot. type MLUpdateModelSnapshot func(snapshot_id string, job_id string, body io.Reader, o ...func(*MLUpdateModelSnapshotRequest)) (*Response, error) // MLUpdateModelSnapshotRequest configures the ML Update Model Snapshot API request. diff --git a/esapi/api.xpack.ml.update_trained_model_deployment.go b/esapi/api.xpack.ml.update_trained_model_deployment.go index af0ec102b3..c3ba9c3b27 100644 --- a/esapi/api.xpack.ml.update_trained_model_deployment.go +++ b/esapi/api.xpack.ml.update_trained_model_deployment.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLUpdateTrainedModelDeploymentFunc(t Transport) MLUpdateTrainedModelDepl // ----- API Definition ------------------------------------------------------- -// MLUpdateTrainedModelDeployment - Updates certain properties of trained model deployment. +// MLUpdateTrainedModelDeployment - Update a trained model deployment // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-trained-model-deployment. type MLUpdateTrainedModelDeployment func(model_id string, o ...func(*MLUpdateTrainedModelDeploymentRequest)) (*Response, error) // MLUpdateTrainedModelDeploymentRequest configures the ML Update Trained Model Deployment API request. diff --git a/esapi/api.xpack.ml.upgrade_job_snapshot.go b/esapi/api.xpack.ml.upgrade_job_snapshot.go index d7e4b91e73..ec33b3cc4b 100644 --- a/esapi/api.xpack.ml.upgrade_job_snapshot.go +++ b/esapi/api.xpack.ml.upgrade_job_snapshot.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newMLUpgradeJobSnapshotFunc(t Transport) MLUpgradeJobSnapshot { // ----- API Definition ------------------------------------------------------- -// MLUpgradeJobSnapshot - Upgrades a given job snapshot to the current major version. +// MLUpgradeJobSnapshot - Upgrade a snapshot // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-upgrade-job-snapshot. type MLUpgradeJobSnapshot func(snapshot_id string, job_id string, o ...func(*MLUpgradeJobSnapshotRequest)) (*Response, error) // MLUpgradeJobSnapshotRequest configures the ML Upgrade Job Snapshot API request. diff --git a/esapi/api.xpack.ml.validate.go b/esapi/api.xpack.ml.validate.go index 1b65cbdd7c..deae1dd9c8 100644 --- a/esapi/api.xpack.ml.validate.go +++ b/esapi/api.xpack.ml.validate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,7 +43,7 @@ func newMLValidateFunc(t Transport) MLValidate { // ----- API Definition ------------------------------------------------------- -// MLValidate - Validates an anomaly detection job. +// MLValidate - Validate an anomaly detection job // // See full documentation at https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html. type MLValidate func(body io.Reader, o ...func(*MLValidateRequest)) (*Response, error) diff --git a/esapi/api.xpack.ml.validate_detector.go b/esapi/api.xpack.ml.validate_detector.go index 8d3d403dc3..e36f5a0f1b 100644 --- a/esapi/api.xpack.ml.validate_detector.go +++ b/esapi/api.xpack.ml.validate_detector.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,7 @@ func newMLValidateDetectorFunc(t Transport) MLValidateDetector { // ----- API Definition ------------------------------------------------------- -// MLValidateDetector - Validates an anomaly detection detector. -// -// See full documentation at https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html. +// MLValidateDetector - Validate an anomaly detection job type MLValidateDetector func(body io.Reader, o ...func(*MLValidateDetectorRequest)) (*Response, error) // MLValidateDetectorRequest configures the ML Validate Detector API request. diff --git a/esapi/api.xpack.monitoring.bulk.go b/esapi/api.xpack.monitoring.bulk.go index bca1492423..e7186eae42 100644 --- a/esapi/api.xpack.monitoring.bulk.go +++ b/esapi/api.xpack.monitoring.bulk.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,17 +43,15 @@ func newMonitoringBulkFunc(t Transport) MonitoringBulk { // ----- API Definition ------------------------------------------------------- -// MonitoringBulk - Used by the monitoring features to send monitoring data. +// MonitoringBulk - Send monitoring data // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/monitor-elasticsearch-cluster.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch. type MonitoringBulk func(body io.Reader, o ...func(*MonitoringBulkRequest)) (*Response, error) // MonitoringBulkRequest configures the Monitoring Bulk API request. type MonitoringBulkRequest struct { Body io.Reader - DocumentType string - Interval string SystemAPIVersion string SystemID string @@ -89,19 +87,9 @@ func (r MonitoringBulkRequest) Do(providedCtx context.Context, transport Transpo method = "POST" - path.Grow(7 + 1 + len("_monitoring") + 1 + len(r.DocumentType) + 1 + len("bulk")) + path.Grow(7 + len("/_monitoring/bulk")) path.WriteString("http://") - path.WriteString("/") - path.WriteString("_monitoring") - if r.DocumentType != "" { - path.WriteString("/") - path.WriteString(r.DocumentType) - if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "type", r.DocumentType) - } - } - path.WriteString("/") - path.WriteString("bulk") + path.WriteString("/_monitoring/bulk") params = make(map[string]string) @@ -202,13 +190,6 @@ func (f MonitoringBulk) WithContext(v context.Context) func(*MonitoringBulkReque } } -// WithDocumentType - default document type for items which don't provide one. -func (f MonitoringBulk) WithDocumentType(v string) func(*MonitoringBulkRequest) { - return func(r *MonitoringBulkRequest) { - r.DocumentType = v - } -} - // WithInterval - collection interval (e.g., '10s' or '10000ms') of the payload. func (f MonitoringBulk) WithInterval(v string) func(*MonitoringBulkRequest) { return func(r *MonitoringBulkRequest) { diff --git a/esapi/api.xpack.open_point_in_time.go b/esapi/api.xpack.open_point_in_time.go index 83179b9e1f..65dc9703b1 100644 --- a/esapi/api.xpack.open_point_in_time.go +++ b/esapi/api.xpack.open_point_in_time.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newOpenPointInTimeFunc(t Transport) OpenPointInTime { // ----- API Definition ------------------------------------------------------- -// OpenPointInTime - Open a point in time that can be used in subsequent searches +// OpenPointInTime - Open a point in time // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time. type OpenPointInTime func(index []string, keep_alive string, o ...func(*OpenPointInTimeRequest)) (*Response, error) // OpenPointInTimeRequest configures the Open Point In Time API request. @@ -57,12 +57,13 @@ type OpenPointInTimeRequest struct { Body io.Reader AllowPartialSearchResults *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool KeepAlive string MaxConcurrentShardRequests *int Preference string - Routing string + ProjectRouting string + Routing []string Pretty bool Human bool @@ -115,8 +116,8 @@ func (r OpenPointInTimeRequest) Do(providedCtx context.Context, transport Transp params["allow_partial_search_results"] = strconv.FormatBool(*r.AllowPartialSearchResults) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -135,8 +136,12 @@ func (r OpenPointInTimeRequest) Do(providedCtx context.Context, transport Transp params["preference"] = r.Preference } - if r.Routing != "" { - params["routing"] = r.Routing + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") } if r.Pretty { @@ -239,7 +244,7 @@ func (f OpenPointInTime) WithAllowPartialSearchResults(v bool) func(*OpenPointIn } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f OpenPointInTime) WithExpandWildcards(v string) func(*OpenPointInTimeRequest) { +func (f OpenPointInTime) WithExpandWildcards(v ...string) func(*OpenPointInTimeRequest) { return func(r *OpenPointInTimeRequest) { r.ExpandWildcards = v } @@ -273,8 +278,15 @@ func (f OpenPointInTime) WithPreference(v string) func(*OpenPointInTimeRequest) } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f OpenPointInTime) WithProjectRouting(v string) func(*OpenPointInTimeRequest) { + return func(r *OpenPointInTimeRequest) { + r.ProjectRouting = v + } +} + // WithRouting - specific routing value. -func (f OpenPointInTime) WithRouting(v string) func(*OpenPointInTimeRequest) { +func (f OpenPointInTime) WithRouting(v ...string) func(*OpenPointInTimeRequest) { return func(r *OpenPointInTimeRequest) { r.Routing = v } diff --git a/esapi/api.xpack.profiling.flamegraph.go b/esapi/api.xpack.profiling.flamegraph.go index 7a350e8193..cf46597bbf 100644 --- a/esapi/api.xpack.profiling.flamegraph.go +++ b/esapi/api.xpack.profiling.flamegraph.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,7 +43,7 @@ func newProfilingFlamegraphFunc(t Transport) ProfilingFlamegraph { // ----- API Definition ------------------------------------------------------- -// ProfilingFlamegraph - Extracts a UI-optimized structure to render flamegraphs from Universal Profiling. +// ProfilingFlamegraph - Extracts a UI-optimized structure to render flamegraphs from Universal Profiling // // See full documentation at https://www.elastic.co/guide/en/observability/current/universal-profiling.html. type ProfilingFlamegraph func(body io.Reader, o ...func(*ProfilingFlamegraphRequest)) (*Response, error) diff --git a/esapi/api.xpack.rollup.delete_job.go b/esapi/api.xpack.rollup.delete_job.go index d1335eb910..e91396e9b0 100644 --- a/esapi/api.xpack.rollup.delete_job.go +++ b/esapi/api.xpack.rollup.delete_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newRollupDeleteJobFunc(t Transport) RollupDeleteJob { // ----- API Definition ------------------------------------------------------- -// RollupDeleteJob - Deletes an existing rollup job. +// RollupDeleteJob - Delete a rollup job // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-delete-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-delete-job. type RollupDeleteJob func(id string, o ...func(*RollupDeleteJobRequest)) (*Response, error) // RollupDeleteJobRequest configures the Rollup Delete Job API request. diff --git a/esapi/api.xpack.rollup.get_jobs.go b/esapi/api.xpack.rollup.get_jobs.go index f55b3a3144..43a0e59592 100644 --- a/esapi/api.xpack.rollup.get_jobs.go +++ b/esapi/api.xpack.rollup.get_jobs.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newRollupGetJobsFunc(t Transport) RollupGetJobs { // ----- API Definition ------------------------------------------------------- -// RollupGetJobs - Retrieves the configuration, stats, and status of rollup jobs. +// RollupGetJobs - Get rollup job information // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-get-jobs. type RollupGetJobs func(o ...func(*RollupGetJobsRequest)) (*Response, error) // RollupGetJobsRequest configures the Rollup Get Jobs API request. diff --git a/esapi/api.xpack.rollup.get_rollup_caps.go b/esapi/api.xpack.rollup.get_rollup_caps.go index 1073bcb593..6a2801fb78 100644 --- a/esapi/api.xpack.rollup.get_rollup_caps.go +++ b/esapi/api.xpack.rollup.get_rollup_caps.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newRollupGetRollupCapsFunc(t Transport) RollupGetRollupCaps { // ----- API Definition ------------------------------------------------------- -// RollupGetRollupCaps - Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern. +// RollupGetRollupCaps - Get the rollup job capabilities // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-caps. type RollupGetRollupCaps func(o ...func(*RollupGetRollupCapsRequest)) (*Response, error) // RollupGetRollupCapsRequest configures the Rollup Get Rollup Caps API request. diff --git a/esapi/api.xpack.rollup.get_rollup_index_caps.go b/esapi/api.xpack.rollup.get_rollup_index_caps.go index 084dffc26d..b8b937ed8b 100644 --- a/esapi/api.xpack.rollup.get_rollup_index_caps.go +++ b/esapi/api.xpack.rollup.get_rollup_index_caps.go @@ -15,18 +15,19 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strings" ) func newRollupGetRollupIndexCapsFunc(t Transport) RollupGetRollupIndexCaps { - return func(index string, o ...func(*RollupGetRollupIndexCapsRequest)) (*Response, error) { + return func(index []string, o ...func(*RollupGetRollupIndexCapsRequest)) (*Response, error) { var r = RollupGetRollupIndexCapsRequest{Index: index} for _, f := range o { f(&r) @@ -42,16 +43,16 @@ func newRollupGetRollupIndexCapsFunc(t Transport) RollupGetRollupIndexCaps { // ----- API Definition ------------------------------------------------------- -// RollupGetRollupIndexCaps - Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored). +// RollupGetRollupIndexCaps - Get the rollup index capabilities // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-index-caps.html. -type RollupGetRollupIndexCaps func(index string, o ...func(*RollupGetRollupIndexCapsRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-index-caps. +type RollupGetRollupIndexCaps func(index []string, o ...func(*RollupGetRollupIndexCapsRequest)) (*Response, error) // RollupGetRollupIndexCapsRequest configures the Rollup Get Rollup Index Caps API request. type RollupGetRollupIndexCapsRequest struct { - Index string + Index []string Pretty bool Human bool @@ -84,12 +85,16 @@ func (r RollupGetRollupIndexCapsRequest) Do(providedCtx context.Context, transpo method = "GET" - path.Grow(7 + 1 + len(r.Index) + 1 + len("_rollup") + 1 + len("data")) + if len(r.Index) == 0 { + return nil, errors.New("index is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len(strings.Join(r.Index, ",")) + 1 + len("_rollup") + 1 + len("data")) path.WriteString("http://") path.WriteString("/") - path.WriteString(r.Index) + path.WriteString(strings.Join(r.Index, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "index", r.Index) + instrument.RecordPathPart(ctx, "index", strings.Join(r.Index, ",")) } path.WriteString("/") path.WriteString("_rollup") diff --git a/esapi/api.xpack.rollup.put_job.go b/esapi/api.xpack.rollup.put_job.go index 32a8419b29..868a89a01c 100644 --- a/esapi/api.xpack.rollup.put_job.go +++ b/esapi/api.xpack.rollup.put_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,11 +43,11 @@ func newRollupPutJobFunc(t Transport) RollupPutJob { // ----- API Definition ------------------------------------------------------- -// RollupPutJob - Creates a rollup job. +// RollupPutJob - Create a rollup job // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-put-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-put-job. type RollupPutJob func(id string, body io.Reader, o ...func(*RollupPutJobRequest)) (*Response, error) // RollupPutJobRequest configures the Rollup Put Job API request. diff --git a/esapi/api.xpack.rollup.rollup_search.go b/esapi/api.xpack.rollup.rollup_search.go index 94b407dff4..46afbce77f 100644 --- a/esapi/api.xpack.rollup.rollup_search.go +++ b/esapi/api.xpack.rollup.rollup_search.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,11 +45,11 @@ func newRollupRollupSearchFunc(t Transport) RollupRollupSearch { // ----- API Definition ------------------------------------------------------- -// RollupRollupSearch - Enables searching rolled-up data using the standard query DSL. +// RollupRollupSearch - Search rolled-up data // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-search.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-rollup-search. type RollupRollupSearch func(index []string, body io.Reader, o ...func(*RollupRollupSearchRequest)) (*Response, error) // RollupRollupSearchRequest configures the Rollup Rollup Search API request. diff --git a/esapi/api.xpack.rollup.start_job.go b/esapi/api.xpack.rollup.start_job.go index a657c45b3f..d4535dd548 100644 --- a/esapi/api.xpack.rollup.start_job.go +++ b/esapi/api.xpack.rollup.start_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newRollupStartJobFunc(t Transport) RollupStartJob { // ----- API Definition ------------------------------------------------------- -// RollupStartJob - Starts an existing, stopped rollup job. +// RollupStartJob - Start rollup jobs // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-start-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-start-job. type RollupStartJob func(id string, o ...func(*RollupStartJobRequest)) (*Response, error) // RollupStartJobRequest configures the Rollup Start Job API request. diff --git a/esapi/api.xpack.rollup.stop_job.go b/esapi/api.xpack.rollup.stop_job.go index bc107e0293..ca10216abd 100644 --- a/esapi/api.xpack.rollup.stop_job.go +++ b/esapi/api.xpack.rollup.stop_job.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,11 +44,11 @@ func newRollupStopJobFunc(t Transport) RollupStopJob { // ----- API Definition ------------------------------------------------------- -// RollupStopJob - Stops an existing, started rollup job. +// RollupStopJob - Stop rollup jobs // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-stop-job.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-stop-job. type RollupStopJob func(id string, o ...func(*RollupStopJobRequest)) (*Response, error) // RollupStopJobRequest configures the Rollup Stop Job API request. diff --git a/esapi/api.xpack.searchable_snapshots.cache_stats.go b/esapi/api.xpack.searchable_snapshots.cache_stats.go index d0fa1cb141..5b8d2ea725 100644 --- a/esapi/api.xpack.searchable_snapshots.cache_stats.go +++ b/esapi/api.xpack.searchable_snapshots.cache_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,11 +42,11 @@ func newSearchableSnapshotsCacheStatsFunc(t Transport) SearchableSnapshotsCacheS // ----- API Definition ------------------------------------------------------- -// SearchableSnapshotsCacheStats - Retrieve node-level cache statistics about searchable snapshots. +// SearchableSnapshotsCacheStats - Get cache statistics // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-cache-stats. type SearchableSnapshotsCacheStats func(o ...func(*SearchableSnapshotsCacheStatsRequest)) (*Response, error) // SearchableSnapshotsCacheStatsRequest configures the Searchable Snapshots Cache Stats API request. diff --git a/esapi/api.xpack.searchable_snapshots.clear_cache.go b/esapi/api.xpack.searchable_snapshots.clear_cache.go index 6e59b486c0..b984165941 100644 --- a/esapi/api.xpack.searchable_snapshots.clear_cache.go +++ b/esapi/api.xpack.searchable_snapshots.clear_cache.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -47,7 +47,7 @@ func newSearchableSnapshotsClearCacheFunc(t Transport) SearchableSnapshotsClearC // // This API is experimental. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-clear-cache. type SearchableSnapshotsClearCache func(o ...func(*SearchableSnapshotsClearCacheRequest)) (*Response, error) // SearchableSnapshotsClearCacheRequest configures the Searchable Snapshots Clear Cache API request. @@ -55,7 +55,7 @@ type SearchableSnapshotsClearCacheRequest struct { Index []string AllowNoIndices *bool - ExpandWildcards string + ExpandWildcards []string IgnoreUnavailable *bool Pretty bool @@ -111,8 +111,8 @@ func (r SearchableSnapshotsClearCacheRequest) Do(providedCtx context.Context, tr params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) } - if r.ExpandWildcards != "" { - params["expand_wildcards"] = r.ExpandWildcards + if len(r.ExpandWildcards) > 0 { + params["expand_wildcards"] = strings.Join(r.ExpandWildcards, ",") } if r.IgnoreUnavailable != nil { @@ -197,7 +197,7 @@ func (f SearchableSnapshotsClearCache) WithContext(v context.Context) func(*Sear } } -// WithIndex - a list of index names. +// WithIndex - clear the cache. func (f SearchableSnapshotsClearCache) WithIndex(v ...string) func(*SearchableSnapshotsClearCacheRequest) { return func(r *SearchableSnapshotsClearCacheRequest) { r.Index = v @@ -212,7 +212,7 @@ func (f SearchableSnapshotsClearCache) WithAllowNoIndices(v bool) func(*Searchab } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -func (f SearchableSnapshotsClearCache) WithExpandWildcards(v string) func(*SearchableSnapshotsClearCacheRequest) { +func (f SearchableSnapshotsClearCache) WithExpandWildcards(v ...string) func(*SearchableSnapshotsClearCacheRequest) { return func(r *SearchableSnapshotsClearCacheRequest) { r.ExpandWildcards = v } diff --git a/esapi/api.xpack.searchable_snapshots.mount.go b/esapi/api.xpack.searchable_snapshots.mount.go index 632266beae..8ed4cf89ba 100644 --- a/esapi/api.xpack.searchable_snapshots.mount.go +++ b/esapi/api.xpack.searchable_snapshots.mount.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newSearchableSnapshotsMountFunc(t Transport) SearchableSnapshotsMount { // ----- API Definition ------------------------------------------------------- -// SearchableSnapshotsMount - Mount a snapshot as a searchable index. +// SearchableSnapshotsMount - Mount a snapshot // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-mount. type SearchableSnapshotsMount func(repository string, snapshot string, body io.Reader, o ...func(*SearchableSnapshotsMountRequest)) (*Response, error) // SearchableSnapshotsMountRequest configures the Searchable Snapshots Mount API request. diff --git a/esapi/api.xpack.searchable_snapshots.stats.go b/esapi/api.xpack.searchable_snapshots.stats.go index 34a942ce68..dc8cd5d93a 100644 --- a/esapi/api.xpack.searchable_snapshots.stats.go +++ b/esapi/api.xpack.searchable_snapshots.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSearchableSnapshotsStatsFunc(t Transport) SearchableSnapshotsStats { // ----- API Definition ------------------------------------------------------- -// SearchableSnapshotsStats - Retrieve shard-level statistics about searchable snapshots. +// SearchableSnapshotsStats - Get searchable snapshot statistics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-stats. type SearchableSnapshotsStats func(o ...func(*SearchableSnapshotsStatsRequest)) (*Response, error) // SearchableSnapshotsStatsRequest configures the Searchable Snapshots Stats API request. diff --git a/esapi/api.xpack.security.activate_user_profile.go b/esapi/api.xpack.security.activate_user_profile.go index f8c1ebf30b..78d2346b69 100644 --- a/esapi/api.xpack.security.activate_user_profile.go +++ b/esapi/api.xpack.security.activate_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityActivateUserProfileFunc(t Transport) SecurityActivateUserProfile // ----- API Definition ------------------------------------------------------- -// SecurityActivateUserProfile - Creates or updates the user profile on behalf of another user. +// SecurityActivateUserProfile - Activate a user profile // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-activate-user-profile. type SecurityActivateUserProfile func(body io.Reader, o ...func(*SecurityActivateUserProfileRequest)) (*Response, error) // SecurityActivateUserProfileRequest configures the Security Activate User Profile API request. diff --git a/esapi/api.xpack.security.authenticate.go b/esapi/api.xpack.security.authenticate.go index 72bba6b8a4..484ee9ef7f 100644 --- a/esapi/api.xpack.security.authenticate.go +++ b/esapi/api.xpack.security.authenticate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityAuthenticateFunc(t Transport) SecurityAuthenticate { // ----- API Definition ------------------------------------------------------- -// SecurityAuthenticate - Enables authentication as a user and retrieve information about the authenticated user. +// SecurityAuthenticate - Authenticate a user // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-authenticate. type SecurityAuthenticate func(o ...func(*SecurityAuthenticateRequest)) (*Response, error) // SecurityAuthenticateRequest configures the Security Authenticate API request. diff --git a/esapi/api.xpack.security.bulk_delete_role.go b/esapi/api.xpack.security.bulk_delete_role.go index ff15c95e96..6e1ea040a1 100644 --- a/esapi/api.xpack.security.bulk_delete_role.go +++ b/esapi/api.xpack.security.bulk_delete_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityBulkDeleteRoleFunc(t Transport) SecurityBulkDeleteRole { // ----- API Definition ------------------------------------------------------- -// SecurityBulkDeleteRole - Bulk delete roles in the native realm. +// SecurityBulkDeleteRole - Bulk delete roles // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-delete-role.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-delete-role. type SecurityBulkDeleteRole func(body io.Reader, o ...func(*SecurityBulkDeleteRoleRequest)) (*Response, error) // SecurityBulkDeleteRoleRequest configures the Security Bulk Delete Role API request. diff --git a/esapi/api.xpack.security.bulk_put_role.go b/esapi/api.xpack.security.bulk_put_role.go index f20c2d6b1d..f51e6d1e53 100644 --- a/esapi/api.xpack.security.bulk_put_role.go +++ b/esapi/api.xpack.security.bulk_put_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityBulkPutRoleFunc(t Transport) SecurityBulkPutRole { // ----- API Definition ------------------------------------------------------- -// SecurityBulkPutRole - Bulk adds and updates roles in the native realm. +// SecurityBulkPutRole - Bulk create or update roles // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-put-role.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-put-role. type SecurityBulkPutRole func(body io.Reader, o ...func(*SecurityBulkPutRoleRequest)) (*Response, error) // SecurityBulkPutRoleRequest configures the Security Bulk Put Role API request. diff --git a/esapi/api.xpack.security.bulk_update_api_keys.go b/esapi/api.xpack.security.bulk_update_api_keys.go index b9666a7281..83f33c0e5f 100644 --- a/esapi/api.xpack.security.bulk_update_api_keys.go +++ b/esapi/api.xpack.security.bulk_update_api_keys.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityBulkUpdateAPIKeysFunc(t Transport) SecurityBulkUpdateAPIKeys { // ----- API Definition ------------------------------------------------------- -// SecurityBulkUpdateAPIKeys - Updates the attributes of multiple existing API keys. +// SecurityBulkUpdateAPIKeys - Bulk update API keys // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-update-api-keys.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-update-api-keys. type SecurityBulkUpdateAPIKeys func(body io.Reader, o ...func(*SecurityBulkUpdateAPIKeysRequest)) (*Response, error) // SecurityBulkUpdateAPIKeysRequest configures the Security Bulk UpdateAPI Keys API request. diff --git a/esapi/api.xpack.security.change_password.go b/esapi/api.xpack.security.change_password.go index 1b71ccf93a..ffb6910226 100644 --- a/esapi/api.xpack.security.change_password.go +++ b/esapi/api.xpack.security.change_password.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityChangePasswordFunc(t Transport) SecurityChangePassword { // ----- API Definition ------------------------------------------------------- -// SecurityChangePassword - Changes the passwords of users in the native realm and built-in users. +// SecurityChangePassword - Change passwords // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-change-password. type SecurityChangePassword func(body io.Reader, o ...func(*SecurityChangePasswordRequest)) (*Response, error) // SecurityChangePasswordRequest configures the Security Change Password API request. diff --git a/esapi/api.xpack.security.clear_api_key_cache.go b/esapi/api.xpack.security.clear_api_key_cache.go index 6e55402360..c0a7610016 100644 --- a/esapi/api.xpack.security.clear_api_key_cache.go +++ b/esapi/api.xpack.security.clear_api_key_cache.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityClearAPIKeyCacheFunc(t Transport) SecurityClearAPIKeyCache { // ----- API Definition ------------------------------------------------------- -// SecurityClearAPIKeyCache - Clear a subset or all entries from the API key cache. +// SecurityClearAPIKeyCache - Clear the API key cache // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-api-key-cache. type SecurityClearAPIKeyCache func(ids []string, o ...func(*SecurityClearAPIKeyCacheRequest)) (*Response, error) // SecurityClearAPIKeyCacheRequest configures the Security ClearAPI Key Cache API request. diff --git a/esapi/api.xpack.security.clear_cached_privileges.go b/esapi/api.xpack.security.clear_cached_privileges.go index e9e4620af6..78349055bc 100644 --- a/esapi/api.xpack.security.clear_cached_privileges.go +++ b/esapi/api.xpack.security.clear_cached_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityClearCachedPrivilegesFunc(t Transport) SecurityClearCachedPrivil // ----- API Definition ------------------------------------------------------- -// SecurityClearCachedPrivileges - Evicts application privileges from the native application privileges cache. +// SecurityClearCachedPrivileges - Clear the privileges cache // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-privileges. type SecurityClearCachedPrivileges func(application []string, o ...func(*SecurityClearCachedPrivilegesRequest)) (*Response, error) // SecurityClearCachedPrivilegesRequest configures the Security Clear Cached Privileges API request. diff --git a/esapi/api.xpack.security.clear_cached_realms.go b/esapi/api.xpack.security.clear_cached_realms.go index b08ea21315..8eddf282b7 100644 --- a/esapi/api.xpack.security.clear_cached_realms.go +++ b/esapi/api.xpack.security.clear_cached_realms.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityClearCachedRealmsFunc(t Transport) SecurityClearCachedRealms { // ----- API Definition ------------------------------------------------------- -// SecurityClearCachedRealms - Evicts users from the user cache. Can completely clear the cache or evict specific users. +// SecurityClearCachedRealms - Clear the user cache // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-realms. type SecurityClearCachedRealms func(realms []string, o ...func(*SecurityClearCachedRealmsRequest)) (*Response, error) // SecurityClearCachedRealmsRequest configures the Security Clear Cached Realms API request. diff --git a/esapi/api.xpack.security.clear_cached_roles.go b/esapi/api.xpack.security.clear_cached_roles.go index 333644ef2b..b7395dcae2 100644 --- a/esapi/api.xpack.security.clear_cached_roles.go +++ b/esapi/api.xpack.security.clear_cached_roles.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityClearCachedRolesFunc(t Transport) SecurityClearCachedRoles { // ----- API Definition ------------------------------------------------------- -// SecurityClearCachedRoles - Evicts roles from the native role cache. +// SecurityClearCachedRoles - Clear the roles cache // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-roles. type SecurityClearCachedRoles func(name []string, o ...func(*SecurityClearCachedRolesRequest)) (*Response, error) // SecurityClearCachedRolesRequest configures the Security Clear Cached Roles API request. diff --git a/esapi/api.xpack.security.clear_cached_service_tokens.go b/esapi/api.xpack.security.clear_cached_service_tokens.go index c1f12de944..fb6f973de5 100644 --- a/esapi/api.xpack.security.clear_cached_service_tokens.go +++ b/esapi/api.xpack.security.clear_cached_service_tokens.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityClearCachedServiceTokensFunc(t Transport) SecurityClearCachedSer // ----- API Definition ------------------------------------------------------- -// SecurityClearCachedServiceTokens - Evicts tokens from the service account token caches. +// SecurityClearCachedServiceTokens - Clear service account token caches // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-service-tokens. type SecurityClearCachedServiceTokens func(name []string, namespace string, service string, o ...func(*SecurityClearCachedServiceTokensRequest)) (*Response, error) // SecurityClearCachedServiceTokensRequest configures the Security Clear Cached Service Tokens API request. diff --git a/esapi/api.xpack.security.create_api_key.go b/esapi/api.xpack.security.create_api_key.go index 4ec392eddd..40dbb7cf43 100644 --- a/esapi/api.xpack.security.create_api_key.go +++ b/esapi/api.xpack.security.create_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityCreateAPIKeyFunc(t Transport) SecurityCreateAPIKey { // ----- API Definition ------------------------------------------------------- -// SecurityCreateAPIKey - Creates an API key for access without requiring basic authentication. +// SecurityCreateAPIKey - Create an API key // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key. type SecurityCreateAPIKey func(body io.Reader, o ...func(*SecurityCreateAPIKeyRequest)) (*Response, error) // SecurityCreateAPIKeyRequest configures the Security CreateAPI Key API request. diff --git a/esapi/api.xpack.security.create_cross_cluster_api_key.go b/esapi/api.xpack.security.create_cross_cluster_api_key.go index e0bf480f46..9a4faf8dda 100644 --- a/esapi/api.xpack.security.create_cross_cluster_api_key.go +++ b/esapi/api.xpack.security.create_cross_cluster_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityCreateCrossClusterAPIKeyFunc(t Transport) SecurityCreateCrossClu // ----- API Definition ------------------------------------------------------- -// SecurityCreateCrossClusterAPIKey - Creates a cross-cluster API key for API key based remote cluster access. +// SecurityCreateCrossClusterAPIKey - Create a cross-cluster API key // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-cross-cluster-api-key. type SecurityCreateCrossClusterAPIKey func(body io.Reader, o ...func(*SecurityCreateCrossClusterAPIKeyRequest)) (*Response, error) // SecurityCreateCrossClusterAPIKeyRequest configures the Security Create Cross ClusterAPI Key API request. diff --git a/esapi/api.xpack.security.create_service_token.go b/esapi/api.xpack.security.create_service_token.go index b40a2fd930..0d2725ef47 100644 --- a/esapi/api.xpack.security.create_service_token.go +++ b/esapi/api.xpack.security.create_service_token.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityCreateServiceTokenFunc(t Transport) SecurityCreateServiceToken { // ----- API Definition ------------------------------------------------------- -// SecurityCreateServiceToken - Creates a service account token for access without requiring basic authentication. +// SecurityCreateServiceToken - Create a service account token // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-service-token. type SecurityCreateServiceToken func(namespace string, service string, o ...func(*SecurityCreateServiceTokenRequest)) (*Response, error) // SecurityCreateServiceTokenRequest configures the Security Create Service Token API request. diff --git a/esapi/api.xpack.security.delegate_pki.go b/esapi/api.xpack.security.delegate_pki.go index 080bfdc0af..59d9001022 100644 --- a/esapi/api.xpack.security.delegate_pki.go +++ b/esapi/api.xpack.security.delegate_pki.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityDelegatePkiFunc(t Transport) SecurityDelegatePki { // ----- API Definition ------------------------------------------------------- -// SecurityDelegatePki - Delegate PKI authentication. +// SecurityDelegatePki - Delegate PKI authentication // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-delegate-pki-authentication.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delegate-pki. type SecurityDelegatePki func(body io.Reader, o ...func(*SecurityDelegatePkiRequest)) (*Response, error) // SecurityDelegatePkiRequest configures the Security Delegate Pki API request. diff --git a/esapi/api.xpack.security.delete_privileges.go b/esapi/api.xpack.security.delete_privileges.go index 34b51523c8..564507e34d 100644 --- a/esapi/api.xpack.security.delete_privileges.go +++ b/esapi/api.xpack.security.delete_privileges.go @@ -15,18 +15,19 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strings" ) func newSecurityDeletePrivilegesFunc(t Transport) SecurityDeletePrivileges { - return func(name string, application string, o ...func(*SecurityDeletePrivilegesRequest)) (*Response, error) { + return func(name []string, application string, o ...func(*SecurityDeletePrivilegesRequest)) (*Response, error) { var r = SecurityDeletePrivilegesRequest{Name: name, Application: application} for _, f := range o { f(&r) @@ -42,15 +43,15 @@ func newSecurityDeletePrivilegesFunc(t Transport) SecurityDeletePrivileges { // ----- API Definition ------------------------------------------------------- -// SecurityDeletePrivileges - Removes application privileges. +// SecurityDeletePrivileges - Delete application privileges // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html. -type SecurityDeletePrivileges func(name string, application string, o ...func(*SecurityDeletePrivilegesRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-privileges. +type SecurityDeletePrivileges func(name []string, application string, o ...func(*SecurityDeletePrivilegesRequest)) (*Response, error) // SecurityDeletePrivilegesRequest configures the Security Delete Privileges API request. type SecurityDeletePrivilegesRequest struct { Application string - Name string + Name []string Refresh string @@ -85,7 +86,11 @@ func (r SecurityDeletePrivilegesRequest) Do(providedCtx context.Context, transpo method = "DELETE" - path.Grow(7 + 1 + len("_security") + 1 + len("privilege") + 1 + len(r.Application) + 1 + len(r.Name)) + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_security") + 1 + len("privilege") + 1 + len(r.Application) + 1 + len(strings.Join(r.Name, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_security") @@ -97,9 +102,9 @@ func (r SecurityDeletePrivilegesRequest) Do(providedCtx context.Context, transpo instrument.RecordPathPart(ctx, "application", r.Application) } path.WriteString("/") - path.WriteString(r.Name) + path.WriteString(strings.Join(r.Name, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "name", r.Name) + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) } params = make(map[string]string) diff --git a/esapi/api.xpack.security.delete_role.go b/esapi/api.xpack.security.delete_role.go index c5a9bdeca8..2b6670e698 100644 --- a/esapi/api.xpack.security.delete_role.go +++ b/esapi/api.xpack.security.delete_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityDeleteRoleFunc(t Transport) SecurityDeleteRole { // ----- API Definition ------------------------------------------------------- -// SecurityDeleteRole - Removes roles in the native realm. +// SecurityDeleteRole - Delete roles // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role. type SecurityDeleteRole func(name string, o ...func(*SecurityDeleteRoleRequest)) (*Response, error) // SecurityDeleteRoleRequest configures the Security Delete Role API request. diff --git a/esapi/api.xpack.security.delete_role_mapping.go b/esapi/api.xpack.security.delete_role_mapping.go index 13f000a93d..eb83019f8c 100644 --- a/esapi/api.xpack.security.delete_role_mapping.go +++ b/esapi/api.xpack.security.delete_role_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityDeleteRoleMappingFunc(t Transport) SecurityDeleteRoleMapping { // ----- API Definition ------------------------------------------------------- -// SecurityDeleteRoleMapping - Removes role mappings. +// SecurityDeleteRoleMapping - Delete role mappings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role-mapping. type SecurityDeleteRoleMapping func(name string, o ...func(*SecurityDeleteRoleMappingRequest)) (*Response, error) // SecurityDeleteRoleMappingRequest configures the Security Delete Role Mapping API request. diff --git a/esapi/api.xpack.security.delete_service_token.go b/esapi/api.xpack.security.delete_service_token.go index b08d37d5f7..7fd79e8ba2 100644 --- a/esapi/api.xpack.security.delete_service_token.go +++ b/esapi/api.xpack.security.delete_service_token.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityDeleteServiceTokenFunc(t Transport) SecurityDeleteServiceToken { // ----- API Definition ------------------------------------------------------- -// SecurityDeleteServiceToken - Deletes a service account token. +// SecurityDeleteServiceToken - Delete service account tokens // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-service-token. type SecurityDeleteServiceToken func(name string, namespace string, service string, o ...func(*SecurityDeleteServiceTokenRequest)) (*Response, error) // SecurityDeleteServiceTokenRequest configures the Security Delete Service Token API request. diff --git a/esapi/api.xpack.security.delete_user.go b/esapi/api.xpack.security.delete_user.go index 3b61f66618..873ada4146 100644 --- a/esapi/api.xpack.security.delete_user.go +++ b/esapi/api.xpack.security.delete_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityDeleteUserFunc(t Transport) SecurityDeleteUser { // ----- API Definition ------------------------------------------------------- -// SecurityDeleteUser - Deletes users from the native realm. +// SecurityDeleteUser - Delete users // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-user. type SecurityDeleteUser func(username string, o ...func(*SecurityDeleteUserRequest)) (*Response, error) // SecurityDeleteUserRequest configures the Security Delete User API request. diff --git a/esapi/api.xpack.security.disable_user.go b/esapi/api.xpack.security.disable_user.go index 27d912d5ca..154af929aa 100644 --- a/esapi/api.xpack.security.disable_user.go +++ b/esapi/api.xpack.security.disable_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityDisableUserFunc(t Transport) SecurityDisableUser { // ----- API Definition ------------------------------------------------------- -// SecurityDisableUser - Disables users in the native realm. +// SecurityDisableUser - Disable users // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-disable-user. type SecurityDisableUser func(username string, o ...func(*SecurityDisableUserRequest)) (*Response, error) // SecurityDisableUserRequest configures the Security Disable User API request. diff --git a/esapi/api.xpack.security.disable_user_profile.go b/esapi/api.xpack.security.disable_user_profile.go index c1c23b507f..2082903c9c 100644 --- a/esapi/api.xpack.security.disable_user_profile.go +++ b/esapi/api.xpack.security.disable_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityDisableUserProfileFunc(t Transport) SecurityDisableUserProfile { // ----- API Definition ------------------------------------------------------- -// SecurityDisableUserProfile - Disables a user profile so it's not visible in user profile searches. +// SecurityDisableUserProfile - Disable a user profile // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-disable-user-profile.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-disable-user-profile. type SecurityDisableUserProfile func(uid string, o ...func(*SecurityDisableUserProfileRequest)) (*Response, error) // SecurityDisableUserProfileRequest configures the Security Disable User Profile API request. diff --git a/esapi/api.xpack.security.enable_user.go b/esapi/api.xpack.security.enable_user.go index 11052e0abe..702a19ba61 100644 --- a/esapi/api.xpack.security.enable_user.go +++ b/esapi/api.xpack.security.enable_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityEnableUserFunc(t Transport) SecurityEnableUser { // ----- API Definition ------------------------------------------------------- -// SecurityEnableUser - Enables users in the native realm. +// SecurityEnableUser - Enable users // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user. type SecurityEnableUser func(username string, o ...func(*SecurityEnableUserRequest)) (*Response, error) // SecurityEnableUserRequest configures the Security Enable User API request. diff --git a/esapi/api.xpack.security.enable_user_profile.go b/esapi/api.xpack.security.enable_user_profile.go index 4404987886..eed5658207 100644 --- a/esapi/api.xpack.security.enable_user_profile.go +++ b/esapi/api.xpack.security.enable_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityEnableUserProfileFunc(t Transport) SecurityEnableUserProfile { // ----- API Definition ------------------------------------------------------- -// SecurityEnableUserProfile - Enables a user profile so it's visible in user profile searches. +// SecurityEnableUserProfile - Enable a user profile // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-enable-user-profile.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user-profile. type SecurityEnableUserProfile func(uid string, o ...func(*SecurityEnableUserProfileRequest)) (*Response, error) // SecurityEnableUserProfileRequest configures the Security Enable User Profile API request. diff --git a/esapi/api.xpack.security.enroll_kibana.go b/esapi/api.xpack.security.enroll_kibana.go index 06ed386d7d..4ad9d07ad4 100644 --- a/esapi/api.xpack.security.enroll_kibana.go +++ b/esapi/api.xpack.security.enroll_kibana.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityEnrollKibanaFunc(t Transport) SecurityEnrollKibana { // ----- API Definition ------------------------------------------------------- -// SecurityEnrollKibana - Allows a kibana instance to configure itself to communicate with a secured elasticsearch cluster. +// SecurityEnrollKibana - Enroll Kibana // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-kibana-enrollment.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enroll-kibana. type SecurityEnrollKibana func(o ...func(*SecurityEnrollKibanaRequest)) (*Response, error) // SecurityEnrollKibanaRequest configures the Security Enroll Kibana API request. diff --git a/esapi/api.xpack.security.enroll_node.go b/esapi/api.xpack.security.enroll_node.go index e7b9951e77..3731b6b2e9 100644 --- a/esapi/api.xpack.security.enroll_node.go +++ b/esapi/api.xpack.security.enroll_node.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityEnrollNodeFunc(t Transport) SecurityEnrollNode { // ----- API Definition ------------------------------------------------------- -// SecurityEnrollNode - Allows a new node to enroll to an existing cluster with security enabled. +// SecurityEnrollNode - Enroll a node // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-node-enrollment.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enroll-node. type SecurityEnrollNode func(o ...func(*SecurityEnrollNodeRequest)) (*Response, error) // SecurityEnrollNodeRequest configures the Security Enroll Node API request. diff --git a/esapi/api.xpack.security.get_api_key.go b/esapi/api.xpack.security.get_api_key.go index 2617633595..778b338706 100644 --- a/esapi/api.xpack.security.get_api_key.go +++ b/esapi/api.xpack.security.get_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityGetAPIKeyFunc(t Transport) SecurityGetAPIKey { // ----- API Definition ------------------------------------------------------- -// SecurityGetAPIKey - Retrieves information for one or more API keys. +// SecurityGetAPIKey - Get API key information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-api-key. type SecurityGetAPIKey func(o ...func(*SecurityGetAPIKeyRequest)) (*Response, error) // SecurityGetAPIKeyRequest configures the Security GetAPI Key API request. diff --git a/esapi/api.xpack.security.get_builtin_privileges.go b/esapi/api.xpack.security.get_builtin_privileges.go index c0a8d59cba..fb97bf173d 100644 --- a/esapi/api.xpack.security.get_builtin_privileges.go +++ b/esapi/api.xpack.security.get_builtin_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityGetBuiltinPrivilegesFunc(t Transport) SecurityGetBuiltinPrivileg // ----- API Definition ------------------------------------------------------- -// SecurityGetBuiltinPrivileges - Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch. +// SecurityGetBuiltinPrivileges - Get builtin privileges // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-builtin-privileges. type SecurityGetBuiltinPrivileges func(o ...func(*SecurityGetBuiltinPrivilegesRequest)) (*Response, error) // SecurityGetBuiltinPrivilegesRequest configures the Security Get Builtin Privileges API request. diff --git a/esapi/api.xpack.security.get_privileges.go b/esapi/api.xpack.security.get_privileges.go index 2c37365242..cbb5891029 100644 --- a/esapi/api.xpack.security.get_privileges.go +++ b/esapi/api.xpack.security.get_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,15 +42,15 @@ func newSecurityGetPrivilegesFunc(t Transport) SecurityGetPrivileges { // ----- API Definition ------------------------------------------------------- -// SecurityGetPrivileges - Retrieves application privileges. +// SecurityGetPrivileges - Get application privileges // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-privileges. type SecurityGetPrivileges func(o ...func(*SecurityGetPrivilegesRequest)) (*Response, error) // SecurityGetPrivilegesRequest configures the Security Get Privileges API request. type SecurityGetPrivilegesRequest struct { Application string - Name string + Name []string Pretty bool Human bool @@ -83,7 +83,7 @@ func (r SecurityGetPrivilegesRequest) Do(providedCtx context.Context, transport method = "GET" - path.Grow(7 + 1 + len("_security") + 1 + len("privilege") + 1 + len(r.Application) + 1 + len(r.Name)) + path.Grow(7 + 1 + len("_security") + 1 + len("privilege") + 1 + len(r.Application) + 1 + len(strings.Join(r.Name, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_security") @@ -96,11 +96,11 @@ func (r SecurityGetPrivilegesRequest) Do(providedCtx context.Context, transport instrument.RecordPathPart(ctx, "application", r.Application) } } - if r.Name != "" { + if len(r.Name) > 0 { path.WriteString("/") - path.WriteString(r.Name) + path.WriteString(strings.Join(r.Name, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "name", r.Name) + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) } } @@ -191,8 +191,8 @@ func (f SecurityGetPrivileges) WithApplication(v string) func(*SecurityGetPrivil } } -// WithName - privilege name. -func (f SecurityGetPrivileges) WithName(v string) func(*SecurityGetPrivilegesRequest) { +// WithName - comma-separated list of privilege names. if you do not specify this parameter, the api returns information about all privileges for the requested application.. +func (f SecurityGetPrivileges) WithName(v ...string) func(*SecurityGetPrivilegesRequest) { return func(r *SecurityGetPrivilegesRequest) { r.Name = v } diff --git a/esapi/api.xpack.security.get_role.go b/esapi/api.xpack.security.get_role.go index 6ee1b8aca6..aef52d1a48 100644 --- a/esapi/api.xpack.security.get_role.go +++ b/esapi/api.xpack.security.get_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityGetRoleFunc(t Transport) SecurityGetRole { // ----- API Definition ------------------------------------------------------- -// SecurityGetRole - Retrieves roles in the native realm. +// SecurityGetRole - Get roles // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-role. type SecurityGetRole func(o ...func(*SecurityGetRoleRequest)) (*Response, error) // SecurityGetRoleRequest configures the Security Get Role API request. diff --git a/esapi/api.xpack.security.get_role_mapping.go b/esapi/api.xpack.security.get_role_mapping.go index 8a01d53420..1e53b95865 100644 --- a/esapi/api.xpack.security.get_role_mapping.go +++ b/esapi/api.xpack.security.get_role_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityGetRoleMappingFunc(t Transport) SecurityGetRoleMapping { // ----- API Definition ------------------------------------------------------- -// SecurityGetRoleMapping - Retrieves role mappings. +// SecurityGetRoleMapping - Get role mappings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-role-mapping. type SecurityGetRoleMapping func(o ...func(*SecurityGetRoleMappingRequest)) (*Response, error) // SecurityGetRoleMappingRequest configures the Security Get Role Mapping API request. diff --git a/esapi/api.xpack.security.get_service_accounts.go b/esapi/api.xpack.security.get_service_accounts.go index 9f71851a51..22cfc27000 100644 --- a/esapi/api.xpack.security.get_service_accounts.go +++ b/esapi/api.xpack.security.get_service_accounts.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityGetServiceAccountsFunc(t Transport) SecurityGetServiceAccounts { // ----- API Definition ------------------------------------------------------- -// SecurityGetServiceAccounts - Retrieves information about service accounts. +// SecurityGetServiceAccounts - Get service accounts // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-service-accounts. type SecurityGetServiceAccounts func(o ...func(*SecurityGetServiceAccountsRequest)) (*Response, error) // SecurityGetServiceAccountsRequest configures the Security Get Service Accounts API request. diff --git a/esapi/api.xpack.security.get_service_credentials.go b/esapi/api.xpack.security.get_service_credentials.go index d70b51fcf9..40432fba86 100644 --- a/esapi/api.xpack.security.get_service_credentials.go +++ b/esapi/api.xpack.security.get_service_credentials.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityGetServiceCredentialsFunc(t Transport) SecurityGetServiceCredent // ----- API Definition ------------------------------------------------------- -// SecurityGetServiceCredentials - Retrieves information of all service credentials for a service account. +// SecurityGetServiceCredentials - Get service account credentials // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-service-credentials. type SecurityGetServiceCredentials func(namespace string, service string, o ...func(*SecurityGetServiceCredentialsRequest)) (*Response, error) // SecurityGetServiceCredentialsRequest configures the Security Get Service Credentials API request. diff --git a/esapi/api.xpack.security.get_settings.go b/esapi/api.xpack.security.get_settings.go index 55ea9d06b7..51fa11d311 100644 --- a/esapi/api.xpack.security.get_settings.go +++ b/esapi/api.xpack.security.get_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityGetSettingsFunc(t Transport) SecurityGetSettings { // ----- API Definition ------------------------------------------------------- -// SecurityGetSettings - Retrieve settings for the security system indices +// SecurityGetSettings - Get security index settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-settings. type SecurityGetSettings func(o ...func(*SecurityGetSettingsRequest)) (*Response, error) // SecurityGetSettingsRequest configures the Security Get Settings API request. diff --git a/esapi/api.xpack.security.get_stats.go b/esapi/api.xpack.security.get_stats.go new file mode 100644 index 0000000000..438a7c2ce3 --- /dev/null +++ b/esapi/api.xpack.security.get_stats.go @@ -0,0 +1,215 @@ +// 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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newSecurityGetStatsFunc(t Transport) SecurityGetStats { + return func(o ...func(*SecurityGetStatsRequest)) (*Response, error) { + var r = SecurityGetStatsRequest{} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// SecurityGetStats - Get security statistics for all nodes +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-stats. +type SecurityGetStats func(o ...func(*SecurityGetStatsRequest)) (*Response, error) + +// SecurityGetStatsRequest configures the Security Get Stats API request. +type SecurityGetStatsRequest struct { + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r SecurityGetStatsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "security.get_stats") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + len("/_security/stats")) + path.WriteString("http://") + path.WriteString("/_security/stats") + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "security.get_stats") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "security.get_stats") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f SecurityGetStats) WithContext(v context.Context) func(*SecurityGetStatsRequest) { + return func(r *SecurityGetStatsRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f SecurityGetStats) WithPretty() func(*SecurityGetStatsRequest) { + return func(r *SecurityGetStatsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f SecurityGetStats) WithHuman() func(*SecurityGetStatsRequest) { + return func(r *SecurityGetStatsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f SecurityGetStats) WithErrorTrace() func(*SecurityGetStatsRequest) { + return func(r *SecurityGetStatsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f SecurityGetStats) WithFilterPath(v ...string) func(*SecurityGetStatsRequest) { + return func(r *SecurityGetStatsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f SecurityGetStats) WithHeader(h map[string]string) func(*SecurityGetStatsRequest) { + return func(r *SecurityGetStatsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f SecurityGetStats) WithOpaqueID(s string) func(*SecurityGetStatsRequest) { + return func(r *SecurityGetStatsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.xpack.security.get_token.go b/esapi/api.xpack.security.get_token.go index 008f03e0de..c44cdb5d26 100644 --- a/esapi/api.xpack.security.get_token.go +++ b/esapi/api.xpack.security.get_token.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityGetTokenFunc(t Transport) SecurityGetToken { // ----- API Definition ------------------------------------------------------- -// SecurityGetToken - Creates a bearer token for access without requiring basic authentication. +// SecurityGetToken - Get a token // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-token. type SecurityGetToken func(body io.Reader, o ...func(*SecurityGetTokenRequest)) (*Response, error) // SecurityGetTokenRequest configures the Security Get Token API request. diff --git a/esapi/api.xpack.security.get_user.go b/esapi/api.xpack.security.get_user.go index 24f4cdc66c..0521cbbde8 100644 --- a/esapi/api.xpack.security.get_user.go +++ b/esapi/api.xpack.security.get_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityGetUserFunc(t Transport) SecurityGetUser { // ----- API Definition ------------------------------------------------------- -// SecurityGetUser - Retrieves information about users in the native realm and built-in users. +// SecurityGetUser - Get users // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user. type SecurityGetUser func(o ...func(*SecurityGetUserRequest)) (*Response, error) // SecurityGetUserRequest configures the Security Get User API request. diff --git a/esapi/api.xpack.security.get_user_privileges.go b/esapi/api.xpack.security.get_user_privileges.go index 977c4002ef..7d9d1ac88f 100644 --- a/esapi/api.xpack.security.get_user_privileges.go +++ b/esapi/api.xpack.security.get_user_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecurityGetUserPrivilegesFunc(t Transport) SecurityGetUserPrivileges { // ----- API Definition ------------------------------------------------------- -// SecurityGetUserPrivileges - Retrieves security privileges for the logged in user. +// SecurityGetUserPrivileges - Get user privileges // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user-privileges. type SecurityGetUserPrivileges func(o ...func(*SecurityGetUserPrivilegesRequest)) (*Response, error) // SecurityGetUserPrivilegesRequest configures the Security Get User Privileges API request. diff --git a/esapi/api.xpack.security.get_user_profile.go b/esapi/api.xpack.security.get_user_profile.go index 4074a8bc4f..68471c10f1 100644 --- a/esapi/api.xpack.security.get_user_profile.go +++ b/esapi/api.xpack.security.get_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityGetUserProfileFunc(t Transport) SecurityGetUserProfile { // ----- API Definition ------------------------------------------------------- -// SecurityGetUserProfile - Retrieves user profiles for the given unique ID(s). +// SecurityGetUserProfile - Get a user profile // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user-profile. type SecurityGetUserProfile func(uid []string, o ...func(*SecurityGetUserProfileRequest)) (*Response, error) // SecurityGetUserProfileRequest configures the Security Get User Profile API request. diff --git a/esapi/api.xpack.security.grant_api_key.go b/esapi/api.xpack.security.grant_api_key.go index ccab017289..13b088cf57 100644 --- a/esapi/api.xpack.security.grant_api_key.go +++ b/esapi/api.xpack.security.grant_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityGrantAPIKeyFunc(t Transport) SecurityGrantAPIKey { // ----- API Definition ------------------------------------------------------- -// SecurityGrantAPIKey - Creates an API key on behalf of another user. +// SecurityGrantAPIKey - Grant an API key // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-grant-api-key. type SecurityGrantAPIKey func(body io.Reader, o ...func(*SecurityGrantAPIKeyRequest)) (*Response, error) // SecurityGrantAPIKeyRequest configures the Security GrantAPI Key API request. diff --git a/esapi/api.xpack.security.has_privileges.go b/esapi/api.xpack.security.has_privileges.go index 31c79c08ca..3fdfd6e615 100644 --- a/esapi/api.xpack.security.has_privileges.go +++ b/esapi/api.xpack.security.has_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityHasPrivilegesFunc(t Transport) SecurityHasPrivileges { // ----- API Definition ------------------------------------------------------- -// SecurityHasPrivileges - Determines whether the specified user has a specified list of privileges. +// SecurityHasPrivileges - Check user privileges // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-has-privileges. type SecurityHasPrivileges func(body io.Reader, o ...func(*SecurityHasPrivilegesRequest)) (*Response, error) // SecurityHasPrivilegesRequest configures the Security Has Privileges API request. diff --git a/esapi/api.xpack.security.has_privileges_user_profile.go b/esapi/api.xpack.security.has_privileges_user_profile.go index a52ca13cec..938e9761bd 100644 --- a/esapi/api.xpack.security.has_privileges_user_profile.go +++ b/esapi/api.xpack.security.has_privileges_user_profile.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityHasPrivilegesUserProfileFunc(t Transport) SecurityHasPrivilegesU // ----- API Definition ------------------------------------------------------- -// SecurityHasPrivilegesUserProfile - Determines whether the users associated with the specified profile IDs have all the requested privileges. +// SecurityHasPrivilegesUserProfile - Check user profile privileges // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-has-privileges-user-profile. type SecurityHasPrivilegesUserProfile func(body io.Reader, o ...func(*SecurityHasPrivilegesUserProfileRequest)) (*Response, error) // SecurityHasPrivilegesUserProfileRequest configures the Security Has Privileges User Profile API request. diff --git a/esapi/api.xpack.security.invalidate_api_key.go b/esapi/api.xpack.security.invalidate_api_key.go index d8604b1eaf..af5d9dab5d 100644 --- a/esapi/api.xpack.security.invalidate_api_key.go +++ b/esapi/api.xpack.security.invalidate_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityInvalidateAPIKeyFunc(t Transport) SecurityInvalidateAPIKey { // ----- API Definition ------------------------------------------------------- -// SecurityInvalidateAPIKey - Invalidates one or more API keys. +// SecurityInvalidateAPIKey - Invalidate API keys // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-api-key. type SecurityInvalidateAPIKey func(body io.Reader, o ...func(*SecurityInvalidateAPIKeyRequest)) (*Response, error) // SecurityInvalidateAPIKeyRequest configures the Security InvalidateAPI Key API request. diff --git a/esapi/api.xpack.security.invalidate_token.go b/esapi/api.xpack.security.invalidate_token.go index dfc62203ae..e33867acce 100644 --- a/esapi/api.xpack.security.invalidate_token.go +++ b/esapi/api.xpack.security.invalidate_token.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityInvalidateTokenFunc(t Transport) SecurityInvalidateToken { // ----- API Definition ------------------------------------------------------- -// SecurityInvalidateToken - Invalidates one or more access tokens or refresh tokens. +// SecurityInvalidateToken - Invalidate a token // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-token. type SecurityInvalidateToken func(body io.Reader, o ...func(*SecurityInvalidateTokenRequest)) (*Response, error) // SecurityInvalidateTokenRequest configures the Security Invalidate Token API request. diff --git a/esapi/api.xpack.security.oidc_authenticate.go b/esapi/api.xpack.security.oidc_authenticate.go index 8031757e1f..5eb86c5867 100644 --- a/esapi/api.xpack.security.oidc_authenticate.go +++ b/esapi/api.xpack.security.oidc_authenticate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityOidcAuthenticateFunc(t Transport) SecurityOidcAuthenticate { // ----- API Definition ------------------------------------------------------- -// SecurityOidcAuthenticate - Exchanges an OpenID Connection authentication response message for an Elasticsearch access token and refresh token pair +// SecurityOidcAuthenticate - Authenticate OpenID Connect // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-authenticate.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-authenticate. type SecurityOidcAuthenticate func(body io.Reader, o ...func(*SecurityOidcAuthenticateRequest)) (*Response, error) // SecurityOidcAuthenticateRequest configures the Security Oidc Authenticate API request. diff --git a/esapi/api.xpack.security.oidc_logout.go b/esapi/api.xpack.security.oidc_logout.go index 7852e82dde..c1957047d2 100644 --- a/esapi/api.xpack.security.oidc_logout.go +++ b/esapi/api.xpack.security.oidc_logout.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityOidcLogoutFunc(t Transport) SecurityOidcLogout { // ----- API Definition ------------------------------------------------------- -// SecurityOidcLogout - Invalidates a refresh token and access token that was generated from the OpenID Connect Authenticate API +// SecurityOidcLogout - Logout of OpenID Connect // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-logout.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-logout. type SecurityOidcLogout func(body io.Reader, o ...func(*SecurityOidcLogoutRequest)) (*Response, error) // SecurityOidcLogoutRequest configures the Security Oidc Logout API request. diff --git a/esapi/api.xpack.security.oidc_prepare_authentication.go b/esapi/api.xpack.security.oidc_prepare_authentication.go index bbb4347044..169040cd32 100644 --- a/esapi/api.xpack.security.oidc_prepare_authentication.go +++ b/esapi/api.xpack.security.oidc_prepare_authentication.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityOidcPrepareAuthenticationFunc(t Transport) SecurityOidcPrepareAu // ----- API Definition ------------------------------------------------------- -// SecurityOidcPrepareAuthentication - Creates an OAuth 2.0 authentication request as a URL string +// SecurityOidcPrepareAuthentication - Prepare OpenID connect authentication // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-prepare-authentication.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-prepare-authentication. type SecurityOidcPrepareAuthentication func(body io.Reader, o ...func(*SecurityOidcPrepareAuthenticationRequest)) (*Response, error) // SecurityOidcPrepareAuthenticationRequest configures the Security Oidc Prepare Authentication API request. diff --git a/esapi/api.xpack.security.put_privileges.go b/esapi/api.xpack.security.put_privileges.go index 6dd0f16929..ada1dcefdd 100644 --- a/esapi/api.xpack.security.put_privileges.go +++ b/esapi/api.xpack.security.put_privileges.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityPutPrivilegesFunc(t Transport) SecurityPutPrivileges { // ----- API Definition ------------------------------------------------------- -// SecurityPutPrivileges - Adds or updates application privileges. +// SecurityPutPrivileges - Create or update application privileges // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-privileges. type SecurityPutPrivileges func(body io.Reader, o ...func(*SecurityPutPrivilegesRequest)) (*Response, error) // SecurityPutPrivilegesRequest configures the Security Put Privileges API request. diff --git a/esapi/api.xpack.security.put_role.go b/esapi/api.xpack.security.put_role.go index c1515dc4c2..9c3666c78f 100644 --- a/esapi/api.xpack.security.put_role.go +++ b/esapi/api.xpack.security.put_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityPutRoleFunc(t Transport) SecurityPutRole { // ----- API Definition ------------------------------------------------------- -// SecurityPutRole - Adds and updates roles in the native realm. +// SecurityPutRole - Create or update roles // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role. type SecurityPutRole func(name string, body io.Reader, o ...func(*SecurityPutRoleRequest)) (*Response, error) // SecurityPutRoleRequest configures the Security Put Role API request. diff --git a/esapi/api.xpack.security.put_role_mapping.go b/esapi/api.xpack.security.put_role_mapping.go index ee79ec53eb..646ea185ae 100644 --- a/esapi/api.xpack.security.put_role_mapping.go +++ b/esapi/api.xpack.security.put_role_mapping.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityPutRoleMappingFunc(t Transport) SecurityPutRoleMapping { // ----- API Definition ------------------------------------------------------- -// SecurityPutRoleMapping - Creates and updates role mappings. +// SecurityPutRoleMapping - Create or update role mappings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping. type SecurityPutRoleMapping func(name string, body io.Reader, o ...func(*SecurityPutRoleMappingRequest)) (*Response, error) // SecurityPutRoleMappingRequest configures the Security Put Role Mapping API request. diff --git a/esapi/api.xpack.security.put_user.go b/esapi/api.xpack.security.put_user.go index 24e424e9d4..7e92af8ddd 100644 --- a/esapi/api.xpack.security.put_user.go +++ b/esapi/api.xpack.security.put_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityPutUserFunc(t Transport) SecurityPutUser { // ----- API Definition ------------------------------------------------------- -// SecurityPutUser - Adds and updates users in the native realm. These users are commonly referred to as native users. +// SecurityPutUser - Create or update users // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-user. type SecurityPutUser func(username string, body io.Reader, o ...func(*SecurityPutUserRequest)) (*Response, error) // SecurityPutUserRequest configures the Security Put User API request. diff --git a/esapi/api.xpack.security.query_api_keys.go b/esapi/api.xpack.security.query_api_keys.go index 33e4b2c247..d982eebfb1 100644 --- a/esapi/api.xpack.security.query_api_keys.go +++ b/esapi/api.xpack.security.query_api_keys.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSecurityQueryAPIKeysFunc(t Transport) SecurityQueryAPIKeys { // ----- API Definition ------------------------------------------------------- -// SecurityQueryAPIKeys - Retrieves information for API keys using a subset of query DSL +// SecurityQueryAPIKeys - Find API keys with a query // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-api-keys. type SecurityQueryAPIKeys func(o ...func(*SecurityQueryAPIKeysRequest)) (*Response, error) // SecurityQueryAPIKeysRequest configures the Security QueryAPI Keys API request. diff --git a/esapi/api.xpack.security.query_role.go b/esapi/api.xpack.security.query_role.go index 965195084d..c053dcb756 100644 --- a/esapi/api.xpack.security.query_role.go +++ b/esapi/api.xpack.security.query_role.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityQueryRoleFunc(t Transport) SecurityQueryRole { // ----- API Definition ------------------------------------------------------- -// SecurityQueryRole - Retrieves information for Roles using a subset of query DSL +// SecurityQueryRole - Find roles with a query // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-role.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-role. type SecurityQueryRole func(o ...func(*SecurityQueryRoleRequest)) (*Response, error) // SecurityQueryRoleRequest configures the Security Query Role API request. diff --git a/esapi/api.xpack.security.query_user.go b/esapi/api.xpack.security.query_user.go index 8f1d60a9e5..1f448c443f 100644 --- a/esapi/api.xpack.security.query_user.go +++ b/esapi/api.xpack.security.query_user.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSecurityQueryUserFunc(t Transport) SecurityQueryUser { // ----- API Definition ------------------------------------------------------- -// SecurityQueryUser - Retrieves information for Users using a subset of query DSL +// SecurityQueryUser - Find users with a query // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-user.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-user. type SecurityQueryUser func(o ...func(*SecurityQueryUserRequest)) (*Response, error) // SecurityQueryUserRequest configures the Security Query User API request. diff --git a/esapi/api.xpack.security.saml_authenticate.go b/esapi/api.xpack.security.saml_authenticate.go index 0effb869ed..9e2da2cfb1 100644 --- a/esapi/api.xpack.security.saml_authenticate.go +++ b/esapi/api.xpack.security.saml_authenticate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecuritySamlAuthenticateFunc(t Transport) SecuritySamlAuthenticate { // ----- API Definition ------------------------------------------------------- -// SecuritySamlAuthenticate - Exchanges a SAML Response message for an Elasticsearch access token and refresh token pair +// SecuritySamlAuthenticate - Authenticate SAML // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-authenticate. type SecuritySamlAuthenticate func(body io.Reader, o ...func(*SecuritySamlAuthenticateRequest)) (*Response, error) // SecuritySamlAuthenticateRequest configures the Security Saml Authenticate API request. diff --git a/esapi/api.xpack.security.saml_complete_logout.go b/esapi/api.xpack.security.saml_complete_logout.go index 041b13f723..5c77f7d002 100644 --- a/esapi/api.xpack.security.saml_complete_logout.go +++ b/esapi/api.xpack.security.saml_complete_logout.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecuritySamlCompleteLogoutFunc(t Transport) SecuritySamlCompleteLogout { // ----- API Definition ------------------------------------------------------- -// SecuritySamlCompleteLogout - Verifies the logout response sent from the SAML IdP +// SecuritySamlCompleteLogout - Logout of SAML completely // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-complete-logout. type SecuritySamlCompleteLogout func(body io.Reader, o ...func(*SecuritySamlCompleteLogoutRequest)) (*Response, error) // SecuritySamlCompleteLogoutRequest configures the Security Saml Complete Logout API request. diff --git a/esapi/api.xpack.security.saml_invalidate.go b/esapi/api.xpack.security.saml_invalidate.go index 95db4c69fa..69b7b4ccc1 100644 --- a/esapi/api.xpack.security.saml_invalidate.go +++ b/esapi/api.xpack.security.saml_invalidate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecuritySamlInvalidateFunc(t Transport) SecuritySamlInvalidate { // ----- API Definition ------------------------------------------------------- -// SecuritySamlInvalidate - Consumes a SAML LogoutRequest +// SecuritySamlInvalidate - Invalidate SAML // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-invalidate. type SecuritySamlInvalidate func(body io.Reader, o ...func(*SecuritySamlInvalidateRequest)) (*Response, error) // SecuritySamlInvalidateRequest configures the Security Saml Invalidate API request. diff --git a/esapi/api.xpack.security.saml_logout.go b/esapi/api.xpack.security.saml_logout.go index 1b3f53b4b7..6210e021a1 100644 --- a/esapi/api.xpack.security.saml_logout.go +++ b/esapi/api.xpack.security.saml_logout.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecuritySamlLogoutFunc(t Transport) SecuritySamlLogout { // ----- API Definition ------------------------------------------------------- -// SecuritySamlLogout - Invalidates an access token and a refresh token that were generated via the SAML Authenticate API +// SecuritySamlLogout - Logout of SAML // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-logout. type SecuritySamlLogout func(body io.Reader, o ...func(*SecuritySamlLogoutRequest)) (*Response, error) // SecuritySamlLogoutRequest configures the Security Saml Logout API request. diff --git a/esapi/api.xpack.security.saml_prepare_authentication.go b/esapi/api.xpack.security.saml_prepare_authentication.go index 8e26921084..089335fa3a 100644 --- a/esapi/api.xpack.security.saml_prepare_authentication.go +++ b/esapi/api.xpack.security.saml_prepare_authentication.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecuritySamlPrepareAuthenticationFunc(t Transport) SecuritySamlPrepareAu // ----- API Definition ------------------------------------------------------- -// SecuritySamlPrepareAuthentication - Creates a SAML authentication request +// SecuritySamlPrepareAuthentication - Prepare SAML authentication // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-prepare-authentication. type SecuritySamlPrepareAuthentication func(body io.Reader, o ...func(*SecuritySamlPrepareAuthenticationRequest)) (*Response, error) // SecuritySamlPrepareAuthenticationRequest configures the Security Saml Prepare Authentication API request. diff --git a/esapi/api.xpack.security.saml_service_provider_metadata.go b/esapi/api.xpack.security.saml_service_provider_metadata.go index 02651c2f05..bb108b8b4b 100644 --- a/esapi/api.xpack.security.saml_service_provider_metadata.go +++ b/esapi/api.xpack.security.saml_service_provider_metadata.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSecuritySamlServiceProviderMetadataFunc(t Transport) SecuritySamlService // ----- API Definition ------------------------------------------------------- -// SecuritySamlServiceProviderMetadata - Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider +// SecuritySamlServiceProviderMetadata - Create SAML service provider metadata // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-service-provider-metadata. type SecuritySamlServiceProviderMetadata func(realm_name string, o ...func(*SecuritySamlServiceProviderMetadataRequest)) (*Response, error) // SecuritySamlServiceProviderMetadataRequest configures the Security Saml Service Provider Metadata API request. diff --git a/esapi/api.xpack.security.suggest_user_profiles.go b/esapi/api.xpack.security.suggest_user_profiles.go index b218e109a9..3c0075580a 100644 --- a/esapi/api.xpack.security.suggest_user_profiles.go +++ b/esapi/api.xpack.security.suggest_user_profiles.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecuritySuggestUserProfilesFunc(t Transport) SecuritySuggestUserProfiles // ----- API Definition ------------------------------------------------------- -// SecuritySuggestUserProfiles - Get suggestions for user profiles that match specified search criteria. +// SecuritySuggestUserProfiles - Suggest a user profile // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-suggest-user-profile.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-suggest-user-profiles. type SecuritySuggestUserProfiles func(o ...func(*SecuritySuggestUserProfilesRequest)) (*Response, error) // SecuritySuggestUserProfilesRequest configures the Security Suggest User Profiles API request. diff --git a/esapi/api.xpack.security.update_api_key.go b/esapi/api.xpack.security.update_api_key.go index 7cd57113b8..c5ba884df5 100644 --- a/esapi/api.xpack.security.update_api_key.go +++ b/esapi/api.xpack.security.update_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityUpdateAPIKeyFunc(t Transport) SecurityUpdateAPIKey { // ----- API Definition ------------------------------------------------------- -// SecurityUpdateAPIKey - Updates attributes of an existing API key. +// SecurityUpdateAPIKey - Update an API key // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-api-key. type SecurityUpdateAPIKey func(id string, o ...func(*SecurityUpdateAPIKeyRequest)) (*Response, error) // SecurityUpdateAPIKeyRequest configures the Security UpdateAPI Key API request. diff --git a/esapi/api.xpack.security.update_cross_cluster_api_key.go b/esapi/api.xpack.security.update_cross_cluster_api_key.go index 7caeb0e42b..d2792aef1f 100644 --- a/esapi/api.xpack.security.update_cross_cluster_api_key.go +++ b/esapi/api.xpack.security.update_cross_cluster_api_key.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSecurityUpdateCrossClusterAPIKeyFunc(t Transport) SecurityUpdateCrossClu // ----- API Definition ------------------------------------------------------- -// SecurityUpdateCrossClusterAPIKey - Updates attributes of an existing cross-cluster API key. +// SecurityUpdateCrossClusterAPIKey - Update a cross-cluster API key // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-cross-cluster-api-key. type SecurityUpdateCrossClusterAPIKey func(id string, body io.Reader, o ...func(*SecurityUpdateCrossClusterAPIKeyRequest)) (*Response, error) // SecurityUpdateCrossClusterAPIKeyRequest configures the Security Update Cross ClusterAPI Key API request. diff --git a/esapi/api.xpack.security.update_settings.go b/esapi/api.xpack.security.update_settings.go index 9dbc2fc268..514cdf05fe 100644 --- a/esapi/api.xpack.security.update_settings.go +++ b/esapi/api.xpack.security.update_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSecurityUpdateSettingsFunc(t Transport) SecurityUpdateSettings { // ----- API Definition ------------------------------------------------------- -// SecurityUpdateSettings - Update settings for the security system index +// SecurityUpdateSettings - Update security index settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-settings. type SecurityUpdateSettings func(body io.Reader, o ...func(*SecurityUpdateSettingsRequest)) (*Response, error) // SecurityUpdateSettingsRequest configures the Security Update Settings API request. diff --git a/esapi/api.xpack.security.update_user_profile_data.go b/esapi/api.xpack.security.update_user_profile_data.go index 9fa90c210f..b79a177cbe 100644 --- a/esapi/api.xpack.security.update_user_profile_data.go +++ b/esapi/api.xpack.security.update_user_profile_data.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newSecurityUpdateUserProfileDataFunc(t Transport) SecurityUpdateUserProfile // ----- API Definition ------------------------------------------------------- -// SecurityUpdateUserProfileData - Update application specific data for the user profile of the given unique ID. +// SecurityUpdateUserProfileData - Update user profile data // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-user-profile-data. type SecurityUpdateUserProfileData func(body io.Reader, uid string, o ...func(*SecurityUpdateUserProfileDataRequest)) (*Response, error) // SecurityUpdateUserProfileDataRequest configures the Security Update User Profile Data API request. diff --git a/esapi/api.xpack.slm.delete_lifecycle.go b/esapi/api.xpack.slm.delete_lifecycle.go index d53efec9bc..7086d439a1 100644 --- a/esapi/api.xpack.slm.delete_lifecycle.go +++ b/esapi/api.xpack.slm.delete_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSlmDeleteLifecycleFunc(t Transport) SlmDeleteLifecycle { // ----- API Definition ------------------------------------------------------- -// SlmDeleteLifecycle - Deletes an existing snapshot lifecycle policy. +// SlmDeleteLifecycle - Delete a policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-delete-lifecycle. type SlmDeleteLifecycle func(policy_id string, o ...func(*SlmDeleteLifecycleRequest)) (*Response, error) // SlmDeleteLifecycleRequest configures the Slm Delete Lifecycle API request. diff --git a/esapi/api.xpack.slm.execute_lifecycle.go b/esapi/api.xpack.slm.execute_lifecycle.go index ce99684501..7438808a96 100644 --- a/esapi/api.xpack.slm.execute_lifecycle.go +++ b/esapi/api.xpack.slm.execute_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSlmExecuteLifecycleFunc(t Transport) SlmExecuteLifecycle { // ----- API Definition ------------------------------------------------------- -// SlmExecuteLifecycle - Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time. +// SlmExecuteLifecycle - Run a policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-lifecycle. type SlmExecuteLifecycle func(policy_id string, o ...func(*SlmExecuteLifecycleRequest)) (*Response, error) // SlmExecuteLifecycleRequest configures the Slm Execute Lifecycle API request. diff --git a/esapi/api.xpack.slm.execute_retention.go b/esapi/api.xpack.slm.execute_retention.go index 753d04bbe6..6d556db28d 100644 --- a/esapi/api.xpack.slm.execute_retention.go +++ b/esapi/api.xpack.slm.execute_retention.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSlmExecuteRetentionFunc(t Transport) SlmExecuteRetention { // ----- API Definition ------------------------------------------------------- -// SlmExecuteRetention - Deletes any snapshots that are expired according to the policy's retention rules. +// SlmExecuteRetention - Run a retention policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-retention. type SlmExecuteRetention func(o ...func(*SlmExecuteRetentionRequest)) (*Response, error) // SlmExecuteRetentionRequest configures the Slm Execute Retention API request. diff --git a/esapi/api.xpack.slm.get_lifecycle.go b/esapi/api.xpack.slm.get_lifecycle.go index 1b814af6b1..e7b129e962 100644 --- a/esapi/api.xpack.slm.get_lifecycle.go +++ b/esapi/api.xpack.slm.get_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSlmGetLifecycleFunc(t Transport) SlmGetLifecycle { // ----- API Definition ------------------------------------------------------- -// SlmGetLifecycle - Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts. +// SlmGetLifecycle - Get policy information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle. type SlmGetLifecycle func(o ...func(*SlmGetLifecycleRequest)) (*Response, error) // SlmGetLifecycleRequest configures the Slm Get Lifecycle API request. diff --git a/esapi/api.xpack.slm.get_stats.go b/esapi/api.xpack.slm.get_stats.go index 1dcd07fc32..499396956f 100644 --- a/esapi/api.xpack.slm.get_stats.go +++ b/esapi/api.xpack.slm.get_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSlmGetStatsFunc(t Transport) SlmGetStats { // ----- API Definition ------------------------------------------------------- -// SlmGetStats - Returns global and policy-level statistics about actions taken by snapshot lifecycle management. +// SlmGetStats - Get snapshot lifecycle management statistics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-stats. type SlmGetStats func(o ...func(*SlmGetStatsRequest)) (*Response, error) // SlmGetStatsRequest configures the Slm Get Stats API request. diff --git a/esapi/api.xpack.slm.get_status.go b/esapi/api.xpack.slm.get_status.go index 6a025ab677..4880de09a7 100644 --- a/esapi/api.xpack.slm.get_status.go +++ b/esapi/api.xpack.slm.get_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSlmGetStatusFunc(t Transport) SlmGetStatus { // ----- API Definition ------------------------------------------------------- -// SlmGetStatus - Retrieves the status of snapshot lifecycle management (SLM). +// SlmGetStatus - Get the snapshot lifecycle management status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-status. type SlmGetStatus func(o ...func(*SlmGetStatusRequest)) (*Response, error) // SlmGetStatusRequest configures the Slm Get Status API request. diff --git a/esapi/api.xpack.slm.put_lifecycle.go b/esapi/api.xpack.slm.put_lifecycle.go index afcb90fa33..1644b045fa 100644 --- a/esapi/api.xpack.slm.put_lifecycle.go +++ b/esapi/api.xpack.slm.put_lifecycle.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -28,8 +28,8 @@ import ( ) func newSlmPutLifecycleFunc(t Transport) SlmPutLifecycle { - return func(policy_id string, o ...func(*SlmPutLifecycleRequest)) (*Response, error) { - var r = SlmPutLifecycleRequest{PolicyID: policy_id} + return func(body io.Reader, policy_id string, o ...func(*SlmPutLifecycleRequest)) (*Response, error) { + var r = SlmPutLifecycleRequest{Body: body, PolicyID: policy_id} for _, f := range o { f(&r) } @@ -44,10 +44,10 @@ func newSlmPutLifecycleFunc(t Transport) SlmPutLifecycle { // ----- API Definition ------------------------------------------------------- -// SlmPutLifecycle - Creates or updates a snapshot lifecycle policy. +// SlmPutLifecycle - Create or update a policy // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html. -type SlmPutLifecycle func(policy_id string, o ...func(*SlmPutLifecycleRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle. +type SlmPutLifecycle func(body io.Reader, policy_id string, o ...func(*SlmPutLifecycleRequest)) (*Response, error) // SlmPutLifecycleRequest configures the Slm Put Lifecycle API request. type SlmPutLifecycleRequest struct { @@ -196,13 +196,6 @@ func (f SlmPutLifecycle) WithContext(v context.Context) func(*SlmPutLifecycleReq } } -// WithBody - The snapshot lifecycle policy definition to register. -func (f SlmPutLifecycle) WithBody(v io.Reader) func(*SlmPutLifecycleRequest) { - return func(r *SlmPutLifecycleRequest) { - r.Body = v - } -} - // WithMasterTimeout - explicit operation timeout for connection to master node. func (f SlmPutLifecycle) WithMasterTimeout(v time.Duration) func(*SlmPutLifecycleRequest) { return func(r *SlmPutLifecycleRequest) { diff --git a/esapi/api.xpack.slm.start.go b/esapi/api.xpack.slm.start.go index faf89c2adf..54603207d0 100644 --- a/esapi/api.xpack.slm.start.go +++ b/esapi/api.xpack.slm.start.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSlmStartFunc(t Transport) SlmStart { // ----- API Definition ------------------------------------------------------- -// SlmStart - Turns on snapshot lifecycle management (SLM). +// SlmStart - Start snapshot lifecycle management // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-start. type SlmStart func(o ...func(*SlmStartRequest)) (*Response, error) // SlmStartRequest configures the Slm Start API request. diff --git a/esapi/api.xpack.slm.stop.go b/esapi/api.xpack.slm.stop.go index 4944b44cc1..1fdb84c8f9 100644 --- a/esapi/api.xpack.slm.stop.go +++ b/esapi/api.xpack.slm.stop.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSlmStopFunc(t Transport) SlmStop { // ----- API Definition ------------------------------------------------------- -// SlmStop - Turns off snapshot lifecycle management (SLM). +// SlmStop - Stop snapshot lifecycle management // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-stop. type SlmStop func(o ...func(*SlmStopRequest)) (*Response, error) // SlmStopRequest configures the Slm Stop API request. diff --git a/esapi/api.xpack.sql.clear_cursor.go b/esapi/api.xpack.sql.clear_cursor.go index 2b9773ad7b..4cccd60e90 100644 --- a/esapi/api.xpack.sql.clear_cursor.go +++ b/esapi/api.xpack.sql.clear_cursor.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSQLClearCursorFunc(t Transport) SQLClearCursor { // ----- API Definition ------------------------------------------------------- -// SQLClearCursor - Clears the SQL cursor +// SQLClearCursor - Clear an SQL search cursor // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-clear-cursor. type SQLClearCursor func(body io.Reader, o ...func(*SQLClearCursorRequest)) (*Response, error) // SQLClearCursorRequest configures the SQL Clear Cursor API request. diff --git a/esapi/api.xpack.sql.delete_async.go b/esapi/api.xpack.sql.delete_async.go index c91b9c4b30..a2f11047f5 100644 --- a/esapi/api.xpack.sql.delete_async.go +++ b/esapi/api.xpack.sql.delete_async.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSQLDeleteAsyncFunc(t Transport) SQLDeleteAsync { // ----- API Definition ------------------------------------------------------- -// SQLDeleteAsync - Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it. +// SQLDeleteAsync - Delete an async SQL search // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-async-sql-search-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-delete-async. type SQLDeleteAsync func(id string, o ...func(*SQLDeleteAsyncRequest)) (*Response, error) // SQLDeleteAsyncRequest configures the SQL Delete Async API request. diff --git a/esapi/api.xpack.sql.get_async.go b/esapi/api.xpack.sql.get_async.go index 50e9d66da0..1e5ca4e951 100644 --- a/esapi/api.xpack.sql.get_async.go +++ b/esapi/api.xpack.sql.get_async.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSQLGetAsyncFunc(t Transport) SQLGetAsync { // ----- API Definition ------------------------------------------------------- -// SQLGetAsync - Returns the current status and available results for an async SQL search or stored synchronous SQL search +// SQLGetAsync - Get async SQL search results // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async. type SQLGetAsync func(id string, o ...func(*SQLGetAsyncRequest)) (*Response, error) // SQLGetAsyncRequest configures the SQL Get Async API request. diff --git a/esapi/api.xpack.sql.get_async_status.go b/esapi/api.xpack.sql.get_async_status.go index f5ff094374..2906079aea 100644 --- a/esapi/api.xpack.sql.get_async_status.go +++ b/esapi/api.xpack.sql.get_async_status.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSQLGetAsyncStatusFunc(t Transport) SQLGetAsyncStatus { // ----- API Definition ------------------------------------------------------- -// SQLGetAsyncStatus - Returns the current status of an async SQL search or a stored synchronous SQL search +// SQLGetAsyncStatus - Get the async SQL search status // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-status-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async-status. type SQLGetAsyncStatus func(id string, o ...func(*SQLGetAsyncStatusRequest)) (*Response, error) // SQLGetAsyncStatusRequest configures the SQL Get Async Status API request. diff --git a/esapi/api.xpack.sql.query.go b/esapi/api.xpack.sql.query.go index e9e5a1adba..9e9ffac77a 100644 --- a/esapi/api.xpack.sql.query.go +++ b/esapi/api.xpack.sql.query.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,16 +43,17 @@ func newSQLQueryFunc(t Transport) SQLQuery { // ----- API Definition ------------------------------------------------------- -// SQLQuery - Executes a SQL request +// SQLQuery - Get SQL search results // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-query. type SQLQuery func(body io.Reader, o ...func(*SQLQueryRequest)) (*Response, error) // SQLQueryRequest configures the SQL Query API request. type SQLQueryRequest struct { Body io.Reader - Format string + Format string + ProjectRouting string Pretty bool Human bool @@ -95,6 +96,10 @@ func (r SQLQueryRequest) Do(providedCtx context.Context, transport Transport) (* params["format"] = r.Format } + if r.ProjectRouting != "" { + params["project_routing"] = r.ProjectRouting + } + if r.Pretty { params["pretty"] = "true" } @@ -180,13 +185,20 @@ func (f SQLQuery) WithContext(v context.Context) func(*SQLQueryRequest) { } } -// WithFormat - a short version of the accept header, e.g. json, yaml. +// WithFormat - the format for the response.you can also specify a format using the `accept` http header.if you specify both this parameter and the `accept` http header, this parameter takes precedence.. func (f SQLQuery) WithFormat(v string) func(*SQLQueryRequest) { return func(r *SQLQueryRequest) { r.Format = v } } +// WithProjectRouting - a lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. only supported in serverless.. +func (f SQLQuery) WithProjectRouting(v string) func(*SQLQueryRequest) { + return func(r *SQLQueryRequest) { + r.ProjectRouting = v + } +} + // WithPretty makes the response body pretty-printed. func (f SQLQuery) WithPretty() func(*SQLQueryRequest) { return func(r *SQLQueryRequest) { diff --git a/esapi/api.xpack.sql.translate.go b/esapi/api.xpack.sql.translate.go index 6f99ed5d8f..c68df350c0 100644 --- a/esapi/api.xpack.sql.translate.go +++ b/esapi/api.xpack.sql.translate.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newSQLTranslateFunc(t Transport) SQLTranslate { // ----- API Definition ------------------------------------------------------- -// SQLTranslate - Translates SQL into Elasticsearch queries +// SQLTranslate - Translate SQL into Elasticsearch queries // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-translate. type SQLTranslate func(body io.Reader, o ...func(*SQLTranslateRequest)) (*Response, error) // SQLTranslateRequest configures the SQL Translate API request. diff --git a/esapi/api.xpack.ssl.certificates.go b/esapi/api.xpack.ssl.certificates.go index 171d128356..ebea71064e 100644 --- a/esapi/api.xpack.ssl.certificates.go +++ b/esapi/api.xpack.ssl.certificates.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newSSLCertificatesFunc(t Transport) SSLCertificates { // ----- API Definition ------------------------------------------------------- -// SSLCertificates - Retrieves information about the X.509 certificates used to encrypt communications in the cluster. +// SSLCertificates - Get SSL certificates // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ssl-certificates. type SSLCertificates func(o ...func(*SSLCertificatesRequest)) (*Response, error) // SSLCertificatesRequest configures the SSL Certificates API request. diff --git a/esapi/api.xpack.text_structure.find_field_structure.go b/esapi/api.xpack.text_structure.find_field_structure.go index 36074d6472..7b03f698c3 100644 --- a/esapi/api.xpack.text_structure.find_field_structure.go +++ b/esapi/api.xpack.text_structure.find_field_structure.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,10 +44,10 @@ func newTextStructureFindFieldStructureFunc(t Transport) TextStructureFindFieldS // ----- API Definition ------------------------------------------------------- -// TextStructureFindFieldStructure - Finds the structure of a text field in an index. +// TextStructureFindFieldStructure - Find the structure of a text field // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/find-field-structure.html. -type TextStructureFindFieldStructure func(index string, field string, o ...func(*TextStructureFindFieldStructureRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-text_structure. +type TextStructureFindFieldStructure func(field string, index string, o ...func(*TextStructureFindFieldStructureRequest)) (*Response, error) // TextStructureFindFieldStructureRequest configures the Text Structure Find Field Structure API request. type TextStructureFindFieldStructureRequest struct { @@ -258,7 +258,7 @@ func (f TextStructureFindFieldStructure) WithDocumentsToSample(v int) func(*Text } } -// WithEcsCompatibility - optional parameter to specify the compatibility mode with ecs grok patterns - may be either 'v1' or 'disabled'. +// WithEcsCompatibility - the mode of compatibility with ecs compliant grok patterns.use this parameter to specify whether to use ecs grok patterns instead of legacy ones when the structure finder creates a grok pattern.this setting primarily has an impact when a whole message grok pattern such as `%{catalinalog}` matches the input.if the structure finder identifies a common structure but has no idea of the meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output.the intention in that situation is that a user who knows the meanings will rename the fields before using them.. func (f TextStructureFindFieldStructure) WithEcsCompatibility(v string) func(*TextStructureFindFieldStructureRequest) { return func(r *TextStructureFindFieldStructureRequest) { r.EcsCompatibility = v diff --git a/esapi/api.xpack.text_structure.find_message_structure.go b/esapi/api.xpack.text_structure.find_message_structure.go index ed598d6e4c..28f6fe7f82 100644 --- a/esapi/api.xpack.text_structure.find_message_structure.go +++ b/esapi/api.xpack.text_structure.find_message_structure.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newTextStructureFindMessageStructureFunc(t Transport) TextStructureFindMess // ----- API Definition ------------------------------------------------------- -// TextStructureFindMessageStructure - Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch. +// TextStructureFindMessageStructure - Find the structure of text messages // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/find-message-structure.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-message-structure. type TextStructureFindMessageStructure func(body io.Reader, o ...func(*TextStructureFindMessageStructureRequest)) (*Response, error) // TextStructureFindMessageStructureRequest configures the Text Structure Find Message Structure API request. @@ -246,7 +246,7 @@ func (f TextStructureFindMessageStructure) WithDelimiter(v string) func(*TextStr } } -// WithEcsCompatibility - optional parameter to specify the compatibility mode with ecs grok patterns - may be either 'v1' or 'disabled'. +// WithEcsCompatibility - the mode of compatibility with ecs compliant grok patterns.use this parameter to specify whether to use ecs grok patterns instead of legacy ones when the structure finder creates a grok pattern.this setting primarily has an impact when a whole message grok pattern such as `%{catalinalog}` matches the input.if the structure finder identifies a common structure but has no idea of meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output, with the intention that a user who knows the meanings rename these fields before using it.. func (f TextStructureFindMessageStructure) WithEcsCompatibility(v string) func(*TextStructureFindMessageStructureRequest) { return func(r *TextStructureFindMessageStructureRequest) { r.EcsCompatibility = v diff --git a/esapi/api.xpack.text_structure.find_structure.go b/esapi/api.xpack.text_structure.find_structure.go index 833e1b5945..4a8fa275b7 100644 --- a/esapi/api.xpack.text_structure.find_structure.go +++ b/esapi/api.xpack.text_structure.find_structure.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newTextStructureFindStructureFunc(t Transport) TextStructureFindStructure { // ----- API Definition ------------------------------------------------------- -// TextStructureFindStructure - Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. +// TextStructureFindStructure - Find the structure of a text file // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-structure. type TextStructureFindStructure func(body io.Reader, o ...func(*TextStructureFindStructureRequest)) (*Response, error) // TextStructureFindStructureRequest configures the Text Structure Find Structure API request. diff --git a/esapi/api.xpack.text_structure.test_grok_pattern.go b/esapi/api.xpack.text_structure.test_grok_pattern.go index ca88235663..ed3fc7f6e8 100644 --- a/esapi/api.xpack.text_structure.test_grok_pattern.go +++ b/esapi/api.xpack.text_structure.test_grok_pattern.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newTextStructureTestGrokPatternFunc(t Transport) TextStructureTestGrokPatte // ----- API Definition ------------------------------------------------------- -// TextStructureTestGrokPattern - Tests a Grok pattern on some text. +// TextStructureTestGrokPattern - Test a Grok pattern // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/test-grok-pattern.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-test-grok-pattern. type TextStructureTestGrokPattern func(body io.Reader, o ...func(*TextStructureTestGrokPatternRequest)) (*Response, error) // TextStructureTestGrokPatternRequest configures the Text Structure Test Grok Pattern API request. diff --git a/esapi/api.xpack.transform.delete_transform.go b/esapi/api.xpack.transform.delete_transform.go index 40abd0d885..d5388439a6 100644 --- a/esapi/api.xpack.transform.delete_transform.go +++ b/esapi/api.xpack.transform.delete_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newTransformDeleteTransformFunc(t Transport) TransformDeleteTransform { // ----- API Definition ------------------------------------------------------- -// TransformDeleteTransform - Deletes an existing transform. +// TransformDeleteTransform - Delete a transform // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-delete-transform. type TransformDeleteTransform func(transform_id string, o ...func(*TransformDeleteTransformRequest)) (*Response, error) // TransformDeleteTransformRequest configures the Transform Delete Transform API request. diff --git a/esapi/api.xpack.transform.get_node_stats.go b/esapi/api.xpack.transform.get_node_stats.go index 35a26d7b02..90163023a2 100644 --- a/esapi/api.xpack.transform.get_node_stats.go +++ b/esapi/api.xpack.transform.get_node_stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,7 +42,7 @@ func newTransformGetNodeStatsFunc(t Transport) TransformGetNodeStats { // ----- API Definition ------------------------------------------------------- -// TransformGetNodeStats - Retrieves transform usage information for transform nodes. +// TransformGetNodeStats - Retrieves transform usage information for transform nodes // // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html. type TransformGetNodeStats func(o ...func(*TransformGetNodeStatsRequest)) (*Response, error) diff --git a/esapi/api.xpack.transform.get_transform.go b/esapi/api.xpack.transform.get_transform.go index 1ea0008e73..5244e6d068 100644 --- a/esapi/api.xpack.transform.get_transform.go +++ b/esapi/api.xpack.transform.get_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,14 +43,14 @@ func newTransformGetTransformFunc(t Transport) TransformGetTransform { // ----- API Definition ------------------------------------------------------- -// TransformGetTransform - Retrieves configuration information for transforms. +// TransformGetTransform - Get transforms // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform. type TransformGetTransform func(o ...func(*TransformGetTransformRequest)) (*Response, error) // TransformGetTransformRequest configures the Transform Get Transform API request. type TransformGetTransformRequest struct { - TransformID string + TransformID []string AllowNoMatch *bool ExcludeGenerated *bool @@ -88,15 +88,15 @@ func (r TransformGetTransformRequest) Do(providedCtx context.Context, transport method = "GET" - path.Grow(7 + 1 + len("_transform") + 1 + len(r.TransformID)) + path.Grow(7 + 1 + len("_transform") + 1 + len(strings.Join(r.TransformID, ","))) path.WriteString("http://") path.WriteString("/") path.WriteString("_transform") - if r.TransformID != "" { + if len(r.TransformID) > 0 { path.WriteString("/") - path.WriteString(r.TransformID) + path.WriteString(strings.Join(r.TransformID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "transform_id", r.TransformID) + instrument.RecordPathPart(ctx, "transform_id", strings.Join(r.TransformID, ",")) } } @@ -196,8 +196,8 @@ func (f TransformGetTransform) WithContext(v context.Context) func(*TransformGet } } -// WithTransformID - the ID or comma delimited list of ID expressions of the transforms to get, '_all' or '*' implies get all transforms. -func (f TransformGetTransform) WithTransformID(v string) func(*TransformGetTransformRequest) { +// WithTransformID - comma-separated list of transform identifiers or wildcard expressions. you can get information for all transforms by using `_all`, by specifying `*` as the ``, or by omitting the ``.. +func (f TransformGetTransform) WithTransformID(v ...string) func(*TransformGetTransformRequest) { return func(r *TransformGetTransformRequest) { r.TransformID = v } diff --git a/esapi/api.xpack.transform.get_transform_stats.go b/esapi/api.xpack.transform.get_transform_stats.go index 90ae323110..1fe1c50560 100644 --- a/esapi/api.xpack.transform.get_transform_stats.go +++ b/esapi/api.xpack.transform.get_transform_stats.go @@ -15,12 +15,13 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi import ( "context" + "errors" "net/http" "strconv" "strings" @@ -28,7 +29,7 @@ import ( ) func newTransformGetTransformStatsFunc(t Transport) TransformGetTransformStats { - return func(transform_id string, o ...func(*TransformGetTransformStatsRequest)) (*Response, error) { + return func(transform_id []string, o ...func(*TransformGetTransformStatsRequest)) (*Response, error) { var r = TransformGetTransformStatsRequest{TransformID: transform_id} for _, f := range o { f(&r) @@ -44,14 +45,14 @@ func newTransformGetTransformStatsFunc(t Transport) TransformGetTransformStats { // ----- API Definition ------------------------------------------------------- -// TransformGetTransformStats - Retrieves usage information for transforms. +// TransformGetTransformStats - Get transform stats // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html. -type TransformGetTransformStats func(transform_id string, o ...func(*TransformGetTransformStatsRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform-stats. +type TransformGetTransformStats func(transform_id []string, o ...func(*TransformGetTransformStatsRequest)) (*Response, error) // TransformGetTransformStatsRequest configures the Transform Get Transform Stats API request. type TransformGetTransformStatsRequest struct { - TransformID string + TransformID []string AllowNoMatch *bool From *int @@ -89,14 +90,18 @@ func (r TransformGetTransformStatsRequest) Do(providedCtx context.Context, trans method = "GET" - path.Grow(7 + 1 + len("_transform") + 1 + len(r.TransformID) + 1 + len("_stats")) + if len(r.TransformID) == 0 { + return nil, errors.New("transform_id is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_transform") + 1 + len(strings.Join(r.TransformID, ",")) + 1 + len("_stats")) path.WriteString("http://") path.WriteString("/") path.WriteString("_transform") path.WriteString("/") - path.WriteString(r.TransformID) + path.WriteString(strings.Join(r.TransformID, ",")) if instrument, ok := r.Instrument.(Instrumentation); ok { - instrument.RecordPathPart(ctx, "transform_id", r.TransformID) + instrument.RecordPathPart(ctx, "transform_id", strings.Join(r.TransformID, ",")) } path.WriteString("/") path.WriteString("_stats") diff --git a/esapi/api.xpack.transform.preview_transform.go b/esapi/api.xpack.transform.preview_transform.go index 8e042d6ce1..e45af52472 100644 --- a/esapi/api.xpack.transform.preview_transform.go +++ b/esapi/api.xpack.transform.preview_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newTransformPreviewTransformFunc(t Transport) TransformPreviewTransform { // ----- API Definition ------------------------------------------------------- -// TransformPreviewTransform - Previews a transform. +// TransformPreviewTransform - Preview a transform // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-preview-transform. type TransformPreviewTransform func(o ...func(*TransformPreviewTransformRequest)) (*Response, error) // TransformPreviewTransformRequest configures the Transform Preview Transform API request. diff --git a/esapi/api.xpack.transform.put_transform.go b/esapi/api.xpack.transform.put_transform.go index 5ed94c072e..1c051f6830 100644 --- a/esapi/api.xpack.transform.put_transform.go +++ b/esapi/api.xpack.transform.put_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newTransformPutTransformFunc(t Transport) TransformPutTransform { // ----- API Definition ------------------------------------------------------- -// TransformPutTransform - Instantiates a transform. +// TransformPutTransform - Create a transform // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-put-transform. type TransformPutTransform func(body io.Reader, transform_id string, o ...func(*TransformPutTransformRequest)) (*Response, error) // TransformPutTransformRequest configures the Transform Put Transform API request. diff --git a/esapi/api.xpack.transform.reset_transform.go b/esapi/api.xpack.transform.reset_transform.go index abf2f27af3..d62c967362 100644 --- a/esapi/api.xpack.transform.reset_transform.go +++ b/esapi/api.xpack.transform.reset_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newTransformResetTransformFunc(t Transport) TransformResetTransform { // ----- API Definition ------------------------------------------------------- -// TransformResetTransform - Resets an existing transform. +// TransformResetTransform - Reset a transform // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-transform.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-reset-transform. type TransformResetTransform func(transform_id string, o ...func(*TransformResetTransformRequest)) (*Response, error) // TransformResetTransformRequest configures the Transform Reset Transform API request. diff --git a/esapi/api.xpack.transform.schedule_now_transform.go b/esapi/api.xpack.transform.schedule_now_transform.go index 52a384fc6b..7085e74699 100644 --- a/esapi/api.xpack.transform.schedule_now_transform.go +++ b/esapi/api.xpack.transform.schedule_now_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newTransformScheduleNowTransformFunc(t Transport) TransformScheduleNowTrans // ----- API Definition ------------------------------------------------------- -// TransformScheduleNowTransform - Schedules now a transform. +// TransformScheduleNowTransform - Schedule a transform to start now // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/schedule-now-transform.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-schedule-now-transform. type TransformScheduleNowTransform func(transform_id string, o ...func(*TransformScheduleNowTransformRequest)) (*Response, error) // TransformScheduleNowTransformRequest configures the Transform Schedule Now Transform API request. diff --git a/esapi/api.xpack.transform.set_upgrade_mode.go b/esapi/api.xpack.transform.set_upgrade_mode.go new file mode 100644 index 0000000000..95be25ce3d --- /dev/null +++ b/esapi/api.xpack.transform.set_upgrade_mode.go @@ -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. +// +// Code generated from specification version 9.3.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strconv" + "strings" + "time" +) + +func newTransformSetUpgradeModeFunc(t Transport) TransformSetUpgradeMode { + return func(o ...func(*TransformSetUpgradeModeRequest)) (*Response, error) { + var r = TransformSetUpgradeModeRequest{} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// TransformSetUpgradeMode - Set upgrade_mode for transform indices +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode. +type TransformSetUpgradeMode func(o ...func(*TransformSetUpgradeModeRequest)) (*Response, error) + +// TransformSetUpgradeModeRequest configures the Transform Set Upgrade Mode API request. +type TransformSetUpgradeModeRequest struct { + Enabled *bool + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r TransformSetUpgradeModeRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "transform.set_upgrade_mode") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "POST" + + path.Grow(7 + len("/_transform/set_upgrade_mode")) + path.WriteString("http://") + path.WriteString("/_transform/set_upgrade_mode") + + params = make(map[string]string) + + if r.Enabled != nil { + params["enabled"] = strconv.FormatBool(*r.Enabled) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "transform.set_upgrade_mode") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "transform.set_upgrade_mode") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f TransformSetUpgradeMode) WithContext(v context.Context) func(*TransformSetUpgradeModeRequest) { + return func(r *TransformSetUpgradeModeRequest) { + r.ctx = v + } +} + +// WithEnabled - whether to enable upgrade_mode transform setting or not. defaults to false.. +func (f TransformSetUpgradeMode) WithEnabled(v bool) func(*TransformSetUpgradeModeRequest) { + return func(r *TransformSetUpgradeModeRequest) { + r.Enabled = &v + } +} + +// WithTimeout - controls the time to wait before action times out. defaults to 30 seconds. +func (f TransformSetUpgradeMode) WithTimeout(v time.Duration) func(*TransformSetUpgradeModeRequest) { + return func(r *TransformSetUpgradeModeRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f TransformSetUpgradeMode) WithPretty() func(*TransformSetUpgradeModeRequest) { + return func(r *TransformSetUpgradeModeRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f TransformSetUpgradeMode) WithHuman() func(*TransformSetUpgradeModeRequest) { + return func(r *TransformSetUpgradeModeRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f TransformSetUpgradeMode) WithErrorTrace() func(*TransformSetUpgradeModeRequest) { + return func(r *TransformSetUpgradeModeRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f TransformSetUpgradeMode) WithFilterPath(v ...string) func(*TransformSetUpgradeModeRequest) { + return func(r *TransformSetUpgradeModeRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f TransformSetUpgradeMode) WithHeader(h map[string]string) func(*TransformSetUpgradeModeRequest) { + return func(r *TransformSetUpgradeModeRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f TransformSetUpgradeMode) WithOpaqueID(s string) func(*TransformSetUpgradeModeRequest) { + return func(r *TransformSetUpgradeModeRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.xpack.transform.start_transform.go b/esapi/api.xpack.transform.start_transform.go index deb22a6319..be65b5ba14 100644 --- a/esapi/api.xpack.transform.start_transform.go +++ b/esapi/api.xpack.transform.start_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newTransformStartTransformFunc(t Transport) TransformStartTransform { // ----- API Definition ------------------------------------------------------- -// TransformStartTransform - Starts one or more transforms. +// TransformStartTransform - Start a transform // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-start-transform. type TransformStartTransform func(transform_id string, o ...func(*TransformStartTransformRequest)) (*Response, error) // TransformStartTransformRequest configures the Transform Start Transform API request. diff --git a/esapi/api.xpack.transform.stop_transform.go b/esapi/api.xpack.transform.stop_transform.go index 053c256e2f..204c9db42c 100644 --- a/esapi/api.xpack.transform.stop_transform.go +++ b/esapi/api.xpack.transform.stop_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newTransformStopTransformFunc(t Transport) TransformStopTransform { // ----- API Definition ------------------------------------------------------- -// TransformStopTransform - Stops one or more transforms. +// TransformStopTransform - Stop transforms // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-stop-transform. type TransformStopTransform func(transform_id string, o ...func(*TransformStopTransformRequest)) (*Response, error) // TransformStopTransformRequest configures the Transform Stop Transform API request. diff --git a/esapi/api.xpack.transform.update_transform.go b/esapi/api.xpack.transform.update_transform.go index 56759aa49a..862ab5ac9e 100644 --- a/esapi/api.xpack.transform.update_transform.go +++ b/esapi/api.xpack.transform.update_transform.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -45,9 +45,9 @@ func newTransformUpdateTransformFunc(t Transport) TransformUpdateTransform { // ----- API Definition ------------------------------------------------------- -// TransformUpdateTransform - Updates certain properties of a transform. +// TransformUpdateTransform - Update a transform // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform. type TransformUpdateTransform func(body io.Reader, transform_id string, o ...func(*TransformUpdateTransformRequest)) (*Response, error) // TransformUpdateTransformRequest configures the Transform Update Transform API request. diff --git a/esapi/api.xpack.transform.upgrade_transforms.go b/esapi/api.xpack.transform.upgrade_transforms.go index 9671188dea..4575012a2c 100644 --- a/esapi/api.xpack.transform.upgrade_transforms.go +++ b/esapi/api.xpack.transform.upgrade_transforms.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newTransformUpgradeTransformsFunc(t Transport) TransformUpgradeTransforms { // ----- API Definition ------------------------------------------------------- -// TransformUpgradeTransforms - Upgrades all transforms. +// TransformUpgradeTransforms - Upgrade all transforms // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-upgrade-transforms. type TransformUpgradeTransforms func(o ...func(*TransformUpgradeTransformsRequest)) (*Response, error) // TransformUpgradeTransformsRequest configures the Transform Upgrade Transforms API request. diff --git a/esapi/api.xpack.watcher.ack_watch.go b/esapi/api.xpack.watcher.ack_watch.go index 8706581738..26cf96b601 100644 --- a/esapi/api.xpack.watcher.ack_watch.go +++ b/esapi/api.xpack.watcher.ack_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newWatcherAckWatchFunc(t Transport) WatcherAckWatch { // ----- API Definition ------------------------------------------------------- -// WatcherAckWatch - Acknowledges a watch, manually throttling the execution of the watch's actions. +// WatcherAckWatch - Acknowledge a watch // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch. type WatcherAckWatch func(watch_id string, o ...func(*WatcherAckWatchRequest)) (*Response, error) // WatcherAckWatchRequest configures the Watcher Ack Watch API request. diff --git a/esapi/api.xpack.watcher.activate_watch.go b/esapi/api.xpack.watcher.activate_watch.go index cfd579c4a3..e1e9e0f33a 100644 --- a/esapi/api.xpack.watcher.activate_watch.go +++ b/esapi/api.xpack.watcher.activate_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newWatcherActivateWatchFunc(t Transport) WatcherActivateWatch { // ----- API Definition ------------------------------------------------------- -// WatcherActivateWatch - Activates a currently inactive watch. +// WatcherActivateWatch - Activate a watch // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch. type WatcherActivateWatch func(watch_id string, o ...func(*WatcherActivateWatchRequest)) (*Response, error) // WatcherActivateWatchRequest configures the Watcher Activate Watch API request. diff --git a/esapi/api.xpack.watcher.deactivate_watch.go b/esapi/api.xpack.watcher.deactivate_watch.go index 0d5815f0b2..bc6510552d 100644 --- a/esapi/api.xpack.watcher.deactivate_watch.go +++ b/esapi/api.xpack.watcher.deactivate_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newWatcherDeactivateWatchFunc(t Transport) WatcherDeactivateWatch { // ----- API Definition ------------------------------------------------------- -// WatcherDeactivateWatch - Deactivates a currently active watch. +// WatcherDeactivateWatch - Deactivate a watch // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch. type WatcherDeactivateWatch func(watch_id string, o ...func(*WatcherDeactivateWatchRequest)) (*Response, error) // WatcherDeactivateWatchRequest configures the Watcher Deactivate Watch API request. diff --git a/esapi/api.xpack.watcher.delete_watch.go b/esapi/api.xpack.watcher.delete_watch.go index 0db20b9c5d..aaf5226932 100644 --- a/esapi/api.xpack.watcher.delete_watch.go +++ b/esapi/api.xpack.watcher.delete_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newWatcherDeleteWatchFunc(t Transport) WatcherDeleteWatch { // ----- API Definition ------------------------------------------------------- -// WatcherDeleteWatch - Removes a watch from Watcher. +// WatcherDeleteWatch - Delete a watch // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch. type WatcherDeleteWatch func(id string, o ...func(*WatcherDeleteWatchRequest)) (*Response, error) // WatcherDeleteWatchRequest configures the Watcher Delete Watch API request. diff --git a/esapi/api.xpack.watcher.execute_watch.go b/esapi/api.xpack.watcher.execute_watch.go index a2eae8108a..a44dd3b820 100644 --- a/esapi/api.xpack.watcher.execute_watch.go +++ b/esapi/api.xpack.watcher.execute_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newWatcherExecuteWatchFunc(t Transport) WatcherExecuteWatch { // ----- API Definition ------------------------------------------------------- -// WatcherExecuteWatch - Forces the execution of a stored watch. +// WatcherExecuteWatch - Run a watch // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch. type WatcherExecuteWatch func(o ...func(*WatcherExecuteWatchRequest)) (*Response, error) // WatcherExecuteWatchRequest configures the Watcher Execute Watch API request. diff --git a/esapi/api.xpack.watcher.get_settings.go b/esapi/api.xpack.watcher.get_settings.go index 686eae58c1..47ab8ee045 100644 --- a/esapi/api.xpack.watcher.get_settings.go +++ b/esapi/api.xpack.watcher.get_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newWatcherGetSettingsFunc(t Transport) WatcherGetSettings { // ----- API Definition ------------------------------------------------------- -// WatcherGetSettings - Retrieve settings for the watcher system index +// WatcherGetSettings - Get Watcher index settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-settings.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-settings. type WatcherGetSettings func(o ...func(*WatcherGetSettingsRequest)) (*Response, error) // WatcherGetSettingsRequest configures the Watcher Get Settings API request. diff --git a/esapi/api.xpack.watcher.get_watch.go b/esapi/api.xpack.watcher.get_watch.go index e59150398a..8ccf9b5af1 100644 --- a/esapi/api.xpack.watcher.get_watch.go +++ b/esapi/api.xpack.watcher.get_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -42,9 +42,9 @@ func newWatcherGetWatchFunc(t Transport) WatcherGetWatch { // ----- API Definition ------------------------------------------------------- -// WatcherGetWatch - Retrieves a watch by its ID. +// WatcherGetWatch - Get a watch // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch. type WatcherGetWatch func(id string, o ...func(*WatcherGetWatchRequest)) (*Response, error) // WatcherGetWatchRequest configures the Watcher Get Watch API request. diff --git a/esapi/api.xpack.watcher.put_watch.go b/esapi/api.xpack.watcher.put_watch.go index 7ba7666cef..1fff2ec9b9 100644 --- a/esapi/api.xpack.watcher.put_watch.go +++ b/esapi/api.xpack.watcher.put_watch.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -28,8 +28,8 @@ import ( ) func newWatcherPutWatchFunc(t Transport) WatcherPutWatch { - return func(id string, o ...func(*WatcherPutWatchRequest)) (*Response, error) { - var r = WatcherPutWatchRequest{WatchID: id} + return func(id string, body io.Reader, o ...func(*WatcherPutWatchRequest)) (*Response, error) { + var r = WatcherPutWatchRequest{WatchID: id, Body: body} for _, f := range o { f(&r) } @@ -44,10 +44,10 @@ func newWatcherPutWatchFunc(t Transport) WatcherPutWatch { // ----- API Definition ------------------------------------------------------- -// WatcherPutWatch - Creates a new watch, or updates an existing one. +// WatcherPutWatch - Create or update a watch // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html. -type WatcherPutWatch func(id string, o ...func(*WatcherPutWatchRequest)) (*Response, error) +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch. +type WatcherPutWatch func(id string, body io.Reader, o ...func(*WatcherPutWatchRequest)) (*Response, error) // WatcherPutWatchRequest configures the Watcher Put Watch API request. type WatcherPutWatchRequest struct { @@ -206,13 +206,6 @@ func (f WatcherPutWatch) WithContext(v context.Context) func(*WatcherPutWatchReq } } -// WithBody - The watch. -func (f WatcherPutWatch) WithBody(v io.Reader) func(*WatcherPutWatchRequest) { - return func(r *WatcherPutWatchRequest) { - r.Body = v - } -} - // WithActive - specify whether the watch is in/active by default. func (f WatcherPutWatch) WithActive(v bool) func(*WatcherPutWatchRequest) { return func(r *WatcherPutWatchRequest) { diff --git a/esapi/api.xpack.watcher.query_watches.go b/esapi/api.xpack.watcher.query_watches.go index dd6f59910e..2c3f699198 100644 --- a/esapi/api.xpack.watcher.query_watches.go +++ b/esapi/api.xpack.watcher.query_watches.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newWatcherQueryWatchesFunc(t Transport) WatcherQueryWatches { // ----- API Definition ------------------------------------------------------- -// WatcherQueryWatches - Retrieves stored watches. +// WatcherQueryWatches - Query watches // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-query-watches. type WatcherQueryWatches func(o ...func(*WatcherQueryWatchesRequest)) (*Response, error) // WatcherQueryWatchesRequest configures the Watcher Query Watches API request. diff --git a/esapi/api.xpack.watcher.start.go b/esapi/api.xpack.watcher.start.go index b152c7ad95..123411c3d6 100644 --- a/esapi/api.xpack.watcher.start.go +++ b/esapi/api.xpack.watcher.start.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newWatcherStartFunc(t Transport) WatcherStart { // ----- API Definition ------------------------------------------------------- -// WatcherStart - Starts Watcher if it is not already running. +// WatcherStart - Start the watch service // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start. type WatcherStart func(o ...func(*WatcherStartRequest)) (*Response, error) // WatcherStartRequest configures the Watcher Start API request. diff --git a/esapi/api.xpack.watcher.stats.go b/esapi/api.xpack.watcher.stats.go index b8ebffbb4d..d7529e3b95 100644 --- a/esapi/api.xpack.watcher.stats.go +++ b/esapi/api.xpack.watcher.stats.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newWatcherStatsFunc(t Transport) WatcherStats { // ----- API Definition ------------------------------------------------------- -// WatcherStats - Retrieves the current Watcher metrics. +// WatcherStats - Get Watcher statistics // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stats. type WatcherStats func(o ...func(*WatcherStatsRequest)) (*Response, error) // WatcherStatsRequest configures the Watcher Stats API request. diff --git a/esapi/api.xpack.watcher.stop.go b/esapi/api.xpack.watcher.stop.go index 3d8546d4db..24986e48a1 100644 --- a/esapi/api.xpack.watcher.stop.go +++ b/esapi/api.xpack.watcher.stop.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newWatcherStopFunc(t Transport) WatcherStop { // ----- API Definition ------------------------------------------------------- -// WatcherStop - Stops Watcher if it is running. +// WatcherStop - Stop the watch service // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop. type WatcherStop func(o ...func(*WatcherStopRequest)) (*Response, error) // WatcherStopRequest configures the Watcher Stop API request. diff --git a/esapi/api.xpack.watcher.update_settings.go b/esapi/api.xpack.watcher.update_settings.go index c706471411..ef4532a8a5 100644 --- a/esapi/api.xpack.watcher.update_settings.go +++ b/esapi/api.xpack.watcher.update_settings.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -44,9 +44,9 @@ func newWatcherUpdateSettingsFunc(t Transport) WatcherUpdateSettings { // ----- API Definition ------------------------------------------------------- -// WatcherUpdateSettings - Update settings for the watcher system index +// WatcherUpdateSettings - Update Watcher index settings // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-update-settings.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-update-settings. type WatcherUpdateSettings func(body io.Reader, o ...func(*WatcherUpdateSettingsRequest)) (*Response, error) // WatcherUpdateSettingsRequest configures the Watcher Update Settings API request. diff --git a/esapi/api.xpack.xpack.info.go b/esapi/api.xpack.xpack.info.go index d88b3d5727..811aa93131 100644 --- a/esapi/api.xpack.xpack.info.go +++ b/esapi/api.xpack.xpack.info.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newXPackInfoFunc(t Transport) XPackInfo { // ----- API Definition ------------------------------------------------------- -// XPackInfo - Retrieves information about the installed X-Pack features. +// XPackInfo - Get information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-info. type XPackInfo func(o ...func(*XPackInfoRequest)) (*Response, error) // XPackInfoRequest configures the X Pack Info API request. diff --git a/esapi/api.xpack.xpack.usage.go b/esapi/api.xpack.xpack.usage.go index 431f34d890..330ebe65fd 100644 --- a/esapi/api.xpack.xpack.usage.go +++ b/esapi/api.xpack.xpack.usage.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 9.1.0: DO NOT EDIT +// Code generated from specification version 9.3.0: DO NOT EDIT package esapi @@ -43,9 +43,9 @@ func newXPackUsageFunc(t Transport) XPackUsage { // ----- API Definition ------------------------------------------------------- -// XPackUsage - Retrieves usage information about the installed X-Pack features. +// XPackUsage - Get usage information // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html. +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-xpack. type XPackUsage func(o ...func(*XPackUsageRequest)) (*Response, error) // XPackUsageRequest configures the X Pack Usage API request. diff --git a/esutil/bulk_indexer.go b/esutil/bulk_indexer.go index a3fc5c3a76..91ae0176a9 100644 --- a/esutil/bulk_indexer.go +++ b/esutil/bulk_indexer.go @@ -552,7 +552,7 @@ func (w *worker) flushBuffer(ctx context.Context) error { Pipeline: w.bi.config.Pipeline, Refresh: w.bi.config.Refresh, - Routing: w.bi.config.Routing, + Routing: func() []string { if w.bi.config.Routing != "" { return []string{w.bi.config.Routing} }; return nil }(), Source: w.bi.config.Source, SourceExcludes: w.bi.config.SourceExcludes, SourceIncludes: w.bi.config.SourceIncludes, diff --git a/internal/build/cmd/generate/commands/gensource/debug.go b/internal/build/cmd/generate/commands/gensource/debug.go index 24f6f03f73..1e33dcf5cd 100644 --- a/internal/build/cmd/generate/commands/gensource/debug.go +++ b/internal/build/cmd/generate/commands/gensource/debug.go @@ -64,7 +64,7 @@ func (e *Endpoint) DebugInfo() string { if part.Default != nil { fmt.Fprintf(w, ", default: %s", part.Default) } - if part.Deprecated { + if part.Deprecated.Version != "" { fmt.Fprint(w, ", *deprecated*") } fmt.Fprint(w, "\n") diff --git a/internal/build/cmd/generate/commands/gensource/generator.go b/internal/build/cmd/generate/commands/gensource/generator.go index f7cc1d9c5f..f2fee953cf 100644 --- a/internal/build/cmd/generate/commands/gensource/generator.go +++ b/internal/build/cmd/generate/commands/gensource/generator.go @@ -243,7 +243,7 @@ type ` + g.Endpoint.MethodWithNamespace() + `Request struct {`) } } // Skip type only for selected APIs at this point - if p.Name == "type" && p.Deprecated { + if p.Name == "type" && p.Deprecated.Version != "" { if g.Endpoint.Name == "bulk" || g.Endpoint.Name == "create" || g.Endpoint.Name == "delete" || @@ -660,7 +660,7 @@ func (r ` + g.Endpoint.MethodWithNamespace() + `Request) Do(providedCtx context. pathContent.WriteString(`if instrument, ok := r.Instrument.(Instrumentation); ok { instrument.RecordPathPart(ctx, "` + a.Name + `", strconv.Itoa(*r.` + p + `)) }` + "\n") - case "string": + case "string", "enum": pathGrow.WriteString(`len(r.` + p + `) + `) pathContent.WriteString(` path.WriteString(r.` + p + `)` + "\n") pathContent.WriteString(`if instrument, ok := r.Instrument.(Instrumentation); ok { @@ -695,7 +695,7 @@ func (r ` + g.Endpoint.MethodWithNamespace() + `Request) Do(providedCtx context. p = a.GoName() switch a.Type { - case "string": + case "string", "enum": pathGrow.WriteString(`1 + len(r.` + p + `) + `) pathContent.WriteString(` if r.` + p + ` != "" {` + "\n") pathContent.WriteString(` path.WriteString("/")` + "\n") @@ -740,7 +740,7 @@ func (r ` + g.Endpoint.MethodWithNamespace() + `Request) Do(providedCtx context. pathGrow.WriteString("1 +") pathContent.WriteString(` path.WriteString("/")` + "\n") switch a.Type { - case "string": + case "string", "enum": pathGrow.WriteString(`len(r.` + p + `)`) pathContent.WriteString(` path.WriteString(r.` + p + `)` + "\n") case "list": diff --git a/internal/build/cmd/generate/commands/gensource/model.go b/internal/build/cmd/generate/commands/gensource/model.go index 6a1e864899..3a359455f5 100644 --- a/internal/build/cmd/generate/commands/gensource/model.go +++ b/internal/build/cmd/generate/commands/gensource/model.go @@ -142,7 +142,7 @@ func NewEndpoint(f io.Reader) (*Endpoint, error) { var parts []string for partName, part := range path.Parts { // Skip type only for selected APIs at this point - if part.Name == "type" && part.Deprecated { + if part.Name == "type" && part.Deprecated.Version != "" { if endpoint.Name == "bulk" || endpoint.Name == "create" || endpoint.Name == "delete" || @@ -275,7 +275,7 @@ type Path struct { Deprecated struct { Version string `json:"version"` Description string `json:"description"` - } + } `json:"deprecated"` } // Part represents part of the API endpoint URL. @@ -289,7 +289,10 @@ type Part struct { Description string `json:"description"` Required bool `json:"required"` - Deprecated bool `json:"deprecated"` + Deprecated struct { + Version string `json:"version"` + Description string `json:"description"` + } `json:"deprecated"` } // Param represents API endpoint parameter. diff --git a/internal/build/cmd/generate/commands/gentests/skips.go b/internal/build/cmd/generate/commands/gentests/skips.go index b9d862559c..85795cb9cf 100644 --- a/internal/build/cmd/generate/commands/gentests/skips.go +++ b/internal/build/cmd/generate/commands/gentests/skips.go @@ -87,6 +87,7 @@ var skipFiles = []string{ ".*inference/.*.yml", // incompatible inference tests ".*mustache/.*.yml", // incompatible mustache tests "data_stream/240_data_stream_settings.yml", + "index/100_field_name_length_limit.yml", // YAML parse error with nested structures } // TODO: Comments into descriptions for `Skip()` diff --git a/internal/build/go.mod b/internal/build/go.mod index ef78599a26..acfff441b0 100644 --- a/internal/build/go.mod +++ b/internal/build/go.mod @@ -1,6 +1,6 @@ module github.com/elastic/go-elasticsearch/v9/internal/build -go 1.23.0 +go 1.24.0 toolchain go1.24.2 @@ -11,7 +11,7 @@ require ( github.com/elastic/go-elasticsearch/v9 v9.0.0-00010101000000-000000000000 github.com/spf13/cobra v1.8.0 golang.org/x/crypto v0.37.0 - golang.org/x/tools v0.32.0 + golang.org/x/tools v0.39.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -19,8 +19,9 @@ require ( github.com/dlclark/regexp2 v1.4.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - golang.org/x/mod v0.24.0 // indirect - golang.org/x/sync v0.13.0 // indirect - golang.org/x/sys v0.32.0 // indirect + golang.org/x/mod v0.30.0 // indirect + golang.org/x/sync v0.18.0 // indirect + golang.org/x/sys v0.38.0 // indirect + golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect golang.org/x/term v0.31.0 // indirect ) diff --git a/internal/build/go.sum b/internal/build/go.sum index 0028607c15..ac6cc7ca49 100644 --- a/internal/build/go.sum +++ b/internal/build/go.sum @@ -24,14 +24,24 @@ golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= +golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 h1:E2/AqCUMZGgd73TQkxUMcMla25GB9i/5HOdLr+uH7Vo= +golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54/go.mod h1:hKdjCMrbv9skySur+Nek8Hd0uJ0GuxJIoIX2payrIdQ= golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= +golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= From 3c9ae960820d045f5df414be794e40d72465467c Mon Sep 17 00:00:00 2001 From: Matt Devy Date: Wed, 26 Nov 2025 21:47:28 +0000 Subject: [PATCH 5/9] chore: linter errors --- .../commands/genexamples/translator.go | 46 +++++++++---------- .../generate/commands/gensource/command.go | 5 +- .../cmd/tools/commands/spec/command_test.go | 2 +- internal/build/go.mod | 1 - internal/build/go.sum | 10 ---- internal/build/utils/debug.go | 9 ++-- 6 files changed, 31 insertions(+), 42 deletions(-) diff --git a/internal/build/cmd/generate/commands/genexamples/translator.go b/internal/build/cmd/generate/commands/genexamples/translator.go index 3ff2fdd220..ed8dabfe1a 100644 --- a/internal/build/cmd/generate/commands/genexamples/translator.go +++ b/internal/build/cmd/generate/commands/genexamples/translator.go @@ -82,7 +82,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString(")") @@ -115,7 +115,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString(")") @@ -148,7 +148,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString(")") @@ -182,7 +182,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString(")") @@ -227,7 +227,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString(")") @@ -267,7 +267,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString("\t)") @@ -411,7 +411,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString("\tes." + apiName + ".WithPretty(),\n") @@ -445,7 +445,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString(")") @@ -601,7 +601,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } } @@ -634,7 +634,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString(")") @@ -673,7 +673,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } } else { fmt.Fprintf(&src, "%q", matches[1]) @@ -792,7 +792,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } else { fmt.Fprintf(&src, "[]string{%q}", matches[1]) } @@ -895,7 +895,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString(")") @@ -928,7 +928,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString(")") @@ -969,7 +969,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) src.WriteString("\tes." + apiName + ".WithPretty(),\n") } @@ -1012,7 +1012,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) src.WriteString("\tes." + apiName + ".WithPretty(),\n") } @@ -1194,7 +1194,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString("\t)") @@ -1277,7 +1277,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString("\t)") @@ -1316,7 +1316,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString("\t)") @@ -1388,7 +1388,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString("\t)") @@ -1419,7 +1419,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString("\t)") @@ -1453,7 +1453,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } src.WriteString("\t)") @@ -1484,7 +1484,7 @@ var ConsoleToGo = []TranslateRule{ if err != nil { return "", fmt.Errorf("error converting params to arguments: %s", err) } - fmt.Fprintf(&src, args) + fmt.Fprint(&src, args) } else { fmt.Fprintf(&src, "[]string{%q}", matches[1]) } diff --git a/internal/build/cmd/generate/commands/gensource/command.go b/internal/build/cmd/generate/commands/gensource/command.go index 3d5c301929..fa02145147 100644 --- a/internal/build/cmd/generate/commands/gensource/command.go +++ b/internal/build/cmd/generate/commands/gensource/command.go @@ -20,13 +20,14 @@ package gensource import ( "bytes" "fmt" - "github.com/elastic/go-elasticsearch/v9/internal/build/cmd" "io" "os" "path/filepath" "strings" "time" + "github.com/elastic/go-elasticsearch/v9/internal/build/cmd" + "github.com/spf13/cobra" "github.com/elastic/go-elasticsearch/v9/internal/build/utils" @@ -220,7 +221,7 @@ func (cmd *Command) processFile(f *os.File) (err error) { if utils.IsTTY() { fmt.Fprint(os.Stderr, "\x1b[2m") } - fmt.Fprintf(os.Stderr, gen.Endpoint.DebugInfo()) + fmt.Fprint(os.Stderr, gen.Endpoint.DebugInfo()) if utils.IsTTY() { fmt.Fprint(os.Stderr, "\x1b[0m") } diff --git a/internal/build/cmd/tools/commands/spec/command_test.go b/internal/build/cmd/tools/commands/spec/command_test.go index c4c5e66637..8db0e719ab 100644 --- a/internal/build/cmd/tools/commands/spec/command_test.go +++ b/internal/build/cmd/tools/commands/spec/command_test.go @@ -56,7 +56,7 @@ func TestBuild_zipfileUrl(t *testing.T) { t.Run(tt.name, func(t *testing.T) { b := Build{} if err := json.Unmarshal([]byte(tt.json), &b); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err.Error()) } if got := b.zipfileUrl(); got != tt.want { t.Errorf("zipfileUrl() = %v, want %v", got, tt.want) diff --git a/internal/build/go.mod b/internal/build/go.mod index acfff441b0..5e2b84301b 100644 --- a/internal/build/go.mod +++ b/internal/build/go.mod @@ -22,6 +22,5 @@ require ( golang.org/x/mod v0.30.0 // indirect golang.org/x/sync v0.18.0 // indirect golang.org/x/sys v0.38.0 // indirect - golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect golang.org/x/term v0.31.0 // indirect ) diff --git a/internal/build/go.sum b/internal/build/go.sum index ac6cc7ca49..c1cc42dbae 100644 --- a/internal/build/go.sum +++ b/internal/build/go.sum @@ -22,24 +22,14 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= -golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= -golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= -golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= -golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 h1:E2/AqCUMZGgd73TQkxUMcMla25GB9i/5HOdLr+uH7Vo= -golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54/go.mod h1:hKdjCMrbv9skySur+Nek8Hd0uJ0GuxJIoIX2payrIdQ= golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= -golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= -golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/internal/build/utils/debug.go b/internal/build/utils/debug.go index 1c2ec1d9ac..38c4689e98 100644 --- a/internal/build/utils/debug.go +++ b/internal/build/utils/debug.go @@ -28,7 +28,6 @@ import ( ) // PrintSourceWithErr returns source code annotated with location of an error. -// func PrintSourceWithErr(out io.Reader, err error) { if IsTTY() { fmt.Fprint(os.Stderr, "\x1b[2m") @@ -78,13 +77,13 @@ func PrintSourceWithErr(out io.Reader, err error) { if IsTTY() { fmt.Fprint(os.Stderr, "\x1b[31m") } - fmt.Fprintf(os.Stderr, strings.Repeat(" ", 4)) + fmt.Fprint(os.Stderr, strings.Repeat(" ", 4)) for i := 0; i < e.Pos.Column; i++ { fmt.Fprintf(os.Stderr, "-") } - fmt.Fprintf(os.Stderr, "^ ") - fmt.Fprintf(os.Stderr, e.Msg) - fmt.Fprintf(os.Stderr, "\n") + fmt.Fprint(os.Stderr, "^ ") + fmt.Fprint(os.Stderr, e.Msg) + fmt.Fprint(os.Stderr, "\n") if IsTTY() { fmt.Fprint(os.Stderr, "\x1b[0m") } From eb493412ac9169856e0dcb1444ed9b64fb71293a Mon Sep 17 00:00:00 2001 From: Matt Devy Date: Wed, 26 Nov 2025 22:07:30 +0000 Subject: [PATCH 6/9] chore: update generator string -> []string --- esapi/test/go.mod | 15 +++++++++++++++ .../cmd/generate/commands/gentests/generator.go | 2 +- internal/build/go.mod | 1 + internal/build/go.sum | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/esapi/test/go.mod b/esapi/test/go.mod index 91ef4b0dac..8ad836804a 100644 --- a/esapi/test/go.mod +++ b/esapi/test/go.mod @@ -5,3 +5,18 @@ go 1.23 toolchain go1.24.2 replace github.com/elastic/go-elasticsearch/v9 => ../../ + +require ( + github.com/elastic/elastic-transport-go/v8 v8.8.0 + github.com/elastic/go-elasticsearch/v9 v9.0.0-00010101000000-000000000000 + gopkg.in/yaml.v2 v2.4.0 +) + +require ( + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect +) diff --git a/internal/build/cmd/generate/commands/gentests/generator.go b/internal/build/cmd/generate/commands/gentests/generator.go index ebb6a3b2e8..06a4a7b66b 100644 --- a/internal/build/cmd/generate/commands/gentests/generator.go +++ b/internal/build/cmd/generate/commands/gentests/generator.go @@ -435,7 +435,7 @@ func (g *Generator) genCommonSetup() { } { - res, _ = es.Indices.DeleteIndexTemplate("*") + res, _ = es.Indices.DeleteIndexTemplate([]string{"*"}) if res != nil && res.Body != nil { defer res.Body.Close() } } diff --git a/internal/build/go.mod b/internal/build/go.mod index 5e2b84301b..acfff441b0 100644 --- a/internal/build/go.mod +++ b/internal/build/go.mod @@ -22,5 +22,6 @@ require ( golang.org/x/mod v0.30.0 // indirect golang.org/x/sync v0.18.0 // indirect golang.org/x/sys v0.38.0 // indirect + golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect golang.org/x/term v0.31.0 // indirect ) diff --git a/internal/build/go.sum b/internal/build/go.sum index c1cc42dbae..e798eb19e5 100644 --- a/internal/build/go.sum +++ b/internal/build/go.sum @@ -28,6 +28,8 @@ golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 h1:E2/AqCUMZGgd73TQkxUMcMla25GB9i/5HOdLr+uH7Vo= +golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54/go.mod h1:hKdjCMrbv9skySur+Nek8Hd0uJ0GuxJIoIX2payrIdQ= golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= From 3f083099d68a0da212da21e590c1c6ef904aff98 Mon Sep 17 00:00:00 2001 From: Matt Devy Date: Wed, 26 Nov 2025 22:17:14 +0000 Subject: [PATCH 7/9] chore: update DeletePrivileges method to accept []string --- internal/build/cmd/generate/commands/gentests/generator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/build/cmd/generate/commands/gentests/generator.go b/internal/build/cmd/generate/commands/gentests/generator.go index 06a4a7b66b..af968768e2 100644 --- a/internal/build/cmd/generate/commands/gentests/generator.go +++ b/internal/build/cmd/generate/commands/gentests/generator.go @@ -650,7 +650,7 @@ func (g *Generator) genXPackSetup() { if v.Read.Metadata.Reserved { continue } - es.Security.DeletePrivileges(k, "_all") + es.Security.DeletePrivileges([]string{"_all"}, k) } } } From 87f71b5c2e906af86cb434c42d4ea7b7654586d5 Mon Sep 17 00:00:00 2001 From: Matt Devy Date: Wed, 26 Nov 2025 22:35:56 +0000 Subject: [PATCH 8/9] chore: expand skip list with additional test cases for TDigest and downsample scenarios --- .../cmd/generate/commands/gentests/skips.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/internal/build/cmd/generate/commands/gentests/skips.go b/internal/build/cmd/generate/commands/gentests/skips.go index 85795cb9cf..3fe9b0b572 100644 --- a/internal/build/cmd/generate/commands/gentests/skips.go +++ b/internal/build/cmd/generate/commands/gentests/skips.go @@ -688,4 +688,23 @@ rank_vectors/rank_vectors_synthetic_vectors.yml: - "include synthetic vectors" - "Bulk partial update with synthetic vectors" - "Partial update with synthetic vectors" + +# TDigest synthetic source failures +analytics/t_digest_fieldtype.yml: + - TDigest with synthetic source + - TDigest with synthetic source and explicit summary fields + - histogram with synthetic source and ignore_malformed + +# Downsample number format and type assertion failures +downsample-with-security/basic.yml: + - Downsample index + +downsample/basic.yml: + - Downsample a downsampled index + +downsample/date_histogram.yml: + - Date histogram aggregation on time series index and rollup indices + +downsample/settings.yml: + - Downsample datastream with tier preference ` From 6f3012075e0b8c4f0ee91f95b7697ae8f7d0c247 Mon Sep 17 00:00:00 2001 From: Matt Devy Date: Wed, 26 Nov 2025 22:48:12 +0000 Subject: [PATCH 9/9] chore: update Elasticsearch and stack versions to 9.3.0-SNAPSHOT --- .ci/test-matrix.yml | 2 +- .github/workflows/test-api.yml | 4 ++-- .github/workflows/test-integration.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml index a731a2fa64..b565d34e24 100644 --- a/.ci/test-matrix.yml +++ b/.ci/test-matrix.yml @@ -1,7 +1,7 @@ --- STACK_VERSION: - - 8.10.0-SNAPSHOT + - 9.3.0-SNAPSHOT GO_VERSION: - 1-alpine diff --git a/.github/workflows/test-api.yml b/.github/workflows/test-api.yml index 613d3e513f..bef7739754 100644 --- a/.github/workflows/test-api.yml +++ b/.github/workflows/test-api.yml @@ -11,7 +11,7 @@ jobs: test-free: name: Free env: - ELASTICSEARCH_VERSION: elasticsearch:9.1.0-SNAPSHOT + ELASTICSEARCH_VERSION: elasticsearch:9.3.0-SNAPSHOT ELASTICSEARCH_URL: http://localhost:9200 runs-on: ubuntu-latest steps: @@ -43,7 +43,7 @@ jobs: test-platinum: name: Platinum env: - ELASTICSEARCH_VERSION: elasticsearch:9.1.0-SNAPSHOT + ELASTICSEARCH_VERSION: elasticsearch:9.3.0-SNAPSHOT ELASTICSEARCH_URL: https://elastic:elastic@localhost:9200 runs-on: ubuntu-latest steps: diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 36ecaff9ed..5a9b16fa22 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -17,7 +17,7 @@ on: env: GITHUB_ACTIONS: true - ELASTICSEARCH_VERSION: elasticsearch:8.3.0-SNAPSHOT + ELASTICSEARCH_VERSION: elasticsearch:9.3.0-SNAPSHOT jobs: test-integration: